/* Variables - Mantener consistencia con el sistema existente */
:root {
    --primary: #135bec;
    --primary-light: rgba(19, 91, 236, 0.1);
    --primary-dark: #0d4ac4;
    --bg-light: #f6f6f8;
    --bg-dark: #101622;
    --surface-light: #ffffff;
    --surface-dark: #1a1f2e;
    --text-light: #0d121b;
    --text-dark: #f8f9fc;
    --text-muted-light: #4c669a;
    --text-muted-dark: #a0b3d7;
    --border-light: #e2e8f0;
    --border-dark: #334155;
    --success: #28A745;
    --success-light: rgba(40, 167, 69, 0.1);
    --warning: #FFC107;
    --warning-light: rgba(255, 193, 7, 0.1);
    --danger: #DC3545;
    --danger-light: rgba(220, 53, 69, 0.1);
    --info: #17a2b8;
    --info-light: rgba(23, 162, 184, 0.1);
    --resting: #6f42c1;
    --resting-light: rgba(111, 66, 193, 0.1);
    --vacation: #6c757d;
    --vacation-light: rgba(108, 117, 125, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-light);
    transition: background-color 0.3s, color 0.3s;
}

body.dark {
    background-color: var(--bg-dark);
    color: var(--text-dark);
}

/* Container Layout */
.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar - Manteniendo consistencia */
.sidebar {
    width: 256px;
    background-color: var(--surface-light);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

body.dark .sidebar {
    background-color: var(--surface-dark);
    border-color: var(--border-dark);
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background-color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.logo-icon svg {
    width: 24px;
    height: 24px;
}

.logo-text h1 {
    font-size: 1rem;
    font-weight: 700;
}

.logo-text p {
    font-size: 0.875rem;
    color: var(--text-muted-light);
}

body.dark .logo-text p {
    color: var(--text-muted-dark);
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--text-muted-light);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

body.dark .nav-item {
    color: var(--text-muted-dark);
}

.nav-item:hover {
    background-color: var(--primary-light);
}

.nav-item.active {
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.nav-icon {
    font-size: 1.25rem;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* Page Header */
.page-header {
    background-color: var(--surface-light);
    border-bottom: 1px solid var(--border-light);
    padding: 2rem;
}

body.dark .page-header {
    background-color: var(--surface-dark);
    border-color: var(--border-dark);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    flex-wrap: wrap;
}

.header-text h1 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.header-text p {
    font-size: 1rem;
    color: var(--text-muted-light);
}

body.dark .header-text p {
    color: var(--text-muted-dark);
}

/* Buttons */
.btn-primary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(19, 91, 236, 0.3);
}

.btn-secondary {
    padding: 0.625rem 1.5rem;
    background-color: var(--border-light);
    color: var(--text-light);
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

body.dark .btn-secondary {
    background-color: var(--border-dark);
    color: var(--text-dark);
}

.btn-secondary:hover {
    background-color: var(--text-muted-light);
    color: white;
}

.btn-danger {
    padding: 0.625rem 1.5rem;
    background-color: var(--danger-light);
    color: var(--danger);
    border: 1px solid var(--danger);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger:hover {
    background-color: var(--danger);
    color: white;
}

.btn-icon {
    font-size: 1rem;
}

/* Stats Overview */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
}

.stat-card {
    background-color: var(--surface-light);
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.2s;
}

body.dark .stat-card {
    background-color: var(--surface-dark);
    border-color: var(--border-dark);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.stat-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted-light);
}

body.dark .stat-title {
    color: var(--text-muted-dark);
}

.stat-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 700;
}

/* Filters Section */
.filters-section {
    padding: 0 2rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-container {
    flex: 1;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 1rem;
    width: 1.25rem;
    height: 1.25rem;
    color: var(--text-muted-light);
}

body.dark .search-icon {
    color: var(--text-muted-dark);
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    background-color: var(--surface-light);
    color: var(--text-light);
    font-size: 0.875rem;
    outline: none;
    transition: all 0.2s;
}

body.dark .search-box input {
    border-color: var(--border-dark);
    background-color: var(--surface-dark);
    color: var(--text-dark);
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-dropdown {
    position: relative;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    background-color: var(--surface-light);
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

body.dark .filter-btn {
    border-color: var(--border-dark);
    background-color: var(--surface-dark);
    color: var(--text-dark);
}

.filter-btn:hover {
    background-color: var(--bg-light);
}

body.dark .filter-btn:hover {
    background-color: rgba(30, 41, 59, 0.5);
}

.filter-btn.active {
    border-color: var(--primary);
    background-color: var(--primary-light);
    color: var(--primary);
}

.dropdown-icon {
    font-size: 0.75rem;
    transition: transform 0.2s;
}

.filter-btn.open .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    min-width: 200px;
    background-color: var(--surface-light);
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    display: none;
    flex-direction: column;
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
}

body.dark .dropdown-menu {
    background-color: var(--surface-dark);
    border-color: var(--border-dark);
}

.dropdown-menu.show {
    display: flex;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    text-align: left;
    font-size: 0.875rem;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
}

body.dark .dropdown-item {
    color: var(--text-dark);
}

.dropdown-item:hover {
    background-color: var(--bg-light);
}

body.dark .dropdown-item:hover {
    background-color: rgba(30, 41, 59, 0.5);
}

.dropdown-item.active {
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.clear-filters-btn {
    padding: 0.75rem 1rem;
    border: 1px solid var(--danger);
    border-radius: 0.5rem;
    background-color: transparent;
    color: var(--danger);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.clear-filters-btn:hover {
    background-color: var(--danger-light);
}

/* Active Filters */
.active-filters {
    padding: 0 2rem 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    min-height: 2rem;
}

.filter-tag {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background-color: var(--primary-light);
    color: var(--primary);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.filter-tag-remove {
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1;
}

/* View Toggle */
.view-toggle {
    display: flex;
    gap: 1rem;
    padding: 0 2rem 1.5rem;
}

.view-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    background-color: var(--surface-light);
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

body.dark .view-toggle-btn {
    border-color: var(--border-dark);
    background-color: var(--surface-dark);
    color: var(--text-dark);
}

.view-toggle-btn:hover {
    background-color: var(--bg-light);
}

.view-toggle-btn.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Crew Section */
.crew-section {
    padding: 0 2rem 2rem;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.results-info {
    font-size: 0.875rem;
    color: var(--text-muted-light);
}

body.dark .results-info {
    color: var(--text-muted-dark);
}

.view-controls {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid var(--border-light);
    border-radius: 0.375rem;
    background-color: var(--surface-light);
    cursor: pointer;
    transition: all 0.2s;
}

body.dark .view-btn {
    border-color: var(--border-dark);
    background-color: var(--surface-dark);
}

.view-btn:hover {
    background-color: var(--bg-light);
}

.view-btn.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Crew Grid */
.crew-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.crew-card {
    background-color: var(--surface-light);
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.2s;
    cursor: pointer;
}

body.dark .crew-card {
    background-color: var(--surface-dark);
    border-color: var(--border-dark);
}

.crew-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.crew-card-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--border-light);
}

body.dark .crew-card-header {
    border-color: var(--border-dark);
}

.crew-avatar {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
}

.crew-info h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.crew-role {
    font-size: 0.875rem;
    color: var(--text-muted-light);
    margin-bottom: 0.25rem;
}

body.dark .crew-role {
    color: var(--text-muted-dark);
}

.crew-card-body {
    padding: 1.5rem;
}

.crew-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-label {
    font-size: 0.75rem;
    color: var(--text-muted-light);
}

body.dark .detail-label {
    color: var(--text-muted-dark);
}

.detail-value {
    font-size: 0.875rem;
    font-weight: 600;
}

.crew-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.crew-status.available {
    background-color: var(--success-light);
}

.crew-status.assigned {
    background-color: var(--danger-light);
}

.crew-status.resting {
    background-color: var(--resting-light);
}

.crew-status.vacation {
    background-color: var(--vacation-light);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
}

.status-dot.available {
    background-color: var(--success);
}

.status-dot.assigned {
    background-color: var(--danger);
}

.status-dot.resting {
    background-color: var(--resting);
}

.status-dot.vacation {
    background-color: var(--vacation);
}

.status-text {
    font-size: 0.875rem;
    font-weight: 600;
}

.status-text.available {
    color: var(--success);
}

.status-text.assigned {
    color: var(--danger);
}

.status-text.resting {
    color: var(--resting);
}

.status-text.vacation {
    color: var(--vacation);
}

.next-flight {
    font-size: 0.75rem;
    color: var(--text-muted-light);
}

.crew-card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

body.dark .crew-card-footer {
    border-color: var(--border-dark);
}

.card-action-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.card-action-btn.view {
    background-color: var(--primary-light);
    color: var(--primary);
}

.card-action-btn.view:hover {
    background-color: var(--primary);
    color: white;
}

.card-action-btn.edit {
    background-color: var(--warning-light);
    color: var(--warning);
}

.card-action-btn.edit:hover {
    background-color: var(--warning);
    color: white;
}

/* Crew List View */
.crew-list {
    background-color: var(--surface-light);
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    overflow: hidden;
    margin-bottom: 2rem;
}

body.dark .crew-list {
    background-color: var(--surface-dark);
    border-color: var(--border-dark);
}

.list-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr 1fr 1fr 1.5fr 1fr;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background-color: var(--bg-light);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted-light);
}

body.dark .list-header {
    background-color: rgba(30, 41, 59, 0.5);
    color: var(--text-muted-dark);
}

.list-body {
    max-height: 400px;
    overflow-y: auto;
}

.list-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr 1fr 1fr 1.5fr 1fr;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-light);
    transition: background-color 0.2s;
}

body.dark .list-row {
    border-color: var(--border-dark);
}

.list-row:hover {
    background-color: var(--bg-light);
}

body.dark .list-row:hover {
    background-color: rgba(30, 41, 59, 0.3);
}

.list-column {
    display: flex;
    align-items: center;
}

.crew-list-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.list-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
}

.list-names h4 {
    font-weight: 600;
    margin-bottom: 0.125rem;
}

.list-names p {
    font-size: 0.75rem;
    color: var(--text-muted-light);
}

body.dark .list-names p {
    color: var(--text-muted-dark);
}

.list-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary);
    font-size: 1.25rem;
    transition: all 0.2s;
}

