/* =============================================================================
   Hedef Filo — Light Mode Premium Design System
   Font: Inter | Clean, professional, financial UI
   ============================================================================= */

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

:root {
    /* Colors — Clean, professional palette */
    --color-bg: #f8f9fc;
    --color-surface: #ffffff;
    --color-surface-raised: #ffffff;
    --color-border: #e2e8f0;
    --color-border-focus: #1a56db;
    --color-text: #1e293b;
    --color-text-secondary: #64748b;
    --color-text-muted: #94a3b8;

    /* Brand */
    --color-primary: #1a56db;
    --color-primary-hover: #1648c0;
    --color-primary-light: #eff6ff;
    --color-primary-subtle: #dbeafe;

    /* Semantic */
    --color-success: #059669;
    --color-success-bg: #ecfdf5;
    --color-success-border: #a7f3d0;
    --color-warning: #d97706;
    --color-warning-bg: #fffbeb;
    --color-warning-border: #fde68a;
    --color-danger: #dc2626;
    --color-danger-bg: #fef2f2;
    --color-danger-border: #fecaca;

    /* Kiralama (blue tones) */
    --color-kiralama: #1a56db;
    --color-kiralama-bg: #eff6ff;
    --color-kiralama-border: #bfdbfe;

    /* Ödenek (purple tones) */
    --color-odenek: #7c3aed;
    --color-odenek-bg: #f5f3ff;
    --color-odenek-border: #ddd6fe;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* Typography */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --text-xs: 0.75rem;
    --text-sm: 0.8125rem;
    --text-base: 0.9375rem;
    --text-lg: 1.125rem;
    --text-xl: 1.375rem;
    --text-2xl: 1.75rem;

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;

    /* Shadow */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 8px 32px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.04);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

/* =============================================================================
   PUBLIC PAGE
   ============================================================================= */

.public-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* --- Header --- */
.site-header {
    padding: var(--space-xl) 0;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: var(--space-xl);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.header-logo-img {
    height: 30px;
    width: auto;
    object-fit: contain;
    display: block;
}

.logo-divider {
    width: 1px;
    height: 20px;
    background: var(--color-border);
}

.header-title-wrap {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.header-title {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: -0.01em;
    margin: 0;
    line-height: 1.2;
}

.header-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    background: var(--color-primary-light);
    color: var(--color-primary);
    border: 1px solid var(--color-primary-subtle);
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1;
    white-space: nowrap;
}

/* --- Intro Section --- */
.page-intro {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--color-primary);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-sm);
}

.page-intro p {
    font-size: var(--text-sm);
    color: var(--color-text);
    font-weight: 500;
    line-height: 1.6;
    margin-bottom: var(--space-xs);
}

.page-intro p:last-child {
    margin-bottom: 0;
}

/* --- Input Section --- */
.input-section {
    margin-bottom: var(--space-xl);
}

.input-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-md);
}

.input-card-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-border);
}

.input-card-title svg {
    color: var(--color-primary);
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-lg);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.input-group label {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text);
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
}

.label-note {
    font-weight: 400;
    color: var(--color-text-muted);
    font-size: var(--text-xs);
}

/* --- Tooltip System --- */
.info-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    cursor: help;
    margin-left: 5px;
    vertical-align: middle;
    transition: color var(--transition-fast);
    flex-shrink: 0;
    z-index: 5;
}

.info-tooltip svg {
    display: block;
}

.info-tooltip:hover,
.info-tooltip:focus,
.info-tooltip:focus-within {
    color: var(--color-primary);
    outline: none;
    z-index: 9999;
}

.info-tooltip .tooltip-box {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    transform: translateY(4px);
    background-color: #0f172a;
    color: #f8fafc;
    font-size: var(--text-xs);
    font-weight: 400;
    line-height: 1.45;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    white-space: normal;
    width: max-content;
    max-width: 270px;
    text-align: left;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
    z-index: 9999;
}

.info-tooltip .tooltip-box::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 8px;
    border-width: 5px;
    border-style: solid;
    border-color: #0f172a transparent transparent transparent;
}

