/* 
 * DOA Marketplace - Professional SaaS Design System
 * Premium aviation engineering platform
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Premium Color Palette */
    --color-primary: #0F52BA;
    --color-primary-hover: #0A3D8F;
    --color-primary-light: #E6F0FF;

    --color-accent: #06B6D4;
    --color-accent-hover: #0891B2;
    --color-accent-subtle: #CFFAFE;

    --color-text-main: #0F172A;
    --color-text-muted: #475569;
    --color-text-light: #94A3B8;

    --color-bg-body: #F8FAFC;
    --color-bg-surface: #FFFFFF;
    --color-bg-subtle: #F1F5F9;

    --color-border: #E2E8F0;
    --color-border-hover: #CBD5E1;

    --color-success: #10B981;
    --color-success-bg: #D1FAE5;
    --color-warning: #F59E0B;
    --color-warning-bg: #FEF3C7;
    --color-danger: #EF4444;
    --color-danger-bg: #FEE2E2;

    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2.5rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;

    /* Shadows */
    --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.1), 0 1px 2px -1px rgba(15, 23, 42, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.1), 0 2px 4px -2px rgba(15, 23, 42, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.1), 0 4px 6px -4px rgba(15, 23, 42, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.1);
    --shadow-glow: 0 0 15px rgba(6, 182, 212, 0.3);

    /* Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg-body);
    color: var(--color-text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-image: radial-gradient(circle at top right, rgba(6, 182, 212, 0.05), transparent 40%),
        radial-gradient(circle at bottom left, rgba(15, 82, 186, 0.05), transparent 40%);
    background-attachment: fixed;
}

a {
    text-decoration: none;
    color: var(--color-primary);
    font-weight: 500;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--color-primary-hover);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--color-text-main);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.h2 {
    font-size: 1.875rem;
    font-weight: 700;
}

.h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

.h4 {
    font-size: 1.125rem;
    font-weight: 600;
}

/* Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.grid {
    display: grid;
    gap: var(--space-lg);
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.justify-end {
    justify-content: flex-end;
}

.justify-start {
    justify-content: flex-start;
}

.gap-xs {
    gap: var(--space-xs);
}

.gap-sm {
    gap: var(--space-sm);
}

.gap-md {
    gap: var(--space-md);
}

.gap-lg {
    gap: var(--space-lg);
}

.gap-xl {
    gap: var(--space-xl);
}

.mt-xs {
    margin-top: var(--space-xs);
}

.mt-sm {
    margin-top: var(--space-sm);
}

.mt-md {
    margin-top: var(--space-md);
}

.mt-lg {
    margin-top: var(--space-lg);
}

.mt-xl {
    margin-top: var(--space-xl);
}

.mb-xs {
    margin-bottom: var(--space-xs);
}

.mb-sm {
    margin-bottom: var(--space-sm);
}

.mb-md {
    margin-bottom: var(--space-md);
}

.mb-lg {
    margin-bottom: var(--space-lg);
}

.mb-xl {
    margin-bottom: var(--space-xl);
}

.pt-lg {
    padding-top: var(--space-lg);
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--color-text-muted);
}

.text-primary {
    color: var(--color-primary);
}

.text-success {
    color: var(--color-success);
}

.text-danger {
    color: var(--color-danger);
}

.font-medium {
    font-weight: 500;
}

.font-bold {
    font-weight: 600;
}

.text-sm {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

.uppercase {
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Components */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
    gap: 0.5rem;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, #0A3D8F 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(15, 82, 186, 0.25);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(15, 82, 186, 0.35);
}

.btn-outline:hover {
    border-color: var(--color-primary);
    background-color: var(--color-primary-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Notification Header Bell button specific */
#notificationBtn {
    width: 42px;
    height: 42px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    color: var(--color-text-muted);
}

#notificationBtn:hover {
    color: var(--color-primary);
}

.btn-ghost {
    background: transparent;
    color: var(--color-text-muted);
}

.btn-ghost:hover {
    background: rgba(15, 23, 42, 0.05);
    color: var(--color-primary);
}

.btn-success {
    background: linear-gradient(135deg, var(--color-success) 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Cards */
.card {
    background: var(--color-bg-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: all var(--transition-smooth);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--color-border-hover);
}

/* Form Elements */
.form-group {
    margin-bottom: var(--space-md);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-main);
    margin-bottom: 0.5rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    font-family: var(--font-sans);
    color: var(--color-text-main);
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
}

.badge-primary {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.badge-success {
    background: var(--color-success-bg);
    color: var(--color-success);
}

.badge-warning {
    background: var(--color-warning-bg);
    color: var(--color-warning);
}

.badge-neutral {
    background: var(--color-bg-subtle);
    color: var(--color-text-muted);
}

.badge-danger {
    background: var(--color-danger);
    color: white;
}

/* Notification Dropdown */
#notificationDropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--color-border);
    z-index: 1000;
    padding: 0;
    overflow: hidden;
    animation: fadeInUp 0.2s ease-out;
}

.notification-header {
    padding: 1rem;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-item {
    padding: 1rem;
    border-bottom: 1px solid var(--color-border);
    transition: background 0.2s;
    cursor: pointer;
}

.notification-item:hover {
    background: var(--color-bg-subtle);
}

.notification-item.unread {
    border-left: 3px solid var(--color-primary);
}

/* Tables */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    text-align: left;
    padding: 1rem 1.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--color-text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg-subtle);
}

