/* Dashboard Styles */

/* Cabin Crew Specific Styles */
.cabin-crew-details {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.cabin-crew-details h4 {
    margin: 0 0 15px 0;
    color: #667eea;
    font-size: 1.1rem;
    font-weight: 600;
}

#cabinCrewFields {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

#cabinCrewFields h4 {
    margin: 0 0 15px 0;
    color: #667eea;
    font-size: 1.1rem;
    font-weight: 600;
}

.checkbox-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: normal;
    margin-bottom: 0;
}

.checkbox-group input[type="checkbox"] {
    margin: 0;
}

/* Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    background-color: #f5f7fa;
}

.sidebar {
    width: 250px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.main-content {
    flex: 1;
    margin-left: 250px;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header h1 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.user-role {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin: 0;
}

/* Sidebar Navigation */
.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.sidebar-header p {
    margin: 0.5rem 0 0 0;
    opacity: 0.8;
    font-size: 0.9rem;
}

.nav-menu {
    padding: 1rem 0;
}

.nav-item {
    display: block;
    padding: 1rem 1.5rem;
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 1rem;
}

.nav-item:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    padding-left: 2rem;
}

.nav-item.active {
    background: rgba(255,255,255,0.2);
    color: white;
    border-right: 3px solid white;
}

.nav-item i {
    margin-right: 0.75rem;
    width: 20px;
}

/* Content Area */
.content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.content-view {
    display: none;
}

.content-view.active {
    display: block;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

/* Cards Grid Layout */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    padding: 0.5rem;
}

/* Flight Cards Specific Styles */
.flight-card {
    position: relative;
    overflow: hidden;
}

.flight-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.flight-card .card-header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.flight-card .flight-number {
    margin: 0;
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.flight-card .flight-route {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
    font-size: 1rem;
    color: #495057;
}

.flight-card .departure,
.flight-card .arrival {
    font-weight: 600;
    color: #667eea;
}

.flight-card .route-arrow {
    color: #6c757d;
    font-size: 1.2rem;
}

.flight-card .flight-times {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.flight-card .time-info {
    text-align: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.flight-card .time-label {
    display: block;
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.flight-card .time-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

.flight-card .operation-days {
    padding: 0.75rem;
    background: #e3f2fd;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.flight-card .days-label {
    font-size: 0.9rem;
    color: #1976d2;
    font-weight: 500;
}

.flight-card .days-value {
    font-weight: 600;
    color: #0d47a1;
    margin-left: 0.5rem;
}

.flight-card .card-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.card h3 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card p {
    margin: 0;
    color: #7f8c8d;
    line-height: 1.6;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.card-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Profile Status */
.profile-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.profile-status.complete {
    background: #d4edda;
    border: 1px solid #c3e6cb;
}

.profile-status.incomplete {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
}

.profile-status.setup-required {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
}

.profile-status.offline {
    background: #e2e3e5;
    border: 1px solid #d6d8db;
}

.status-icon {
    font-size: 1.5rem;
}

.status-info {
    flex: 1;
}

.status-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.status-description {
    font-size: 0.9rem;
    color: #6c757d;
}

/* Schedule Cards */
.schedule-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-left: 4px solid #667eea;
}

.schedule-item h4 {
    margin: 0 0 0.5rem 0;
}

/* Authorization Cards */
.authorizations-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 0 0.5rem;
}

.authorizations-header h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 600;
}

.authorizations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1.5rem;
    padding: 0.5rem;
}

.authorization-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
    position: relative;
    overflow: hidden;
}

.authorization-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.authorization-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--status-color, #667eea);
}

.authorization-card.pending::before {
    --status-color: #f39c12;
}

.authorization-card.approved::before {
    --status-color: #27ae60;
}

.authorization-card.rejected::before {
    --status-color: #e74c3c;
}

.auth-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.auth-request-id {
    font-size: 0.9rem;
    font-weight: 600;
    color: #667eea;
    background: #f8f9ff;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    border: 1px solid #e6f0ff;
}