.info-tooltip:hover .tooltip-box,
.info-tooltip:focus .tooltip-box,
.info-tooltip:focus-within .tooltip-box {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

@media (max-width: 540px) {
    .info-tooltip .tooltip-box {
        max-width: 220px;
    }
}

.input-group input,
.input-group select {
    padding: 10px 14px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: var(--text-base);
    color: var(--color-text);
    background: var(--color-surface);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    outline: none;
}

.input-group input::placeholder {
    color: var(--color-text-muted);
}

.input-group input:focus,
.input-group select:focus {
    border-color: var(--color-border-focus);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.input-actions {
    margin-top: var(--space-lg);
    display: flex;
    justify-content: flex-end;
}

/* --- Optional Fuel Parameters --- */
.optional-divider {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-sm);
}

.optional-divider-line {
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

.optional-divider-text {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.optional-hint {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
    line-height: 1.5;
}

.input-grid--optional {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.input-group--optional input {
    border-style: dashed;
    background: var(--color-bg);
}

.input-group--optional input:focus {
    border-style: solid;
    background: var(--color-surface);
}

/* --- Buttons --- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 11px 28px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 10px 24px;
    background: var(--color-surface);
    color: var(--color-primary);
    border: 1.5px solid var(--color-primary);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast);
}

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

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    background: var(--color-bg);
    color: var(--color-text);
}

.btn-icon--danger:hover {
    background: var(--color-danger-bg);
    color: var(--color-danger);
}

/* --- Error Section --- */
.error-section {
    margin-bottom: var(--space-lg);
}

.error-card {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--color-danger-bg);
    border: 1px solid var(--color-danger-border);
    border-radius: var(--radius-md);
    color: var(--color-danger);
    font-size: var(--text-sm);
}

.error-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.error-card p {
    margin-bottom: 4px;
}

.error-card p:last-child {
    margin-bottom: 0;
}

/* --- Results Section --- */
.results-section {
    margin-bottom: var(--space-2xl);
    animation: fadeSlideUp 0.5s ease forwards;
}

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

/* --- Results Header Banner --- */
.results-header-banner {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #ffffff;
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-xl);
    text-align: center;
    margin-bottom: var(--space-lg);
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.2);
}

.results-header-title {
    font-size: var(--text-lg);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: var(--space-xs);
    letter-spacing: -0.01em;
}

.results-header-subtitle {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.5;
    max-width: 820px;
    margin: 0 auto;
    font-weight: 400;
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

@media (max-width: 768px) {
    .results-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Result Card --- */
.result-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: box-shadow var(--transition-base);
    display: flex;
    flex-direction: column;
}

.result-card:hover {
    box-shadow: var(--shadow-lg);
}

.result-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
}

.result-card-header h3 {
    font-size: var(--text-lg);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.result-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.result-card-icon--kiralama {
    background: var(--color-kiralama-bg);
    color: var(--color-kiralama);
}

.result-card-icon--odenek {
    background: var(--color-odenek-bg);
    color: var(--color-odenek);
}

.result-card--kiralama .result-card-header {
    border-bottom-color: var(--color-kiralama-border);
}

.result-card--odenek .result-card-header {
    border-bottom-color: var(--color-odenek-border);
}

.result-rows {
    padding: var(--space-md) var(--space-lg);
    flex-grow: 1;
}

.result-row {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.result-row:hover,
.result-row:focus-within {
    z-index: 50;
}

.result-row:last-child {
    border-bottom: none;
}

.result-row--separator {
    border-top: 2px solid var(--color-border);
    margin-top: var(--space-xs);
    padding-top: 12px;
}

.result-label {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
}

.result-value {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text);
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}

.result-value--positive {
    color: var(--color-success);
}

.result-row--highlight-positive {
    background: var(--color-success-bg);
    margin: 0 calc(-1 * var(--space-lg));
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
    border-bottom-color: var(--color-success-border);
}

.result-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    font-size: var(--text-lg);
    font-weight: 800;
    letter-spacing: -0.01em;
    border-top: 2px solid var(--color-border);
    border-bottom-left-radius: inherit;
    border-bottom-right-radius: inherit;
}

.result-card--kiralama .result-total {
    background: var(--color-kiralama-bg);
    color: var(--color-kiralama);
    border-top-color: var(--color-kiralama-border);
}

.result-card--odenek .result-total {
    background: var(--color-odenek-bg);
    color: var(--color-odenek);
    border-top-color: var(--color-odenek-border);
}

/* --- NPV Comparison Section --- */
.npv-comparison-section {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-sm);
}

.npv-rate-header {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-xs);
    border-bottom: 1px solid #f1f5f9;
}

.npv-rate-label {
    color: var(--color-text);
}

.npv-rate-value {
    color: var(--color-primary);
    font-weight: 700;
    margin-left: 4px;
}

.npv-rate-header .info-tooltip .tooltip-box {
    left: 50%;
    transform: translateX(-50%) translateY(4px);
}

.npv-rate-header .info-tooltip .tooltip-box::after {
    left: 50%;
    transform: translateX(-50%);
}

