/* Naval Deployment System - Period-Appropriate Styling */

/* CSS Variables for consistent theming */
:root {
    --royal-navy: #1e3a5f;
    --admiralty-gold: #d4af37;
    --sea-foam: #7fb069;
    --parchment: #f4f1e8;
    --ink-blue: #2c3e50;
    --victory-red: #8b0000;
    --anchor-silver: #c0c0c0;
    --ship-wood: #8b4513;
    
    --font-serif: 'Times New Roman', serif;
    --font-sans: 'Arial', sans-serif;
    
    --shadow-light: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 8px rgba(0,0,0,0.15);
    --shadow-heavy: 0 8px 16px rgba(0,0,0,0.25);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-serif);
    background: linear-gradient(135deg, var(--parchment) 0%, #ede7d3 100%);
    color: var(--ink-blue);
    min-height: 100vh;
    line-height: 1.6;
    background-attachment: fixed;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: bold;
    margin-bottom: 0.5em;
    color: var(--royal-navy);
}

h1 {
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

h2 {
    font-size: 2rem;
    border-bottom: 3px solid var(--admiralty-gold);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* Header Styles */
.admiralty-header {
    background: linear-gradient(135deg, var(--royal-navy) 0%, #2c5aa0 100%);
    color: white;
    padding: 2rem 0 0;
    box-shadow: var(--shadow-heavy);
    border-bottom: 4px solid var(--admiralty-gold);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding: 0 2rem;
}

.crown-insignia {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.5));
}

.admiralty-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.admiralty-motto {
    font-size: 1.1rem;
    color: var(--admiralty-gold);
    margin-bottom: 2rem;
    font-style: italic;
}

/* Navigation */
.admiralty-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    background: rgba(0,0,0,0.1);
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    font-weight: 500;
}

.nav-link:hover {
    background: rgba(255,255,255,0.1);
    border-bottom-color: var(--admiralty-gold);
}

.nav-link.active {
    background: rgba(255,255,255,0.15);
    border-bottom-color: var(--admiralty-gold);
}

.nav-icon {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

.nav-spacer {
    flex-grow: 1;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 1rem;
    color: white;
    font-size: 0.9rem;
}

.user-rank {
    background: var(--admiralty-gold);
    color: var(--royal-navy);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
}

.user-name {
    font-weight: 500;
}

.logout-link {
    color: var(--admiralty-gold) !important;
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: calc(100vh - 200px);
}

/* Page Headers */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: rgba(255,255,255,0.7);
    border-radius: 12px;
    border: 2px solid var(--admiralty-gold);
    box-shadow: var(--shadow-medium);
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-size: 2.5rem;
    color: var(--royal-navy);
    margin-bottom: 0.5rem;
}

.title-icon {
    font-size: 2rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--ink-blue);
    font-style: italic;
}

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

.dashboard-card {
    background: rgba(255,255,255,0.9);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-medium);
    border: 2px solid var(--admiralty-gold);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

/* Card Headers */
.card-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--admiralty-gold);
}

.card-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    color: var(--royal-navy);
}

.card-icon {
    font-size: 1.3rem;
}

.view-all-link {
    color: var(--royal-navy);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 2px solid var(--royal-navy);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.view-all-link:hover {
    background: var(--royal-navy);
    color: white;
}

/* Ship Cards */
.ships-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.ship-card {
    background: rgba(255,255,255,0.8);
    border-radius: 8px;
    padding: 1.5rem;
    border: 2px solid var(--admiralty-gold);
    position: relative;
    transition: all 0.3s ease;
}

.ship-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.ship-header {
    margin-bottom: 1rem;
}

.ship-name {
    font-size: 1.3rem;
    color: var(--royal-navy);
    margin-bottom: 0.3rem;
}

.ship-class {
    background: var(--admiralty-gold);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: bold;
}

.ship-details {
    margin-bottom: 1rem;
}

.ship-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.status-active .status-indicator {
    background: var(--sea-foam);
    box-shadow: 0 0 8px var(--sea-foam);
}

.status-ready .status-indicator {
    background: var(--admiralty-gold);
    box-shadow: 0 0 8px var(--admiralty-gold);
}

.status-maintenance .status-indicator {
    background: var(--victory-red);
    box-shadow: 0 0 8px var(--victory-red);
}

.ship-stats {
    display: flex;
    gap: 1rem;
    margin: 0.5rem 0;
}

.stat {
    font-size: 0.9rem;
    color: var(--ink-blue);
}

.ship-captain {
    font-style: italic;
    color: var(--royal-navy);
}

.ship-captain.vacant {
    color: #888;
}

.ship-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--royal-navy);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 2px solid var(--royal-navy);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.ship-link:hover {
    background: var(--royal-navy);
    color: white;
}