.auth-priority {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.auth-priority.high {
    background: #fee;
    color: #e74c3c;
    border: 1px solid #fdd;
}

.auth-priority.medium {
    background: #fff8e1;
    color: #f39c12;
    border: 1px solid #ffe0b2;
}

.auth-priority.low {
    background: #e8f5e8;
    color: #27ae60;
    border: 1px solid #c8e6c9;
}

.auth-requestor {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.auth-requestor-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
}

.auth-requestor-info h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 1rem;
    font-weight: 600;
}

.auth-requestor-info p {
    margin: 0;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.auth-rule-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.auth-rule-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.auth-rule-description {
    color: #7f8c8d;
    font-size: 0.9rem;
    line-height: 1.4;
}

.auth-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.auth-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.auth-status.pending {
    color: #f39c12;
}

.auth-status.approved {
    color: #27ae60;
}

.auth-status.rejected {
    color: #e74c3c;
}

.auth-status-icon {
    font-size: 1.1rem;
}

.auth-submitted-date {
    color: #7f8c8d;
    font-size: 0.85rem;
}

.auth-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.auth-actions .btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-actions .btn-approve {
    background: #27ae60;
    color: white;
}

.auth-actions .btn-approve:hover {
    background: #229954;
}

.auth-actions .btn-reject {
    background: #e74c3c;
    color: white;
}

.auth-actions .btn-reject:hover {
    background: #c0392b;
}

.auth-actions .btn-view {
    background: #667eea;
    color: white;
}

.auth-actions .btn-view:hover {
    background: #5a6fd8;
}

.auth-actions .btn-secondary {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.auth-actions .btn-secondary:hover {
    background: #e9ecef;
    color: #495057;
}

.schedule-item p {
    margin: 0;
    font-size: 0.9rem;
    color: #6c757d;
}

.schedule-time {
    font-weight: 600;
    color: #495057;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #e9ecef;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #6c757d;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.action-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.action-btn.secondary {
    background: #6c757d;
}

.action-btn.secondary:hover {
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.4);
}

/* User Management Cards */
.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.user-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.user-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.user-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.user-avatar-card {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.5rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.user-info-card {
    flex: 1;
    min-width: 0;
}

.user-name-card {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 0.25rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email-card {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-card-body {
    margin-bottom: 1.5rem;
}

.user-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f8f9fa;
}

.user-detail-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.user-detail-label {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-detail-value {
    font-size: 0.9rem;
    color: #495057;
    font-weight: 500;
}

.user-role-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: capitalize;
}

.user-role-badge.cabin-crew {
    background: #e3f2fd;
    color: #1976d2;
}

.user-role-badge.flight-crew {
    background: #f3e5f5;
    color: #7b1fa2;
}

.user-role-badge.crew-scheduling {
    background: #e8f5e8;
    color: #388e3c;
}

.user-role-badge.administrator {
    background: #fff3e0;
    color: #f57c00;
}

.user-role-badge.rule-limitation {
    background: #fce4ec;
    color: #c2185b;
}

.user-status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: capitalize;
}

.user-status-badge.active {
    background: #d4edda;
    color: #155724;
}

.user-status-badge.inactive {
    background: #f8d7da;
    color: #721c24;
}

.user-status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.user-card-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.action-btn-card {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
}

.action-btn-card:hover {
    transform: translateY(-2px);
}

.action-btn-card.view {
    background: linear-gradient(135deg, #4fc3f7 0%, #29b6f6 100%);
    color: white;
}

.action-btn-card.view:hover {
    box-shadow: 0 4px 15px rgba(79, 195, 247, 0.4);
}

.action-btn-card.edit {
    background: linear-gradient(135deg, #81c784 0%, #66bb6a 100%);
    color: white;
}

.action-btn-card.edit:hover {
    box-shadow: 0 4px 15px rgba(129, 199, 132, 0.4);
}

.action-btn-card.delete {
    background: linear-gradient(135deg, #e57373 0%, #ef5350 100%);
    color: white;
}

.action-btn-card.delete:hover {
    box-shadow: 0 4px 15px rgba(229, 115, 115, 0.4);
}

.empty-state-card {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state-card .empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-card h3 {
    margin: 0 0 0.5rem 0;
    color: #495057;
}

.empty-state-card p {
    margin: 0;
    font-size: 0.9rem;
}

/* Profile Form */
.profile-form-container {
    max-width: 800px;
    margin: 0 auto;
}

.profile-form {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.form-description {
    color: #6c757d;
    margin-bottom: 2rem;
    font-size: 1rem;
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.form-section h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input:invalid {
    border-color: #dc3545;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.4);
}

.no-data-message {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

.no-data-message h3 {
    color: #333;
    margin-bottom: 10px;
}

.no-data-message p {
    margin-bottom: 20px;
    color: #666;
}

.empty-state-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Icon Buttons */
.icon-btn {
    background: #ffffff;
    border: 2px solid #000000;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0 2px;
    color: #000000;
}

.icon-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

.icon-btn.edit-btn {
    background: #ffffff;
    color: #000000;
    border-color: #000000;
}

.icon-btn.edit-btn:hover {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

.icon-btn.view-btn {
    background: #ffffff;
    color: #000000;
    border-color: #000000;
}

.icon-btn.view-btn:hover {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

.icon-btn.delete-btn {
    background: #ffffff;
    color: #000000;
    border-color: #000000;
}

.icon-btn.delete-btn:hover {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

.icon-btn i {
    font-size: 14px;
    font-weight: bold;
}

/* Rule Cards Grid */
.rules-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.rule-card {
    background: white;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.rule-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.rule-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #e9ecef;
}

.rule-id {
    font-weight: 600;
    color: #667eea;
    font-size: 0.9rem;
    background: rgba(102, 126, 234, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
}

.rule-actions {
    display: flex;
    gap: 4px;
}

.rule-card-body {
    padding: 1.25rem;
}

.rule-title {
    margin: 0 0 0.75rem 0;
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
}

.rule-description {
    margin: 0 0 1rem 0;
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rule-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.rule-category {
    background: #e9ecef;
    color: #495057;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.rule-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.rule-status.active {
    background: #d4edda;
    color: #155724;
}

.rule-status.inactive {
    background: #f8d7da;
    color: #721c24;
}

.rule-status.pending {
    background: #fff3cd;
    color: #856404;
}

.rule-footer {
    padding-top: 0.75rem;
    border-top: 1px solid #f1f3f4;
}

.last-modified {
    font-size: 0.8rem;
    color: #6c757d;
    font-style: italic;
}

/* Responsive Design for Cards */
@media (max-width: 768px) {
    .rules-card-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .rule-card-header {
        padding: 0.75rem 1rem;
    }
    
    .rule-card-body {
        padding: 1rem;
    }
    
    .rule-meta {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Permission Cards Grid */
.permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.permission-card {
    background: white;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.permission-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.permission-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #e9ecef;
}

.permission-card h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.permission-card .card-actions {
    display: flex;
    gap: 4px;
}

.permission-card .btn-edit,
.permission-card .btn-delete {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.permission-card .btn-edit {
    background: #ffc107;
    color: #212529;
}

.permission-card .btn-edit:hover {
    background: #e0a800;
    transform: translateY(-2px);
}

.permission-card .btn-delete {
    background: #dc3545;
    color: white;
}

.permission-card .btn-delete:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.permission-description {
    padding: 1.25rem;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Role Permission Cards Grid */
.role-permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.role-permission-card {
    background: white;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.role-permission-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.role-permission-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #e8f5e8 0%, #d4edda 100%);
    border-bottom: 1px solid #c3e6cb;
}

.role-permission-card h3 {
    margin: 0;
    color: #155724;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.role-permission-card .card-actions {
    display: flex;
    gap: 4px;
}

.role-permission-card .btn-icon {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.8);
    color: #495057;
}

.role-permission-card .btn-icon:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.role-permission-card .card-content {
    padding: 1.25rem;
}

.role-permission-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.role-permission-info .info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f8f9fa;
}

.role-permission-info .info-item:last-child {
    border-bottom: none;
}

.role-permission-info .label {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.role-permission-info .value {
    color: #6c757d;
    font-size: 0.9rem;
    text-align: right;
}

.permission-description {
    line-height: 1.5;
    min-height: 60px;
    display: flex;
    align-items: center;
}

/* Role Cards Grid (similar to permission cards) */
.roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.role-card {
    background: white;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.role-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.role-card .role-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #e9ecef;
}

.role-card h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
}

.role-card .role-actions {
    display: flex;
    gap: 4px;
}

.role-card .role-body {
    padding: 1.25rem;
}

.role-card .role-description {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.role-card .role-meta {
    font-size: 0.8rem;
    color: #6c757d;
    font-style: italic;
}

/* No data state */
.no-data {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
    grid-column: 1 / -1;
}

.no-data i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-data p {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
}

/* Responsive Design for Permission Cards */
@media (max-width: 768px) {
    .permissions-grid,
    .roles-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .permission-card .card-header,
    .role-card .role-header {
        padding: 0.75rem 1rem;
    }
    
    .permission-description,
    .role-card .role-body {
        padding: 1rem;
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #495057;
}

.profile-summary {
    margin-bottom: 1.5rem;
}

.profile-field {
    display: flex;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f8f9fa;
}

.profile-field:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.profile-field label {
    font-weight: 600;
    color: #495057;
    min-width: 150px;
    margin-right: 1rem;
}

.profile-field span {
    color: #6c757d;
    flex: 1;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

/* Network Status */
.network-status {
    background: #f39c12;
    color: white;
    padding: 0.5rem 1rem;
    text-align: center;
    font-size: 0.9rem;
    position: sticky;
    top: 0;
    z-index: 101;
}

.network-status.hidden {
    display: none;
}

/* Loading Spinner */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Messages */
.message-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    max-width: 400px;
}

.message {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    animation: slideIn 0.3s ease;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .content {
        padding: 1rem;
    }
    
    .header {
        padding: 1rem;
    }
    
    .header h1 {
        font-size: 1.2rem;
    }
    
    .user-info {
        gap: 0.5rem;
    }
    
    .user-details {
        display: none;
    }
    
    .quick-actions {
        flex-direction: column;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-field {
        flex-direction: column;
    }
    
    .profile-field label {
        min-width: auto;
        margin-right: 0;
        margin-bottom: 0.25rem;
    }
}

/* User Management Styles */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    margin: 0 0 0.5rem 0;
    color: #495057;
}

.empty-state p {
    margin: 0;
    font-size: 0.9rem;
}

/* Violation Cards */
.violations-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.violations-header h3 {
    margin: 0;
    color: #2c3e50;
}

.violations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.violation-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #e74c3c;
    transition: all 0.3s ease;
    position: relative;
}

.violation-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.violation-card.critical {
    border-left-color: #c0392b;
    background: linear-gradient(135deg, #fff 0%, #fdf2f2 100%);
}

.violation-card.high {
    border-left-color: #e74c3c;
}

.violation-card.medium {
    border-left-color: #f39c12;
}

.violation-card.low {
    border-left-color: #f1c40f;
}

.violation-card.resolved {
    border-left-color: #27ae60;
    opacity: 0.8;
}

.violation-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.violation-id {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.violation-severity {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.violation-severity.critical {
    background-color: #fdf2f2;
    color: #c0392b;
    border: 1px solid #e74c3c;
}

.violation-severity.high {
    background-color: #fee;
    color: #e74c3c;
}

.violation-severity.medium {
    background-color: #fff3cd;
    color: #f39c12;
}

.violation-severity.low {
    background-color: #fff9c4;
    color: #f1c40f;
}

.violation-employee {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.violation-employee-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    margin-right: 12px;
}

.violation-employee-info h4 {
    margin: 0 0 4px 0;
    color: #2c3e50;
    font-size: 16px;
}

.violation-employee-info p {
    margin: 0;
    color: #7f8c8d;
    font-size: 14px;
}

.violation-rule-info {
    margin-bottom: 15px;
}

.violation-rule-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 15px;
}

.violation-rule-description {
    color: #7f8c8d;
    font-size: 14px;
    line-height: 1.4;
}

.violation-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-top: 15px;
    border-top: 1px solid #ecf0f1;
}

.violation-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 14px;
}

.violation-status.open {
    color: #e74c3c;
}

.violation-status.investigating {
    color: #f39c12;
}

.violation-status.resolved {
    color: #27ae60;
}

.violation-date {
    color: #7f8c8d;
    font-size: 13px;
}

.violation-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.violation-actions .btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 80px;
}

.violation-actions .btn:hover {
    transform: translateY(-1px);
}

.btn-resolve {
    background-color: #27ae60;
    color: white;
}

.btn-resolve:hover {
    background-color: #229954;
}

.btn-investigate {
    background-color: #f39c12;
    color: white;
}

.btn-investigate:hover {
    background-color: #e67e22;
}

.btn-view-violation {
    background-color: #3498db;
    color: white;
}

.btn-view-violation:hover {
    background-color: #2980b9;
}

.loading-indicator {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.loading-indicator i {
    font-size: 2rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.user-status {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.user-status.active {
    background-color: #d4edda;
    color: #155724;
}

.user-status.inactive {
    background-color: #f8d7da;
    color: #721c24;
}

.user-status.pending {
    background-color: #fff3cd;
    color: #856404;
}

.table-responsive {
    overflow-x: auto;
    margin-top: 1rem;
}

.table th {
    background-color: #f8f9fa;
    border-top: none;
    font-weight: 600;
    color: #495057;
}

.table td {
    vertical-align: middle;
}

.btn-group .btn {
    margin-right: 0.25rem;
}

.btn-group .btn:last-child {
    margin-right: 0;
}

/* Category Group Styles */
.category-group {
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.group-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.group-icon {
    font-size: 1.5rem;
    min-width: 2rem;
    text-align: center;
}

.group-title {
    flex: 1;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.group-count {
    background-color: rgba(255,255,255,0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
}

.group-categories {
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.category-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-item:hover {
    background-color: #e9ecef;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.category-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    min-width: 2rem;
    text-align: center;
}

.category-content {
    flex: 1;
}

.category-content h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
}

.category-content p {
    margin: 0;
    font-size: 0.875rem;
    color: #6c757d;
}

/* Optgroup styles for rule category dropdown */
select optgroup {
    font-weight: 600;
    font-size: 0.9rem;
    color: #495057;
    background-color: #f8f9fa;
    padding: 0.5rem 0;
    margin: 0.25rem 0;
}

select optgroup option {
    font-weight: 400;
    color: #6c757d;
    padding-left: 1rem;
    background-color: #ffffff;
}

select optgroup option:hover {
    background-color: #e9ecef;
    color: #495057;
}

/* Conditional form fields styling */
#scaleUnitGroup, #crewCompositionGroup {
    transition: all 0.3s ease;
    opacity: 1;
}

#scaleUnitGroup[style*="display: none"], 
#crewCompositionGroup[style*="display: none"] {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

#scaleUnit, #crewComposition {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

#scaleUnit:focus, #crewComposition:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

#crewComposition {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background-color: #fff;
    transition: border-color 0.3s ease;
}

#crewComposition:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Rule details view styling */
.rule-details p {
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.rule-details p:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .group-categories {
        grid-template-columns: 1fr;
    }
    
    .group-header {
        padding: 0.75rem 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .group-title {
        font-size: 1.1rem;
    }
    
    #scaleUnit, #crewComposition {
        padding: 0.625rem;
        font-size: 0.9rem;
    }
}

/* Pairing Pattern Roster Styles */
.pairing-controls {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-group label {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.method-selection {
    display: flex;
    gap: 1rem;
}

.method-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid #dee2e6;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #6c757d;
}

.method-btn:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.method-btn.active {
    border-color: #667eea;
    background: #667eea;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.method-interface {
    display: none;
    margin-top: 2rem;
}

.method-interface.active {
    display: block;
}

.manual-controls, .automatic-controls {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.manual-form, .automatic-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.flight-sequence-builder {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    background: #f8f9fa;
}

.sequence-list {
    min-height: 100px;
    margin-bottom: 1rem;
    padding: 0.5rem;
    border: 2px dashed #dee2e6;
    border-radius: 6px;
    background: white;
}

.sequence-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: #e3f2fd;
    border-radius: 6px;
    border-left: 4px solid #2196f3;
}

.sequence-item:last-child {
    margin-bottom: 0;
}

.flight-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.flight-number {
    font-weight: 600;
    color: #1976d2;
}

.flight-route {
    font-size: 0.85rem;
    color: #666;
}

.remove-flight {
    background: #ff5252;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    font-size: 0.8rem;
}

.remove-flight:hover {
    background: #d32f2f;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

.calendar-container {
    margin-top: 2rem;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.calendar-header h4 {
    margin: 0;
    color: #495057;
    font-size: 1.25rem;
}

.calendar-controls {
    display: flex;
    gap: 0.75rem;
}

.pairing-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.calendar-day {
    background: white;
    padding: 1rem;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.calendar-day-header {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
    text-align: center;
    background: #f8f9fa;
    padding: 0.5rem;
    margin: -1rem -1rem 0.5rem -1rem;
}

.calendar-day.other-month {
    background: #f8f9fa;
    color: #adb5bd;
}

.calendar-day.today {
    background: #e3f2fd;
    border: 2px solid #2196f3;
}

.pairing-item {
    background: #667eea;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pairing-item:hover {
    background: #5a67d8;
    transform: scale(1.05);
}

.pairing-item.cabin-crew {
    background: #48bb78;
}

.pairing-item.flight-crew {
    background: #ed8936;
}

.existing-patterns {
    margin-top: 2rem;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.existing-patterns h4 {
    margin: 0 0 1.5rem 0;
    color: #495057;
    font-size: 1.25rem;
}

.patterns-list {
    display: grid;
    gap: 1rem;
}

.pattern-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.pattern-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.pattern-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pattern-name {
    font-weight: 600;
    color: #495057;
    font-size: 1.1rem;
}

.pattern-details {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.pattern-actions {
    display: flex;
    gap: 0.5rem;
}

.pattern-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Responsive Design for Pairing Pattern Roster */
@media (max-width: 1024px) {
    .pairing-controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .method-selection {
        flex-direction: column;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .calendar-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .pairing-calendar {
        grid-template-columns: repeat(7, 1fr);
        font-size: 0.8rem;
    }
    
    .calendar-day {
        min-height: 80px;
        padding: 0.5rem;
    }
}

@media (max-width: 768px) {
    .pairing-controls {
        padding: 1rem;
    }
    
    .manual-controls, .automatic-controls {
        padding: 1rem;
    }
    
    .calendar-container {
        padding: 1rem;
    }
    
    .pairing-calendar {
        grid-template-columns: repeat(7, 1fr);
        gap: 0;
    }
    
    .calendar-day {
        min-height: 60px;
        padding: 0.25rem;
    }
    
    .calendar-day-header {
        font-size: 0.75rem;
        padding: 0.25rem;
    }
    
    .pairing-item {
        font-size: 0.65rem;
        padding: 0.125rem 0.25rem;
    }
    
    .pattern-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .pattern-details {
        flex-direction: column;
        gap: 0.5rem;
    }
}