.npv-rate-header .info-tooltip:hover .tooltip-box,
.npv-rate-header .info-tooltip:focus .tooltip-box,
.npv-rate-header .info-tooltip:focus-within .tooltip-box {
    transform: translateX(-50%) translateY(0);
}

.npv-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

@media (max-width: 768px) {
    .npv-cards-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
}

.npv-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.npv-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.npv-card--kiralama {
    background: #eff6ff;
    border: 1.5px solid #bfdbfe;
}

.npv-card--kiralama .npv-card-label {
    color: #1e40af;
    font-weight: 600;
}

.npv-card--kiralama .npv-card-value {
    color: #1d4ed8;
    font-weight: 800;
    font-size: var(--text-base);
    font-variant-numeric: tabular-nums;
}

.npv-card--odenek {
    background: #f5f3ff;
    border: 1.5px solid #ddd6fe;
}

.npv-card--odenek .npv-card-label {
    color: #6b21a8;
    font-weight: 600;
}

.npv-card--odenek .npv-card-value {
    color: #7e22ce;
    font-weight: 800;
    font-size: var(--text-base);
    font-variant-numeric: tabular-nums;
}

/* --- Comparison Result --- */
.comparison-result {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-lg) var(--space-xl);
    border-radius: var(--radius-lg);
    border: 2px solid;
    box-shadow: var(--shadow-lg);
    margin-bottom: var(--space-lg);
}

.comparison--kiralama-wins {
    background: var(--color-kiralama-bg);
    border-color: var(--color-kiralama-border);
    color: var(--color-kiralama);
}

.comparison--odenek-wins {
    background: var(--color-odenek-bg);
    border-color: var(--color-odenek-border);
    color: var(--color-odenek);
}

.comparison-icon {
    flex-shrink: 0;
}

.comparison-diff {
    font-size: var(--text-base);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xs);
}

.comparison-diff strong {
    color: var(--color-text);
    font-variant-numeric: tabular-nums;
}

.comparison-verdict {
    font-size: var(--text-lg);
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* --- Footer --- */
.site-footer {
    padding: var(--space-xl) 0;
    border-top: 1px solid var(--color-border);
    text-align: center;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.site-footer a {
    color: var(--color-text-secondary);
}

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


/* =============================================================================
   ADMIN PAGES
   ============================================================================= */

/* --- Login Page --- */
.admin-login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
}

.login-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-xl);
}

.login-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.login-logo {
    margin-bottom: var(--space-md);
}

.login-header h1 {
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.login-header p {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.login-footer {
    margin-top: var(--space-lg);
    text-align: center;
    font-size: var(--text-sm);
}

/* --- Admin Layout --- */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg);
    font-weight: 700;
    font-size: var(--text-base);
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
}

.sidebar-nav {
    flex: 1;
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
    transition: all var(--transition-fast);
}

.sidebar-link:hover {
    background: var(--color-bg);
    color: var(--color-text);
}

.sidebar-link.active {
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-weight: 600;
}

.sidebar-link--danger {
    color: var(--color-danger);
}

.sidebar-link--danger:hover {
    background: var(--color-danger-bg);
    color: var(--color-danger);
}

.sidebar-footer {
    padding: var(--space-md);
    border-top: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* --- Admin Main --- */
.admin-main {
    flex: 1;
    padding: var(--space-xl) var(--space-2xl);
    max-width: 900px;
}

.admin-page-header {
    margin-bottom: var(--space-xl);
}

.admin-page-header h2 {
    font-size: var(--text-2xl);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-xs);
}

.admin-page-header p {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

/* --- Dashboard Cards --- */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-lg);
}

.dash-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all var(--transition-base);
    text-decoration: none;
    color: var(--color-text);
}

.dash-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    color: var(--color-text);
}

.dash-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-md);
}

.dash-card h3 {
    font-size: var(--text-base);
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.dash-card p {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

/* --- Flash Messages --- */
.flash-container {
    margin-bottom: var(--space-lg);
}

.flash {
    padding: 12px var(--space-lg);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
    animation: fadeSlideUp 0.3s ease forwards;
}

.flash--success {
    background: var(--color-success-bg);
    color: var(--color-success);
    border: 1px solid var(--color-success-border);
}

.flash--error {
    background: var(--color-danger-bg);
    color: var(--color-danger);
    border: 1px solid var(--color-danger-border);
}

.flash-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    transition: opacity var(--transition-fast);
}

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

/* --- Form Components --- */
.settings-form {
    margin-bottom: var(--space-lg);
}

.form-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-sm);
}

.form-card-title {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-border);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.form-row:last-child {
    margin-bottom: 0;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.form-group label {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text);
}

