/* ============================================
   DEKLARIA - Modern Light Theme
   Inspired by Aspia.se
   Clean, Professional Design
   ============================================ */

:root {
    /* Light Theme Colors - Based on Deklaria Branding */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8FAFC;
    --bg-card: #FFFFFF;
    --bg-elevated: #F1F5F9;

    /* Deklaria Brand Colors */
    --accent-primary: #2563EB;
    --accent-primary-dark: #1E40AF;
    --accent-primary-light: #3B82F6;
    --accent-secondary: #10B981;
    --accent-gradient: linear-gradient(135deg, #2563EB 0%, #3B82F6 100%);

    /* Status Colors */
    --success: #10B981;
    --success-light: #D1FAE5;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --danger: #EF4444;
    --danger-light: #FEE2E2;
    --info: #3B82F6;
    --info-light: #DBEAFE;

    /* Text Colors */
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;

    /* Borders & Effects */
    --border-color: #E2E8F0;
    --border-light: #F1F5F9;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Spacing */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

main {
    flex: 1;
    padding-top: 2rem;
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
    background: var(--bg-primary) !important;
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 0;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.navbar-brand:hover {
    color: var(--accent-primary);
}

.navbar-brand i {
    color: var(--accent-primary);
    font-size: 1.75rem;
}

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    padding: 0.6rem 1rem !important;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--accent-primary) !important;
    background: var(--bg-secondary);
}

.nav-link i {
    margin-right: 0.4rem;
}

.navbar-toggler {
    border: 1px solid var(--border-color);
    padding: 0.5rem;
}

.dropdown-menu {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
}

.dropdown-item {
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    padding: 0.6rem 1rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: var(--bg-secondary);
    color: var(--accent-primary);
}

.dropdown-divider {
    border-color: var(--border-color);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    font-weight: 600;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-sm);
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary, .btn-primary-custom {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover, .btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--accent-primary);
    color: var(--accent-primary);
}

.btn-outline-primary:hover {
    background: var(--accent-primary);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #DC2626;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

/* Deklaria Branded Buttons */
.btn-deklaria-primary {
    background: linear-gradient(135deg, #2563EB 0%, #3B82F6 100%);
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-sm);
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    display: inline-block;
    text-decoration: none;
}

.btn-deklaria-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
    color: white;
}

.btn-deklaria-success {
    background: linear-gradient(135deg, #10B981 0%, #34D399 100%);
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-sm);
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
    display: inline-block;
    text-decoration: none;
}

.btn-deklaria-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
    color: white;
}

.deklaria-badge-success {
    background: linear-gradient(135deg, #10B981 0%, #34D399 100%);
    color: white;
    border-radius: 8px;
    display: inline-block;
}

/* ============================================
   CARDS
   ============================================ */
.card, .deklaria-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.card:hover, .deklaria-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: #CBD5E1;
}

.card-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.75rem;
}

.card-title {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.card-text {
    color: var(--text-secondary);
}

/* Feature Cards with Icons */
.feature-card {
    text-align: center;
    padding: 2.5rem 2rem;
}

.feature-card .icon-wrapper {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--accent-primary);
}

.feature-card h5 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    background: linear-gradient(135deg, #F8FAFC 0%, #EFF6FF 100%);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 5rem 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-section .display-1 {
    font-size: 3.5rem;
    color: var(--text-primary);
    font-weight: 800;
    position: relative;
}

.hero-section .display-4 {
    color: var(--text-primary);
    font-weight: 700;
    position: relative;
}

.hero-section .lead {
    color: var(--text-secondary);
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
}

/* ============================================
   FORMS
   ============================================ */
