/* Mongstad App - Modern Design System */

:root {
    /* Primary Color Palette */
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;
    
    /* Neutral Palette */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Accent Colors */
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #06b6d4;
    --info-light: #cffafe;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    
    /* Transitions */
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Styles */
body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    color: var(--gray-800);
    background: #f0f4f8;
    min-height: 100vh;
    position: relative;
}

.container {
    position: relative;
}

/* Enhanced Header */
.header-brand {
    background: #155E86;
    box-shadow: 0 4px 20px rgba(21, 94, 134, 0.15);
    padding: 2rem 0;
    margin-bottom: 2.5rem;
    position: relative;
    overflow: visible;
    z-index: 10;
}

.header-brand::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.header-brand::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -100px;
    width: 200px;
    height: 200px;
    border: 40px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.brand-logo-container {
    position: relative;
    z-index: 2;
}

.brand-icon-logo {
    font-size: 3rem;
    color: white;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.2));
    transition: var(--transition);
}

.brand-text {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    text-align: left;
    line-height: 1.1;
}

.brand-main {
    font-size: 2.3rem;
    font-weight: 900;
    color: white;
    letter-spacing: 0.1em;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
    font-family: 'Roboto', sans-serif;
}

.brand-sub {
    font-size: calc(2.3rem * 8 / 15);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-top: 0;
}

.brand-logo-container:hover .brand-icon-logo {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}

.brand-logo-container a {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.brand-logo-container a:hover {
    opacity: 0.9;
}

@media (max-width: 768px) {
    .brand-icon-logo {
        font-size: 2rem;
    }
    
    .brand-main {
        font-size: 1.5rem;
    }
    
    .brand-sub {
        font-size: calc(1.5rem * 8 / 15);
    }
}

/* User Menu Button */
.user-menu-button {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    color: var(--gray-800) !important;
    font-weight: 600;
    padding: 0.5rem 1.25rem !important;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.user-menu-button:hover {
    background: white !important;
}

/* Navigation Tabs */
.approver-nav-tabs {
    display: inline-flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 0.375rem;
    backdrop-filter: blur(10px);
}

.approver-nav-tabs .approver-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.approver-nav-tabs .approver-tab:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

.approver-nav-tabs .approver-tab.active {
    background: white;
    color: var(--primary-700);
    box-shadow: var(--shadow-md);
}

/* Enhanced Cards */
.card {
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    background: white;
    overflow: hidden;
}

.card-header {
    background: #155E86;
    color: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.card-body {
    padding: 1.5rem;
}

/* Form Container */
.form-container {
    max-width: 820px;
    margin: 0 auto;
    padding: 2rem;
    background: white;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    position: relative;
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #155E86;
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
}

/* Form Controls */
.form-control,
.form-select {
    border: 1px solid var(--gray-300);
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    transition: var(--transition);
    background-color: white;
}

.form-select {
    --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    padding-right: 2.25rem;
    background-image: var(--bs-form-select-bg-img), linear-gradient(180deg, #ffffff, #ffffff);
    background-repeat: no-repeat;
    background-position: right 0.75rem center, 0 0;
    background-size: 16px 12px, 100% 100%;
    appearance: none;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.form-label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-text {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-top: 0.375rem;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Buttons */
.btn {
    font-weight: 600;
    padding: 0.45rem 0.9rem;
    border-radius: 0.375rem;
    transition: var(--transition);
    border: 1px solid transparent;
    box-shadow: none;
}

.btn:hover {
    opacity: 0.9;
}

.btn:active {
    opacity: 1;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

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

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

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.btn-info {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.375rem 0.875rem;
    font-size: 0.875rem;
}

/* Alerts */
.alert {
    border: none;
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid;
}

.alert-success {
    background: var(--success-light);
    border-left-color: var(--success);
    color: #065f46;
}

.alert-danger {
    background: var(--danger-light);
    border-left-color: var(--danger);
    color: #991b1b;
}

.alert-warning {
    background: var(--warning-light);
    border-left-color: var(--warning);
    color: #92400e;
}

.alert-info {
    background: var(--info-light);
    border-left-color: var(--info);
    color: #164e63;
}

.alert-light {
    background: var(--gray-50);
    border-left-color: var(--gray-300);
    color: var(--gray-700);
}

/* Badges */
.badge {
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
}

/* Tables */
.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background: var(--gray-50);
    color: var(--gray-700);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 1rem 1.25rem;
    border-bottom: 2px solid var(--gray-200);
}

.table tbody td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--gray-100);
}

.table tbody tr:hover {
    background: var(--gray-50);
}

/* Modals */
.modal-backdrop {
    z-index: 2000;
    background-color: rgba(15, 23, 42, 0.55);
}

.modal {
    z-index: 2010;
}

.modal-content {
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
}

.modal-header {
    border-bottom: 1px solid var(--gray-200);
    padding: 1.5rem;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--gray-200);
    padding: 1.25rem 1.5rem;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* Dropdown Menu */
.dropdown-menu {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 0.5rem;
    margin-top: 0.5rem;
    z-index: 1050;
}

.dropdown-item {
    border-radius: var(--radius);
    padding: 0.625rem 1rem;
    transition: var(--transition);
    font-weight: 500;
}

.dropdown-item:hover {
    background: var(--primary-50);
}

.dropdown-divider {
    margin: 0.5rem 0;
    border-color: var(--gray-200);
}

/* Landing Page CTA Cards */
.cta-card {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    height: 100%;
    padding: 1.5rem;
    border-radius: var(--radius-2xl);
    border: 1px solid #d0d7e3;
    background: white;
    box-shadow: var(--shadow-md);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    align-items: center;
    text-align: center;
}

.cta-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.cta-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: #c3ccdc;
}

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

.cta-card-icon {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-xl);
    display: grid;
    place-items: center;
    font-size: 2rem;
    transition: var(--transition);
    position: relative;
    z-index: 2;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    color: var(--gray-500);
    border: 1px solid var(--gray-200);
}

.cta-card:hover .cta-card-icon {
    transform: scale(1.05);
}

.cta-card-icon.primary {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.cta-card:nth-child(1)::before {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(37, 99, 235, 0.05) 100%);
}

.cta-card-icon.secondary {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    color: #6d28d9;
    border-color: #d8b4fe;
}

.cta-card:nth-child(3)::before {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(124, 58, 237, 0.05) 100%);
}

.cta-card-icon.success {
    background: linear-gradient(135deg, #ecfeff 0%, #cffafe 100%);
    color: #0f766e;
    border-color: #99f6e4;
}

.cta-card:nth-child(4)::before {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.05) 0%, rgba(8, 145, 178, 0.05) 100%);
}