.list-action-btn:hover {
    opacity: 0.7;
    transform: scale(1.1);
}

/* Schedule View */
.schedule-view {
    background-color: var(--surface-light);
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    overflow: hidden;
    margin-bottom: 2rem;
}

body.dark .schedule-view {
    background-color: var(--surface-dark);
    border-color: var(--border-dark);
}

.schedule-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

body.dark .schedule-header {
    border-color: var(--border-dark);
}

.schedule-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.schedule-nav-btn {
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid var(--border-light);
    border-radius: 0.375rem;
    background-color: var(--surface-light);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.dark .schedule-nav-btn {
    border-color: var(--border-dark);
    background-color: var(--surface-dark);
}

.schedule-nav-btn:hover {
    background-color: var(--bg-light);
}

.schedule-title {
    font-size: 1.125rem;
    font-weight: 600;
}

.schedule-legend {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted-light);
}

body.dark .legend-item {
    color: var(--text-muted-dark);
}

.legend-color {
    width: 1rem;
    height: 1rem;
    border-radius: 0.25rem;
}

.legend-color.available {
    background-color: var(--success);
}

.legend-color.assigned {
    background-color: var(--primary);
}

.legend-color.resting {
    background-color: var(--resting);
}

.legend-color.vacation {
    background-color: var(--vacation);
}