.form-group input,
.form-group select {
    padding: 10px 14px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: var(--text-base);
    color: var(--color-text);
    background: var(--color-surface);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    outline: none;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--color-border-focus);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.form-help {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

.form-actions {
    margin-top: var(--space-lg);
    display: flex;
    gap: var(--space-md);
}

/* --- Tax Bracket Table --- */
.dilim-table-wrap {
    overflow-x: auto;
    margin-bottom: var(--space-md);
}

.dilim-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

.dilim-table th {
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    color: var(--color-text-secondary);
    border-bottom: 2px solid var(--color-border);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dilim-table td {
    padding: 8px 14px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.cell-center {
    text-align: center;
}

.cell-computed {
    color: var(--color-text-muted);
    font-style: italic;
    font-variant-numeric: tabular-nums;
}

.input-table {
    padding: 6px 10px !important;
    border: 1.5px solid var(--color-border) !important;
    border-radius: var(--radius-sm) !important;
    font-family: var(--font) !important;
    font-size: var(--text-sm) !important;
    width: 100%;
    min-width: 120px;
    background: var(--color-surface);
    color: var(--color-text);
    outline: none;
    transition: border-color var(--transition-fast);
}

.input-table:focus {
    border-color: var(--color-border-focus) !important;
    box-shadow: 0 0 0 2px rgba(26, 86, 219, 0.08);
}

.inline-form {
    display: inline;
}

/* --- Iskonto Grid --- */
.iskonto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
}

.iskonto-item {
    padding: var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg);
}

.iskonto-item--warning {
    border-color: var(--color-warning-border);
    background: var(--color-warning-bg);
}

.iskonto-vade {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-md);
}

.input-iskonto {
    width: 100%;
}

.warning-badge {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: rgba(217, 119, 6, 0.08);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    color: var(--color-warning);
    line-height: 1.4;
}

.warning-badge svg {
    flex-shrink: 0;
    margin-top: 1px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .public-container {
        padding: 0 var(--space-md);
    }

    .logo-area {
        gap: var(--space-sm);
        flex-wrap: wrap;
    }

    .header-logo-img {
        height: 24px;
    }

    .logo-divider {
        display: none;
    }

    .header-title-wrap {
        gap: 6px;
    }

    .header-title {
        font-size: var(--text-sm);
    }

    .header-badge {
        font-size: 10px;
        padding: 2px 6px;
    }

    .input-grid {
        grid-template-columns: 1fr;
    }

    .admin-layout {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        height: auto;
        position: static;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
    }

    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
    }

    .admin-main {
        padding: var(--space-lg);
    }

    .result-total {
        font-size: var(--text-base);
    }
}

/* --- Clickable values & Details Links --- */
.details-link {
    color: inherit;
    text-decoration: underline dotted;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.details-link:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

/* --- Modal Popup --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: var(--color-surface);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 1200px;
    box-shadow: var(--shadow-xl);
    animation: fadeSlideUp var(--transition-base);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}

.modal-header h3 {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--color-text);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
}

.modal-close:hover {
    color: var(--color-danger);
}

.modal-body {
    padding: var(--space-lg);
    overflow-y: auto;
}

.modal-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

@media (max-width: 992px) {
    .modal-grid {
        grid-template-columns: 1fr;
    }
}

.modal-section-title {
    font-size: var(--text-base);
    font-weight: 700;
    margin-bottom: var(--space-md);
    color: var(--color-text);
    border-left: 3px solid var(--color-primary);
    padding-left: var(--space-sm);
}

/* --- Parameter Table --- */
.modal-param-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

.modal-param-table th,
.modal-param-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.modal-param-table th {
    font-weight: 600;
    color: var(--color-text-secondary);
    background: var(--color-bg);
}

.modal-param-table td {
    color: var(--color-text);
}

/* --- Monthly Table --- */
.modal-table-container {
    overflow-x: auto;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
}

.modal-months-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-xs);
}

.modal-months-table th,
.modal-months-table td {
    padding: 10px 10px;
    text-align: right;
    border-bottom: 1px solid var(--color-border);
}

.modal-months-table th:first-child,
.modal-months-table td:first-child {
    text-align: center;
}

.modal-months-table th {
    font-weight: 600;
    color: var(--color-text-secondary);
    background: var(--color-bg);
    white-space: nowrap;
}

.modal-months-table td {
    color: var(--color-text);
    font-variant-numeric: tabular-nums;
}

.modal-footer-summary {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-2xl);
    padding: var(--space-md) var(--space-lg);
    background-color: var(--color-bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    margin-top: var(--space-md);
}

.summary-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.summary-label {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text-secondary);
}

.summary-value {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--color-primary);
    font-variant-numeric: tabular-nums;
}

