/* Ultra Modern Corporate Theme - Premium Edition */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    /* Brand Colors - Deep & Vibrant (Unified) */
    --primary: #2563eb;
    /* Matches the Vivid Gradient Darker Tone */
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;

    --secondary: #3b82f6;
    /* Lighter Blue */
    --accent: #60a5fa;

    /* Shared Gradients - Fully Synced */
    --gradient-blue: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --gradient-orange: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --gradient-green: linear-gradient(135deg, #10b981 0%, #059669 100%);

    /* Interface Colors */
    --sidebar-bg: #0f172a;
    --sidebar-gradient: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);

    /* Status Colors (Vibrant) */
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;

    /* Modern Grays */
    --bg-main: #f3f4f6;
    --surface: #ffffff;
    --text-main: #111827;
    --text-body: #4b5563;
    --text-muted: #9ca3af;

    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    --shadow-glow: 0 4px 20px rgba(67, 97, 238, 0.15);

    --radius-sm: 0.5rem;
    --radius: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;

    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    font-size: 0.95rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.03em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar - Premium Glassy/Dark */
.sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    /* Fallback */
    background: var(--sidebar-gradient);
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    height: 90px;
    display: flex;
    align-items: center;
    padding: 0 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: -0.04em;
}

.logo i {
    background: linear-gradient(135deg, #4361ee, #4895ef);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.8rem;
    filter: drop-shadow(0 2px 10px rgba(67, 97, 238, 0.3));
}

.nav-menu {
    flex: 1;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    border: 1px solid transparent;
}

.nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(5px);
}

.nav-link.active {
    background: linear-gradient(90deg, rgba(67, 97, 238, 0.2), transparent);
    color: #fff;
    border-left: 4px solid var(--primary);
    border-radius: 4px var(--radius) var(--radius) 4px;
    /* Straight edge on left */
}

.nav-link i {
    width: 24px;
    margin-right: 12px;
    font-size: 1.1em;
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 2.5rem 3rem;
    width: calc(100% - 280px);
    max-width: 1920px;
}

.page-header {
    margin-bottom: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.page-title {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #111827, #374151);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 500;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title::before {
    content: '';
    display: block;
    width: 4px;
    height: 24px;
    background: var(--primary);
    border-radius: 4px;
}

/* Premium Cards */
.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Stats Logic */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3.5rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
}

.stat-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    background: var(--primary-light);
    color: var(--primary);
}

.stat-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
}

/* Colored Stat Cards Variations - Vivid (Restored) */
/* Colored Stat Cards Variations - Vivid (Restored) */
.stat-card-blue {
    background: var(--gradient-blue);
    border: none;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.4);
}

.stat-card-orange {
    background: var(--gradient-orange);
    border: none;
    box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.4);
}

.stat-card-green {
    background: var(--gradient-green);
    border: none;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.4);
}

.stat-card-colored .stat-label,
.stat-card-colored .stat-value {
    color: white !important;
}

.stat-card-colored .stat-icon-wrapper {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    backdrop-filter: blur(4px);
}

/* Ship Card - Focus */
.ship-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2.5rem;
}

.ship-card {
    padding: 0;
    border: none;
    background: var(--surface);
    display: flex;
    flex-direction: column;
}

/* Ship Card Status Variants - Active & Vivid (Matched to Stats) */
.ship-card-primary {
    background: var(--gradient-blue);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.ship-card-primary .ship-info h3,
.ship-card-primary .ship-meta {
    color: white;
}

.ship-card-primary .progress-label {
    color: white !important;
}

.ship-card-primary .ship-meta i {
    color: rgba(255, 255, 255, 0.8);
}

.ship-card-primary:hover {
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.4);
    border-color: rgba(255, 255, 255, 0.6);
}