/* Personnel Styles */
.personnel-list {
    space-y: 1rem;
}

.personnel-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255,255,255,0.6);
    border-radius: 8px;
    border: 1px solid var(--admiralty-gold);
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.personnel-item:hover {
    background: rgba(255,255,255,0.9);
    transform: translateX(4px);
}

.personnel-rank .rank-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.8rem;
    text-align: center;
    min-width: 80px;
    display: inline-block;
}

.rank-Admiral {
    background: var(--victory-red);
    color: white;
}

.rank-Captain {
    background: var(--royal-navy);
    color: white;
}

.rank-Commander {
    background: var(--admiralty-gold);
    color: var(--royal-navy);
}

.rank-Lieutenant {
    background: var(--sea-foam);
    color: white;
}

.rank-Midshipman {
    background: var(--anchor-silver);
    color: var(--royal-navy);
}

.personnel-info {
    flex-grow: 1;
}

.personnel-name {
    font-size: 1.1rem;
    color: var(--royal-navy);
    margin-bottom: 0.2rem;
}

.personnel-number {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.2rem;
}

.personnel-assignment {
    font-size: 0.9rem;
    color: var(--ink-blue);
}

.personnel-assignment.unassigned {
    color: #888;
    font-style: italic;
}

.personnel-link {
    color: var(--royal-navy);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
}

/* Status Metrics */
.status-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.metric {
    text-align: center;
    padding: 1rem;
    background: rgba(255,255,255,0.7);
    border-radius: 8px;
    border: 2px solid var(--admiralty-gold);
}

.metric-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--royal-navy);
}