.table td {
    padding: 1.25rem 1.5rem;
    font-size: 0.9375rem;
    color: var(--color-text-main);
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover td {
    background: var(--color-bg-subtle);
}

/* Layouts */

/* App Shell */
.app-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    padding: var(--space-lg) var(--space-md);
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-header {
    margin-bottom: var(--space-xl);
    padding: 0 var(--space-sm);
}

.sidebar-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    color: var(--color-text-muted);
    border-radius: var(--radius-md);
    margin-bottom: 0.25rem;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all var(--transition-fast);
}

.nav-item:hover {
    background: var(--color-bg-subtle);
    color: var(--color-primary);
    transform: translateX(2px);
}

.nav-item.active {
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(15, 82, 186, 0.1);
}

/* Main Content */
.main-content {
    padding: var(--space-xl);
    background: var(--color-bg-body);
    overflow-y: auto;
    height: 100vh;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
}

/* Hero Section */
.hero {
    padding: 8rem 0 6rem;
    background: linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.7)), url('../images/hero-bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    text-align: center;
    position: relative;
    overflow: hidden;
    color: white;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(6, 182, 212, 0.2), transparent 60%),
        radial-gradient(circle at bottom left, rgba(15, 82, 186, 0.2), transparent 60%);
    pointer-events: none;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: white;
    margin-bottom: 1.5rem;
    position: relative;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.25rem;
    color: var(--color-text-light);
    max-width: 680px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
    position: relative;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Premium Text Effects */
.text-gradient {
    background: linear-gradient(135deg, #FFFFFF 0%, #93C5FD 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass Cards (Enhanced) */
.card-glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--color-text-main);
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-smooth);
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 560px;
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-xl);
    transform: scale(0.95);
    transition: transform var(--transition-smooth);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.open .modal-content {
    transform: scale(1);
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
    box-shadow: var(--shadow-xs);
}

/* Dev Toolbar */
.dev-toolbar {
    display: none !important;
}

.dev-toolbar a {
    color: var(--color-text-light);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.dev-toolbar a:hover,
.dev-toolbar a.active {
    background: white;
    color: var(--color-text-main);
}

/* Footer */
.footer {
    background: var(--color-text-main);
    color: white;
    padding: 4rem 0;
}

.footer a {
    color: var(--color-text-light);
    font-weight: 400;
}

.footer a:hover {
    color: white;
}

/* Step Icons */
.step-icon-lg {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-accent-subtle) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--color-primary);
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(15, 82, 186, 0.15);
}

/* ============================================
 * PREMIUM POLISH & ANIMATIONS
 * ============================================ */

/* Glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease-out forwards;
}

.delay-100 {
    animation-delay: 100ms;
}

.delay-200 {
    animation-delay: 200ms;
}

.delay-300 {
    animation-delay: 300ms;
}


/* 
 * Background Utilities (Replacing Inline Styles) 
 * These allow for dark mode overrides in enhancements.css
 */

/* Subtle surface gradient (used in card headers) */
.bg-gradient-surface {
    background: linear-gradient(135deg, rgba(15, 82, 186, 0.02) 0%, rgba(6, 182, 212, 0.02) 100%);
}

.bg-gradient-surface-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(5, 150, 105, 0.05) 100%);
}

.bg-gradient-surface-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, rgba(217, 119, 6, 0.05) 100%);
}

.bg-gradient-surface-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, rgba(220, 38, 38, 0.05) 100%);
}

.bg-gradient-surface-primary {
    background: linear-gradient(135deg, rgba(15, 82, 186, 0.05) 0%, rgba(6, 182, 212, 0.05) 100%);
}

/* Strong stat card gradients */
.bg-gradient-card-primary {
    background: linear-gradient(135deg, #0F52BA 0%, #06B6D4 100%);
    color: white;
}

.bg-gradient-card-success {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
}

.bg-gradient-card-warning {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: white;
}

.bg-gradient-card-purple {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
    color: white;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.4);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(6, 182, 212, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(6, 182, 212, 0);
    }
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--color-border-hover);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-muted);
}

/* Selection */
::selection {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

/* ============================================
 * PRINT OPTIMIZATIONS
 * ============================================ */
@media print {

    /* Hide non-printable elements */
    .sidebar,
    .navbar,
    .dev-toolbar,
    .btn,
    .msg-popup-overlay,
    .modal-overlay,
    .step-icon-lg {
        display: none !important;
    }

    /* Reset Layout */
    .app-shell {
        display: block !important;
    }

    .main-content {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        height: auto !important;
        overflow: visible !important;
        background: white !important;
    }

    body {
        background: white !important;
        overflow: visible !important;
    }

    /* Improve readability */
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        break-inside: avoid;
    }

    .container {
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
    }

    /* Text colors for print */
    * {
        color: black !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .badge {
        border: 1px solid #ccc;
    }
}