/* ==========================================================================
   SMART WAY MARINE CARGO LLC - HR MANAGEMENT SYSTEM
   Executive Neo-Corporate 360° Design System
   Headings: Plus Jakarta Sans | Body: Inter / Montserrat | Monospace: JetBrains Mono | Urdu: Noto Nastaliq Urdu
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@500;600;700;800&family=Noto+Nastaliq+Urdu:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
    /* Color Spectrum */
    --swmc-navy-950: #060911;
    --swmc-navy-900: #0b1120;
    --swmc-navy-850: #0f172a;
    --swmc-navy-800: #1e293b;
    --swmc-navy-700: #334155;
    
    --swmc-indigo-600: #4f46e5;
    --swmc-indigo-500: #6366f1;
    --swmc-indigo-400: #818cf8;
    
    --swmc-blue-600: #2563eb;
    --swmc-blue-500: #3b82f6;
    --swmc-blue-400: #60a5fa;
    --swmc-cyan-500: #06b6d4;
    --swmc-cyan-400: #22d3ee;
    
    --swmc-emerald-600: #059669;
    --swmc-emerald-500: #10b981;
    --swmc-amber-500: #f59e0b;
    --swmc-rose-500: #f43f5e;
    
    --swmc-bg-canvas: #f8fafc;
    --swmc-bg-surface: #ffffff;
    --swmc-border-light: #f1f5f9;
    --swmc-border: #e2e8f0;
    --swmc-border-strong: #cbd5e1;
    
    --swmc-text-main: #0f172a;
    --swmc-text-body: #334155;
    --swmc-text-muted: #64748b;
    --swmc-text-light: #94a3b8;
    
    /* Layout Dimensions */
    --swmc-sidebar-width: 272px;
    --swmc-header-height: 72px;
    
    /* Shadows */
    --swmc-shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
    --swmc-shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.07), 0 1px 2px -1px rgba(15, 23, 42, 0.07);
    --swmc-shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.06);
    --swmc-shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
    --swmc-shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    --swmc-shadow-glow: 0 0 24px rgba(99, 102, 241, 0.18);
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.885rem;
    line-height: 1.55;
    color: var(--swmc-text-body);
    background-color: var(--swmc-bg-canvas);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .heading-font {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--swmc-navy-900);
}

.font-monospace {
    font-family: 'JetBrains Mono', monospace !important;
}

/* Global Urdu Font Support */
.urdu-text, [dir="rtl"], .lang-ur {
    font-family: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', serif !important;
    direction: rtl;
    text-align: right;
    line-height: 2.1;
}

.urdu-inline {
    font-family: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', serif !important;
    display: inline-block;
    direction: rtl;
    line-height: 1.8;
}

/* Layout Framework */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    background: var(--swmc-bg-canvas);
}

/* ==========================================================================
   EXECUTIVE SIDEBAR
   ========================================================================== */
.sidebar {
    width: var(--swmc-sidebar-width);
    background: linear-gradient(180deg, #070c18 0%, #0c1427 100%);
    color: var(--swmc-text-light);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 28px rgba(0, 0, 0, 0.25);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-header {
    height: var(--swmc-header-height);
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(0, 0, 0, 0.2);
}

.sidebar-brand-img {
    max-height: 42px;
    width: auto;
    object-fit: contain;
    background: #ffffff;
    padding: 4px 10px;
    border-radius: 9px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.sidebar-menu {
    list-style: none;
    padding: 0.85rem 0.65rem 2rem;
    margin: 0;
}

.sidebar-item {
    margin-bottom: 4px;
}

.sidebar-heading-text {
    font-size: 0.64rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #475569;
    padding: 1.1rem 0.85rem 0.35rem;
    font-weight: 800;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.65rem 0.95rem;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 9px;
    font-weight: 500;
    font-size: 0.845rem;
    transition: all 0.15s ease-in-out;
}

.sidebar-link:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.06);
}

.sidebar-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.38);
    font-weight: 600;
}

.sidebar-icon {
    width: 20px;
    margin-right: 0.8rem;
    font-size: 1rem;
    text-align: center;
    flex-shrink: 0;
}

/* Collapsible Accordion Section */
.sidebar-collapse-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    padding: 0.65rem 0.95rem !important;
    color: #94a3b8 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 9px !important;
    font-size: 0.845rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.15s ease-in-out !important;
    text-align: left !important;
    outline: none !important;
}

.sidebar-collapse-btn:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
}

.sidebar-collapse-btn .chevron {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-size: 0.7rem !important;
    opacity: 0.75 !important;
}

.sidebar-collapse-btn[aria-expanded="true"] .chevron,
.sidebar-collapse-btn.active-parent .chevron {
    transform: rotate(180deg) !important;
    opacity: 1 !important;
}