.metric-label {
    font-size: 0.9rem;
    color: var(--ink-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Activity Lists */
.recent-activity {
    margin-top: 1.5rem;
}

.activity-title {
    color: var(--royal-navy);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.activity-list {
    list-style: none;
}

.activity-item {
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    display: flex;
    gap: 1rem;
}

.activity-time {
    font-weight: bold;
    color: var(--royal-navy);
    min-width: 100px;
}

/* Naval Orders */
.orders-content {
    space-y: 1rem;
}

.order-item {
    background: rgba(255,255,255,0.8);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--admiralty-gold);
    margin-bottom: 1rem;
}

.order-item.priority-high {
    border-left-color: var(--victory-red);
    background: rgba(139,0,0,0.05);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.order-priority {
    font-weight: bold;
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: var(--victory-red);
    color: white;
}

.order-date {
    font-style: italic;
    color: #666;
}

.order-text {
    line-height: 1.6;
    color: var(--ink-blue);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: var(--royal-navy);
    color: white;
    border-color: var(--royal-navy);
}

.btn-primary:hover {
    background: transparent;
    color: var(--royal-navy);
}

.btn-secondary {
    background: transparent;
    color: var(--royal-navy);
    border-color: var(--royal-navy);
}

.btn-secondary:hover {
    background: var(--royal-navy);
    color: white;
}

/* Footer */
.admiralty-footer {
    background: var(--royal-navy);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
    border-top: 4px solid var(--admiralty-gold);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-text {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.footer-motto {
    color: var(--admiralty-gold);
    font-size: 1rem;
}

/* Maritime Decorations */
.maritime-decoration {
    position: fixed;
    font-size: 2rem;
    opacity: 0.1;
    pointer-events: none;
    z-index: -1;
}

.maritime-decoration.top-left {
    top: 20px;
    left: 20px;
}

.maritime-decoration.top-right {
    top: 20px;
    right: 20px;
}

.maritime-decoration.bottom-left {
    bottom: 20px;
    left: 20px;
}

.maritime-decoration.bottom-right {
    bottom: 20px;
    right: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .admiralty-nav {
        flex-wrap: wrap;
    }
    
    .nav-link {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .ships-grid {
        grid-template-columns: 1fr;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .admiralty-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

/* Detail Pages Additional Styles */
.ship-detail-container,
.personnel-detail-container {
    max-width: 1000px;
    margin: 0 auto;
}

.ship-header,
.personnel-header {
    background: rgba(255,255,255,0.9);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-medium);
    border: 2px solid var(--admiralty-gold);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ship-title,
.personnel-title {
    font-size: 2.2rem;
    color: var(--royal-navy);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ship-subtitle,
.personnel-subtitle {
    color: var(--ink-blue);
    font-style: italic;
    margin-top: 0.5rem;
}

.ship-detail-grid,
.personnel-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.detail-card {
    background: rgba(255,255,255,0.9);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    border: 2px solid var(--admiralty-gold);
}

.spec-table,
.info-table {
    display: grid;
    gap: 0.8rem;
}

.spec-row,
.info-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 0.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.spec-label,
.info-label {
    font-weight: bold;
    color: var(--royal-navy);
}

.spec-value,
.info-value {
    color: var(--ink-blue);
    text-align: right;
}

/* Actions Footer */
.ship-actions-footer,
.personnel-actions-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding: 1rem 0;
}

.action-buttons {
    display: flex;
    gap: 1rem;
}

/* Login Page Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    padding: 2rem;
}

.login-card {
    background: rgba(255,255,255,0.95);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    border: 3px solid var(--admiralty-gold);
    max-width: 500px;
    width: 100%;
    text-align: center;
}

.login-header {
    margin-bottom: 2rem;
}

.crown-insignia {
    font-size: 4rem;
    margin-bottom: 1rem;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
}

.login-title {
    font-size: 2rem;
    color: var(--royal-navy);
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--ink-blue);
    font-size: 1.1rem;
    font-style: italic;
}

.login-error {
    background: rgba(139,0,0,0.1);
    border: 2px solid var(--victory-red);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    color: var(--victory-red);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.login-form {
    text-align: left;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: bold;
    color: var(--royal-navy);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--admiralty-gold);
    border-radius: 6px;
    font-size: 1rem;
    font-family: var(--font-serif);
    background: rgba(255,255,255,0.9);
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: var(--royal-navy);
    box-shadow: 0 0 0 3px rgba(30,58,95,0.1);
}

.input-help {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.3rem;
    font-style: italic;
}

.login-button {
    width: 100%;
    background: var(--royal-navy);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.login-button:hover {
    background: #2c5aa0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.login-help {
    text-align: left;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(244,241,232,0.7);
    border-radius: 8px;
    border: 1px solid var(--admiralty-gold);
}

.help-title {
    color: var(--royal-navy);
    margin-bottom: 1rem;
    text-align: center;
    font-size: 1.1rem;
}

.test-accounts {
    display: grid;
    gap: 1rem;
}

.account-group {
    margin-bottom: 1rem;
}

.rank-title {
    color: var(--victory-red);
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.account-item {
    font-size: 0.9rem;
    color: var(--ink-blue);
    margin-left: 1rem;
    margin-bottom: 0.2rem;
}

.naval-orders {
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    border-top: 1px solid var(--admiralty-gold);
    padding-top: 1.5rem;
}

.orders-text {
    margin-bottom: 0.5rem;
}

.orders-signature {
    margin-top: 0.5rem;
    font-weight: bold;
}

/* Role-specific Dashboard Styles */
.admiralty-dashboard, .captain-dashboard, .officer-dashboard, .seaman-dashboard {
    max-width: 1400px;
    margin: 0 auto;
}

.command-header, .ship-command-header, .officer-header, .seaman-header {
    background: rgba(255,255,255,0.9);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-medium);
    border: 2px solid var(--admiralty-gold);
    text-align: center;
}

.command-title {
    font-size: 2.2rem;
    color: var(--royal-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.command-subtitle {
    color: var(--ink-blue);
    font-size: 1.2rem;
    font-style: italic;
    margin-bottom: 1rem;
}

.fleet-status-banner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.status-item {
    text-align: center;
    padding: 1rem;
    background: rgba(30,58,95,0.1);
    border-radius: 8px;
    border: 1px solid var(--royal-navy);
}

.status-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: var(--royal-navy);
}

.status-label {
    font-size: 0.9rem;
    color: var(--ink-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ship-status-banner {
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: bold;
}

.command-grid, .duty-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.command-card, .duty-card {
    background: rgba(255,255,255,0.9);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-medium);
    border: 2px solid var(--admiralty-gold);
}

.deployed-ship, .officer-item, .crew-member {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    background: rgba(244,241,232,0.7);
    border-radius: 6px;
    margin-bottom: 0.5rem;
    border: 1px solid var(--admiralty-gold);
}

.readiness-chart {
    margin-top: 1rem;
}

.readiness-bar {
    background: rgba(192,192,192,0.3);
    border-radius: 10px;
    height: 20px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.readiness-fill {
    background: linear-gradient(90deg, var(--sea-foam) 0%, var(--admiralty-gold) 100%);
    height: 100%;
    transition: width 0.3s ease;
}

.priority-high { color: var(--victory-red); }
.priority-medium { color: var(--admiralty-gold); }
.priority-low { color: var(--sea-foam); }

.duty-item, .order-item, .notice-item {
    padding: 1rem;
    border-left: 4px solid var(--admiralty-gold);
    background: rgba(244,241,232,0.7);
    border-radius: 6px;
    margin-bottom: 1rem;
}

.duty-item.urgent, .order-item.urgent, .notice-item.important {
    border-left-color: var(--victory-red);
    background: rgba(139,0,0,0.05);
}

.watch-schedule, .schedule-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.watch-slot, .watch-period {
    padding: 1rem;
    background: rgba(30,58,95,0.05);
    border-radius: 8px;
    border: 2px solid var(--royal-navy);
    text-align: center;
}

.watch-slot.current, .watch-period.current {
    background: rgba(212,175,55,0.1);
    border-color: var(--admiralty-gold);
}

.operation-status.excellent, .crew-status.active, .record-value.active {
    color: var(--sea-foam);
    font-weight: bold;
}

.operation-status.good {
    color: var(--admiralty-gold);
    font-weight: bold;
}

.operation-status.adequate {
    color: var(--ink-blue);
    font-weight: bold;
}

.no-assignment {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.assignment-notice {
    background: rgba(255,255,255,0.9);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    border: 2px solid var(--admiralty-gold);
    text-align: center;
    max-width: 500px;
}

.notice-title {
    color: var(--royal-navy);
    font-size: 2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.command-actions, .duty-actions {
    background: rgba(255,255,255,0.9);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    border: 2px solid var(--admiralty-gold);
    text-align: center;
}

.actions-title {
    color: var(--royal-navy);
    margin-bottom: 1.5rem;
}

.duties-checklist {
    display: grid;
    gap: 0.8rem;
}

.duty-checkbox {
    margin-right: 0.8rem;
    transform: scale(1.2);
}

.meal-time {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem;
    background: rgba(244,241,232,0.7);
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .command-grid, .duty-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .fleet-status-banner {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .command-title {
        font-size: 1.8rem;
    }
}

/* SAML Authentication Styles */

/* SSO Section */
.sso-section {
    margin-bottom: 2rem;
}

.sso-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.sso-title {
    color: var(--royal-navy);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.sso-subtitle {
    color: var(--ink-blue);
    font-size: 0.9rem;
    opacity: 0.8;
}

.sso-providers {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.sso-button {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--royal-navy) 0%, #2c5282 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    box-shadow: var(--shadow-medium);
    transition: all 0.3s ease;
    border: 2px solid var(--admiralty-gold);
}

.sso-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
    background: linear-gradient(135deg, #2c5282 0%, var(--royal-navy) 100%);
}

.sso-icon {
    margin-right: 1rem;
    font-size: 1.2rem;
}

.sso-text {
    flex-grow: 1;
    font-weight: bold;
}

.sso-arrow {
    margin-left: 1rem;
    font-size: 1.1rem;
}

.auth-divider {
    text-align: center;
    margin: 2rem 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--ink-blue);
    opacity: 0.3;
}

.divider-text {
    background: var(--parchment);
    padding: 0 1rem;
    color: var(--ink-blue);
    opacity: 0.7;
    font-weight: bold;
    position: relative;
}

.local-auth-section {
    background: rgba(255,255,255,0.1);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(30,58,95,0.2);
}

.local-auth-title {
    text-align: center;
    color: var(--royal-navy);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* Admin SAML Styles */
.providers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.provider-card {
    background: rgba(255,255,255,0.95);
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    border: 2px solid var(--admiralty-gold);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.provider-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-heavy);
}

.provider-disabled {
    opacity: 0.6;
    border-color: var(--anchor-silver);
}

.provider-header {
    background: linear-gradient(135deg, var(--royal-navy) 0%, #2c5282 100%);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.provider-name {
    margin: 0;
    font-size: 1.3rem;
    color: white !important;
}

.status-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.status-active {
    background: var(--sea-foam);
    color: white;
}

.status-inactive {
    background: var(--anchor-silver);
    color: var(--ink-blue);
}

.provider-details {
    padding: 1.5rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(30,58,95,0.1);
}

.info-label {
    font-weight: bold;
    color: var(--ink-blue);
}

.info-value {
    color: var(--royal-navy);
}

.status-yes {
    color: var(--sea-foam);
}

.status-no {
    color: var(--victory-red);
}

.provider-actions {
    padding: 1rem 1.5rem;
    background: rgba(244,241,232,0.5);
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

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

.admin-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0;
    background: rgba(255,255,255,0.9);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
}

.help-text {
    display: flex;
    align-items: center;
    color: var(--ink-blue);
    opacity: 0.8;
}

.help-icon {
    margin-right: 0.5rem;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(255,255,255,0.9);
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.help-section {
    margin-top: 3rem;
    background: rgba(255,255,255,0.9);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
}

.help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.help-card {
    background: rgba(244,241,232,0.7);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--admiralty-gold);
}

.help-card h4 {
    color: var(--royal-navy);
    margin-bottom: 1rem;
}

.help-card small {
    color: var(--ink-blue);
    opacity: 0.7;
    font-style: italic;
}

/* SAML Form Styles */
.saml-provider-form {
    background: rgba(255,255,255,0.95);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    border: 2px solid var(--admiralty-gold);
}

.form-sections {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.form-section {
    border: 1px solid rgba(30,58,95,0.2);
    border-radius: 8px;
    overflow: hidden;
}

.section-header {
    background: linear-gradient(135deg, var(--royal-navy) 0%, #2c5282 100%);
    color: white;
    padding: 1.5rem;
}

.section-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    color: white !important;
}

.section-description {
    margin: 0;
    opacity: 0.9;
    font-size: 0.9rem;
    color: white !important;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
}

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

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

.form-label {
    font-weight: bold;
    color: var(--royal-navy);
    margin-bottom: 0.5rem;
}

.form-input, .form-select, .form-textarea {
    padding: 0.8rem;
    border: 2px solid rgba(30,58,95,0.3);
    border-radius: 6px;
    font-size: 1rem;
    background: white;
    transition: border-color 0.3s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--admiralty-gold);
    box-shadow: 0 0 0 3px rgba(212,175,55,0.2);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
    font-family: monospace;
}

.form-help {
    font-size: 0.8rem;
    color: var(--ink-blue);
    opacity: 0.7;
    margin-top: 0.3rem;
}

.config-method-selector {
    padding: 1.5rem;
    background: rgba(244,241,232,0.3);
}

.radio-group {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: bold;
    color: var(--royal-navy);
}

.radio-label input[type="radio"] {
    margin-right: 0.5rem;
}

.config-section {
    padding: 1.5rem;
    border-top: 1px solid rgba(30,58,95,0.1);
}

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

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: var(--ink-blue);
}

.checkbox-label input[type="checkbox"] {
    margin-right: 0.8rem;
    transform: scale(1.2);
}

.mapping-info {
    padding: 1.5rem;
    background: rgba(123,176,105,0.1);
    border-left: 4px solid var(--sea-foam);
    margin-top: 1rem;
}

.mapping-info h4 {
    color: var(--royal-navy);
    margin-bottom: 1rem;
}

.mapping-info ul {
    margin-left: 1.5rem;
}

.mapping-info li {
    margin-bottom: 0.5rem;
    color: var(--ink-blue);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--admiralty-gold);
}

.form-navigation {
    margin-bottom: 2rem;
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    display: flex;
    align-items: flex-start;
}

.alert-error {
    background: rgba(139,0,0,0.1);
    border: 1px solid var(--victory-red);
    color: var(--victory-red);
}

.alert-icon {
    margin-right: 1rem;
    font-size: 1.2rem;
    margin-top: 0.2rem;
}

.alert-content h4 {
    margin: 0 0 0.5rem 0;
    color: inherit;
}

.alert-content ul {
    margin: 0;
    padding-left: 1.5rem;
}

/* Responsive SAML Styles */
@media (max-width: 768px) {
    .providers-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-controls {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .help-grid {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .provider-actions {
        justify-content: center;
    }
    
    .sso-providers {
        margin: 0 -0.5rem;
    }
    
    .sso-button {
        margin: 0 0.5rem;
    }
}