.ship-card-success {
    background: var(--gradient-green);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.ship-card-success .ship-info h3,
.ship-card-success .ship-meta {
    color: white;
}

.ship-card-success .progress-label {
    color: white !important;
}

.ship-card-success .ship-meta i {
    color: rgba(255, 255, 255, 0.8);
}

.ship-card-success:hover {
    box-shadow: 0 12px 32px rgba(5, 150, 105, 0.4);
    border-color: rgba(255, 255, 255, 0.6);
}

.ship-card-warning {
    background: var(--gradient-orange);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.ship-card-warning .ship-info h3,
.ship-card-warning .ship-meta {
    color: white;
}

.ship-card-warning .progress-label {
    color: white !important;
}

.ship-card-warning .ship-meta i {
    color: rgba(255, 255, 255, 0.8);
}

.ship-card-warning:hover {
    box-shadow: 0 12px 32px rgba(217, 119, 6, 0.4);
    border-color: rgba(255, 255, 255, 0.6);
}

.ship-card-secondary {
    background: linear-gradient(145deg, #f1f5f9 0%, #e2e8f0 100%);
    border: 1px solid #cbd5e1;
}

.ship-card-secondary:hover {
    box-shadow: 0 12px 32px rgba(71, 85, 105, 0.2);
}

.ship-image-wrapper {
    position: relative;
    height: 200px;
    width: 100%;
    overflow: hidden;
}

.ship-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.ship-card:hover img {
    transform: scale(1.05);
}

/* Gradient Overlay on image */
.ship-image-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    pointer-events: none;
}

.ship-status-badge {
    position: static;
    margin-left: auto;
    font-size: 0.7rem;
    padding: 0.25rem 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background: #ffffff;
    /* Unified white background */
    color: var(--text-main);
    /* Unified dark text */
}

/* No colorful text on badges, keep it clean dark text */
.ship-card-primary .badge-primary {
    color: var(--primary);
}

.ship-card-success .badge-success {
    color: var(--success);
}

.ship-card-warning .badge-warning {
    color: var(--warning);
}

.ship-info {
    padding: 1.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ship-info h3 {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.ship-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.ship-meta i {
    color: var(--primary);
}

/* Modern Progress */
.progress-container {
    background: rgba(255, 255, 255, 0.3);
    /* Transparent white track */
    border-radius: 999px;
    height: 10px;
    width: 100%;
    overflow: hidden;
    margin: 0.5rem 0;
}

.progress-bar {
    height: 100%;
    border-radius: 999px;
    background: #ffffff !important;
    /* Pure white progress bar */
    box-shadow: none;
    transition: width 1s ease-in-out;
}

/* Detail Views */
.detail-layout {
    display: grid;
    grid-template-columns: 2fr 1.2fr;
    gap: 2.5rem;
}

.detail-header-card {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
}

.detail-ship-img {
    width: 280px;
    height: 200px;
    border-radius: var(--radius);
    object-fit: cover;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Timeline Polish */
.timeline {
    position: relative;
    padding-left: 2.5rem;
    margin-top: 1.5rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 10px;
    bottom: 20px;
    width: 2px;
    background: #e2e8f0;
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
}

.timeline-marker {
    position: absolute;
    left: -33px;
    top: 4px;
    width: 16px;
    height: 16px;
    background: #fff;
    border: 3px solid var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.1);
    z-index: 2;
}

.timeline-item:first-child .timeline-marker {
    background: var(--primary);
    box-shadow: 0 0 0 6px rgba(67, 97, 238, 0.2);
}

.timeline-content {
    background: #fff;
    padding: 1.25rem;
    border-radius: var(--radius);
    border: 1px solid #f1f5f9;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.timeline-item:hover .timeline-content {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
    border-color: var(--primary-light);
}

.timeline-date {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.timeline-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

/* Forms - Modern Inputs */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.95rem;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-main);
    transition: var(--transition);
}

input:focus,
select:focus,
textarea:focus {
    background: #fff;
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-family: var(--font-heading);
    cursor: pointer;
    border: none;
    transition: var(--transition);
    gap: 0.5rem;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
}

.btn-primary {
    background: var(--primary);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(67, 97, 238, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

/* Badges */
.badge {
    padding: 0.35rem 0.85rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary {
    background: #e0e7ff;
    color: #3730a3;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

/* File Grid */
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.file-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 160px;
}

.file-item:hover {
    background: #fff;
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.file-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.file-item:hover .file-icon {
    transform: scale(1.1);
}

/* Tables */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th {
    background: #f8fafc;
    padding: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

td {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-body);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: #f8fafc;
}

/* Responsive */
@media (max-width: 1024px) {
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        box-shadow: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .sidebar-header {
        height: 70px;
    }

    .nav-menu {
        flex-direction: row;
        overflow-x: auto;
        padding: 1rem;
    }

    .nav-link {
        min-width: max-content;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 1.5rem;
    }
}