.sidebar-collapse-btn[aria-expanded="true"],
.sidebar-collapse-btn.active-parent {
    color: #38bdf8 !important;
    background-color: rgba(56, 189, 248, 0.08) !important;
}

.sidebar-collapse-btn.active-parent {
    border-left: 3px solid #38bdf8 !important;
}

.sidebar-submenu {
    list-style: none !important;
    padding: 0.35rem 0 0.35rem 1.15rem !important;
    margin: 0 !important;
    border-left: 2px solid rgba(56, 189, 248, 0.22) !important;
    margin-left: 1.45rem !important;
}

.sidebar-submenu .sidebar-link {
    padding: 0.45rem 0.75rem !important;
    font-size: 0.815rem !important;
    color: #94a3b8 !important;
    border-radius: 6px !important;
    margin-bottom: 2px !important;
}

.sidebar-submenu .sidebar-link:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.07) !important;
}

.sidebar-submenu .sidebar-link.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35) !important;
    font-weight: 700 !important;
}

/* ==========================================================================
   TOP HEADER & MAIN CONTENT
   ========================================================================== */
.main-content {
    flex: 1;
    margin-left: var(--swmc-sidebar-width);
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
}

.top-navbar {
    height: var(--swmc-header-height);
    background-color: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--swmc-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.75rem;
    position: sticky;
    top: 0;
    z-index: 900;
    box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.02);
}

.page-container {
    padding: 1.75rem;
    flex: 1;
}

.app-footer {
    padding: 1.1rem 1.75rem;
    background-color: #ffffff;
    border-top: 1px solid var(--swmc-border);
    font-size: 0.8rem;
    color: var(--swmc-text-muted);
}

/* ==========================================================================
   CARDS, KPI WIDGETS & METRICS
   ========================================================================== */
.card {
    border-radius: 16px !important;
    border: 1px solid var(--swmc-border) !important;
    box-shadow: var(--swmc-shadow-sm) !important;
    background-color: var(--swmc-bg-surface);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.4rem;
    border: 1px solid var(--swmc-border);
    box-shadow: var(--swmc-shadow-sm);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3.5px;
    background: linear-gradient(90deg, #4f46e5, #38bdf8);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--swmc-shadow-lg) !important;
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.stat-value {
    font-size: 1.85rem;
    font-weight: 800;
    font-family: 'Plus Jakarta Sans', sans-serif;
    letter-spacing: -0.03em;
    color: var(--swmc-navy-900);
    line-height: 1.15;
    margin: 0.5rem 0 0.15rem;
}

.stat-label {
    font-size: 0.775rem;
    color: var(--swmc-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==========================================================================
   DATA TABLES
   ========================================================================== */
.table-responsive {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid var(--swmc-border);
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

.table th {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.765rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #475569;
    background-color: #f8fafc;
    border-bottom: 1px solid var(--swmc-border);
    padding: 0.95rem 1.15rem;
}

.table td {
    padding: 0.95rem 1.15rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    color: var(--swmc-text-body);
}

.table-hover tbody tr:hover {
    background-color: #f8fafc;
}

/* ==========================================================================
   FORMS & INPUTS
   ========================================================================== */
.form-control, .form-select {
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    padding: 0.62rem 0.95rem;
    font-size: 0.875rem;
    color: var(--swmc-navy-900);
    background-color: #ffffff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-label {
    font-weight: 600;
    font-size: 0.815rem;
    color: #334155;
    margin-bottom: 0.35rem;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
    border-radius: 10px;
    padding: 0.55rem 1.15rem;
    font-weight: 600;
    font-size: 0.845rem;
    letter-spacing: -0.01em;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
    border-color: #4f46e5;
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4338ca 0%, #2563eb 100%);
    border-color: #4338ca;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    border-color: #059669;
    color: #ffffff;
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    border-color: #dc2626;
    color: #ffffff;
}

/* Badges */
.badge {
    padding: 0.4em 0.7em;
    font-weight: 600;
    font-size: 0.745rem;
    letter-spacing: 0.02em;
    border-radius: 7px;
}

.badge-aed {
    background-color: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.badge-pkr {
    background-color: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

/* Modals */
.modal-content {
    border-radius: 18px !important;
    border: 1px solid var(--swmc-border) !important;
    box-shadow: var(--swmc-shadow-xl) !important;
    overflow: hidden;
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--swmc-border-light);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--swmc-border-light);
}

/* Responsive Mobile Navigation */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
}

/* Printable Clean Styles (Protected for exact PDF Layouts) */
@media print {
    .sidebar, .top-navbar, .app-footer, .no-print, .btn, form {
        display: none !important;
    }
    .main-content {
        margin-left: 0 !important;
    }
    .page-container {
        padding: 0 !important;
    }
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }
}