.schedule-table {
    padding: 1.5rem;
    overflow-x: auto;
}

.schedule-grid {
    display: grid;
    grid-template-columns: auto repeat(7, 1fr);
    gap: 1px;
    background-color: var(--border-light);
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    overflow: hidden;
    min-width: 800px;
}

body.dark .schedule-grid {
    background-color: var(--border-dark);
    border-color: var(--border-dark);
}

.schedule-header-cell {
    background-color: var(--bg-light);
    padding: 1rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-align: center;
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.dark .schedule-header-cell {
    background-color: rgba(30, 41, 59, 0.5);
}

.schedule-day-header {
    background-color: var(--bg-light);
    padding: 1rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-align: center;
}

body.dark .schedule-day-header {
    background-color: rgba(30, 41, 59, 0.5);
}

.schedule-cell {
    background-color: var(--surface-light);
    padding: 1rem;
    min-height: 4rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    cursor: pointer;
    transition: all 0.2s;
}

body.dark .schedule-cell {
    background-color: var(--surface-dark);
}

.schedule-cell:hover {
    background-color: var(--bg-light);
}

body.dark .schedule-cell:hover {
    background-color: rgba(30, 41, 59, 0.3);
}

.schedule-cell.available {
    background-color: var(--success-light);
}

.schedule-cell.assigned {
    background-color: var(--primary-light);
}

.schedule-cell.resting {
    background-color: var(--resting-light);
}

.schedule-cell.vacation {
    background-color: var(--vacation-light);
}

.schedule-flight {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    background-color: var(--primary);
    color: white;
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.schedule-time {
    font-size: 0.7rem;
    color: var(--text-muted-light);
}

body.dark .schedule-time {
    color: var(--text-muted-dark);
}

/* Form Tabs */
.form-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 0.5rem;
}

body.dark .form-tabs {
    border-color: var(--border-dark);
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    background: none;
    color: var(--text-muted-light);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}

body.dark .tab-btn {
    color: var(--text-muted-dark);
}

.tab-btn:hover {
    color: var(--primary);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    font-weight: 600;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

body.dark .form-group label {
    color: var(--text-dark);
}

.required {
    color: var(--danger);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    background-color: var(--bg-light);
    color: var(--text-light);
    font-size: 0.875rem;
    font-family: inherit;
    transition: all 0.2s;
}

body.dark .form-group input,
body.dark .form-group select,
body.dark .form-group textarea {
    border-color: var(--border-dark);
    background-color: #1e293b;
    color: var(--text-dark);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.multi-select {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

body.dark .checkbox-label {
    color: var(--text-dark);
}

.error-message {
    font-size: 0.75rem;
    color: var(--danger);
    margin-top: 0.25rem;
    min-height: 1rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: var(--surface-light);
    border-radius: 0.75rem;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

body.dark .modal-content {
    background-color: var(--surface-dark);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body.dark .modal-header {
    border-color: var(--border-dark);
}

.modal-close {
    font-size: 1.5rem;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-muted-light);
}

body.dark .modal-close {
    color: var(--text-muted-dark);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

body.dark .modal-footer {
    border-color: var(--border-dark);
}

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
}

.loading-overlay.show {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay p {
    color: white;
    font-size: 1rem;
    font-weight: 500;
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }

    .header-content {
        flex-direction: column;
    }

    .stats-overview {
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-buttons {
        flex-direction: column;
    }

    .view-toggle {
        flex-direction: column;
    }

    .schedule-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .crew-grid {
        grid-template-columns: 1fr;
    }

    .list-header,
    .list-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 1rem;
    }

    .list-column {
        justify-content: space-between;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-tabs {
        flex-direction: column;
    }
}