.form-control, .form-select {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 0.875rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    background: var(--bg-primary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    color: var(--text-primary);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-label {
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.input-group-text {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* File Input */
input[type="file"] {
    background: var(--bg-primary);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

input[type="file"]:hover {
    border-color: var(--accent-primary);
    background: rgba(37, 99, 235, 0.02);
}

/* Auth Container */
.auth-container {
    max-width: 450px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 3rem;
    box-shadow: var(--shadow-xl);
}

.auth-container h2 {
    color: var(--text-primary);
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
}

.auth-container .subtitle {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 2rem;
}

/* ============================================
   TABLES
   ============================================ */
.table {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    color: var(--text-primary);
}

.table thead {
    background: var(--bg-secondary);
}

.table thead th {
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    padding: 1rem 1.25rem;
    border: none;
}

.table tbody tr {
    border-bottom: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background: var(--bg-secondary);
}

.table td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
    border: none;
    color: var(--text-secondary);
}

.table-responsive {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    font-weight: 600;
    padding: 0.45rem 0.9rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.badge.bg-success {
    background: var(--success-light) !important;
    color: var(--success) !important;
}

.badge.bg-danger {
    background: var(--danger-light) !important;
    color: var(--danger) !important;
}

.badge.bg-warning {
    background: var(--warning-light) !important;
    color: #92400E !important;
}

.badge.bg-info {
    background: var(--info-light) !important;
    color: var(--info) !important;
}

.badge.bg-primary {
    background: rgba(37, 99, 235, 0.1) !important;
    color: var(--accent-primary) !important;
}

.badge.bg-secondary {
    background: var(--bg-elevated) !important;
    color: var(--text-secondary) !important;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    border: 1px solid;
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
}

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

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

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

.alert-info {
    background: var(--info-light);
    border-color: var(--info);
    color: #1E40AF;
}

.custom-alert {
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.btn-close {
    opacity: 0.5;
}

.btn-close:hover {
    opacity: 1;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 2.5rem 0 1.5rem;
    margin-top: auto;
}

.footer p, .footer a {
    color: var(--text-muted);
}

.footer a:hover {
    color: var(--accent-primary);
}

/* ============================================
   PROGRESS BARS
   ============================================ */
.progress {
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    height: 0.75rem;
    overflow: hidden;
}

.progress-bar {
    background: var(--accent-gradient);
    border-radius: var(--radius-sm);
}

/* ============================================
   MODAL
   ============================================ */
.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

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

.modal-title {
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
    color: var(--text-secondary);
}

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

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Stat Icons */
.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon-primary {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    color: #2563EB;
}

.stat-icon-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(52, 211, 153, 0.1) 100%);
    color: #10B981;
}

.stat-icon-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(251, 191, 36, 0.1) 100%);
    color: #F59E0B;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 1.5rem;
    }

    .hero-section .display-1 {
        font-size: 2.5rem;
    }

    .hero-section .display-4 {
        font-size: 1.5rem;
    }

    .auth-container {
        padding: 2rem;
        margin: 1rem;
    }

    .card-body {
        padding: 1.25rem;
    }

    .navbar-collapse {
        background: var(--bg-card);
        padding: 1rem;
        border-radius: var(--radius-md);
        margin-top: 1rem;
        border: 1px solid var(--border-color);
    }

    .btn-lg {
        padding: 0.875rem 1.75rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .hero-section .display-1 {
        font-size: 2rem;
    }

    .card-body {
        padding: 1rem;
    }

    .table {
        font-size: 0.85rem;
    }
}

/* ============================================
   COOKIE CONSENT BANNER
   ============================================ */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1E40AF 0%, #2563EB 100%);
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    animation: slideUpBanner 0.5s ease;
}

.cookie-consent-banner h6 {
    color: white;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.cookie-consent-banner p {
    margin-bottom: 0;
    opacity: 0.95;
}

.cookie-consent-banner .btn-light {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-weight: 600;
}

.cookie-consent-banner .btn-light:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.cookie-consent-banner .btn-success {
    background: #10B981;
    border: none;
    font-weight: 600;
}

.cookie-consent-banner .btn-success:hover {
    background: #059669;
}

.cookie-consent-banner a {
    color: white;
}

@keyframes slideUpBanner {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Cookie Preferences Modal Styling */
#cookiePreferencesModal .form-check-input:checked {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
}

#cookiePreferencesModal .form-check-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

.slide-up {
    animation: slideUp 0.5s ease;
}