.cta-card-icon.info {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    color: #047857;
    border-color: #a7f3d0;
}

.cta-card-icon.warning {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    color: #9a3412;
    border-color: #fed7aa;
}

.cta-card-icon.warning i {
    display: inline-block;
    transform: scaleX(-1);
}

.cta-card:nth-child(2)::before {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(5, 150, 105, 0.05) 100%);
}

.cta-card-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gray-900);
    margin: 0;
    letter-spacing: -0.025em;
    position: relative;
    z-index: 2;
}

.cta-card-text {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--gray-600);
    margin: 0;
    position: relative;
    z-index: 2;
}

/* Landing Page */
.landing-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 1.25rem 2.25rem;
    position: relative;
}


.landing-lead {
    max-width: 700px;
    margin: 0 auto 3rem;
    font-size: 1.25rem;
    color: var(--gray-600);
    line-height: 1.7;
    font-weight: 500;
}

/* Form Section Headers */
.card-header h4 {
    color: white;
    font-weight: 700;
    font-size: 1.125rem;
}

.card-header i {
    color: white;
}

/* Required Field Indicator */
.required-field {
    color: var(--danger);
    font-weight: 700;
}

/* Checkbox Styling */
.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.form-check-input:checked {
    background-color: var(--primary-600);
    border-color: var(--primary-600);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-check-label {
    font-weight: 500;
    color: var(--gray-700);
    margin-left: 0.5rem;
}

/* Idle User Row */
.idle-user-row {
    background-color: #fef3c7 !important;
}

/* Action Buttons */
.action-buttons .btn {
    min-width: 38px;
    min-height: 38px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-container {
        margin: 1rem;
        padding: 1.5rem;
        border-radius: var(--radius-xl);
    }
    
    .brand-title {
        font-size: 1.25rem;
    }
    
    .landing-wrapper {
        padding: 2rem 1.25rem 3rem;
    }
    
    .landing-lead {
        font-size: 1.125rem;
    }
    
    .cta-card {
        padding: 1.5rem;
    }
    
    .cta-card-title {
        font-size: 1.25rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection Color */
::selection {
    background: var(--primary-200);
    color: var(--primary-900);
}

/* Focus Visible */
*:focus-visible {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

/* Loading States */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Print Styles */
@media print {
    .header-brand,
    .user-menu-button,
    .approver-nav-tabs,
    .btn,
    .action-buttons {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid var(--gray-300);
    }
}
