/*
 * AgroFlow - Styles
 * Mobile-first design
 */

/* =============================================================================
   Variables & Reset
   ============================================================================= */
:root {
    --primary-50: #eef4ee;
    --primary-100: #dde9de;
    --primary-200: #c0d4c1;
    --primary-300: #9fb7a1;
    --primary-400: #6f916f;
    --primary-500: #2f6032;
    --primary-600: #1e4620;
    --primary-700: #17391a;
    --primary-800: #122d14;
    --primary-900: #0d220f;

    --accent-50: #fff5eb;
    --accent-100: #ffe8d1;
    --accent-200: #ffd2a8;
    --accent-300: #ffba7d;
    --accent-500: #e67e22;
    --accent-600: #c86816;
    --accent-700: #a95612;

    --success-50: #e9f7ef;
    --success-500: #27ae60;
    --success-700: #1f8e4e;
    --danger-50: #fcebea;
    --danger-500: #c0392b;
    --danger-700: #9f2f24;

    --gray-50: #f4f6f4;
    --gray-100: #edf1ee;
    --gray-200: #d9e0dc;
    --gray-300: #bcc8c2;
    --gray-400: #8c9a93;
    --gray-500: #627069;
    --gray-600: #4d5953;
    --gray-700: #34413c;
    --gray-800: #24302c;
    --gray-900: #1c2826;

    --bg-primary: #ffffff;
    --bg-secondary: #f4f6f4;
    --border-color: var(--gray-200);
    --text-primary: #1c2826;
    --text-secondary: #4d5953;
    --primary: var(--primary-600);
    --primary-color: var(--primary-600);

    --arkod-primary: #1E3A8A;
    --arkod-bg: #dbeafe;
    --natjecaji-primary: #312E81;
    --natjecaji-bg: #f3e8ff;

    --font-family: 'Inter', sans-serif;
    --header-height: 60px;
    --nav-height: 70px;
    --max-width: 480px;
    --native-nav-bottom-offset: 0px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

input, select, textarea, button {
    -webkit-appearance: none;
    appearance: none;
    font-family: var(--font-family);
}

html { font-size: 16px; }

body {
    font-family: var(--font-family);
    background: var(--gray-50);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

body.login-page-active {
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-900) 100%);
}

/* Utility classes for component-level typography and badge contrast */
.font-mono {
    font-family: 'Inter', 'Barlow', 'SFMono-Regular', Menlo, Monaco, Consolas, 'Liberation Mono', monospace !important;
    font-variant-numeric: tabular-nums;
}

.font-bold {
    font-weight: 700 !important;
}

.text-white {
    color: #fff !important;
}

.bg-green-700 {
    background-color: #15803d !important;
}

.bg-red-700 {
    background-color: #b91c1c !important;
}

/* =============================================================================
   Layout
   ============================================================================= */
.app-container {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    background: #fff;
    overflow: hidden;
}

.page-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    overscroll-behavior-x: none;
}

body.login-page-active .page-content {
    padding-bottom: 0;
}

/* Page navigation fade transitions — orchestrated via setTimeout in
   App.navigate (NOT transitionend) for deterministic mobile WebView timing. */
.page-fade-exit {
    opacity: 0;
    transition: opacity 100ms ease;
    will-change: opacity;
}

.page-fade-enter {
    opacity: 0;
    will-change: opacity;
}

.page-fade-enter-active {
    opacity: 1;
    transition: opacity 100ms ease;
}

/* =============================================================================
   Header
   ============================================================================= */
.header {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    color: white;
    padding: 12px 20px 16px;
    padding-top: max(12px, env(safe-area-inset-top));
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: var(--header-height);
    flex-shrink: 0;
}

.header--arkod { background: linear-gradient(135deg, var(--arkod-primary), #1E3A8A); }
.header--natjecaji { background: linear-gradient(135deg, var(--natjecaji-primary), #312E81); }
.header--menu { background: linear-gradient(135deg, var(--primary-600), var(--primary-700)); }

.header-main-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.header-title-group {
    min-width: 0;
}

.header-title { font-size: 1.25rem; font-weight: 700; font-family: 'Inter', 'Barlow', 'SFMono-Regular', Menlo, Monaco, Consolas, 'Liberation Mono', monospace; font-variant-numeric: tabular-nums; }
.header-title,
.header-subtitle {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.header-subtitle { font-size: 0.875rem; opacity: 0.9; margin-top: 2px; }
.header-actions { display: flex; gap: 8px; margin-left: 12px; flex-shrink: 0; }
.header-page-icon {
    width: 34px;
    height: 34px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.header-page-icon svg {
    width: 20px;
    height: 20px;
}

.header-btn {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
}
.header-btn:hover { background: rgba(255,255,255,0.3); }
.header-btn svg { width: 24px; height: 24px; }
.header-bell-btn { position: relative; }

/* ── Notification Badge ──────────────────────────────────────────────────── */
.notification-badge {
    position: absolute;
    top: 4px; right: 4px;
    min-width: 18px; height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #ef4444;
    color: #fff;
    font-size: 11px; font-weight: 700;
    line-height: 18px;
    text-align: center;
    pointer-events: none;
}
.notification-badge--hidden { display: none; }

/* ── Notification Dropdown ───────────────────────────────────────────────── */
.notification-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0);
    z-index: 900;
    transition: background 0.2s;
}
.notification-backdrop--visible { background: rgba(0,0,0,0.3); }

.notification-dropdown {
    position: fixed;
    top: 60px; right: 8px;
    width: min(380px, calc(100vw - 16px));
    max-height: 70vh;
    background: var(--card-bg, #fff);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    z-index: 901;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s, transform 0.2s;
    overflow: hidden;
}
.notification-dropdown--visible { opacity: 1; transform: translateY(0); }

.notification-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}
.notification-dropdown-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary, #111);
}
.notification-mark-read-btn {
    width: 32px; height: 32px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-secondary, #6b7280);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.notification-mark-read-btn:hover { background: var(--hover-bg, #f3f4f6); }

.notification-dropdown-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px 0;
}

.notification-empty {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 8px; padding: 40px 16px;
    color: var(--text-tertiary, #9ca3af);
    text-align: center;
}
.notification-empty p { font-size: 14px; margin: 0; }
.notification-loading { display: flex; align-items: center; justify-content: center; padding: 40px 16px; }

/* ── Notification Swipe Wrapper ───────────────────────────────────────────── */
.notification-swipe-wrapper {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.notification-swipe-wrapper + .notification-swipe-wrapper { border-top: 1px solid var(--border-color, #e5e7eb); }

.notification-delete-action {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 80px;
    background: #ef4444;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1;
}
.notification-delete-action:active { background: #dc2626; }

.notification-card-layer {
    position: relative;
    z-index: 2;
    width: 100%;
    background: var(--card-bg, #fff);
    transform: translateX(0);
    transition: transform 0.2s ease;
    will-change: transform;
}

/* ── Notification Card ───────────────────────────────────────────────────── */
.notification-card {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s;
    border-left: 3px solid transparent;
    background: var(--card-bg, #fff);
}
.notification-card:not(.notification-card--read) {
    background: var(--notification-unread-bg, rgba(59,130,246,0.06));
    border-left-color: var(--primary, #3b82f6);
}
.notification-card:hover { background: var(--hover-bg, #f3f4f6); }

.notification-card-top { display: flex; align-items: flex-start; gap: 8px; }
.notification-card-content {
    position: relative;
    flex: 1;
    min-width: 0;
}
.notification-card-content--expandable {
    padding-right: 20px;
    padding-bottom: 14px;
}
.notification-card-title { font-size: 14px; font-weight: 600; color: var(--text-primary, #111); line-height: 1.3; }
.notification-card--read .notification-card-title { color: var(--text-secondary, #6b7280); }
.notification-card-body {
    font-size: 12px;
    color: var(--text-secondary, #6b7280);
    margin-top: 2px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}
.notification-swipe-wrapper.expanded .notification-card-body {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
}
.notification-expand-chevron {
    position: absolute;
    right: 0;
    bottom: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    color: var(--text-tertiary, #9ca3af);
    opacity: 0;
    pointer-events: none;
}
.notification-expand-chevron--visible {
    opacity: 1;
}
.notification-expand-chevron svg {
    transition: transform 0.18s ease;
    transform: rotate(0deg);
    transform-origin: center;
}
.notification-swipe-wrapper.expanded .notification-expand-chevron svg {
    transform: rotate(180deg);
}

.notification-arrow { display: flex; align-items: center; flex-shrink: 0; margin-top: 1px; }
.notification-arrow--up { color: #16a34a; }
.notification-arrow--down { color: #ef4444; }
.notification-icon {
    width: 24px;
    height: 24px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}
.notification-icon--support_reply {
    background: #ecfeff;
    color: #0f766e;
}

.notification-pct { flex-shrink: 0; font-size: 13px; font-weight: 700; margin-top: 1px; }
.notification-pct.notification-arrow--up { color: #16a34a; }
.notification-pct.notification-arrow--down { color: #ef4444; }

.notification-card-footer { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.notification-type-badge {
    font-size: 10px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.5px;
    padding: 2px 6px; border-radius: 4px;
    background: var(--hover-bg, #f3f4f6);
    color: var(--text-secondary, #6b7280);
}
.notification-type-badge--price_burza { background: #fef3c7; color: #92400e; }
.notification-type-badge--price_lokalno { background: #dbeafe; color: #1e40af; }
.notification-type-badge--support_reply { background: #ccfbf1; color: #115e59; }
.notification-time { font-size: 11px; color: var(--text-tertiary, #9ca3af); margin-left: auto; }

[data-theme="dark"] .notification-dropdown { background: var(--card-bg, #1f2937); }
[data-theme="dark"] .notification-card-layer { background: var(--card-bg, #1f2937); }
[data-theme="dark"] .notification-card { background: var(--card-bg, #1f2937); }
[data-theme="dark"] .notification-card:not(.notification-card--read) { background: rgba(59,130,246,0.1); }
[data-theme="dark"] .notification-card:hover { background: rgba(255,255,255,0.05); }
[data-theme="dark"] .notification-expand-chevron { color: var(--text-tertiary, #9ca3af); }
[data-theme="dark"] .notification-icon--support_reply { background: rgba(13, 148, 136, 0.22); color: #5eead4; }
[data-theme="dark"] .notification-badge { background: #dc2626; }
[data-theme="dark"] .notification-delete-action { background: #dc2626; }

.header-left-btn,
.header-back-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
    flex-shrink: 0;
}

.header-left-btn:hover,
.header-back-btn:hover { background: rgba(255,255,255,0.3); }

.header-left-btn svg,
.header-back-btn svg {
    width: 22px;
    height: 22px;
}

/* =============================================================================
   Bottom Navigation
   ============================================================================= */
.bottom-nav {
    width: 100%;
    max-width: var(--max-width);
    background: white;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    padding-bottom: calc(max(8px, env(safe-area-inset-bottom)) + var(--native-nav-bottom-offset));
    z-index: 1000;
    flex-shrink: 0;
    align-items: flex-start;
}

body.platform-native.platform-android {
    --native-nav-bottom-offset: 14px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-decoration: none;
    color: var(--gray-400);
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.15s;
    line-height: 1;
}
.nav-item:hover { color: var(--gray-600); }
.nav-item.active { color: var(--primary-600); }
.nav-item svg {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
    display: block;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.nav-item span { font-size: 0.75rem; font-weight: 500; }

.hidden {
    display: none !important;
}

/* =============================================================================
   Cijene Filter Bar
   ============================================================================= */
.cijene-filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: white;
}

.cijene-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.cijene-filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    background: var(--primary-50, #f0fdf4);
    color: var(--primary-700, #15803d);
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 4px;
    white-space: nowrap;
    border: 1px solid var(--primary-200, #bbf7d0);
}

.cijene-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1.5px solid var(--gray-300);
    border-radius: 4px;
    background: white;
    color: var(--gray-700);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
    flex-shrink: 0;
}
.cijene-filter-btn:hover {
    border-color: var(--primary-400);
    color: var(--primary-600);
}
.cijene-filter-btn svg {
    flex-shrink: 0;
}

/* Filter Sheet / Modal */
.cijene-filter-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: fadeIn 0.15s ease;
}

.cijene-filter-sheet {
    width: 100%;
    max-width: 480px;
    background: white;
    border-radius: 4px 4px 0 0;
    overflow: hidden;
    animation: slideUp 0.25s ease;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

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

.cijene-filter-sheet__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
}
.cijene-filter-sheet__header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--gray-800);
}
.cijene-filter-sheet__close {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--gray-500);
    border-radius: 4px;
}
.cijene-filter-sheet__close:hover {
    background: var(--gray-100);
}

.cijene-filter-sheet__body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

.cijene-filter-group__label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.cijene-filter-options {
    display: flex;
    gap: 8px;
}

.cijene-filter-option {
    flex: 1;
    padding: 10px 12px;
    border: 1.5px solid var(--gray-200);
    border-radius: 4px;
    background: white;
    color: var(--gray-600);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}
.cijene-filter-option:hover {
    border-color: var(--primary-300);
    background: var(--primary-50);
}
.cijene-filter-option.active {
    background: var(--primary-600);
    color: white;
    border-color: var(--primary-600);
}

.cijene-filter-sheet__footer {
    padding: 16px 20px;
    border-top: 1px solid var(--gray-200);
}

.cijene-filter-sheet__apply {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 4px;
    background: var(--accent-600);
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.cijene-filter-sheet__apply:hover {
    background: var(--accent-700);
}

/* =============================================================================
   Search
   ============================================================================= */
.search-container { padding: 0 16px 16px; }

.search-input-wrapper {
    position: relative;
    width: 100%;
}

.search-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--gray-400);
    pointer-events: none;
}

.search-input-icon svg {
    width: 100%;
    height: 100%;
}

.search-input {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px 10px 44px;
    border: 1px solid var(--gray-200);
    border-radius: 4px;
    font-size: 1rem;
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E") no-repeat 14px center / 18px;
    color: var(--gray-800);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.search-input-wrapper .search-input {
    background-image: none;
}
.search-input:focus { 
    outline: none; 
    border-color: var(--primary-500); 
    box-shadow: 0 0 0 3px var(--primary-100); 
}

.natjecaji-search-container {
    margin-top: 1rem;
    padding: 0 1rem 0.25rem;
}

.sync-status-row {
    margin: 0 16px 12px;
    padding: 12px 14px;
    border: 1px solid var(--gray-200);
    border-radius: 4px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sync-status-row__left {
    min-width: 0;
}

.sync-status-row__title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gray-700);
}

.sync-status-row__meta {
    margin-top: 2px;
    font-size: 0.78rem;
    color: var(--gray-500);
    line-height: 1.3;
    word-break: break-word;
}

.sync-refresh-btn {
    border: 1px solid var(--accent-300);
    background: var(--accent-50);
    color: var(--accent-700);
    border-radius: 4px;
    padding: 9px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: var(--font-family);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    white-space: nowrap;
}

.sync-refresh-btn:hover {
    background: var(--accent-100);
}


.sync-refresh-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.sync-refresh-btn__icon {
    width: 16px;
    height: 16px;
}

.sync-refresh-btn--running .sync-refresh-btn__icon {
    animation: spin 0.9s linear infinite;
}

.sync-note {
    margin: 0 16px 12px;
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* =============================================================================
   Section Header
   ============================================================================= */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
}
.section-title { font-size: 1.125rem; font-weight: 600; }
.section-subtitle { font-size: 0.875rem; color: var(--gray-500); }

/* =============================================================================
   Price Cards
   ============================================================================= */
.price-cards { 
    padding: 0 16px; 
    display: flex; 
    flex-direction: column; 
    gap: 12px; 
}

.price-card {
    background: white;
    border-radius: 4px;
    padding: 16px 20px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    border: 1px solid var(--gray-100);
    transition: all 0.3s ease;
    cursor: pointer;
}
.price-card:hover {
    border-color: var(--primary-200);
}
.price-card:active {
    transform: scale(0.99);
}

/* Expanded state */
.price-card--expanded {
    border-color: var(--primary-500);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.price-card-header { display: flex; justify-content: space-between; margin-bottom: 8px; }
.price-card-crop { font-size: 1rem; font-weight: 600; color: var(--gray-800); }
.price-card-price { text-align: right; }
.price-value { font-size: 1.5rem; font-weight: 700; color: var(--gray-900); }
.price-unit { font-size: 0.875rem; color: var(--gray-500); }
.price-per-unit { font-size: 0.75rem; color: var(--gray-400); }

.price-card-location {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.875rem;
    color: var(--gray-500);
}
.price-card-location svg { width: 14px; height: 14px; }

.price-card-exchange {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 2px 0 4px;
    line-height: 1.2;
}
.price-card-exchange-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--gray-600);
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: 3px;
    padding: 2px 6px;
    white-space: nowrap;
}
.price-card-exchange-tag--euronext {
    color: #1e3a8a;
    background: #eef2ff;
    border-color: #c7d2fe;
}
.price-card-exchange-tag--cme {
    color: #7c2d12;
    background: #fff7ed;
    border-color: #fed7aa;
}
.price-card-exchange-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--gray-500);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.price-card-exchange-info:hover,
.price-card-exchange-info:focus-visible {
    background: var(--gray-100);
    color: var(--gray-700);
    outline: none;
}

.price-exchange-info-body p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--gray-700);
}
.price-exchange-info-body p + p {
    margin-top: 12px;
}

.price-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-100);
}

.price-card-date {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--gray-400);
}
.price-card-date svg { width: 14px; height: 14px; }

/* Inline chart section within card */
.price-card-chart {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    margin-top: 0;
}

.price-card-chart--visible {
    max-height: 350px;
    opacity: 1;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-100);
}

.chart-period-selector {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 16px;
}

.period-btn {
    background: transparent;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    color: var(--gray-500);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}
.period-btn.active {
    background: var(--primary-600);
    border-color: var(--primary-600);
    color: white;
}
.chart-period-selector .period-btn {
    padding: 8px 14px;
    font-size: 0.8rem;
}

/* Contract Selector Dropdown */
.contract-select-wrapper {
    margin-bottom: 12px;
}

.contract-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-200);
    border-radius: 4px;
    font-family: var(--font-family);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    background: white;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 36px;
}

.contract-select:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px var(--primary-100);
}

.contract-select-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-500);
    margin-bottom: 6px;
}

.chart-container-inline {
    height: 200px;
    position: relative;
}

/* Tap hint */
.tap-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    margin: 16px;
    background: var(--gray-50);
    border-radius: 4px;
    color: var(--gray-500);
    font-size: 0.875rem;
}
.tap-hint svg {
    width: 18px;
    height: 18px;
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* =============================================================================
   Trend Badges
   ============================================================================= */
.trend-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}
.trend-badge svg { width: 14px; height: 14px; }
.trend-badge--up { background: #15803d; color: #fff; font-weight: 700; }
.trend-badge--down { background: #b91c1c; color: #fff; font-weight: 700; }
.trend-badge--stable { background: var(--gray-100); color: var(--gray-600); }
.trend-badge--stale { background: #fff7ed; color: #c2410c; }

/* =============================================================================
   Menu Page
   ============================================================================= */
.user-profile-card {
    background: white;
    border-radius: 4px;
    padding: 20px;
    margin: 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 16px;
}
.user-avatar {
    width: 64px; height: 64px;
    background: var(--primary-500);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
}
.user-name { font-size: 1.125rem; font-weight: 600; }
.user-email { font-size: 0.875rem; color: var(--gray-500); }
.user-role-badge {
    margin-top: 4px;
    display: inline-block;
    padding: 2px 10px;
    background: var(--primary-100);
    color: var(--primary-700);
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
}

.menu-list {
    background: white;
    border-radius: 4px;
    margin: 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    overflow: hidden;
}
.menu-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    text-decoration: none;
    color: var(--gray-800);
    border-bottom: 1px solid var(--gray-100);
    transition: background 0.15s;
}
.menu-item:last-child { border-bottom: none; }
.menu-item:hover { background: var(--gray-50); }

.menu-item-icon {
    width: 40px; height: 40px;
    background: var(--gray-100);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
}
.menu-item-icon svg { width: 20px; height: 20px; color: var(--gray-600); }
.menu-item-content { flex: 1; }
.menu-item-title { font-weight: 500; }
.menu-item-subtitle { font-size: 0.875rem; color: var(--gray-500); }
.menu-item-arrow { color: var(--gray-400); }
.menu-item-arrow svg { width: 20px; height: 20px; }

.menu-logout { padding: 16px; }

/* Sidebar Menu Drawer */
.sidebar-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    pointer-events: none;
}

.sidebar-menu-frame {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    margin: 0;
}

.sidebar-menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0);
    transition: background 0.2s ease;
    pointer-events: none;
}

.sidebar-menu-panel {
    position: fixed;
    top: 0;
    bottom: 0;
    left: max(0px, calc(50% - (var(--max-width) / 2)));
    width: min(340px, calc(100vw - 56px));
    max-width: var(--max-width);
    background: #fff;
    border-right: 1px solid var(--gray-200);
    box-shadow: 2px 0 4px rgba(15, 23, 42, 0.1);
    display: flex;
    flex-direction: column;
    transform: translateX(-104%);
    transition: transform 0.24s ease;
    pointer-events: none;
    padding-top: max(8px, env(safe-area-inset-top));
    padding-bottom: max(10px, env(safe-area-inset-bottom));
}

.sidebar-menu-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 14px 10px 16px;
    border-bottom: 1px solid var(--gray-100);
}

.sidebar-menu-title {
    font-size: 1rem;
    color: var(--gray-800);
}

.sidebar-menu-close-btn {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 4px;
    background: var(--gray-100);
    color: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
}

.sidebar-menu-close-btn:hover {
    background: var(--gray-200);
}

.sidebar-menu-close-btn svg {
    width: 20px;
    height: 20px;
}

.sidebar-menu-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.sidebar-menu-profile {
    margin: 12px 12px 10px;
}

.sidebar-menu-list {
    margin: 0 12px;
    border-radius: 4px;
}

.sidebar-menu-logout {
    padding: 12px;
}

.sidebar-menu-overlay--visible {
    pointer-events: auto;
}

.sidebar-menu-overlay--visible .sidebar-menu-backdrop {
    background: rgba(15, 23, 42, 0.44);
    pointer-events: auto;
}

.sidebar-menu-overlay--visible .sidebar-menu-panel {
    transform: translateX(0);
    pointer-events: auto;
}

/* =============================================================================
   Dokumenti Page
   ============================================================================= */
.dokumenti-page {
    padding: 16px;
    padding-bottom: 80px;
}

.dokumenti-search-container {
    padding: 0 0 4px;
}

.dokumenti-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dokumenti-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 48px 24px;
    text-align: center;
    color: var(--gray-500);
}
.dokumenti-empty-icon {
    width: 80px; height: 80px;
    background: var(--primary-50);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}
.dokumenti-empty-icon svg { width: 40px; height: 40px; color: var(--primary-500); }
.dokumenti-empty h3 { font-size: 1.125rem; font-weight: 600; color: var(--gray-700); margin-bottom: 4px; }
.dokumenti-empty p { font-size: 0.875rem; }

.dokumenti-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: white;
    border-radius: 4px;
    padding: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    border: 1px solid var(--gray-100);
    cursor: pointer;
    transition: border-color 0.15s;
}
.dokumenti-card:hover { border-color: var(--primary-200); }
.dokumenti-card:active { transform: scale(0.99); }

.dokumenti-card-thumb {
    width: 56px; height: 72px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--gray-100);
}
.dokumenti-card-thumb img { width: 100%; height: 100%; object-fit: cover; }

.dokumenti-card-info { flex: 1; min-width: 0; }
.dokumenti-card-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dokumenti-card-date {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--gray-400);
    margin-top: 4px;
}
.dokumenti-card-date svg { width: 13px; height: 13px; }

.dokumenti-fab {
    position: fixed;
    bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + var(--native-nav-bottom-offset) + 28px);
    right: calc(50% - min(var(--max-width), 100vw) / 2 + 20px);
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--primary-600);
    color: white;
    border: none;
    box-shadow: 0 1px 2px rgba(22, 163, 74, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: transform 0.15s, box-shadow 0.15s;
}
.dokumenti-fab:active { transform: scale(0.92); }
.dokumenti-fab svg { width: 26px; height: 26px; }

/* Stacked FABs */
.dokumenti-fab--upload {
    bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + var(--native-nav-bottom-offset) + 28px);
    width: 48px; height: 48px;
    background: #3b82f6;
    box-shadow: 0 1px 2px rgba(59, 130, 246, 0.2);
}
.dokumenti-fab--upload svg { width: 22px; height: 22px; }
.dokumenti-fab--folder {
    bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + var(--native-nav-bottom-offset) + 94px);
    width: 48px; height: 48px;
    background: var(--gray-600);
    box-shadow: 0 1px 2px rgba(75, 85, 99, 0.2);
}
.dokumenti-fab--folder svg { width: 22px; height: 22px; }

/* Sort Toolbar */
.dokumenti-toolbar {
    display: flex;
    justify-content: flex-end;
    padding: 4px 16px 12px;
}
.dokumenti-sort-control select {
    background: var(--gray-50, #f9fafb);
    border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: 4px;
    padding: 6px 12px;
    font-family: var(--font-family, 'Inter', sans-serif);
    font-size: 0.8125rem;
    color: var(--gray-700, #374151);
    cursor: pointer;
}

/* Folder Card */
.dokumenti-card--folder { cursor: pointer; }
.dokumenti-card-thumb--folder {
    background: var(--primary-50, #f0fdf4) !important;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dokumenti-card-thumb--folder svg {
    width: 32px; height: 32px;
    color: var(--primary-600, #16a34a);
}

/* File Type Icons */
.dokumenti-card-file-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    gap: 2px;
}
.dokumenti-card-file-icon svg { width: 28px; height: 28px; }
.dokumenti-card-file-icon span {
    font-size: 0.5625rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.dokumenti-card-file-icon--img { color: #0891b2; background: #ecfeff; }
.dokumenti-card-file-icon--pdf { color: #dc2626; background: #fef2f2; }
.dokumenti-card-file-icon--doc { color: #3b82f6; background: #eff6ff; }
.dokumenti-card-thumb--file { background: transparent !important; }

/* Folder Name Input */
.dokumenti-folder-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: 4px;
    font-family: var(--font-family, 'Inter', sans-serif);
    font-size: 0.9375rem;
    color: var(--gray-800, #1f2937);
    background: var(--gray-50, #f9fafb);
    box-sizing: border-box;
    user-select: text;
    -webkit-user-select: text;
}
.dokumenti-folder-input:focus {
    outline: none;
    border-color: var(--primary-500, #22c55e);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

/* Move Dialog */
.dokumenti-move-dialog-content { max-height: 70vh; }
.dokumenti-move-list {
    max-height: 300px;
    overflow-y: auto;
    margin: 12px 0;
}
.dokumenti-move-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--gray-700, #374151);
    transition: background 0.15s;
}
.dokumenti-move-option:hover { background: var(--gray-100, #f3f4f6); }
.dokumenti-move-option--current {
    background: var(--primary-50, #f0fdf4);
    color: var(--primary-700, #15803d);
    font-weight: 600;
    pointer-events: none;
}
.dokumenti-move-option--indent { padding-left: 36px; }

/* Document Viewer Overlay */
.dokumenti-viewer {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #000;
    z-index: 10000;
    display: flex;
    flex-direction: column;
}
.dokumenti-viewer-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    padding-top: max(12px, env(safe-area-inset-top));
    background: rgba(0,0,0,0.8);
}
.dokumenti-viewer-close {
    width: 40px; height: 40px;
    border: none; background: none;
    color: white; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.dokumenti-viewer-close svg { width: 24px; height: 24px; }
.dokumenti-viewer-title { color: white; font-weight: 500; font-size: 1rem; }
.dokumenti-viewer-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 16px;
}
.dokumenti-viewer-body img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* =============================================================================
   Document Scanner Overlay
   ============================================================================= */
.scanner-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #000;
    z-index: 10000;
    display: flex;
    flex-direction: column;
}
.scanner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    padding-top: max(12px, env(safe-area-inset-top));
    background: rgba(0,0,0,0.8);
}
.scanner-header-title { color: white; font-weight: 500; font-size: 1rem; }

.scanner-btn-cancel,
.scanner-btn-crop {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
}
.scanner-btn-cancel { background: rgba(255,255,255,0.15); color: white; }
.scanner-btn-crop { background: var(--primary-500); color: white; }

.scanner-canvas-wrap {
    flex: 1;
    position: relative;
    overflow: hidden;
}
.scanner-canvas-wrap canvas { display: block; }

.scanner-hint {
    padding: 12px;
    text-align: center;
    color: rgba(255,255,255,0.7);
    font-size: 0.875rem;
    background: rgba(0,0,0,0.8);
    padding-bottom: max(12px, env(safe-area-inset-bottom));
}

/* Scanner Preview + Name Step */
.scanner-preview {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow: auto;
}
.scanner-preview img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }

.scanner-name-section {
    padding: 16px;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    background: rgba(0,0,0,0.8);
}
.scanner-name-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    font-size: 1rem;
    font-family: var(--font-family);
    background: rgba(255,255,255,0.1);
    color: white;
    transition: border-color 0.15s;
}
.scanner-name-input::placeholder { color: rgba(255,255,255,0.4); }
.scanner-name-input:focus { outline: none; border-color: var(--primary-500); }

/* =============================================================================
   Login Page
   ============================================================================= */
.login-page-content {
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.login-card {
    background: white;
    border-radius: 4px;
    padding: 32px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.login-logo { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    margin-bottom: 32px; 
}
.login-logo-icon {
    width: 80px; height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}
.login-logo-wrapper {
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 50%;
    border: 1.5px solid #166534;
    overflow: hidden;
}
.login-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.15);
    transform-origin: center;
    display: block;
}
.login-title { font-size: 1.5rem; font-weight: 700; }
.login-subtitle { color: var(--gray-500); }

.form-group { margin-bottom: 16px; }
.form-label { 
    display: block; 
    font-size: 0.875rem; 
    font-weight: 500; 
    color: var(--gray-700); 
    margin-bottom: 4px; 
}
.form-input-wrapper { position: relative; }
.form-input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    border: 1px solid var(--gray-200);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus { 
    outline: none; 
    border-color: var(--primary-500); 
    box-shadow: 0 0 0 3px var(--primary-100); 
}
.form-input--no-icon {
    padding-left: 16px;
    text-align: left;
}
.form-input-icon {
    position: absolute;
    left: 16px; 
    top: 50%; 
    transform: translateY(-50%); 
    color: var(--gray-400); 
}
.form-input-icon svg { width: 20px; height: 20px; }

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 4px;
}
.password-toggle svg { width: 20px; height: 20px; }

.login-btn {
    width: 100%;
    padding: 14px;
    background: var(--accent-600);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    transition: background 0.15s;
}
.login-btn:hover { background: var(--accent-700); }
.login-btn svg { width: 20px; height: 20px; }

.login-footer { text-align: center; margin-top: 24px; }
.login-footer-text { color: var(--gray-500); font-size: 0.875rem; }
.login-footer-link { color: var(--primary-600); text-decoration: none; font-weight: 500; }

/* 2FA code inputs */
.twofa-code-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 20px 0;
}
.twofa-digit {
    width: 44px;
    height: 52px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    border: 2px solid var(--gray-300);
    border-radius: 4px;
    background: var(--white);
    color: var(--gray-900);
    outline: none;
    transition: border-color 0.15s;
}
.twofa-digit:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}
@keyframes twofa-shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}
.twofa-shake { animation: twofa-shake 0.4s ease; }

/* =============================================================================
   Utilities
   ============================================================================= */
.loading-container { text-align: center; padding: 32px; }

.loading-spinner {
    display: inline-block;
    width: 24px; height: 24px;
    border: 2px solid var(--gray-200);
    border-top-color: var(--primary-600);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.empty-state, .error-state {
    text-align: center;
    padding: 32px;
    color: var(--gray-500);
}
.error-state { color: #dc2626; }

/* =============================================================================
   Evidencija Page
   ============================================================================= */
.header--evidencija {
    background:
        radial-gradient(circle at top right, rgba(251, 191, 36, 0.22), transparent 36%),
        linear-gradient(135deg, #0f3d34, #174d41 58%, #1f5d4f);
}

.evidencija-page {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
}

.evidencija-intro-card,
.evidencija-farm-card,
.evidencija-login-card,
.evidencija-subview-card {
    border-radius: 4px;
}

.evidencija-intro-card {
    position: relative;
    overflow: hidden;
    padding: 18px 18px 20px;
    color: #f8fafc;
    background:
        radial-gradient(circle at top right, rgba(252, 211, 77, 0.36), transparent 34%),
        linear-gradient(160deg, #12332d 0%, #17443a 46%, #22584c 100%);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.evidencija-intro-kicker,
.evidencija-section-kicker,
.evidencija-login-kicker,
.evidencija-subview-kicker {
    font-size: 0.73rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.82;
}

.evidencija-intro-card h2,
.evidencija-login-card h2,
.evidencija-subview-card h2 {
    margin-top: 8px;
    font-size: 1.3rem;
    line-height: 1.15;
}

.evidencija-intro-card p:last-child,
.evidencija-login-card p:last-of-type,
.evidencija-subview-card p:last-of-type {
    margin-top: 8px;
    line-height: 1.5;
}

.evidencija-farm-card {
    padding: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbf8 100%);
    border: 1px solid rgba(47, 96, 50, 0.12);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.evidencija-farm-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.evidencija-farm-copy {
    min-width: 0;
}

.evidencija-farm-label {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #5c6f67;
}

.evidencija-farm-copy h2 {
    margin-top: 6px;
    color: #10231c;
    font-size: 1.22rem;
    line-height: 1.2;
}

.evidencija-farm-copy p:last-child {
    margin-top: 6px;
    color: #5c6f67;
}

.evidencija-farm-action {
    width: 42px;
    height: 42px;
    border-radius: 4px;
    border: 1px solid rgba(47, 96, 50, 0.18);
    background: #eef4ee;
    color: #214a2c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.evidencija-farm-action svg,
.evidencija-action-icon svg,
.evidencija-login-icon svg,
.evidencija-subview-icon svg,
.evidencija-action-arrow svg {
    width: 20px;
    height: 20px;
}

.evidencija-farm-action:hover,
.evidencija-farm-action:focus-visible {
    background: #e4efe5;
    border-color: rgba(47, 96, 50, 0.32);
}

.evidencija-stats-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.evidencija-stat-card {
    border-radius: 4px;
    padding: 14px;
    background: linear-gradient(180deg, #f3f8f4 0%, #eef4ee 100%);
    border: 1px solid rgba(47, 96, 50, 0.12);
}

.evidencija-stat-label {
    font-size: 0.8rem;
    color: #5c6f67;
}

.evidencija-stat-value {
    margin-top: 10px;
    color: #10231c;
    font-size: 1.5rem;
    font-weight: 700;
}

.evidencija-stat-meta {
    margin-top: 4px;
    color: #5c6f67;
    font-size: 0.8rem;
    line-height: 1.4;
}

.evidencija-section-head h3 {
    margin-top: 4px;
    color: #10231c;
    font-size: 1.05rem;
}

.evidencija-actions-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.evidencija-action-card {
    width: 100%;
    padding: 16px;
    border-radius: 4px;
    border: 1px solid rgba(47, 96, 50, 0.12);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbf8 100%);
    text-align: left;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.evidencija-action-card:hover,
.evidencija-action-card:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(47, 96, 50, 0.26);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.evidencija-action-icon,
.evidencija-login-icon,
.evidencija-subview-icon {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.evidencija-action-icon {
    background: linear-gradient(135deg, #eef4ee, #dde9de);
    color: #214a2c;
}

.evidencija-action-copy {
    min-width: 0;
    flex: 1;
}

.evidencija-action-copy h4 {
    color: #10231c;
    font-size: 1rem;
    font-weight: 700;
}

.evidencija-action-copy p {
    margin-top: 4px;
    color: #5c6f67;
    font-size: 0.87rem;
    line-height: 1.45;
}

.evidencija-action-arrow {
    color: #789084;
    flex-shrink: 0;
}

.evidencija-login-card,
.evidencija-subview-card {
    padding: 22px 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbf8 100%);
    border: 1px solid rgba(47, 96, 50, 0.12);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.evidencija-login-card {
    margin-top: 8px;
}

.evidencija-login-icon,
.evidencija-subview-icon {
    background: linear-gradient(135deg, #12332d, #22584c);
    color: #f8fafc;
}

.evidencija-subview-note {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 4px;
    background: #eef4ee;
    color: #2d4a3b;
    line-height: 1.45;
}

.evidencija-primary-btn,
.evidencija-secondary-btn {
    width: 100%;
    min-height: 48px;
    margin-top: 18px;
    border-radius: 4px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.evidencija-primary-btn {
    border: 1px solid rgba(47, 96, 50, 0.18);
    background: #eef4ee;
    color: #214a2c;
    font-weight: 700;
}

.evidencija-secondary-btn {
    border: 1px solid rgba(47, 96, 50, 0.18);
    background: #eef4ee;
    color: #214a2c;
}

.evidencija-primary-btn:hover,
.evidencija-primary-btn:focus-visible,
.evidencija-secondary-btn:hover,
.evidencija-secondary-btn:focus-visible {
    background: #e4efe5;
    border-color: rgba(47, 96, 50, 0.3);
}

.evidencija-primary-btn:active,
.evidencija-secondary-btn:active {
    opacity: 0.92;
}

.evidencija-primary-btn:hover,
.evidencija-secondary-btn:hover,
.evidencija-primary-btn:focus-visible,
.evidencija-secondary-btn:focus-visible,
.evidencija-action-card:focus-visible,
.evidencija-farm-action:focus-visible {
    outline: none;
}

.evidencija-ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 40px;
    margin-bottom: 6px;
    padding: 8px 12px;
    border: 1px solid rgba(47, 96, 50, 0.18);
    border-radius: 4px;
    background: #eef4ee;
    color: #214a2c;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.evidencija-ghost-btn:hover,
.evidencija-ghost-btn:focus-visible {
    background: #e4efe5;
    border-color: rgba(47, 96, 50, 0.3);
    outline: none;
}
.evidencija-ghost-btn:active {
    opacity: 0.92;
}

.evidencija-subview-shell {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.evidencija-subview-topbar {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.evidencija-inline-btn {
    width: auto;
    margin-top: 0;
    align-self: flex-start;
    padding: 0 16px;
}

.evidencija-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.evidencija-form-card,
.evidencija-list-card,
.evidencija-selected-pill {
    border-radius: 4px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbf8 100%);
    border: 1px solid rgba(47, 96, 50, 0.12);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.evidencija-form-card {
    padding: 16px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
}

.evidencija-form-head,
.evidencija-list-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.evidencija-form-head h3,
.evidencija-list-card-head h3 {
    color: #10231c;
    font-size: 1rem;
}

.evidencija-link-btn {
    border: 0;
    background: transparent;
    color: #215236;
    font-weight: 700;
    cursor: pointer;
}

.evidencija-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 14px;
    min-width: 0;
}

.evidencija-field span,
.evidencija-suggestion-row > span {
    color: #415b50;
    font-size: 0.84rem;
    font-weight: 600;
}

.evidencija-field input,
.evidencija-field select,
.evidencija-field textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: block;
    border-radius: 4px;
    border: 1px solid rgba(47, 96, 50, 0.18);
    background: #f9fcf9;
    color: #10231c;
    padding: 12px 14px;
    font-size: 0.95rem;
}

.evidencija-field select {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.evidencija-field input[type="date"],
.evidencija-field input[type="time"] {
    height: 52px;
    padding-top: 0;
    padding-bottom: 0;
    line-height: 52px;
    -webkit-appearance: none;
    appearance: none;
    color-scheme: light;
    text-align: left;
}

.evidencija-field input[type="date"]::-webkit-datetime-edit,
.evidencija-field input[type="time"]::-webkit-datetime-edit {
    min-height: 100%;
    display: flex;
    align-items: center;
    padding: 0;
}

.evidencija-field input[type="date"]::-webkit-date-and-time-value,
.evidencija-field input[type="time"]::-webkit-date-and-time-value {
    text-align: left;
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.evidencija-field input[type="date"]::-webkit-calendar-picker-indicator,
.evidencija-field input[type="time"]::-webkit-calendar-picker-indicator {
    opacity: 0.72;
}

.date-input-wrap {
    display: block;
    position: relative;
    width: 100%;
    min-width: 0;
}

.date-input--formatted {
    -webkit-text-fill-color: transparent;
}

.date-input--formatted::-webkit-datetime-edit-day-field:focus,
.date-input--formatted::-webkit-datetime-edit-month-field:focus,
.date-input--formatted::-webkit-datetime-edit-year-field:focus {
    background: transparent;
}

.date-input-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    pointer-events: none;
    white-space: nowrap;
    line-height: 1;
}

.date-input-text--empty {
    opacity: 0.55;
}

.evidencija-field textarea {
    resize: vertical;
    min-height: 88px;
}

.evidencija-field input:focus,
.evidencija-field select:focus,
.evidencija-field textarea:focus {
    outline: none;
    border-color: rgba(33, 74, 44, 0.46);
    box-shadow: 0 0 0 3px rgba(33, 74, 44, 0.08);
}

.evidencija-field-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.evidencija-field-grid > * {
    min-width: 0;
}

.evidencija-list-card {
    padding: 14px 16px;
}

.evidencija-list-card--compact {
    padding: 13px 14px;
}

/* Optimistic UI: row pending a background sync (Evidencija spray/fertilizer save) */
.evidencija-list-card.evidencija-syncing {
    opacity: 0.55;
    pointer-events: none;
    animation: evidencija-sync-pulse 1.1s ease-in-out infinite;
}

@keyframes evidencija-sync-pulse {
    0%, 100% { opacity: 0.45; }
    50% { opacity: 0.7; }
}

/* Rejected offline save: stays stored, needs the user to edit or discard it */
.evidencija-list-card.evidencija-failed {
    border-color: rgba(201, 55, 55, 0.35);
    background: rgba(201, 55, 55, 0.05);
}

/* A queued parcel card is not interactive, except for removing it. */
.evidencija-chip-btn--queued {
    pointer-events: auto;
}

.evidencija-waiting-note {
    margin: 4px 0 0;
    color: #9a6700;
    font-size: 0.85rem;
    font-weight: 600;
}

[data-theme="dark"] .evidencija-waiting-note {
    color: #e3b341;
}

.evidencija-failed-message {
    margin: 8px 0 0;
    color: #c93737;
    font-size: 0.88rem;
    font-weight: 600;
}

.evidencija-card-actions--failed {
    margin-top: 8px;
}

.evidencija-list-card-head p {
    margin-top: 4px;
    color: #5c6f67;
    font-size: 0.88rem;
}

.evidencija-card-actions,
.evidencija-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.evidencija-chip-btn {
    border: 1px solid rgba(47, 96, 50, 0.16);
    border-radius: 999px;
    background: #eef4ee;
    color: #214a2c;
    padding: 8px 12px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.evidencija-chip-btn--danger {
    background: #fff1f2;
    border-color: rgba(220, 38, 38, 0.16);
    color: #b91c1c;
}

.evidencija-card-note {
    margin-top: 10px;
    color: #415b50;
    line-height: 1.5;
}

.evidencija-date-header {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 10px 2px 6px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #3a7d44;
    letter-spacing: 0.02em;
    background: var(--bg-primary, #f4f6f5);
}

.evidencija-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.evidencija-card-header h3 {
    color: #10231c;
    font-size: 1rem;
}
.evidencija-card-header p {
    margin-top: 4px;
    color: #5c6f67;
    font-size: 0.88rem;
}

.evidencija-card-chevron {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    color: #5c6f67;
    transition: transform 0.2s ease;
}
.evidencija-card-chevron svg {
    width: 100%;
    height: 100%;
}

.evidencija-history-card .evidencija-detail-grid,
.evidencija-history-card .evidencija-card-note {
    display: none;
}
.evidencija-history-card.expanded .evidencija-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.evidencija-history-card.expanded .evidencija-card-note {
    display: block;
}
.evidencija-history-card.expanded .evidencija-card-chevron {
    transform: rotate(180deg);
}

/* Checkbox (hidden until select-mode) */
.evidencija-checkbox {
    display: none;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(47, 96, 50, 0.3);
    background: transparent;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.evidencija-checkbox svg {
    width: 14px;
    height: 14px;
    stroke: transparent;
    transition: stroke 0.15s ease;
}
.select-mode .evidencija-checkbox {
    display: flex;
}
.evidencija-checkbox.selected {
    background: #2e7d32;
    border-color: #2e7d32;
}
.evidencija-checkbox.selected svg {
    stroke: #fff;
}
.select-mode .evidencija-card-chevron {
    display: none;
}
.evidencija-history-card--selected {
    border-color: rgba(46, 125, 50, 0.4);
    box-shadow: 0 0 0 1px rgba(46, 125, 50, 0.15);
}

/* Bulk action bar */
.evidencija-bulk-action-bar {
    position: fixed;
    bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + var(--native-nav-bottom-offset) + 12px);
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: calc(var(--max-width) - 32px);
    z-index: 95;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    background: #ffffff;
    border-top: 1px solid rgba(47, 96, 50, 0.12);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
}
.evidencija-bulk-count {
    font-size: 0.88rem;
    color: #415b50;
}
.evidencija-bulk-count strong {
    color: #10231c;
}
.evidencija-bulk-btns {
    display: flex;
    gap: 8px;
    align-items: center;
}

.evidencija-detail-grid {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.evidencija-detail-grid span {
    border-radius: 4px;
    background: #eef4ee;
    color: #214a2c;
    padding: 9px 10px;
    font-size: 0.83rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.evidencija-selected-pill {
    margin-top: 14px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.evidencija-selected-pill strong {
    color: #10231c;
    font-size: 0.94rem;
}

.evidencija-selected-pill span {
    color: #5c6f67;
    font-size: 0.84rem;
    overflow-wrap: anywhere;
}

.evidencija-field--search {
    position: relative;
}

.evidencija-search-status {
    margin-top: 8px;
    color: #5c6f67;
    font-size: 0.82rem;
}

.evidencija-search-results {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.evidencija-search-result {
    width: 100%;
    max-width: 100%;
    text-align: left;
    border: 1px solid rgba(47, 96, 50, 0.12);
    border-radius: 4px;
    background: #f5faf5;
    padding: 12px 14px;
    cursor: pointer;
}

.evidencija-search-result strong {
    display: block;
    color: #10231c;
    font-size: 0.92rem;
    overflow-wrap: anywhere;
}

.evidencija-search-result span {
    display: block;
    margin-top: 4px;
    color: #5c6f67;
    font-size: 0.82rem;
    overflow-wrap: anywhere;
}

.evidencija-suggestion-row {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.evidencija-filter-card {
    gap: 0;
}

.evidencija-filter-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.evidencija-filter-toggle {
    width: 100%;
    border: 1px solid rgba(47, 96, 50, 0.12);
    border-radius: 4px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbf8 100%);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
    cursor: pointer;
}

.evidencija-filter-toggle-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.evidencija-filter-toggle-copy strong {
    color: #10231c;
    font-size: 0.95rem;
}

.evidencija-filter-toggle-copy span {
    color: #5c6f67;
    font-size: 0.83rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.evidencija-filter-toggle-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.evidencija-filter-toggle-icon {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    background: #eef4ee;
    color: #214a2c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.evidencija-filter-toggle-icon svg {
    width: 18px;
    height: 18px;
}

.evidencija-filter-toggle--open {
    border-color: rgba(47, 96, 50, 0.22);
}

.evidencija-filter-copy {
    margin-top: 4px;
    color: #5c6f67;
    font-size: 0.84rem;
    line-height: 1.45;
}

.evidencija-filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 10px;
    border-radius: 999px;
    background: #eef4ee;
    color: #214a2c;
    font-size: 0.77rem;
    font-weight: 700;
    white-space: nowrap;
}

.evidencija-filter-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.evidencija-filter-btn {
    margin-top: 0;
}

.evidencija-section-head--spaced {
    margin-top: 6px;
}

.evidencija-subview-note--tight {
    margin-top: 14px;
    overflow-wrap: anywhere;
}

.evidencija-total-calc {
    font-size: 13px;
    color: #166534;
    font-weight: 600;
    margin-top: 6px;
    padding: 6px 10px;
    background: rgba(22, 101, 52, 0.08);
    border-radius: 4px;
}

[data-theme="dark"] .evidencija-total-calc {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
}

/* Segmented tab control */
.evidencija-segmented {
    display: flex;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
}

.evidencija-segmented-btn {
    flex: 1;
    padding: 10px 12px;
    font-size: 0.88rem;
    font-weight: 600;
    background: #f9fafb;
    color: #4b5563;
    border: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    min-height: 44px;
}

.evidencija-segmented-btn + .evidencija-segmented-btn {
    border-left: 1px solid #d1d5db;
}

.evidencija-segmented-btn--active {
    background: #166534;
    color: #ffffff;
}

[data-theme="dark"] .evidencija-segmented {
    border-color: rgba(109, 151, 118, 0.25);
}

[data-theme="dark"] .evidencija-segmented-btn {
    background: #1d231f;
    color: #a3b8a8;
}

[data-theme="dark"] .evidencija-segmented-btn + .evidencija-segmented-btn {
    border-left-color: rgba(109, 151, 118, 0.25);
}

[data-theme="dark"] .evidencija-segmented-btn--active {
    background: #166534;
    color: #ffffff;
}

/* Compact variant: crop catalog/manual entry toggle inside the parcel form */
.evidencija-segmented--compact {
    margin-bottom: 0;
}

.evidencija-segmented--compact .evidencija-segmented-btn {
    min-height: 36px;
    padding: 7px 10px;
    font-size: 0.82rem;
}

.evidencija-inline-status,
.evidencija-inline-warning {
    margin: 8px 0 0;
    font-size: 0.78rem;
    line-height: 1.45;
    color: #5c6f67;
}

.evidencija-inline-warning {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid rgba(180, 83, 9, 0.22);
    border-radius: 4px;
    background: #fff8ed;
    color: #7c4a03;
}

.evidencija-inline-warning .evidencija-link-btn {
    flex: 0 0 auto;
}

/* ── Reference catalog ("Popis sredstava i gnojiva") ─────────────────────── */
.evidencija-catalog-toolbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 8px 0 10px;
    background: var(--bg-primary, #ffffff);
}

.evidencija-catalog-toolbar .evidencija-segmented {
    margin-bottom: 0;
}

.evidencija-catalog-search {
    position: relative;
    display: flex;
    align-items: center;
}

.evidencija-catalog-search svg {
    position: absolute;
    left: 12px;
    width: 18px;
    height: 18px;
    color: #5c6f67;
    pointer-events: none;
}

.evidencija-catalog-search input {
    width: 100%;
    min-width: 0;
    border-radius: 4px;
    border: 1px solid rgba(47, 96, 50, 0.18);
    background: #f9fcf9;
    color: #10231c;
    padding: 12px 14px 12px 38px;
    font-size: 0.95rem;
    min-height: 44px;
    -webkit-appearance: none;
    appearance: none;
}

.evidencija-catalog-search input:focus {
    outline: none;
    border-color: rgba(47, 96, 50, 0.4);
}

.evidencija-catalog-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.evidencija-catalog-count {
    color: #5c6f67;
    font-size: 0.82rem;
}

.evidencija-catalog-state {
    padding: 28px 16px;
    text-align: center;
    color: #5c6f67;
    font-size: 0.9rem;
}

.evidencija-catalog-card {
    padding: 0;
    overflow: hidden;
}

.evidencija-catalog-card-head {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.evidencija-catalog-card-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.evidencija-catalog-card-copy strong {
    color: #10231c;
    font-size: 0.98rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.evidencija-catalog-badge {
    align-self: flex-start;
    border-radius: 4px;
    background: #eef4ee;
    border: 1px solid rgba(47, 96, 50, 0.16);
    color: #214a2c;
    padding: 2px 8px;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.evidencija-catalog-chevron {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: #5c6f67;
    transition: transform 0.2s ease;
}

.evidencija-catalog-chevron svg {
    width: 100%;
    height: 100%;
}

.evidencija-catalog-card--open .evidencija-catalog-chevron {
    transform: rotate(180deg);
}

.evidencija-catalog-card-head--static {
    cursor: default;
    padding-bottom: 10px;
}

.evidencija-catalog-card--static .evidencija-catalog-card-body {
    border-top: 0;
    padding-top: 0;
}

.evidencija-catalog-card-body {
    padding: 0 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    border-top: 1px solid rgba(47, 96, 50, 0.1);
    padding-top: 14px;
}

.evidencija-catalog-detail {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.evidencija-catalog-detail-label {
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #5c6f67;
}

.evidencija-catalog-detail-value,
.evidencija-catalog-description {
    color: #2a3b32;
    font-size: 0.9rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.evidencija-catalog-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.evidencija-catalog-chip {
    border-radius: 4px;
    background: #f3f8f4;
    border: 1px solid rgba(47, 96, 50, 0.12);
    color: #2a4a33;
    padding: 4px 8px;
    font-size: 0.8rem;
    line-height: 1.2;
}

.evidencija-catalog-more {
    margin-top: 2px;
}

.evidencija-catalog-disclaimer {
    color: #6b7d73;
    font-size: 0.78rem;
    line-height: 1.45;
    padding: 0 2px;
}

[data-theme="dark"] .evidencija-catalog-toolbar {
    background: var(--bg-primary, #111613);
}

[data-theme="dark"] .evidencija-catalog-search input {
    background: #101411;
    border-color: rgba(109, 151, 118, 0.18);
    color: #f3f5f4;
}

[data-theme="dark"] .evidencija-catalog-search svg,
[data-theme="dark"] .evidencija-catalog-count,
[data-theme="dark"] .evidencija-catalog-state,
[data-theme="dark"] .evidencija-catalog-detail-label,
[data-theme="dark"] .evidencija-catalog-disclaimer {
    color: #a7b3ac;
}

[data-theme="dark"] .evidencija-catalog-card-copy strong {
    color: #f3f5f4;
}

[data-theme="dark"] .evidencija-catalog-detail-value,
[data-theme="dark"] .evidencija-catalog-description {
    color: #cbd5cd;
}

[data-theme="dark"] .evidencija-catalog-badge,
[data-theme="dark"] .evidencija-catalog-chip {
    background: #202923;
    border-color: rgba(109, 151, 118, 0.16);
    color: #dfe6e1;
}

[data-theme="dark"] .evidencija-catalog-chevron {
    color: #a7b3ac;
}

[data-theme="dark"] .evidencija-catalog-card-body {
    border-top-color: rgba(109, 151, 118, 0.16);
}

/* Autocomplete results overlay */
.evidencija-autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 20;
    max-height: 200px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .evidencija-autocomplete-results {
    background: #1d231f;
    border-color: rgba(109, 151, 118, 0.25);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Export PDF modal overlay */
.evidencija-export-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.evidencija-export-modal {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 20px;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.evidencija-export-modal h3 {
    margin: 0;
    font-size: 1.1rem;
}

.evidencija-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-secondary, #555);
}

.evidencija-input,
select.evidencija-input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color, #ccc);
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.95rem;
    box-sizing: border-box;
    background: var(--bg-primary, #fff);
    color: var(--text-primary, #333);
}

.evidencija-input:focus,
select.evidencija-input:focus {
    outline: none;
    border-color: rgba(33, 74, 44, 0.46);
    box-shadow: 0 0 0 3px rgba(33, 74, 44, 0.08);
}

[data-theme="dark"] .evidencija-input,
[data-theme="dark"] select.evidencija-input {
    background: #161b17;
    border-color: rgba(109, 151, 118, 0.3);
    color: #e0e0e0;
}

[data-theme="dark"] .evidencija-export-modal {
    background: #1d231f;
    border-color: rgba(109, 151, 118, 0.25);
}

.evidencija-subview-card--empty {
    text-align: center;
}

.evidencija-primary-btn[disabled],
.evidencija-secondary-btn[disabled] {
    opacity: 0.7;
    cursor: default;
}

@media (min-width: 640px) {
    .evidencija-subview-topbar {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
    }

    .evidencija-field-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .evidencija-filter-actions {
        flex-direction: row;
    }

    .evidencija-filter-btn {
        flex: 1;
    }
}

[data-theme="dark"] .evidencija-form-card,
[data-theme="dark"] .evidencija-list-card,
[data-theme="dark"] .evidencija-selected-pill,
[data-theme="dark"] .evidencija-filter-toggle {
    background: linear-gradient(180deg, #1d231f 0%, #171c18 100%);
    border-color: rgba(109, 151, 118, 0.16);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .evidencija-form-head h3,
[data-theme="dark"] .evidencija-list-card-head h3,
[data-theme="dark"] .evidencija-selected-pill strong,
[data-theme="dark"] .evidencija-filter-toggle-copy strong {
    color: #f3f5f4;
}

[data-theme="dark"] .evidencija-field span,
[data-theme="dark"] .evidencija-suggestion-row > span,
[data-theme="dark"] .evidencija-list-card-head p,
[data-theme="dark"] .evidencija-card-note,
[data-theme="dark"] .evidencija-selected-pill span,
[data-theme="dark"] .evidencija-filter-toggle-copy span,
[data-theme="dark"] .evidencija-search-status,
[data-theme="dark"] .evidencija-inline-status,
[data-theme="dark"] .evidencija-filter-copy {
    color: #a7b3ac;
}

[data-theme="dark"] .evidencija-inline-warning {
    background: rgba(180, 83, 9, 0.12);
    border-color: rgba(245, 158, 11, 0.28);
    color: #f2c47d;
}

[data-theme="dark"] .evidencija-field input,
[data-theme="dark"] .evidencija-field select,
[data-theme="dark"] .evidencija-field textarea,
[data-theme="dark"] .evidencija-search-result {
    background: #101411;
    border-color: rgba(109, 151, 118, 0.18);
    color: #f3f5f4;
}

[data-theme="dark"] .evidencija-detail-grid span,
[data-theme="dark"] .evidencija-chip-btn,
[data-theme="dark"] .evidencija-filter-badge,
[data-theme="dark"] .evidencija-filter-toggle-icon {
    background: #202923;
    border-color: rgba(109, 151, 118, 0.16);
    color: #dfe6e1;
}

[data-theme="dark"] .evidencija-date-header {
    color: #a0d4a8;
    background: var(--bg-primary, #111613);
}
[data-theme="dark"] .evidencija-card-header h3 {
    color: #f3f5f4;
}
[data-theme="dark"] .evidencija-card-header p,
[data-theme="dark"] .evidencija-card-chevron {
    color: #a7b3ac;
}
[data-theme="dark"] .evidencija-chip-btn--danger {
    background: rgba(127, 29, 29, 0.28);
    border-color: rgba(248, 113, 113, 0.2);
    color: #fda4af;
}

[data-theme="dark"] .evidencija-checkbox {
    border-color: rgba(140, 200, 150, 0.3);
}
[data-theme="dark"] .evidencija-checkbox.selected {
    background: #388e3c;
    border-color: #388e3c;
}
[data-theme="dark"] .evidencija-history-card--selected {
    border-color: rgba(56, 142, 60, 0.4);
    box-shadow: 0 0 0 1px rgba(56, 142, 60, 0.15);
}
[data-theme="dark"] .evidencija-bulk-action-bar {
    background: #1a1f1c;
    border-color: rgba(109, 151, 118, 0.16);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.2);
}
[data-theme="dark"] .evidencija-bulk-count {
    color: #a7b3ac;
}
[data-theme="dark"] .evidencija-bulk-count strong {
    color: #f3f5f4;
}
[data-theme="dark"] .evidencija-link-btn {
    color: #8fd3a0;
}

/* =============================================================================
   PI (Poljoprivredna Iskaznica) Page
   ============================================================================= */
.header--pi { background: linear-gradient(135deg, #78350F, #78350F); }

.pi-page {
    padding: 16px;
    padding-bottom: 168px;
}

.pi-page--single {
    display: flex;
    flex-direction: column;
}

.pi-single-wrap {
    width: 100%;
    max-width: 420px;
    margin: 8px auto 0;
}

.pi-single-card {
    position: relative;
    width: 100%;
    border: 0;
    background: linear-gradient(160deg, #78350F 0%, #78350F 45%, #78350F 100%);
    border-radius: 4px;
    padding: 16px;
    cursor: pointer;
    text-align: left;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.pi-single-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.pi-single-card:active {
    transform: scale(0.985);
}

.pi-single-card-glow {
    position: absolute;
    width: 220px;
    height: 220px;
    top: -120px;
    right: -100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(120, 53, 15, 0.45) 0%, rgba(120, 53, 15, 0) 72%);
    pointer-events: none;
}

.pi-single-card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 1.58 / 1;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    background: rgba(255, 255, 255, 0.55);
}

.pi-single-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pi-single-card-meta {
    margin-top: 14px;
}

.pi-single-card-meta h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
}

.pi-single-card-meta p {
    margin-top: 4px;
    font-size: 0.85rem;
    color: #ffffff;
}

.pi-single-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.pi-bottom-actions {
    width: 100%;
    max-width: 420px;
    margin: 16px auto 0;
    background: rgba(120, 53, 15, 0.9);
    border: 1px solid rgba(120, 53, 15, 0.55);
    border-radius: 4px;
    padding: 10px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* ── Iskaznice Section Headings ─────────────────────────────────── */
.iskaznice-section-heading {
    width: 100%;
    max-width: 420px;
    margin: 0 auto 8px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #78350F;
    letter-spacing: 0.02em;
}
.iskaznice-section-heading--potvrda {
    margin-top: 28px;
}

/* ── Potvrda Section ────────────────────────────────────────────── */
.potvrda-section {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}
.potvrda-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    border: 2px dashed #d6d3d1;
    border-radius: 4px;
    background: var(--gray-50, #fafaf9);
}
.potvrda-empty-icon svg {
    width: 48px;
    height: 48px;
    color: #a8a29e;
}
.potvrda-empty-text {
    margin-top: 12px;
    font-size: 0.9rem;
    color: #78716c;
    text-align: center;
}
/* ── Potvrda Document Tile (PDF) ────────────────────────────────── */
.potvrda-document-tile {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px;
    border: 1px solid #e7e5e4;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    text-align: left;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.potvrda-document-tile:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.potvrda-document-tile:active {
    transform: scale(0.985);
}
.potvrda-document-tile-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fef3c7;
    border-radius: 4px;
}
.potvrda-document-tile-icon svg {
    width: 24px;
    height: 24px;
    color: #92400e;
}
.potvrda-document-tile-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.potvrda-document-tile-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1c1917;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.potvrda-document-tile-expiry {
    font-size: 0.82rem;
    color: #78716c;
}
.potvrda-document-tile-badge {
    flex-shrink: 0;
    padding: 3px 8px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #92400e;
    background: #fef3c7;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Potvrda card (image variant) now matches the primary brown PI card styling */
.potvrda-card {
    background: linear-gradient(160deg, #78350F 0%, #78350F 45%, #78350F 100%);
}

.potvrda-action-panel__delete {
    width: 100%;
    margin-top: 8px;
}

.potvrda-expiry-modal__field {
    margin-top: 4px;
}

.potvrda-expiry-modal__actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.btn {
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    border: none;
    border-radius: 4px;
    font-size: 0.92rem;
    font-weight: 700;
    font-family: var(--font-family);
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.btn--primary {
    border: 1px solid #78350F;
    background: linear-gradient(135deg, #78350F, #78350F);
    color: #ffffff;
}

.btn--primary:hover,
.btn--primary:focus-visible {
    background: linear-gradient(135deg, #6b2f0c, #6b2f0c);
}

.potvrda-expiry-modal__actions .btn {
    flex: 1;
}

.pi-action-btn {
    border: 1px solid #fed7aa;
    background: #fff7ed;
    color: #9a3412;
    border-radius: 4px;
    min-height: 40px;
    padding: 8px 10px;
    font-family: var(--font-family);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease, border-color 0.15s ease;
}

.pi-action-btn:hover {
    filter: brightness(0.98);
    border-color: #fdba74;
}

.pi-action-btn:active {
    transform: scale(0.985);
}

.pi-action-btn--primary {
    border-color: #78350F;
    background: linear-gradient(135deg, #78350F, #78350F);
    color: white;
}

.pi-action-btn--danger {
    grid-column: 1 / -1;
    border-color: #fecdd3;
    background: #fff1f2;
    color: #be123c;
}

.pi-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pi-empty-icon {
    width: 80px; height: 80px;
    background: #fef3c7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}
.pi-empty-icon svg { width: 40px; height: 40px; color: #d97706; }

.pi-card-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: white;
    border-radius: 4px;
    padding: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    border: 1px solid var(--gray-100);
    cursor: pointer;
    transition: border-color 0.15s;
}
.pi-card-item:hover { border-color: #fbbf24; }
.pi-card-item:active { transform: scale(0.99); }

.pi-card-thumb {
    width: 72px; height: 46px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--gray-100);
}
.pi-card-thumb img { width: 100%; height: 100%; object-fit: cover; }

.pi-card-thumb--generated {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fef3c7;
}
.pi-card-thumb--generated svg { width: 28px; height: 28px; color: #d97706; }

/* ── Add Options Modal (Bottom Sheet) ────────────────────────────────────── */
.pi-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.pi-modal-backdrop {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0);
    transition: background 0.2s;
}
.pi-modal-overlay--visible .pi-modal-backdrop {
    background: rgba(0,0,0,0.4);
}

.pi-modal-sheet {
    position: relative;
    width: 100%;
    max-width: var(--max-width);
    background: white;
    border-radius: 4px 4px 0 0;
    padding: 12px 20px;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    transform: translateY(100%);
    transition: transform 0.25s ease-out;
}
.pi-modal-overlay--visible .pi-modal-sheet {
    transform: translateY(0);
}

.pi-modal-handle {
    width: 36px; height: 4px;
    background: var(--gray-300);
    border-radius: 2px;
    margin: 0 auto 16px;
}

.pi-modal-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 16px;
}

.pi-modal-option {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--gray-200);
    background: white;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 10px;
    transition: background 0.15s, border-color 0.15s;
    text-align: left;
    font-family: var(--font-family);
}
.pi-modal-option:hover { background: var(--gray-50); border-color: #fbbf24; }
.pi-modal-option:active { transform: scale(0.99); }

.pi-modal-option-icon {
    width: 44px; height: 44px;
    background: #fef3c7;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pi-modal-option-icon svg { width: 22px; height: 22px; color: #d97706; }

.pi-modal-option-text { flex: 1; }
.pi-modal-option-label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--gray-800);
}
.pi-modal-option-desc {
    display: block;
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 2px;
}

/* ── Manual Entry Form ───────────────────────────────────────────────────── */
.pi-manual-form-wrap {
    flex: 1;
    overflow-y: auto;
    padding: 20px 16px;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    background: #111;
}

.pi-manual-form {
    max-width: 400px;
    margin: 0 auto;
}

.pi-form-group {
    margin-bottom: 16px;
}

.pi-form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.pi-form-row .pi-form-group {
    margin-bottom: 0;
}

.pi-form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    margin-bottom: 6px;
}

.pi-form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    font-size: 1rem;
    font-family: var(--font-family);
    background: rgba(255,255,255,0.08);
    color: white;
    transition: border-color 0.15s;
}
.pi-form-input::placeholder { color: rgba(255,255,255,0.3); }
.pi-form-input:focus {
    outline: none;
    border-color: #fbbf24;
    box-shadow: 0 0 0 3px rgba(251,191,36,0.15);
}

.pi-form-input--date {
    height: 44px;
    padding: 0 12px;
    font-size: 0.9rem;
    line-height: 44px;
    -webkit-appearance: none;
    appearance: none;
}

.pi-form-input--date::-webkit-date-and-time-value {
    text-align: left;
}


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

/* =============================================================================
   Settings Page
   ============================================================================= */
.settings-page {
    padding: 16px;
}

.settings-section {
    background: var(--card-bg, white);
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color, var(--gray-100));
}

.settings-section-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.settings-section-icon {
    width: 44px; height: 44px;
    background: var(--primary-50);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.settings-section-icon svg { width: 22px; height: 22px; color: var(--primary-600); }

.settings-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, var(--gray-800));
}

.settings-section-desc {
    font-size: 0.8rem;
    color: var(--text-secondary, var(--gray-500));
    margin-top: 2px;
}

/* Theme Toggle */
.settings-theme-toggle {
    display: flex;
    gap: 10px;
}

.settings-theme-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    border: 2px solid var(--border-color, var(--gray-200));
    border-radius: 4px;
    background: var(--card-bg, white);
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-family);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary, var(--gray-500));
}
.settings-theme-btn svg { width: 28px; height: 28px; }
.settings-theme-btn:hover { border-color: var(--primary-500); }
.settings-theme-btn.active {
    border-color: var(--primary-500);
    background: var(--primary-50);
    color: var(--primary-700);
}
.settings-theme-btn.active svg { color: var(--primary-600); }

/* Language List */
.settings-lang-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.settings-lang-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color, var(--gray-200));
    border-radius: 4px;
    background: var(--card-bg, white);
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-family);
    text-align: left;
}
.settings-lang-btn:hover { border-color: var(--primary-500); }
.settings-lang-btn.active {
    border-color: var(--primary-500);
    background: var(--primary-50);
}

.settings-lang-flag {
    font-size: 1.5rem;
    line-height: 1;
}

.settings-lang-name {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary, var(--gray-800));
}

.settings-lang-check {
    width: 20px; height: 20px;
    color: var(--primary-600);
}

.settings-option-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.settings-row-main {
    flex: 1;
}

.settings-row-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary, var(--gray-800));
}

.settings-row-desc {
    margin-top: 2px;
    font-size: 0.78rem;
    color: var(--text-secondary, var(--gray-500));
    line-height: 1.35;
}

.settings-switch {
    position: relative;
    display: inline-flex;
    width: 46px;
    height: 28px;
    flex-shrink: 0;
}

.settings-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.settings-switch-slider {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: var(--gray-300);
    transition: background 0.2s;
}

.settings-switch-slider::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    left: 3px;
    top: 3px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

.settings-switch input:checked + .settings-switch-slider {
    background: var(--primary-600);
}

.settings-switch input:checked + .settings-switch-slider::before {
    transform: translateX(18px);
}

.settings-subsection {
    margin-top: 10px;
}

.settings-subtitle {
    margin-bottom: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary, var(--gray-700));
}

.settings-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.settings-check-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 9999px;
    border: 1px solid var(--border-color, var(--gray-200));
    background: var(--card-bg, white);
    color: var(--text-secondary, var(--gray-600));
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.settings-check-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.settings-check-chip.active {
    border-color: var(--primary-500);
    background: var(--primary-50);
    color: var(--primary-700);
}

.settings-inline-note {
    margin: 10px 0;
    font-size: 0.78rem;
    color: var(--text-secondary, var(--gray-500));
    line-height: 1.4;
}

.settings-inline-note--danger {
    color: #dc2626;
}

.settings-segmented {
    display: flex;
    gap: 8px;
}

.settings-segmented--four {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.settings-segment-btn {
    flex: 1;
    border: 1px solid var(--border-color, var(--gray-200));
    border-radius: 4px;
    background: var(--card-bg, white);
    color: var(--text-secondary, var(--gray-600));
    padding: 10px 8px;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all 0.15s;
}

.settings-segment-btn.active {
    border-color: var(--primary-500);
    background: var(--primary-50);
    color: var(--primary-700);
}

.settings-secondary-btn {
    margin-top: 8px;
    border: 1px solid var(--border-color, var(--gray-300));
    border-radius: 4px;
    background: var(--gray-50);
    color: var(--gray-700);
    padding: 10px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.settings-secondary-btn:hover:not(:disabled) {
    background: var(--gray-100);
}

.settings-secondary-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
.settings-secondary-btn--danger {
    border-color: #fca5a5;
    color: #dc2626;
    background: #fef2f2;
}
.settings-secondary-btn--danger:hover:not(:disabled) {
    background: #fee2e2;
}
.settings-storage-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.settings-storage-item {
    border: 1px solid var(--border-color, var(--gray-200));
    border-radius: 4px;
    padding: 10px;
    background: var(--gray-50);
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--text-secondary, var(--gray-600));
}

.settings-storage-item strong {
    color: var(--text-primary, var(--gray-800));
    font-size: 0.9rem;
}

.settings-section--danger {
    border-color: #fecaca;
    background: #fff7f7;
}

.settings-section-icon--danger {
    background: #fee2e2;
}

.settings-section-icon--danger svg {
    color: #dc2626;
}

.settings-danger-btn {
    margin-top: 4px;
}

/* =============================================================================
   Profil Page
   ============================================================================= */
.profil-page {
    padding: 16px;
}

.profil-card {
    background: white;
    border-radius: 4px;
    padding: 24px 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    border: 1px solid var(--gray-100);
    text-align: center;
}

.profil-avatar {
    width: 76px;
    height: 76px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: var(--primary-600);
    color: white;
    font-size: 1.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profil-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gray-800);
}

.profil-email {
    margin-top: 4px;
    color: var(--gray-500);
    font-size: 0.9rem;
}

.profil-meta-row {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.profil-member-since {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.profil-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.profil-form-group {
    margin-bottom: 12px;
}

.profil-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.profil-input {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--gray-200);
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: var(--font-family);
    background: white;
    color: var(--gray-800);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.profil-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px var(--primary-100);
}

.profil-save-btn {
    width: 100%;
    border: none;
    border-radius: 4px;
    padding: 12px 16px;
    background: var(--accent-600);
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    transition: background 0.15s;
}

.profil-save-btn:hover {
    background: var(--accent-700);
}


.profil-collapsible-header {
    width: 100%;
    border: none;
    background: none;
    text-align: left;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.profil-collapse-arrow {
    width: 20px;
    height: 20px;
    color: var(--gray-500);
    transition: transform 0.2s ease;
}

.profil-collapse-arrow.is-open {
    transform: rotate(180deg);
}

.profil-password-body {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.25s ease, opacity 0.2s ease, margin-top 0.2s ease;
    margin-top: 0;
}

.profil-password-body.is-open {
    max-height: 520px;
    opacity: 1;
    margin-top: 14px;
}

.profil-password-strength {
    margin: 4px 0 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profil-password-strength-bar {
    flex: 1;
    height: 8px;
    border-radius: 9999px;
    background: var(--gray-200);
    overflow: hidden;
}

.profil-password-strength-fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--gray-400);
    transition: width 0.2s ease, background 0.2s ease;
}

.profil-password-strength-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-500);
    min-width: 54px;
    text-align: right;
}

.profil-verification-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.profil-verification-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.profil-verification-badge--verified {
    background: #dcfce7;
    color: #15803d;
}

.profil-verification-badge--unverified {
    background: #fef3c7;
    color: #b45309;
}

.profil-resend-btn {
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    background: var(--gray-100);
    color: var(--gray-700);
    font-size: 0.82rem;
    font-weight: 600;
    font-family: var(--font-family);
    padding: 9px 12px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.profil-resend-btn:hover:not(:disabled) {
    background: var(--gray-200);
}

.profil-resend-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.profil-danger-section {
    border-color: #fecaca;
    background: #fff7f7;
}

.profil-delete-btn {
    width: 100%;
    border: none;
    border-radius: 4px;
    padding: 12px 16px;
    margin-top: 12px;
    background: #dc2626;
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    transition: background 0.15s;
}

.profil-delete-btn:hover {
    background: #b91c1c;
}

.profil-delete-dialog {
    max-width: 360px;
}

.profil-delete-field {
    margin-top: 14px;
    text-align: left;
}

.profil-loading-text {
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--gray-500);
}

/* =============================================================================
   Weather Page
   ============================================================================= */
.weather-page {
    padding: 16px;
}

/* Search Box */
.weather-search-box {
    position: relative;
    margin-bottom: 20px;
}

.weather-search-box input {
    width: 100%;
    padding: 12px 44px 12px 14px;
    border: 1px solid var(--gray-200);
    border-radius: 4px;
    font-size: 0.9375rem;
    font-family: var(--font-family);
    color: var(--gray-800);
}

.weather-search-box input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.weather-search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--gray-200);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--gray-600);
    transition: all 0.2s;
}

.weather-search-clear:hover {
    background: var(--gray-300);
    color: var(--gray-800);
}

.weather-search-action {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    min-width: 24px;
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.weather-search-action .weather-search-clear {
    position: static;
    right: auto;
    top: auto;
    transform: none;
}

.weather-search-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--gray-300);
    border-top-color: var(--primary-600);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

/* Search Results */
.weather-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--gray-200);
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 10;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.weather-search-result {
    padding: 12px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--gray-100);
}

.weather-search-result:hover {
    background: var(--gray-50);
}

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

.weather-search-result strong {
    display: block;
    font-size: 15px;
    color: var(--gray-800);
    margin-bottom: 2px;
}

.weather-search-result small {
    font-size: 13px;
    color: var(--gray-500);
}

.weather-search-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    font-size: 14px;
    color: var(--gray-600);
}

.weather-search-status--error {
    color: #b91c1c;
}

.weather-search-retry {
    border: 1px solid var(--gray-300);
    background: white;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 12px;
    color: var(--gray-700);
    cursor: pointer;
}

.weather-search-retry:hover {
    background: var(--gray-50);
}

/* Current Weather */
.weather-current-card {
    background: linear-gradient(135deg, #1E293B, #1E293B);
    color: #ffffff;
    border-radius: 4px;
    padding: 24px;
    margin-bottom: 20px;
    text-align: center;
}

.weather-current-location {
    margin-bottom: 16px;
}

.weather-current-city {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff;
}

.weather-current-county {
    font-size: 0.875rem;
    opacity: 1;
    color: #ffffff;
    margin-top: 4px;
}

.weather-current-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 4px;
}

.weather-current-icon {
    font-size: 3rem;
    line-height: 1;
}

.weather-current-temp {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
    color: #ffffff;
}

.weather-current-desc {
    font-size: 1rem;
    opacity: 1;
    color: #ffffff;
    margin-bottom: 16px;
}

.weather-current-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    text-align: left;
}

.weather-current-detail {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    padding: 12px;
}

.weather-detail-icon {
    font-size: 1.1rem;
    line-height: 1;
    margin-bottom: 2px;
}

.weather-detail-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.65);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.weather-detail-value {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #ffffff;
}

/* Section Header */
.weather-section-header {
    padding: 0 0 12px;
}

.weather-section-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
}

/* Daily Cards */
.weather-daily-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.weather-day-card {
    background: white;
    border: 1px solid var(--gray-100);
    border-radius: 4px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.weather-day-card:active {
    transform: scale(0.99);
}

.weather-day-card--expanded {
    border-color: var(--primary-300);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.weather-day-summary {
    display: grid;
    grid-template-columns: 70px 32px 60px 50px 1fr 20px;
    align-items: center;
    gap: 8px;
}

.weather-day-name {
    display: flex;
    flex-direction: column;
}

.weather-day-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-800);
}

.weather-day-date {
    font-size: 0.75rem;
    color: var(--gray-400);
}

.weather-day-icon {
    font-size: 1.5rem;
    text-align: center;
}

.weather-day-temps {
    display: flex;
    gap: 4px;
    font-size: 0.875rem;
}

.weather-day-high {
    font-weight: 600;
    color: var(--gray-800);
}

.weather-day-low {
    color: var(--gray-400);
}

.weather-day-precip {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 0.8125rem;
    color: var(--arkod-primary);
}

.weather-day-wind {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-align: right;
}

.weather-day-expand-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
}

.weather-day-expand-arrow svg {
    width: 16px;
    height: 16px;
    color: var(--gray-400);
    transition: transform 0.2s;
}

/* Hourly Detail (expanded) */
.weather-hourly-scroll {
    display: flex;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 16px 0 4px;
    margin-top: 12px;
    border-top: 1px solid var(--gray-100);
}

.weather-hourly-scroll::-webkit-scrollbar {
    display: none;
}

.weather-hourly-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 60px;
    padding: 8px 4px;
    flex-shrink: 0;
}

.weather-hourly-time {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-500);
}

.weather-hourly-icon {
    font-size: 1.25rem;
}

.weather-hourly-temp {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-800);
}

.weather-hourly-precip {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 0.6875rem;
    color: var(--arkod-primary);
}

.weather-hourly-wind {
    font-size: 0.6875rem;
    color: var(--gray-400);
}

.weather-hourly-soil {
    font-size: 0.6875rem;
    color: var(--primary-600);
}

.weather-day-agro-summary {
    display: flex;
    justify-content: space-around;
    padding: 12px 0 4px;
    margin-top: 10px;
    border-top: 1px solid var(--gray-100);
}

.weather-agro-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 0.8125rem;
}

.weather-agro-label {
    font-size: 0.6875rem;
    color: var(--gray-400);
}

/* Error State */
.weather-error {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-500);
}

.weather-error span {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 12px;
}

.weather-error p {
    font-size: 0.875rem;
}

/* Skeleton */
.weather-skeleton .skeleton-line {
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

/* Header gradient for weather page */
.header--weather {
    background: linear-gradient(135deg, #1E293B, #1E293B);
}

/* Weather Tab Bar */
.weather-tab-bar {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--gray-100);
    border-radius: 4px;
    margin-bottom: 16px;
}

.weather-tab {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 4px;
    background: transparent;
    font-family: var(--font-family);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.2s ease;
}

.weather-tab--active {
    background: #fff;
    color: var(--gray-800);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* ─ Moje parcele (Parcel-level weather block) ───────────────────────────── */
.weather-parcels-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.weather-parcel-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: white;
    border: 1px solid var(--gray-100);
    border-radius: 4px;
    padding: 12px 14px;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.weather-parcel-card--clickable {
    cursor: pointer;
}

.weather-parcel-card--clickable:hover {
    border-color: rgba(47, 96, 50, 0.3);
    background: #f7faf6;
}

.weather-parcel-card--active {
    border-color: rgba(47, 96, 50, 0.55);
    background: #eef4ee;
}

.weather-parcel-card__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.weather-parcel-card__title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gray-800);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.weather-parcel-card__meta {
    font-size: 0.75rem;
    color: var(--gray-500);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.weather-parcel-card__coords {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 2px;
}

.weather-parcel-coords {
    color: var(--gray-700);
}

.weather-parcel-coords--missing {
    color: #b45309;
    font-style: italic;
}

.weather-parcel-card__action {
    flex-shrink: 0;
}

.weather-parcel-set,
.weather-parcel-edit {
    -webkit-appearance: none;
    appearance: none;
    background: #eef4ee;
    border: 1px solid rgba(47, 96, 50, 0.18);
    color: #214a2c;
    font-weight: 700;
    font-family: var(--font-family);
    font-size: 0.75rem;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}

.weather-parcel-set:hover,
.weather-parcel-edit:hover {
    background: #e4efe5;
    border-color: rgba(47, 96, 50, 0.3);
}

.weather-parcel-set:active,
.weather-parcel-edit:active { opacity: 0.92; }

.weather-parcel-empty {
    border: 1px dashed var(--gray-200);
    border-radius: 4px;
    padding: 14px;
    font-size: 0.85rem;
    color: var(--gray-500);
    text-align: center;
    background: var(--gray-50, #fafafa);
}

[data-theme="dark"] .weather-parcel-card {
    background: #1d231f;
    border-color: rgba(109, 151, 118, 0.25);
}

[data-theme="dark"] .weather-parcel-card--clickable:hover {
    background: #232a25;
    border-color: rgba(109, 151, 118, 0.45);
}

[data-theme="dark"] .weather-parcel-card--active {
    background: #21302a;
    border-color: #375046;
}

[data-theme="dark"] .weather-parcel-card__title { color: #e0e0e0; }
[data-theme="dark"] .weather-parcel-card__meta,
[data-theme="dark"] .weather-parcel-card__coords,
[data-theme="dark"] .weather-parcel-coords { color: #aab3ad; }
[data-theme="dark"] .weather-parcel-coords--missing { color: #fbbf24; }

[data-theme="dark"] .weather-parcel-set,
[data-theme="dark"] .weather-parcel-edit {
    background: #21302a;
    border-color: #375046;
    color: #d8e6dd;
}

[data-theme="dark"] .weather-parcel-empty {
    background: #1a1f1b;
    border-color: rgba(109, 151, 118, 0.25);
    color: #aab3ad;
}

/* ─ Coordinate input modal (parcel weather) ─────────────────────────────── */
.weather-parcel-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.weather-parcel-modal {
    background: var(--bg-primary, #fff);
    border: 1px solid var(--border-color, var(--gray-200));
    border-radius: 4px;
    width: 100%;
    max-width: 480px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.weather-parcel-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-100);
}

.weather-parcel-modal__header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
}

.weather-parcel-modal__close {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    border: 0;
    font-size: 1.4rem;
    line-height: 1;
    color: var(--gray-500);
    cursor: pointer;
    padding: 2px 6px;
}

.weather-parcel-modal__body {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.weather-parcel-modal__parcel-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-700);
}

.weather-parcel-modal__label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-top: 6px;
}

.weather-parcel-modal__input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color, #ccc);
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.95rem;
    box-sizing: border-box;
    background: var(--bg-primary, #fff);
    color: var(--text-primary, #333);
}

.weather-parcel-modal__input:focus {
    outline: none;
    border-color: rgba(33, 74, 44, 0.46);
    box-shadow: 0 0 0 3px rgba(33, 74, 44, 0.08);
}

.weather-parcel-modal__hint {
    font-size: 0.72rem;
    color: var(--gray-500);
    line-height: 1.4;
}

.weather-parcel-modal__map {
    width: 100%;
    height: 280px;
    border: 1px solid var(--gray-100);
    border-radius: 4px;
    margin-top: 6px;
    background: #f4f4f4;
}

.weather-parcel-modal__map .leaflet-container { border-radius: 4px; }

.weather-parcel-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--gray-100);
}

.weather-parcel-modal__btn {
    -webkit-appearance: none;
    appearance: none;
    font-family: var(--font-family);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid transparent;
}

.weather-parcel-modal__btn--ghost {
    background: transparent;
    border-color: var(--gray-200);
    color: var(--gray-700);
}

.weather-parcel-modal__btn--ghost:hover {
    background: var(--gray-50, #fafafa);
}

.weather-parcel-modal__btn--primary {
    background: #214a2c;
    color: #fff;
    border-color: #214a2c;
}

.weather-parcel-modal__btn--primary:hover { background: #1a3a23; }
.weather-parcel-modal__btn--primary[disabled] { opacity: 0.7; cursor: default; }

[data-theme="dark"] .weather-parcel-modal {
    background: #1d231f;
    border-color: rgba(109, 151, 118, 0.25);
}

[data-theme="dark"] .weather-parcel-modal__header,
[data-theme="dark"] .weather-parcel-modal__footer {
    border-color: rgba(109, 151, 118, 0.18);
}

[data-theme="dark"] .weather-parcel-modal__header h3 { color: #e0e0e0; }
[data-theme="dark"] .weather-parcel-modal__parcel-name,
[data-theme="dark"] .weather-parcel-modal__label { color: #d8e6dd; }
[data-theme="dark"] .weather-parcel-modal__input {
    background: #161b17;
    border-color: rgba(109, 151, 118, 0.3);
    color: #e0e0e0;
}
[data-theme="dark"] .weather-parcel-modal__hint { color: #aab3ad; }
[data-theme="dark"] .weather-parcel-modal__map {
    background: #161b17;
    border-color: rgba(109, 151, 118, 0.25);
}
[data-theme="dark"] .weather-parcel-modal__btn--ghost {
    color: #d8e6dd;
    border-color: rgba(109, 151, 118, 0.3);
}
[data-theme="dark"] .weather-parcel-modal__btn--ghost:hover { background: #161b17; }

/* ===== Evidencija parcel-drawing trigger + full-screen Leaflet modal ===== */

/* "Nacrtaj na karti" trigger button (matches the unified Evidencija button palette) */
.evidencija-draw-trigger {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 2px;
    padding: 10px 14px;
    border-radius: 4px;
    cursor: pointer;
    background: #eef4ee;
    border: 1px solid rgba(47, 96, 50, 0.18);
    color: #214a2c;
    font-family: var(--font-family);
    font-size: 0.85rem;
    font-weight: 700;
}

.evidencija-draw-trigger:hover {
    background: #e4efe5;
    border-color: rgba(47, 96, 50, 0.3);
}

.evidencija-draw-trigger:active { opacity: 0.92; }
.evidencija-draw-trigger svg { width: 16px; height: 16px; flex-shrink: 0; }

.evidencija-draw-status {
    margin: 6px 0 0;
    font-size: 0.76rem;
    font-weight: 600;
    color: #2f6032;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Full-screen drawing overlay (position: fixed; inset: 0; z-index: 1100) */
.evidencija-draw-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: #11160f;
}

.evidencija-draw-map {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: #11160f;
}

.evidencija-draw-map .leaflet-container {
    font-family: var(--font-family);
    background: #11160f;
}

/* Lift the Esri attribution (bottom-right) above the lower edge of the
   actions bar so it stays readable. */
.evidencija-draw-map .leaflet-bottom { bottom: 76px; }

/* The bottom-left zoom control (+ / -) needs a bigger lift than the
   attribution: the actions stack (yellow "Dodaj točku" CTA + secondary
   button row + safe-area padding) is ~140px tall, so clear the whole stack
   plus the bottom safe-area inset. Higher specificity wins over the rule
   above without needing !important. */
.evidencija-draw-overlay .leaflet-bottom.leaflet-left {
    bottom: calc(150px + env(safe-area-inset-bottom, 0px));
}

.evidencija-draw-topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1200;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    /* Overlay is mounted to document.body, bypassing the Capacitor safe-area
       wrappers, so clear the iOS Dynamic Island / Android status bar here. */
    padding: max(16px, env(safe-area-inset-top)) 14px 16px;
    background: linear-gradient(180deg, rgba(10, 14, 9, 0.82) 0%, rgba(10, 14, 9, 0) 100%);
    pointer-events: none;
}

/* Left column stacks the title block and the readout HUD vertically so the
   stats always flow BELOW the (potentially two-line) instruction text —
   no fixed top offset to collide with safe-area insets or wrapped text. */
.evidencija-draw-topbar-left {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0; /* allow the instruction span to wrap inside the flex row */
    flex: 1 1 auto;
}

.evidencija-draw-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: #fff;
}

.evidencija-draw-title strong {
    font-size: 0.95rem;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.evidencija-draw-title span {
    font-size: 0.72rem;
    opacity: 0.88;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.evidencija-draw-close {
    pointer-events: auto;
    -webkit-appearance: none;
    appearance: none;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(17, 22, 15, 0.6);
    color: #fff;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
}

.evidencija-draw-readout {
    /* In-flow within .evidencija-draw-topbar-left (was absolute top:62px,
       which collided with the wrapped instruction text on notched devices). */
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    pointer-events: none;
}

.evidencija-draw-readout-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 84px;
    padding: 8px 12px;
    border-radius: 4px;
    background: rgba(17, 22, 15, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #fff;
}

.evidencija-draw-readout-item span {
    font-size: 0.64rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.78;
}

.evidencija-draw-readout-item strong {
    font-size: 0.95rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.evidencija-draw-actions {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 24px 14px calc(env(safe-area-inset-bottom, 0px) + 14px);
    background: linear-gradient(0deg, rgba(10, 14, 9, 0.85) 0%, rgba(10, 14, 9, 0) 100%);
}

.evidencija-draw-actions-row {
    display: flex;
    gap: 8px;
}

.evidencija-draw-actions-row .evidencija-draw-btn { flex: 1; }

.evidencija-draw-btn {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    padding: 12px 10px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid transparent;
    font-family: var(--font-family);
    font-size: 0.85rem;
    font-weight: 700;
}

.evidencija-draw-btn--ghost {
    background: rgba(17, 22, 15, 0.72);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.evidencija-draw-btn--ghost:active { background: rgba(17, 22, 15, 0.92); }

.evidencija-draw-btn--primary {
    background: #f4c430;
    border-color: #f4c430;
    color: #1f2a16;
}

.evidencija-draw-btn--primary:active { opacity: 0.92; }

/* Primary "Dodaj točku" CTA — drops a vertex at the center crosshair */
.evidencija-draw-btn--add {
    flex: 0 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 12px;
    background: #f4c430;
    border-color: #f4c430;
    color: #1f2a16;
    font-size: 0.95rem;
}

.evidencija-draw-btn--add:active { opacity: 0.92; }
.evidencija-draw-btn--add svg { width: 18px; height: 18px; flex-shrink: 0; }

/* "Završi" confirm — distinct green so it reads apart from the yellow add CTA */
.evidencija-draw-btn--finish {
    background: #1f5130;
    border-color: #1f5130;
    color: #fff;
}

.evidencija-draw-btn--finish:active { opacity: 0.92; }

/* Fixed center target — marks exactly where "Dodaj točku" drops a vertex.
   Yellow ring with a red center dot; pointer-events:none so map panning
   passes straight through it. */
.evidencija-draw-crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    transform: translate(-50%, -50%);
    z-index: 1150;
    pointer-events: none;
    border-radius: 50%;
    border: 1.5px solid #f4c430; /* Thinned from 3px for a more precise target */
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.evidencija-draw-crosshair span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px; /* Shrunk from 8px for a finer center dot */
    height: 4px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45);
}

/* Segment-length chip anchored at each edge midpoint */
.evidencija-draw-seg-icon { width: 0; height: 0; }

.evidencija-draw-seg-label {
    position: absolute;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(17, 22, 15, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* In-map town search — floats in the top-left HUD column (inside the topbar's
   pointer-events:none gradient, so it re-enables its own events). The bar chrome
   stays dark over the imagery in both themes, like the readout HUD; only the
   results dropdown gets light/dark surfaces (a solid card over the map). */
.evidencija-draw-search {
    position: relative;
    align-self: flex-start;
    max-width: 100%;
    pointer-events: auto;
}

.evidencija-draw-search-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 4px;
    background: rgba(17, 22, 15, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.32);
}

.evidencija-draw-search-toggle {
    -webkit-appearance: none;
    appearance: none;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.evidencija-draw-search-toggle svg { width: 18px; height: 18px; }

/* Collapsed by default: the input has zero width and is inert; the toggle
   expands it. transition animates the slide-out. */
.evidencija-draw-search-input {
    width: 0;
    min-width: 0;
    padding: 0;
    border: none;
    background: transparent;
    color: #fff;
    font-family: var(--font-family);
    font-size: 0.85rem;
    opacity: 0;
    pointer-events: none;
    transition: width 0.18s ease, padding 0.18s ease, opacity 0.18s ease;
}

.evidencija-draw-search-input::placeholder { color: rgba(255, 255, 255, 0.6); }
.evidencija-draw-search-input:focus { outline: none; }

.evidencija-draw-search.is-open .evidencija-draw-search-input {
    width: 190px;
    max-width: 56vw;
    padding: 6px 8px;
    opacity: 1;
    pointer-events: auto;
}

/* Results dropdown — solid surface floating over the map, hidden until it has
   rows (the .is-visible toggle from _renderDrawSearchResults). */
.evidencija-draw-search-results {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 240px;
    max-width: 72vw;
    max-height: 240px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 4px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.24);
    z-index: 1;
}

.evidencija-draw-search-results.is-visible { display: block; }

.evidencija-draw-search-result {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border: none;
    border-bottom: 1px solid var(--gray-100);
    background: transparent;
    cursor: pointer;
    font-family: var(--font-family);
}

.evidencija-draw-search-result:last-child { border-bottom: none; }

.evidencija-draw-search-result:hover,
.evidencija-draw-search-result:active { background: var(--gray-50); }

.evidencija-draw-search-result strong {
    display: block;
    font-size: 0.875rem;
    color: var(--gray-800);
}

.evidencija-draw-search-result small {
    font-size: 0.75rem;
    color: var(--gray-500);
}

body.evidencija-draw-open { overflow: hidden; }

/* Dark mode — the satellite imagery looks identical, so only the form-side
   trigger/status need theme-specific colors; the on-map controls stay readable
   over imagery in both themes. */
[data-theme="dark"] .evidencija-draw-trigger {
    background: #21302a;
    border-color: #375046;
    color: #d8e6dd;
}

[data-theme="dark"] .evidencija-draw-trigger:hover {
    background: #28392f;
    border-color: #436152;
}

[data-theme="dark"] .evidencija-draw-status { color: #8fc79b; }

/* Search dropdown — dark solid surface (the bar itself stays dark in both
   themes, so only the results card needs theming). */
[data-theme="dark"] .evidencija-draw-search-results {
    background: #2a2a2a;
    border-color: #444;
}

[data-theme="dark"] .evidencija-draw-search-result {
    border-bottom-color: #333;
}

[data-theme="dark"] .evidencija-draw-search-result:hover,
[data-theme="dark"] .evidencija-draw-search-result:active {
    background: #333;
}

[data-theme="dark"] .evidencija-draw-search-result strong { color: #e5e5e5; }
[data-theme="dark"] .evidencija-draw-search-result small { color: #888; }

/* Master overview map (Parcele view) — read-only header above the parcel list.
   Fixed height keeps it as a scrollable block inside .page-content's flex flow;
   the map itself has all pan/zoom handlers disabled so it never traps scroll. */
.evidencija-master-map-wrap {
    margin-bottom: 12px;
}

.evidencija-master-map {
    width: 100%;
    height: 250px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(47, 96, 50, 0.18);
    background: #11160f;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.evidencija-master-map .leaflet-container {
    font-family: var(--font-family);
    background: #11160f;
    border-radius: 4px;
}

.evidencija-master-map-hint {
    margin: 6px 2px 0;
    font-size: 0.72rem;
    color: #5a6b5e;
}

/* Centered field-name tooltip on each master-map polygon (no pointer arrow) */
.evidencija-master-tooltip {
    background: rgba(17, 22, 15, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 4px;
    color: #fff;
    font-weight: 700;
    font-size: 0.72rem;
    box-shadow: none;
}

.evidencija-master-tooltip::before { display: none; }

/* List cards with a drawn polygon are tappable to fly the master map to them */
.evidencija-list-card--mappable {
    cursor: pointer;
}

.evidencija-list-card--mappable:active {
    border-color: rgba(47, 96, 50, 0.3);
}

[data-theme="dark"] .evidencija-master-map { border-color: #375046; }
[data-theme="dark"] .evidencija-master-map-hint { color: #8a9b8e; }

/* Radar Container */
.weather-radar-container {
    position: relative;
    width: 100%;
    height: 60vh;
    min-height: 300px;
    max-height: 500px;
    border-radius: 4px;
    overflow: hidden;
    background: var(--gray-100);
}

.weather-radar-map {
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Override Leaflet defaults inside our container */
.weather-radar-container .leaflet-container {
    font-family: var(--font-family);
    border-radius: 4px;
}

.weather-radar-container .leaflet-control-attribution {
    font-size: 0.625rem;
    background: rgba(255,255,255,0.7);
    border-radius: 0 4px 0 0;
}

/* Radar Loading Overlay */
.radar-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(255,255,255,0.85);
    z-index: 1000;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.radar-error-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(255,255,255,0.9);
    z-index: 1000;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.radar-error-overlay p {
    margin: 0;
}

/* Radar Playback Controls */
.radar-controls {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    margin-top: 12px;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 4px;
}

.radar-timeline {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.radar-timeline-labels {
    display: flex;
    justify-content: space-between;
    padding: 0 2px;
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--gray-400);
    user-select: none;
}

.radar-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.radar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--gray-100);
    color: var(--gray-700);
    cursor: pointer;
    transition: background 0.15s ease;
    flex-shrink: 0;
}

.radar-btn:active {
    background: var(--gray-200);
}

.radar-btn--play {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, var(--accent-500), var(--accent-600));
    color: #fff;
}

.radar-btn--play:active {
    background: linear-gradient(135deg, var(--accent-600), var(--accent-700));
}


.radar-scrubber {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--gray-200);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.radar-scrubber::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-600);
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    cursor: pointer;
}

.radar-scrubber::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-600);
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    cursor: pointer;
}

.radar-timestamp {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-700);
    min-width: 110px;
    text-align: center;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

/* =============================================================================
   Dark Theme
   ============================================================================= */
[data-theme="dark"] {
    --card-bg: #1e1e1e;
    --border-color: #333;
    --bg-primary: #1f232b;
    --bg-secondary: #161b22;
    --text-primary: #e5e5e5;
    --text-secondary: #a3a3a3;
}

[data-theme="dark"] body {
    background: #121212;
    color: #e5e5e5;
}

[data-theme="dark"] .app-container {
    background: #121212;
}

[data-theme="dark"] .page-content {
    background: #121212;
}

/* Header - keep gradient but slightly darker */
[data-theme="dark"] .header {
    background: linear-gradient(135deg, #14532d, #166534);
}
[data-theme="dark"] .header--arkod {
    background: linear-gradient(135deg, #1E3A8A, #1E3A8A);
}
[data-theme="dark"] .header--natjecaji {
    background: linear-gradient(135deg, #312E81, #312E81);
}
[data-theme="dark"] .header--menu {
    background: linear-gradient(135deg, #14532d, #166534);
}
[data-theme="dark"] .header--evidencija {
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.2), transparent 38%),
        linear-gradient(135deg, #0b2822, #10342c 56%, #14473d);
}
[data-theme="dark"] .header--pi {
    background: linear-gradient(135deg, #78350F, #78350F);
}

/* Bottom Nav */
[data-theme="dark"] .bottom-nav {
    background: #1e1e1e;
    border-top-color: #333;
}
[data-theme="dark"] .nav-item { color: #666; }
[data-theme="dark"] .nav-item:hover { color: #999; }
[data-theme="dark"] .nav-item.active { color: var(--primary-500); }

/* Price Cards */
[data-theme="dark"] .price-card {
    background: #1e1e1e;
    border-color: #333;
}
[data-theme="dark"] .price-card:hover { border-color: #555; }
[data-theme="dark"] .price-card--expanded {
    border-color: var(--primary-600);
    box-shadow: 0 1px 2px rgba(22, 163, 74, 0.05);
}
[data-theme="dark"] .price-card-crop { color: #e5e5e5; }
[data-theme="dark"] .price-value { color: #f5f5f5; }
[data-theme="dark"] .price-unit { color: #999; }
[data-theme="dark"] .price-per-unit { color: #777; }
[data-theme="dark"] .price-card-location { color: #999; }
[data-theme="dark"] .price-card-exchange-tag {
    color: #d4d4d4;
    background: #2a2a2a;
    border-color: #444;
}
[data-theme="dark"] .price-card-exchange-tag--euronext {
    color: #c7d2fe;
    background: #1e293b;
    border-color: #334155;
}
[data-theme="dark"] .price-card-exchange-tag--cme {
    color: #fed7aa;
    background: #2a1d12;
    border-color: #4a2a17;
}
[data-theme="dark"] .price-card-exchange-info { color: #999; }
[data-theme="dark"] .price-card-exchange-info:hover,
[data-theme="dark"] .price-card-exchange-info:focus-visible {
    background: #333;
    color: #e5e5e5;
}
[data-theme="dark"] .price-exchange-info-body p { color: #d4d4d4; }
[data-theme="dark"] .price-card-footer { border-top-color: #333; }
[data-theme="dark"] .price-card-date { color: #777; }
[data-theme="dark"] .price-card-chart--visible { border-top-color: #333; }

/* Contract Select */
[data-theme="dark"] .contract-select {
    background: #2a2a2a;
    border-color: #444;
    color: #e5e5e5;
}
[data-theme="dark"] .contract-select-label { color: #999; }

/* Period Buttons */
[data-theme="dark"] .period-btn {
    background: #2a2a2a;
    border-color: #444;
    color: #ccc;
}
[data-theme="dark"] .period-btn:hover { border-color: var(--primary-500); color: var(--primary-500); }
[data-theme="dark"] .period-btn.active { background: var(--primary-600); border-color: var(--primary-600); color: white; }

/* Cijene Filter Bar */
[data-theme="dark"] .cijene-filter-bar { background: #121212; }
[data-theme="dark"] .cijene-filter-chip {
    background: rgba(34, 197, 94, 0.12);
    color: var(--primary-400);
    border-color: rgba(34, 197, 94, 0.25);
}
[data-theme="dark"] .cijene-filter-btn {
    background: #2a2a2a;
    border-color: #444;
    color: #ccc;
}
[data-theme="dark"] .cijene-filter-btn:hover {
    border-color: var(--primary-500);
    color: var(--primary-400);
}
[data-theme="dark"] .cijene-filter-sheet {
    background: #1e1e1e;
}
[data-theme="dark"] .cijene-filter-sheet__header {
    border-bottom-color: #333;
}
[data-theme="dark"] .cijene-filter-sheet__header h3 { color: #e5e5e5; }
[data-theme="dark"] .cijene-filter-sheet__close { color: #999; }
[data-theme="dark"] .cijene-filter-sheet__close:hover { background: #333; }
[data-theme="dark"] .cijene-filter-group__label { color: #888; }
[data-theme="dark"] .cijene-filter-option {
    background: #2a2a2a;
    border-color: #444;
    color: #ccc;
}
[data-theme="dark"] .cijene-filter-option:hover {
    border-color: var(--primary-500);
    background: rgba(34, 197, 94, 0.1);
}
[data-theme="dark"] .cijene-filter-option.active {
    background: var(--primary-600);
    color: white;
    border-color: var(--primary-600);
}
[data-theme="dark"] .cijene-filter-sheet__footer {
    border-top-color: #333;
}

/* Search */
[data-theme="dark"] .search-input {
    background-color: #2a2a2a;
    border-color: #444;
    color: #e5e5e5;
}
[data-theme="dark"] .search-input-icon {
    color: #888;
}
[data-theme="dark"] .search-input:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}
[data-theme="dark"] .sync-status-row {
    background: #1a1a1a;
    border-color: #333;
}
[data-theme="dark"] .sync-status-row__title {
    color: #d4d4d4;
}
[data-theme="dark"] .sync-status-row__meta {
    color: #9a9a9a;
}
[data-theme="dark"] .sync-refresh-btn {
    background: rgba(230, 126, 34, 0.18);
    border-color: rgba(230, 126, 34, 0.42);
    color: #ffd2a8;
}
[data-theme="dark"] .sync-refresh-btn:hover {
    background: rgba(230, 126, 34, 0.28);
}
[data-theme="dark"] .sync-note {
    color: #8b8b8b;
}

/* Section Header */
[data-theme="dark"] .section-title { color: #e5e5e5; }
[data-theme="dark"] .section-subtitle { color: #999; }

/* Tap Hint */
[data-theme="dark"] .tap-hint { background: #1e1e1e; color: #999; }

/* Trend Badges */
[data-theme="dark"] .trend-badge--up { background: #15803d; color: #fff; font-weight: 700; }
[data-theme="dark"] .trend-badge--down { background: #b91c1c; color: #fff; font-weight: 700; }
[data-theme="dark"] .trend-badge--stable { background: #2a2a2a; color: #999; }
[data-theme="dark"] .trend-badge--stale { background: rgba(194, 65, 12, 0.2); color: #fdba74; }

/* Menu Page */
[data-theme="dark"] .user-profile-card {
    background: #1e1e1e;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
[data-theme="dark"] .user-name { color: #e5e5e5; }
[data-theme="dark"] .user-email { color: #999; }
[data-theme="dark"] .user-role-badge {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

[data-theme="dark"] .menu-list {
    background: #1e1e1e;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
[data-theme="dark"] .menu-item {
    color: #e5e5e5;
    border-bottom-color: #333;
}
[data-theme="dark"] .menu-item:hover { background: #2a2a2a; }
[data-theme="dark"] .menu-item-icon {
    background: #334155;
    border: 1px solid #475569;
}
[data-theme="dark"] .menu-item-icon svg { color: #e2e8f0; }
[data-theme="dark"] .menu-item-subtitle { color: #999; }
[data-theme="dark"] .menu-item-arrow { color: #94a3b8; }

[data-theme="dark"] .sidebar-menu-panel {
    background: #161b22;
    border-right-color: #2f3640;
}

[data-theme="dark"] .sidebar-menu-panel-header {
    border-bottom-color: #2f3640;
}

[data-theme="dark"] .sidebar-menu-title {
    color: #e5e5e5;
}

[data-theme="dark"] .sidebar-menu-close-btn {
    background: #28313b;
    color: #d4dde7;
}

[data-theme="dark"] .sidebar-menu-close-btn:hover {
    background: #334155;
}

[data-theme="dark"] .login-btn {
    background: var(--accent-600);
}
[data-theme="dark"] .login-btn:hover { background: var(--accent-700); }

/* Dokumenti Page */
[data-theme="dark"] .dokumenti-card {
    background: #1e1e1e;
    border-color: #333;
}
[data-theme="dark"] .dokumenti-card:hover { border-color: #555; }
[data-theme="dark"] .dokumenti-card-thumb { background: #2a2a2a; }
[data-theme="dark"] .dokumenti-card-name { color: #e5e5e5; }
[data-theme="dark"] .dokumenti-card-date { color: #777; }
[data-theme="dark"] .dokumenti-empty { color: #999; }
[data-theme="dark"] .dokumenti-empty h3 { color: #ccc; }
[data-theme="dark"] .dokumenti-card-thumb--folder { background: rgba(34, 197, 94, 0.1) !important; }
[data-theme="dark"] .dokumenti-card-file-icon--img { background: rgba(8, 145, 178, 0.2); }
[data-theme="dark"] .dokumenti-card-file-icon--pdf { background: rgba(220, 38, 38, 0.1); }
[data-theme="dark"] .dokumenti-card-file-icon--doc { background: rgba(59, 130, 246, 0.1); }
[data-theme="dark"] .dokumenti-sort-control select { background: #2a2a2a; border-color: #444; color: #ccc; }
[data-theme="dark"] .dokumenti-folder-input { background: #2a2a2a; border-color: #444; color: #e5e5e5; }
[data-theme="dark"] .dokumenti-move-option { color: #ccc; }
[data-theme="dark"] .dokumenti-move-option:hover { background: #333; }
[data-theme="dark"] .dokumenti-move-option--current { background: rgba(34, 197, 94, 0.1); color: #4ade80; }

/* PI Page */
[data-theme="dark"] .pi-card-item {
    background: #1e1e1e;
    border-color: #333;
}
[data-theme="dark"] .pi-card-item:hover { border-color: #d97706; }
[data-theme="dark"] .pi-card-thumb { background: #2a2a2a; }
[data-theme="dark"] .evidencija-intro-card {
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.28), transparent 36%),
        linear-gradient(160deg, #0e2622 0%, #12332d 48%, #18453c 100%);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
[data-theme="dark"] .evidencija-farm-card,
[data-theme="dark"] .evidencija-action-card,
[data-theme="dark"] .evidencija-login-card,
[data-theme="dark"] .evidencija-subview-card {
    background: linear-gradient(180deg, #171f1c 0%, #1b2521 100%);
    border-color: #2f3c37;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
[data-theme="dark"] .evidencija-farm-label,
[data-theme="dark"] .evidencija-farm-copy p:last-child,
[data-theme="dark"] .evidencija-stat-label,
[data-theme="dark"] .evidencija-stat-meta,
[data-theme="dark"] .evidencija-action-copy p {
    color: #9bb0a7;
}
[data-theme="dark"] .evidencija-farm-copy h2,
[data-theme="dark"] .evidencija-section-head h3,
[data-theme="dark"] .evidencija-action-copy h4,
[data-theme="dark"] .evidencija-stat-value,
[data-theme="dark"] .evidencija-login-card h2,
[data-theme="dark"] .evidencija-subview-card h2 {
    color: #edf5ef;
}
[data-theme="dark"] .evidencija-farm-action,
[data-theme="dark"] .evidencija-secondary-btn {
    background: #21302a;
    border-color: #375046;
    color: #d8e6dd;
}
[data-theme="dark"] .evidencija-ghost-btn {
    background: #21302a;
    border-color: #375046;
    color: #d8e6dd;
}
[data-theme="dark"] .evidencija-ghost-btn:hover,
[data-theme="dark"] .evidencija-ghost-btn:focus-visible {
    background: #1a2923;
    border-color: #456356;
}
[data-theme="dark"] .evidencija-stats-grid .evidencija-stat-card {
    background: linear-gradient(180deg, #1d2924 0%, #202e29 100%);
    border-color: #31453d;
}
[data-theme="dark"] .evidencija-action-icon {
    background: linear-gradient(135deg, #21302a, #2a3d35);
    color: #d8e6dd;
}
[data-theme="dark"] .evidencija-login-icon,
[data-theme="dark"] .evidencija-subview-icon {
    background: linear-gradient(135deg, #14532d, #166534);
    border-color: #166534;
}
[data-theme="dark"] .evidencija-primary-btn {
    background: #21302a;
    border-color: #375046;
    color: #d8e6dd;
}
[data-theme="dark"] .evidencija-primary-btn:hover,
[data-theme="dark"] .evidencija-primary-btn:focus-visible,
[data-theme="dark"] .evidencija-secondary-btn:hover,
[data-theme="dark"] .evidencija-secondary-btn:focus-visible {
    background: #1a2923;
    border-color: #456356;
}
[data-theme="dark"] .evidencija-subview-note {
    background: #203029;
    color: #d8e6dd;
}
[data-theme="dark"] .evidencija-action-arrow {
    color: #86a597;
}
[data-theme="dark"] .pi-single-card {
    background: linear-gradient(160deg, #2f200d 0%, #3f2d14 55%, #4c360d 100%);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
[data-theme="dark"] .pi-single-card-meta h3 { color: #ffedd5; }
[data-theme="dark"] .pi-single-card-meta p { color: #fdba74; }
[data-theme="dark"] .pi-action-btn {
    background: #2f2418;
    border-color: #5b4124;
    color: #fdba74;
}
[data-theme="dark"] .pi-bottom-actions {
    background: rgba(35, 25, 14, 0.92);
    border-color: rgba(217, 119, 6, 0.5);
}
[data-theme="dark"] .pi-action-btn:hover {
    border-color: #f59e0b;
}
[data-theme="dark"] .pi-action-btn--primary {
    background: linear-gradient(135deg, #78350F, #78350F);
    border-color: #78350F;
    color: #fff;
}
[data-theme="dark"] .pi-action-btn--danger {
    background: #3f1d24;
    border-color: #7f1d1d;
    color: #fecdd3;
}
[data-theme="dark"] .iskaznice-section-heading {
    color: #fdba74;
}
[data-theme="dark"] .potvrda-empty-state {
    border-color: #44403c;
    background: #1c1917;
}
[data-theme="dark"] .potvrda-empty-icon svg { color: #78716c; }
[data-theme="dark"] .potvrda-empty-text { color: #a8a29e; }
[data-theme="dark"] .potvrda-document-tile {
    background: #1c1917;
    border-color: #44403c;
}
[data-theme="dark"] .potvrda-document-tile-icon {
    background: #422006;
}
[data-theme="dark"] .potvrda-document-tile-icon svg { color: #fbbf24; }
[data-theme="dark"] .potvrda-document-tile-title { color: #fafaf9; }
[data-theme="dark"] .potvrda-document-tile-expiry { color: #a8a29e; }
[data-theme="dark"] .potvrda-document-tile-badge {
    background: #422006;
    color: #fbbf24;
}
[data-theme="dark"] .potvrda-card {
    background: linear-gradient(160deg, #2f200d 0%, #3f2d14 55%, #4c360d 100%);
}
[data-theme="dark"] .btn--primary {
    background: linear-gradient(135deg, #78350F, #78350F);
    border-color: #78350F;
    color: #fff;
}
[data-theme="dark"] .btn--primary:hover,
[data-theme="dark"] .btn--primary:focus-visible {
    background: linear-gradient(135deg, #6b2f0c, #6b2f0c);
}

/* Settings Page Dark Overrides */
[data-theme="dark"] .settings-section {
    background: #1e1e1e;
    border-color: #333;
}
[data-theme="dark"] .settings-section-icon {
    background: rgba(34, 197, 94, 0.16);
    border: 1px solid rgba(74, 222, 128, 0.28);
}
[data-theme="dark"] .settings-section-icon svg { color: #4ade80; }
[data-theme="dark"] .settings-theme-btn {
    border-color: #333;
    background: #1e1e1e;
    color: #999;
}
[data-theme="dark"] .settings-theme-btn.active {
    background: rgba(34, 197, 94, 0.1);
    border-color: var(--primary-500);
    color: #4ade80;
}
[data-theme="dark"] .settings-lang-btn {
    border-color: #333;
    background: #1e1e1e;
}
[data-theme="dark"] .settings-lang-btn.active {
    background: rgba(34, 197, 94, 0.1);
    border-color: var(--primary-500);
}
[data-theme="dark"] .settings-lang-name { color: #e5e5e5; }
[data-theme="dark"] .settings-row-title { color: #e5e5e5; }
[data-theme="dark"] .settings-row-desc { color: #999; }
[data-theme="dark"] .settings-switch-slider { background: #444; }
[data-theme="dark"] .settings-switch input:checked + .settings-switch-slider { background: #16a34a; }
[data-theme="dark"] .settings-check-chip {
    border-color: #444;
    background: #2a2a2a;
    color: #ccc;
}
[data-theme="dark"] .settings-check-chip.active {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
}
[data-theme="dark"] .settings-inline-note { color: #999; }
[data-theme="dark"] .settings-inline-note--danger { color: #f87171; }
[data-theme="dark"] .settings-segment-btn {
    border-color: #444;
    background: #2a2a2a;
    color: #ccc;
}
[data-theme="dark"] .settings-segment-btn.active {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
}
[data-theme="dark"] .settings-secondary-btn {
    border-color: #444;
    background: #2a2a2a;
    color: #ccc;
}
[data-theme="dark"] .settings-secondary-btn:hover:not(:disabled) {
    background: #333;
}
[data-theme="dark"] .settings-secondary-btn--danger {
    border-color: #7f1d1d;
    color: #fca5a5;
    background: rgba(220,38,38,0.1);
}
[data-theme="dark"] .settings-secondary-btn--danger:hover:not(:disabled) {
    background: rgba(220,38,38,0.2);
}
[data-theme="dark"] .settings-storage-item {
    border-color: #444;
    background: #2a2a2a;
    color: #999;
}
[data-theme="dark"] .settings-storage-item strong { color: #e5e5e5; }
[data-theme="dark"] .settings-section--danger {
    border-color: rgba(248, 113, 113, 0.35);
    background: rgba(127, 29, 29, 0.2);
}
[data-theme="dark"] .settings-section-icon--danger {
    background: rgba(220, 38, 38, 0.2);
    border-color: rgba(248, 113, 113, 0.35);
}
[data-theme="dark"] .settings-section-icon--danger svg {
    color: #f87171;
}

/* Profil Page Dark Overrides */
[data-theme="dark"] .profil-card {
    background: #1e1e1e;
    border-color: #333;
}
[data-theme="dark"] .profil-name { color: #e5e5e5; }
[data-theme="dark"] .profil-email,
[data-theme="dark"] .profil-member-since { color: #999; }
[data-theme="dark"] .profil-label { color: #ccc; }
[data-theme="dark"] .profil-input {
    background: #2a2a2a;
    border-color: #444;
    color: #e5e5e5;
}
[data-theme="dark"] .profil-input:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}
[data-theme="dark"] .profil-save-btn {
    background: var(--accent-600);
}
[data-theme="dark"] .profil-save-btn:hover {
    background: var(--accent-700);
}
[data-theme="dark"] .profil-collapse-arrow {
    color: #cbd5e1;
}
[data-theme="dark"] .profil-password-strength-bar {
    background: #333;
}
[data-theme="dark"] .profil-password-strength-text {
    color: #999;
}
[data-theme="dark"] .profil-verification-badge--verified {
    background: rgba(22, 163, 74, 0.2);
    color: #4ade80;
}
[data-theme="dark"] .profil-verification-badge--unverified {
    background: rgba(217, 119, 6, 0.2);
    color: #fbbf24;
}
[data-theme="dark"] .profil-resend-btn {
    background: #2a2a2a;
    border-color: #444;
    color: #ccc;
}
[data-theme="dark"] .profil-resend-btn:hover:not(:disabled) {
    background: #333;
}
[data-theme="dark"] .profil-danger-section {
    border-color: rgba(248, 113, 113, 0.35);
    background: rgba(127, 29, 29, 0.2);
}
[data-theme="dark"] .profil-delete-btn {
    background: #b91c1c;
}
[data-theme="dark"] .profil-delete-btn:hover {
    background: #991b1b;
}

/* Loading / Utility */
[data-theme="dark"] .loading-spinner { border-color: #333; border-top-color: var(--primary-500); }
[data-theme="dark"] .empty-state { color: #999; }
[data-theme="dark"] .error-state { color: #f87171; }

/* =============================================================================
   Multi-Select Mode (Dokumenti)
   ============================================================================= */

/* Header Select Button */
.header-select-btn {
    padding: 6px 14px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    background: rgba(255,255,255,0.15);
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: var(--font-family);
    cursor: pointer;
    transition: background 0.15s;
    margin-left: auto;
}
.header-select-btn:hover { background: rgba(255,255,255,0.25); }

/* Card in select mode */
.dokumenti-card--selectable {
    padding-left: 8px;
}
.dokumenti-card--selected {
    border-color: var(--primary-500) !important;
    background: var(--primary-50);
}
[data-theme="dark"] .dokumenti-card--selected {
    border-color: var(--primary-500) !important;
    background: rgba(34, 197, 94, 0.08);
}

/* Checkbox */
.dokumenti-card-checkbox {
    width: 26px; height: 26px;
    border: 2px solid var(--gray-300);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
}
.dokumenti-card-checkbox--checked {
    background: var(--primary-500);
    border-color: var(--primary-500);
}
.dokumenti-card-checkbox--checked svg {
    width: 14px; height: 14px;
    color: white;
}
[data-theme="dark"] .dokumenti-card-checkbox { border-color: #555; }

/* Floating Delete Bar */
.dokumenti-select-bar {
    position: fixed;
    bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    width: calc(100% - 32px);
    max-width: calc(var(--max-width) - 32px);
    z-index: 500;
    transition: transform 0.25s ease-out;
}
.dokumenti-select-bar--visible {
    transform: translateX(-50%) translateY(0);
}

.dokumenti-select-bar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    padding-bottom: 2px;
}

.dokumenti-select-bar-btn {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 52px;
    padding: 0 12px;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.88rem;
    line-height: 1.1;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: background 0.15s;
    text-align: center;
}
.dokumenti-select-bar-btn--delete {
    background: #dc2626;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.dokumenti-select-bar-btn--delete:hover { background: #b91c1c; }
.dokumenti-select-bar-btn--rename {
    background: var(--gray-700, #374151);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.dokumenti-select-bar-btn--rename:hover {
    background: var(--gray-800, #1f2937);
}
.dokumenti-select-bar-btn--move {
    background: var(--primary-600, #16a34a);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.dokumenti-select-bar-btn--move:hover {
    background: var(--primary-700, #15803d);
}
.dokumenti-select-bar-btn:active { transform: scale(0.98); }
.dokumenti-select-bar-btn svg { width: 20px; height: 20px; }
[data-theme="dark"] .dokumenti-select-bar-btn--rename {
    background: #374151;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
[data-theme="dark"] .dokumenti-select-bar-btn--rename:hover {
    background: #4b5563;
}
[data-theme="dark"] .dokumenti-select-bar-btn--move {
    background: #166534;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
[data-theme="dark"] .dokumenti-select-bar-btn--move:hover {
    background: #15803d;
}

/* =============================================================================
   Confirmation Dialog
   ============================================================================= */
.confirm-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.confirm-backdrop {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0);
    transition: background 0.2s;
}
.confirm-overlay--visible .confirm-backdrop {
    background: rgba(0,0,0,0.5);
}

.confirm-dialog {
    position: relative;
    width: 100%;
    max-width: 320px;
    background: white;
    border-radius: 4px;
    padding: 28px 24px 20px;
    text-align: center;
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.2s ease-out, opacity 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.confirm-overlay--visible .confirm-dialog {
    transform: scale(1);
    opacity: 1;
}

.confirm-dialog-icon {
    width: 56px; height: 56px;
    background: #fef2f2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.confirm-dialog-icon svg { width: 28px; height: 28px; color: #dc2626; }

.confirm-dialog-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.confirm-dialog-msg {
    font-size: 0.9rem;
    color: var(--gray-500);
    margin-bottom: 4px;
    line-height: 1.4;
}

.confirm-dialog-count {
    font-size: 0.85rem;
    font-weight: 600;
    color: #dc2626;
    margin-bottom: 20px;
}

.confirm-dialog-actions {
    display: flex;
    gap: 10px;
}

.confirm-dialog-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    transition: background 0.15s;
}

.confirm-dialog-btn--no {
    background: var(--gray-100);
    color: var(--gray-700);
}
.confirm-dialog-btn--no:hover { background: var(--gray-200); }

.confirm-dialog-btn--yes {
    background: var(--danger-500);
    color: white;
}
.confirm-dialog-btn--yes:hover { background: var(--danger-700); }

/* Dark theme dialog */
[data-theme="dark"] .confirm-dialog {
    background: #1e1e1e;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
[data-theme="dark"] .confirm-dialog-icon { background: rgba(220, 38, 38, 0.15); }
[data-theme="dark"] .confirm-dialog-title { color: #e5e5e5; }
[data-theme="dark"] .confirm-dialog-msg { color: #999; }
[data-theme="dark"] .confirm-dialog-count { color: #f87171; }
[data-theme="dark"] .confirm-dialog-btn--no { background: #2a2a2a; color: #ccc; }
[data-theme="dark"] .confirm-dialog-btn--no:hover { background: #333; }

/* =============================================================================
   CSV Export Button (Cijene header)
   ============================================================================= */
.header-export-btn {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
}
.header-export-btn:hover { background: rgba(255,255,255,0.3); }
.header-export-btn svg { width: 22px; height: 22px; }

/* =============================================================================
   Admin Role Badge & Menu Styling
   ============================================================================= */
.user-avatar--admin {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
}

.user-role-badge--admin {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: white !important;
}

.menu-item--admin {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.1));
    border-left: 3px solid #f59e0b;
}

.menu-item--admin .menu-item-icon {
    color: #f59e0b;
}

[data-theme="dark"] .menu-item--admin {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.15));
}

.header--admin {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.header--dev {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
}

/* =============================================================================
   Admin Page
   ============================================================================= */
.admin-page {
    padding: 16px;
}

.admin-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.admin-panel-header h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-800);
}

.admin-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
}
.admin-tabs::-webkit-scrollbar { display: none; }

.admin-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    background: var(--gray-100);
    color: var(--gray-600);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.admin-tab svg { width: 16px; height: 16px; }
.admin-tab.active { background: var(--primary-500); color: white; }

.admin-loading {
    display: flex;
    justify-content: center;
    padding: 40px;
}

.admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.admin-header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.admin-section-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
}

.admin-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    background: white;
    color: var(--gray-700);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.admin-btn svg { width: 16px; height: 16px; }
.admin-btn:hover { background: var(--gray-50); }
.admin-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.admin-btn:disabled:hover { background: inherit; }

.admin-btn-primary {
    background: var(--accent-600);
    border-color: var(--accent-600);
    color: white;
}
.admin-btn-primary:hover { background: var(--accent-700); }
.admin-btn-primary:disabled {
    background: var(--accent-300);
    border-color: var(--accent-300);
    color: #f8fafc;
}

.admin-btn-publish.is-loading svg {
    animation: spin 0.85s linear infinite;
}

.admin-btn-publish.has-pending {
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.22);
}


.admin-btn-icon {
    width: 36px; height: 36px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}
.admin-btn-icon:hover { background: var(--gray-100); color: var(--gray-700); }
.admin-btn-icon svg { width: 18px; height: 18px; }
.admin-btn-icon.admin-btn-danger:hover { background: #fef2f2; color: #dc2626; }

.admin-move-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1;
    transition: all 0.15s;
}
.admin-move-btn:hover { background: var(--gray-100); color: var(--gray-700); }
.admin-move-btn:disabled,
.admin-move-btn.is-loading {
    opacity: 0.45;
    cursor: default;
}

.admin-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-400);
}
.admin-empty svg { width: 48px; height: 48px; margin-bottom: 12px; }
.admin-empty p { font-size: 0.875rem; }

.admin-category-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-category-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
}
.admin-category-card:hover { border-color: var(--primary-300); box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.admin-category-card--inactive { opacity: 0.6; }

.admin-category-info { flex: 1; min-width: 0; }
.admin-category-info h3 { font-size: 0.9375rem; font-weight: 600; color: var(--gray-800); margin-bottom: 4px; }
.admin-category-info p { font-size: 0.8125rem; color: var(--gray-500); margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-category-steps { font-size: 0.75rem; color: var(--primary-600); font-weight: 500; }

.admin-category-actions { display: flex; gap: 4px; }

.admin-back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    background: var(--gray-100);
    color: var(--gray-700);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}
.admin-back-btn:hover { background: var(--gray-200); }
.admin-back-btn svg { width: 16px; height: 16px; }

.admin-category-detail { margin-top: 16px; }
.admin-category-desc { font-size: 0.875rem; color: var(--gray-500); margin-bottom: 20px; }

.admin-steps-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.admin-steps-header h3 { font-size: 0.9375rem; font-weight: 600; color: var(--gray-700); }

.admin-steps-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-step-card {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 4px;
}

.admin-step-number {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--primary-100);
    color: var(--primary-700);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    flex-shrink: 0;
}

.admin-step-content { flex: 1; min-width: 0; }

.admin-step-image {
    width: 80px; height: 60px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}
.admin-step-image img { width: 100%; height: 100%; object-fit: cover; }

.admin-step-info h4 { font-size: 0.875rem; font-weight: 600; color: var(--gray-800); margin-bottom: 4px; }
.admin-step-info p { font-size: 0.8125rem; color: var(--gray-600); line-height: 1.4; }
.admin-step-desc-preview { font-size: 0.8125rem; color: var(--gray-600); line-height: 1.4; max-height: 3.6em; overflow: hidden; }

.admin-step-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Admin Form Dialog */
.admin-form-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.2s;
}
.admin-form-overlay--visible { opacity: 1; }

.admin-form-dialog {
    width: 95%;
    max-width: 700px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    background: white;
    border-radius: 4px;
    padding: 0;
    transform: translateY(20px);
    transition: transform 0.2s;
}
.admin-form-overlay--visible .admin-form-dialog { transform: translateY(0); }
.admin-form-dialog--large { max-width: 700px; }

.admin-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    padding: 16px 16px 0;
}
.admin-form-header h3 { font-size: 1.125rem; font-weight: 600; color: var(--gray-800); }

.admin-form-dialog > form {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.admin-form-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem;
}

.admin-form-body > *:last-child {
    margin-bottom: 0;
}

.admin-form-close {
    width: 36px; height: 36px;
    border: none;
    border-radius: 50%;
    background: var(--gray-100);
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.admin-form-close:hover { background: var(--gray-200); }
.admin-form-close svg { width: 20px; height: 20px; }

.admin-form-group { margin-bottom: 16px; }
.admin-form-group label { display: block; font-size: 0.8125rem; font-weight: 500; color: var(--gray-700); margin-bottom: 6px; }
.admin-form-group input[type="text"],
.admin-form-group input[type="number"],
.admin-form-group input[type="url"],
.admin-form-group textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    font-size: 0.9375rem;
    font-family: inherit;
    transition: border-color 0.15s;
}
.admin-form-group input:focus,
.admin-form-group textarea:focus {
    outline: none;
    border-color: var(--primary-500);
}
.admin-form-group textarea { resize: vertical; min-height: 80px; }

.admin-form-row { display: flex; gap: 12px; }
.admin-form-group--small { width: 80px; flex-shrink: 0; }
.admin-form-group--flex { flex: 1; }

.admin-form-checkbox {
    display: flex;
    align-items: center;
}
.admin-form-checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin: 0;
}
.admin-form-checkbox input[type="checkbox"] {
    width: 18px; height: 18px;
    accent-color: var(--primary-500);
}

.admin-image-upload { margin-top: 8px; }

.admin-image-preview {
    width: 100%;
    height: 150px;
    border: 2px dashed var(--gray-300);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: border-color 0.15s;
}
.admin-image-preview:hover { border-color: var(--primary-400); }
.admin-image-preview svg { width: 32px; height: 32px; margin-bottom: 8px; }
.admin-image-preview span { font-size: 0.8125rem; }
.admin-image-preview img { width: 100%; height: 100%; object-fit: contain; }

.admin-image-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px; height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.admin-image-remove svg { width: 16px; height: 16px; }

.admin-form-actions {
    display: flex;
    flex-shrink: 0;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 0;
    padding: 0 16px 16px;
}


/* Admin No Access */
.admin-no-access {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}
.admin-no-access-icon {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: var(--gray-100);
    color: var(--gray-400);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}
.admin-no-access-icon svg { width: 40px; height: 40px; }
.admin-no-access h2 { font-size: 1.25rem; font-weight: 600; color: var(--gray-700); margin-bottom: 8px; }
.admin-no-access p { font-size: 0.875rem; color: var(--gray-500); }

/* Admin Dark Theme */
[data-theme="dark"] .admin-tab { background: #2a2a2a; color: #aaa; }
[data-theme="dark"] .admin-tab.active { background: var(--primary-600); color: white; }
[data-theme="dark"] .admin-panel-header h2 { color: #e5e5e5; }
[data-theme="dark"] .admin-section-header h2 { color: #e5e5e5; }
[data-theme="dark"] .admin-btn { background: #2a2a2a; border-color: #444; color: #ccc; }
[data-theme="dark"] .admin-btn:hover { background: #333; }
[data-theme="dark"] .admin-category-card { background: #1e1e1e; border-color: #333; }
[data-theme="dark"] .admin-category-info h3 { color: #e5e5e5; }
[data-theme="dark"] .admin-category-info p { color: #888; }
[data-theme="dark"] .admin-back-btn { background: #2a2a2a; color: #ccc; }
[data-theme="dark"] .admin-step-card { background: #1e1e1e; border-color: #333; }
[data-theme="dark"] .admin-step-info h4 { color: #e5e5e5; }
[data-theme="dark"] .admin-step-info p { color: #999; }
[data-theme="dark"] .admin-step-desc-preview { color: #999; }
[data-theme="dark"] .admin-form-dialog { background: #1e1e1e; }
[data-theme="dark"] .admin-form-header h3 { color: #e5e5e5; }
[data-theme="dark"] .admin-form-group label { color: #ccc; }
[data-theme="dark"] .admin-form-group input,
[data-theme="dark"] .admin-form-group textarea { background: #2a2a2a; border-color: #444; color: #e5e5e5; }
[data-theme="dark"] .admin-image-preview { border-color: #444; color: #666; }
[data-theme="dark"] .admin-no-access-icon { background: #2a2a2a; color: #666; }
[data-theme="dark"] .admin-no-access h2 { color: #e5e5e5; }
[data-theme="dark"] .admin-no-access p { color: #888; }

/* Admin Coming Soon */
.admin-coming-soon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--gray-400);
}
.admin-coming-soon svg { width: 64px; height: 64px; margin-bottom: 16px; opacity: 0.5; }
.admin-coming-soon h3 { font-size: 1.125rem; font-weight: 600; color: var(--gray-600); margin-bottom: 8px; }
.admin-coming-soon p { font-size: 0.875rem; }

[data-theme="dark"] .admin-coming-soon { color: #666; }
[data-theme="dark"] .admin-coming-soon h3 { color: #999; }

/* Admin Price Filters */
.admin-price-filters {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.admin-price-filter-group {
    display: flex;
    gap: 8px;
}

.admin-filter-btn {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    background: white;
    color: var(--gray-600);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}
.admin-filter-btn:hover { border-color: var(--primary-400); }
.admin-filter-btn.active {
    background: var(--primary-50);
    border-color: var(--primary-500);
    color: var(--primary-700);
}

[data-theme="dark"] .admin-filter-btn { background: #2a2a2a; border-color: #444; color: #aaa; }
[data-theme="dark"] .admin-filter-btn:hover { border-color: var(--primary-500); }
[data-theme="dark"] .admin-filter-btn.active { background: rgba(34, 197, 94, 0.15); color: var(--primary-400); }

.admin-filter-toggle {
    position: relative;
    min-width: 80px;
    transition: all 0.2s ease;
}
.admin-filter-toggle.active {
    background: var(--primary-500);
    color: white;
    border-color: var(--primary-600);
}
.admin-filter-toggle.active:hover {
    background: var(--primary-600);
}
[data-theme="dark"] .admin-filter-toggle.active { background: var(--primary-600); color: white; border-color: var(--primary-500); }

/* Admin Product List */
.admin-products-list { display: flex; flex-direction: column; gap: 0.5rem; }
.admin-product-card {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.75rem; background: white; border: 1px solid var(--gray-200);
    border-radius: 4px; transition: border-color 0.15s;
}
.admin-product-card:hover { border-color: var(--primary-300); }
.admin-product-color { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.admin-product-info { flex: 1; min-width: 0; }
.admin-product-name { font-size: 0.875rem; font-weight: 600; color: var(--gray-800); }
.admin-product-meta { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.25rem; }
.admin-product-code { font-size: 0.75rem; color: var(--gray-500); font-family: monospace; }
.admin-product-badge {
    font-size: 0.65rem; padding: 1px 6px; border-radius: 4px;
    font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px;
}
.admin-product-badge--lokalno { background: #dcfce7; color: #166534; }
.admin-product-badge--burza { background: #dbeafe; color: #1e40af; }
.admin-product-badge--merkantilna { background: #fef9c3; color: #854d0e; }
.admin-product-badge--gnojiva { background: #f3e8ff; color: #6b21a8; }
.admin-product-badge--system { background: var(--gray-100); color: var(--gray-500); }
.admin-product-actions { display: flex; gap: 4px; flex-shrink: 0; }
.admin-color-input { width: 50px; height: 36px; padding: 2px; border: 1px solid var(--gray-300); border-radius: 4px; cursor: pointer; }

/* Admin Prices Accordion */
.admin-price-accordion {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-product-card--accordion {
    display: block;
    padding: 0;
    overflow: hidden;
}

.admin-product-card--accordion.is-expanded {
    border-color: var(--primary-400);
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.08);
}

.admin-product-card-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.admin-product-card-toggle:focus-visible {
    outline: 2px solid var(--primary-500);
    outline-offset: -2px;
}

.admin-product-card--accordion .admin-product-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.admin-product-card--accordion .admin-product-meta {
    margin-top: 0;
}

.admin-product-chevron {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--gray-500);
    transition: transform 0.18s ease, color 0.18s ease;
}

.admin-product-chevron svg {
    width: 18px;
    height: 18px;
}

.admin-product-card--accordion.is-expanded .admin-product-chevron {
    transform: rotate(180deg);
    color: var(--primary-600);
}

.admin-price-history-panel {
    padding: 0 12px 12px;
}

.admin-price-history-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--gray-200);
    border: 1px solid var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.admin-price-history-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 72px;
    padding: 16px;
    border: 1px solid var(--gray-200);
    border-radius: 4px;
    background: var(--gray-50);
    color: var(--gray-500);
    font-size: 0.8125rem;
    text-align: center;
}

.admin-price-history-state .loading-spinner {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

.admin-price-history-state--error {
    color: var(--error-600, #b91c1c);
}

[data-theme="dark"] .admin-product-card { background: #1e1e1e; border-color: #333; }
[data-theme="dark"] .admin-product-name { color: #e5e5e5; }
[data-theme="dark"] .admin-product-code { color: #888; }
[data-theme="dark"] .admin-product-badge--lokalno { background: rgba(22,101,52,0.3); color: #86efac; }
[data-theme="dark"] .admin-product-badge--burza { background: rgba(30,64,175,0.3); color: #93c5fd; }
[data-theme="dark"] .admin-product-badge--merkantilna { background: rgba(133,77,14,0.3); color: #fde047; }
[data-theme="dark"] .admin-product-badge--gnojiva { background: rgba(107,33,168,0.3); color: #d8b4fe; }
[data-theme="dark"] .admin-product-badge--system { background: #333; color: #777; }
[data-theme="dark"] .admin-color-input { background: #2a2a2a; border-color: #444; }
[data-theme="dark"] .admin-product-card--accordion.is-expanded { border-color: var(--primary-500); box-shadow: none; }
[data-theme="dark"] .admin-product-chevron { color: #9ca3af; }
[data-theme="dark"] .admin-price-history-list { background: #333; border-color: #333; }
[data-theme="dark"] .admin-price-history-state { background: #252525; border-color: #333; color: #9ca3af; }
[data-theme="dark"] .admin-price-history-state--error { color: #fca5a5; }

/* Admin Price List */
.admin-price-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.admin-price-header {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(84px, 1fr) minmax(84px, 1fr) auto;
    column-gap: 10px;
    padding: 10px 12px;
    background: var(--gray-100);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-price-row {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(84px, 1fr) minmax(84px, 1fr) auto;
    column-gap: 10px;
    padding: 12px;
    background: white;
    align-items: flex-start;
}

.admin-price-product {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}

.admin-price-product-main {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.admin-price-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.admin-price-product strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-800);
    min-width: 0;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.2;
}

.admin-price-product small {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 2px;
    white-space: normal;
    word-break: break-word;
    line-height: 1.2;
}

.admin-price-value strong {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--primary-600);
}

.admin-price-value small {
    display: block;
    font-size: 0.6875rem;
    color: var(--gray-400);
    margin-top: 2px;
}

.admin-price-value,
.admin-price-date,
.admin-price-actions {
    min-width: 0;
}

.admin-price-date {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.admin-price-actions {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
}

@media (max-width: 640px) {
    .admin-price-header {
        display: none;
    }

    .admin-price-row {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "product actions"
            "price date";
        column-gap: 12px;
        row-gap: 8px;
        align-items: flex-start;
    }

    .admin-price-product {
        grid-area: product;
    }

    .admin-price-value {
        grid-area: price;
        justify-self: center;
        text-align: center;
    }

    .admin-price-date {
        grid-area: date;
        text-align: right;
    }

    .admin-price-actions {
        grid-area: actions;
        align-self: flex-start;
    }
}

.admin-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-left: 6px;
}

.admin-badge--manual {
    background: #fef3c7;
    color: #92400e;
}

/* Admin Form Select */
.admin-form-group select {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    font-size: 0.9375rem;
    font-family: inherit;
    background: white;
    cursor: pointer;
    transition: border-color 0.15s;
}
.admin-form-group select:focus {
    outline: none;
    border-color: var(--primary-500);
}
.admin-form-group input[type="date"] {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    font-size: 0.9375rem;
    font-family: inherit;
    transition: border-color 0.15s;
}
.admin-form-group input[type="date"]:focus {
    outline: none;
    border-color: var(--primary-500);
}
.admin-form-group small {
    color: var(--gray-400);
    font-weight: 400;
}

/* Admin Price Dark Theme */
[data-theme="dark"] .admin-price-list { background: #333; }
[data-theme="dark"] .admin-price-header { background: #2a2a2a; color: #888; }
[data-theme="dark"] .admin-price-row { background: #1e1e1e; }
[data-theme="dark"] .admin-price-product strong { color: #e5e5e5; }
[data-theme="dark"] .admin-price-product small { color: #888; }
[data-theme="dark"] .admin-price-value strong { color: var(--primary-400); }
[data-theme="dark"] .admin-price-date { color: #888; }
[data-theme="dark"] .admin-badge--manual { background: rgba(251, 191, 36, 0.2); color: #fbbf24; }
[data-theme="dark"] .admin-form-group select { background: #2a2a2a; border-color: #444; color: #e5e5e5; }
[data-theme="dark"] .admin-form-group input[type="date"] { background: #2a2a2a; border-color: #444; color: #e5e5e5; }

/* Admin Price Row - Responsive Flex Columns */
.admin-price-list .admin-price-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-price-list .admin-price-header span:nth-child(1) {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
}

.admin-price-list .admin-price-header span:nth-child(2) {
    flex: 0 0 auto;
    min-width: 80px;
    text-align: right;
}

.admin-price-list .admin-price-header span:nth-child(3) {
    flex: 0 0 auto;
    text-align: right;
}

.admin-price-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.admin-price-row .apr-col-left {
    flex: 1 1 auto;
    min-width: 0;
}

.admin-price-row .apr-col-center {
    flex: 0 0 auto;
    min-width: 80px;
    text-align: right;
}

.admin-price-row .apr-col-right {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    padding-left: 10px;
    border-left: 1px solid var(--gray-200);
}

.admin-price-row .admin-price-product {
    min-width: 0;
}

.admin-price-row .admin-price-product-main {
    min-width: 0;
}

.admin-price-row .apr-title {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-price-row .apr-subtitle {
    display: block;
    margin-top: 2px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-price-row .admin-price-actions {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    gap: 4px;
}

.admin-price-row .admin-badge {
    margin-left: 0;
    margin-top: 4px;
}

.admin-price-row .apr-date {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-align: right;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .admin-price-list .admin-price-header {
        display: none;
    }
}

[data-theme="dark"] .admin-price-row .apr-subtitle {
    color: #9ca3af;
}

[data-theme="dark"] .admin-price-row .apr-date {
    color: #9ca3af;
}

[data-theme="dark"] .admin-price-row .apr-col-right {
    border-left-color: #333;
}

/* ── Admin Users (Korisnici) ─────────────────────────────────────────────── */
.admin-users-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-user-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-user-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 4px;
    transition: box-shadow 0.15s;
}

.admin-user-row:hover {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.admin-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.admin-user-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gray-800);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-user-email,
.admin-user-farm,
.admin-user-oib,
.admin-user-date {
    font-size: 0.75rem;
    color: var(--gray-500);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-user-badges {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

.admin-user-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.admin-user-badge--admin {
    background: #dbeafe;
    color: #1e40af;
}

.admin-user-badge--dev {
    background: #fae8ff;
    color: #86198f;
}

.admin-role-select {
    padding: 4px 8px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    font-size: 0.8125rem;
    font-family: var(--font-family);
    background: var(--white);
    color: var(--gray-900);
}

.admin-user-badge--user {
    background: var(--gray-100);
    color: var(--gray-600);
}

.admin-user-badge--active {
    background: #dcfce7;
    color: #166534;
}

.admin-user-badge--suspended {
    background: #fee2e2;
    color: #991b1b;
}

.admin-user-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-btn-sm {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
}

/* Responsive: stack on mobile */
@media (max-width: 600px) {
    .admin-user-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .admin-user-badges {
        flex-direction: row;
        justify-content: flex-start;
    }

    .admin-user-actions {
        flex-direction: row;
    }
}

/* Dark theme */
[data-theme="dark"] .admin-user-row {
    background: #1e1e1e;
    border-color: #333;
}

[data-theme="dark"] .admin-user-name { color: #e5e5e5; }
[data-theme="dark"] .admin-user-email,
[data-theme="dark"] .admin-user-farm,
[data-theme="dark"] .admin-user-oib,
[data-theme="dark"] .admin-user-date { color: #888; }

[data-theme="dark"] .admin-user-badge--admin { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
[data-theme="dark"] .admin-user-badge--dev { background: rgba(168, 85, 247, 0.2); color: #c084fc; }
[data-theme="dark"] .admin-role-select { background: var(--gray-800); color: var(--gray-100); border-color: var(--gray-600); }
[data-theme="dark"] .admin-user-badge--user { background: rgba(255, 255, 255, 0.08); color: #aaa; }
[data-theme="dark"] .admin-user-badge--active { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
[data-theme="dark"] .admin-user-badge--suspended { background: rgba(239, 68, 68, 0.2); color: #f87171; }

/* =============================================================================
   ARKOD Page - Tutorials
   ============================================================================= */
.arkod-page {
    padding: 16px;
}

.arkod-intro {
    text-align: center;
    padding: 20px;
    margin-bottom: 20px;
}
.arkod-intro h2 { font-size: 1.25rem; font-weight: 700; color: var(--gray-800); margin-bottom: 8px; }
.arkod-intro p { font-size: 0.875rem; color: var(--gray-500); line-height: 1.5; }

.arkod-categories {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.arkod-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-400);
}
.arkod-empty svg { width: 48px; height: 48px; margin-bottom: 12px; }
.arkod-empty p { font-size: 0.875rem; }

.arkod-category-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
}
.arkod-category-card:hover { border-color: var(--arkod-primary); box-shadow: 0 1px 2px rgba(59, 130, 246, 0.1); }

.arkod-category-icon {
    width: 48px; height: 48px;
    border-radius: 4px;
    background: var(--arkod-bg);
    color: var(--arkod-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.arkod-category-icon svg { width: 24px; height: 24px; }

.arkod-category-info { flex: 1; min-width: 0; }
.arkod-category-info h3 { font-size: 0.9375rem; font-weight: 600; color: var(--gray-800); margin-bottom: 4px; }
.arkod-category-info p { font-size: 0.8125rem; color: var(--gray-500); margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arkod-category-steps { font-size: 0.75rem; color: var(--arkod-primary); font-weight: 500; }

.arkod-category-arrow { color: var(--gray-300); flex-shrink: 0; }
.arkod-category-arrow svg { width: 20px; height: 20px; }

/* Folder Cards */
.arkod-folders {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.arkod-folder-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
}
.arkod-folder-card:hover { border-color: var(--arkod-primary); box-shadow: 0 1px 2px rgba(59, 130, 246, 0.1); }

.arkod-folder-icon {
    width: 48px; height: 48px;
    border-radius: 4px;
    background: var(--arkod-bg);
    color: var(--arkod-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.arkod-folder-icon svg { width: 24px; height: 24px; }

.arkod-folder-info { flex: 1; min-width: 0; }
.arkod-folder-info h3 { font-size: 0.9375rem; font-weight: 600; color: var(--gray-800); margin-bottom: 4px; }

/* Breadcrumb */
.arkod-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--arkod-primary);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 8px;
    padding: 4px 0;
}
.arkod-breadcrumb:hover { text-decoration: underline; }

.arkod-view-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 16px;
}

/* Inline Step Slider */
.arkod-step-slider {
    margin-top: 4px;
}

.arkod-step-content {
    transition: opacity 0.15s, transform 0.15s;
}

.arkod-step-image {
    width: 100%;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
    background: var(--gray-100);
}
.arkod-step-image img {
    width: 100%;
    height: auto;
    display: block;
}

.arkod-step-text { padding: 0 4px; }
.arkod-step-title { font-size: 1.0625rem; font-weight: 600; color: var(--gray-800); margin-bottom: 8px; }
.arkod-step-desc { font-size: 0.9375rem; color: var(--gray-600); line-height: 1.6; }

/* Progress Dots */
.arkod-step-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 20px 0 16px;
}

.arkod-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--gray-300);
    transition: all 0.15s;
}
.arkod-dot--active { background: #ef4444; transform: scale(1.2); }

/* Step Navigation Buttons */
.arkod-step-nav {
    display: flex;
    justify-content: space-between;
    padding-top: 8px;
}

.arkod-nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all 0.15s;
}
.arkod-nav-btn svg { width: 18px; height: 18px; }

.arkod-nav-prev {
    background: var(--gray-100);
    color: var(--gray-700);
}
.arkod-nav-prev:hover { background: var(--gray-200); }
.arkod-nav-btn--disabled { opacity: 0.5; cursor: not-allowed; }

.arkod-nav-next {
    background: var(--arkod-primary);
    color: white;
}
.arkod-nav-next:hover { background: #172554; }

.arkod-nav-finish {
    background: var(--arkod-primary);
    color: white;
}
.arkod-nav-finish:hover { background: #172554; }

/* ARKOD Dark Theme */
[data-theme="dark"] .arkod-intro h2 { color: #e5e5e5; }
[data-theme="dark"] .arkod-intro p { color: #b6c2d2; }
[data-theme="dark"] .arkod-category-card { background: #1e1e1e; border-color: #333; }
[data-theme="dark"] .arkod-category-card:hover { border-color: var(--arkod-primary); }
[data-theme="dark"] .arkod-category-icon { background: rgba(59, 130, 246, 0.15); }
[data-theme="dark"] .arkod-category-info h3 { color: #e5e5e5; }
[data-theme="dark"] .arkod-category-info p { color: #b6c2d2; }
[data-theme="dark"] .arkod-category-steps { color: #93c5fd; }
[data-theme="dark"] .arkod-category-arrow { color: #64748b; }
[data-theme="dark"] .arkod-folder-card { background: #1e1e1e; border-color: #333; }
[data-theme="dark"] .arkod-folder-card:hover { border-color: var(--arkod-primary); }
[data-theme="dark"] .arkod-folder-icon { background: rgba(59, 130, 246, 0.15); }
[data-theme="dark"] .arkod-folder-info h3 { color: #e5e5e5; }
[data-theme="dark"] .arkod-breadcrumb { color: #60a5fa; }
[data-theme="dark"] .arkod-view-title { color: #e5e5e5; }
[data-theme="dark"] .arkod-step-image { background: #1e1e1e; }
[data-theme="dark"] .arkod-step-title { color: #e5e5e5; }
[data-theme="dark"] .arkod-step-desc { color: #e2e8f0; }
[data-theme="dark"] .arkod-dot { background: #444; }
[data-theme="dark"] .arkod-nav-prev {
    background: #334155;
    color: #f8fafc;
    border: 1px solid #475569;
}
[data-theme="dark"] .arkod-nav-prev:hover { background: #475569; }
[data-theme="dark"] .arkod-nav-btn--disabled {
    opacity: 0.72;
    color: #94a3b8;
}

/* =============================================================================
   Login Error
   ============================================================================= */
.login-error {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 4px;
    margin-bottom: 16px;
    color: #dc2626;
    font-size: 0.875rem;
}
.login-error svg { width: 20px; height: 20px; flex-shrink: 0; }

.login-success {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--primary-50);
    border: 1px solid var(--primary-100);
    border-radius: 4px;
    margin-bottom: 16px;
    color: var(--primary-700);
    font-size: 0.875rem;
}
.login-success svg { width: 20px; height: 20px; flex-shrink: 0; }

.form-hint {
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-top: 4px;
}

/* Password strength meter */
.password-strength-meter {
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 8px;
}

.password-strength-meter .strength-bar {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: var(--gray-200);
    position: relative;
    overflow: hidden;
}

.password-strength-meter .strength-bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s, background 0.3s;
}

.password-strength-meter .strength-label {
    font-size: 0.6875rem;
    font-weight: 600;
    white-space: nowrap;
}

.password-strength-meter.strength-weak .strength-bar::after { width: 25%; background: #ef4444; }
.password-strength-meter.strength-weak .strength-label { color: #ef4444; }

.password-strength-meter.strength-fair .strength-bar::after { width: 50%; background: #f59e0b; }
.password-strength-meter.strength-fair .strength-label { color: #f59e0b; }

.password-strength-meter.strength-good .strength-bar::after { width: 75%; background: #22c55e; }
.password-strength-meter.strength-good .strength-label { color: #22c55e; }

.password-strength-meter.strength-strong .strength-bar::after { width: 100%; background: #16a34a; }
.password-strength-meter.strength-strong .strength-label { color: #16a34a; }

.loading-spinner-small {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* =============================================================================
   Export Modal
   ============================================================================= */
.export-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1.5rem;
}

.export-modal {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    animation: modalSlideUp 0.25s ease-out;
}

.export-modal-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 24rem;
    max-height: 85vh;
    overflow: hidden;
    border-radius: 4px;
    background: var(--bg-primary);
}

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

.export-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
    flex-shrink: 0;
}

.export-modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-800);
}

.export-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    transition: background 0.15s, color 0.15s;
}

.export-modal-close:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.export-modal-close svg {
    width: 20px;
    height: 20px;
}

.export-modal-body {
    padding: 20px;
    padding-right: 0.5rem;
    padding-bottom: 16px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.export-mode-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.export-mode-tab {
    flex: 1;
    padding: 10px 16px;
    border: 2px solid var(--gray-200);
    background: white;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.15s;
}

.export-mode-tab:hover {
    border-color: var(--gray-300);
    color: var(--gray-700);
}

.export-mode-tab.active {
    border-color: var(--primary-500);
    background: var(--primary-50);
    color: var(--primary-700);
}

.export-date-inputs {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.export-date-field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.export-date-field input[type="date"] {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid var(--gray-200);
    border-radius: 4px;
    font-size: 1rem;
    font-family: var(--font-family);
    color: var(--gray-800);
    transition: border-color 0.15s;
    -webkit-appearance: none;
    appearance: none;
}

.export-date-field input[type="date"]:focus {
    outline: none;
    border-color: var(--primary-500);
}

.export-date-field.hidden {
    display: none;
}

.export-modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
    flex-shrink: 0;
}

.export-btn-cancel {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    background: white;
    border-radius: 4px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.15s;
}

.export-btn-cancel:hover {
    border-color: var(--gray-300);
    background: var(--gray-50);
}

.export-btn-download {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: var(--accent-600);
    border-radius: 4px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.15s;
}

.export-btn-download:hover {
    background: var(--accent-700);
}


.export-btn-download:disabled {
    background: var(--gray-400);
    cursor: not-allowed;
}

.export-btn-download svg {
    width: 18px;
    height: 18px;
}

.spinner-small {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

/* =============================================================================
   Export Modal - Commodity Selection
   ============================================================================= */
.export-commodity-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
}

.export-commodity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.export-commodity-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

.export-select-all-btn {
    background: none;
    border: none;
    color: var(--primary-600);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.15s;
}

.export-select-all-btn:hover {
    background: var(--primary-50);
}

.export-commodity-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.export-commodity-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid var(--gray-200);
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.export-commodity-item:hover {
    border-color: var(--gray-300);
    background: var(--gray-50);
}

.export-commodity-item.checked {
    border-color: var(--primary-500);
    background: var(--primary-50);
}

.export-commodity-cb {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-500);
    cursor: pointer;
    flex-shrink: 0;
}

.export-commodity-swatch {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.export-commodity-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-800);
}

/* =============================================================================
   Export Modal - Format Selection
   ============================================================================= */
.export-format-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
}

.export-format-tabs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.export-format-tab {
    flex: 1;
    padding: 10px 16px;
    border: 2px solid var(--gray-200);
    background: white;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}

.export-format-tab:hover {
    border-color: var(--gray-300);
    color: var(--gray-700);
}

.export-format-tab.active {
    border-color: var(--primary-500);
    background: var(--primary-50);
    color: var(--primary-700);
}

.export-format-note {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 8px;
    margin-bottom: 0;
    font-style: italic;
}

/* =============================================================================
   Export Modal - Dark Mode
   ============================================================================= */
[data-theme="dark"] .export-modal {
    background: transparent;
}

[data-theme="dark"] .export-modal-container {
    background: #1e1e1e;
}

[data-theme="dark"] .export-modal-header {
    border-bottom-color: #333;
}

[data-theme="dark"] .export-modal-header h3 {
    color: #e5e5e5;
}

[data-theme="dark"] .export-modal-close {
    color: #999;
}

[data-theme="dark"] .export-modal-close:hover {
    background: #333;
    color: #e5e5e5;
}

[data-theme="dark"] .export-mode-tab {
    border-color: #444;
    background: #1e1e1e;
    color: #999;
}

[data-theme="dark"] .export-mode-tab:hover {
    border-color: #555;
    color: #ccc;
}

[data-theme="dark"] .export-mode-tab.active {
    border-color: var(--primary-500);
    background: rgba(34, 197, 94, 0.1);
    color: #4ade80;
}

[data-theme="dark"] .export-date-field label {
    color: #ccc;
}

[data-theme="dark"] .export-date-field input[type="date"] {
    background: #2a2a2a;
    border-color: #444;
    color: #e5e5e5;
}

[data-theme="dark"] .export-date-field input[type="date"]:focus {
    border-color: var(--primary-500);
}

[data-theme="dark"] .export-commodity-section {
    border-top-color: #333;
}

[data-theme="dark"] .export-commodity-label {
    color: #ccc;
}

[data-theme="dark"] .export-select-all-btn {
    color: #4ade80;
}

[data-theme="dark"] .export-select-all-btn:hover {
    background: rgba(34, 197, 94, 0.1);
}

[data-theme="dark"] .export-commodity-item {
    border-color: #444;
}

[data-theme="dark"] .export-commodity-item:hover {
    border-color: #555;
    background: #2a2a2a;
}

[data-theme="dark"] .export-commodity-item.checked {
    border-color: var(--primary-500);
    background: rgba(34, 197, 94, 0.1);
}

[data-theme="dark"] .export-commodity-name {
    color: #e5e5e5;
}

[data-theme="dark"] .export-format-section {
    border-top-color: #333;
}

[data-theme="dark"] .export-format-tab {
    border-color: #444;
    background: #1e1e1e;
    color: #999;
}

[data-theme="dark"] .export-format-tab:hover {
    border-color: #555;
    color: #ccc;
}

[data-theme="dark"] .export-format-tab.active {
    border-color: var(--primary-500);
    background: rgba(34, 197, 94, 0.1);
    color: #4ade80;
}

[data-theme="dark"] .export-format-note {
    color: #777;
}

[data-theme="dark"] .export-modal-footer {
    border-top-color: #333;
}

[data-theme="dark"] .export-btn-cancel {
    border-color: #444;
    background: #1e1e1e;
    color: #999;
}

[data-theme="dark"] .export-btn-cancel:hover {
    border-color: #555;
    background: #2a2a2a;
}

/* =============================================================================
   Toast Notifications
   ============================================================================= */
.toast-container {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    background: var(--gray-800);
    color: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: auto;
    max-width: 340px;
    text-align: center;
}

.toast--visible {
    opacity: 1;
    transform: translateY(0);
}

.toast-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.toast-message {
    line-height: 1.3;
}

.toast--success {
    background: var(--primary-600);
    color: white;
}

.toast--success .toast-icon {
    stroke: white;
}

.toast--info {
    background: var(--gray-800);
    color: white;
}

.toast--info .toast-icon {
    stroke: white;
}

.toast--error {
    background: #dc2626;
    color: white;
}

.toast--warning {
    background: #b45309;
    color: white;
}

.toast--warning .toast-icon {
    stroke: white;
}

.toast--error .toast-icon {
    stroke: white;
}

[data-theme="dark"] .toast--info {
    background: var(--gray-200);
    color: var(--gray-800);
}

[data-theme="dark"] .toast--info .toast-icon {
    stroke: var(--gray-800);
}

/* =============================================================================
   Weather Page - Dark Mode
   ============================================================================= */
[data-theme="dark"] .weather-section-header h2 {
    color: #e5e5e5;
}

[data-theme="dark"] .weather-search-box input {
    background: #2a2a2a;
    border-color: #444;
    color: #e5e5e5;
}

[data-theme="dark"] .weather-search-box input:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

[data-theme="dark"] .weather-search-clear {
    background: #444;
    color: #aaa;
}

[data-theme="dark"] .weather-search-clear:hover {
    background: #555;
    color: #e5e5e5;
}

[data-theme="dark"] .weather-search-spinner {
    border-color: #555;
    border-top-color: var(--primary-500);
}

[data-theme="dark"] .weather-search-results {
    background: #2a2a2a;
    border-color: #444;
}

[data-theme="dark"] .weather-search-result {
    border-bottom-color: #333;
}

[data-theme="dark"] .weather-search-result:hover {
    background: #333;
}

[data-theme="dark"] .weather-search-result strong {
    color: #e5e5e5;
}

[data-theme="dark"] .weather-search-result small {
    color: #888;
}

[data-theme="dark"] .weather-search-status {
    color: #bbb;
}

[data-theme="dark"] .weather-search-status--error {
    color: #fca5a5;
}

[data-theme="dark"] .weather-search-retry {
    background: #333;
    border-color: #555;
    color: #e5e5e5;
}

[data-theme="dark"] .weather-search-retry:hover {
    background: #3b3b3b;
}

[data-theme="dark"] .weather-current-card {
    background: linear-gradient(135deg, #1E293B, #1E293B);
}
[data-theme="dark"] .weather-current-card,
[data-theme="dark"] .weather-current-card * {
    color: #ffffff;
}

[data-theme="dark"] .weather-day-card {
    background: #1e1e1e;
    border-color: #333;
}

[data-theme="dark"] .weather-day-card--expanded {
    border-color: var(--primary-600);
    box-shadow: 0 1px 2px rgba(22, 163, 74, 0.08);
}

[data-theme="dark"] .weather-day-label {
    color: #e5e5e5;
}

[data-theme="dark"] .weather-day-date {
    color: #777;
}

[data-theme="dark"] .weather-day-high {
    color: #e5e5e5;
}

[data-theme="dark"] .weather-day-low {
    color: #777;
}

[data-theme="dark"] .weather-day-wind {
    color: #888;
}

[data-theme="dark"] .weather-day-expand-arrow svg {
    color: #666;
}

[data-theme="dark"] .weather-hourly-scroll {
    border-top-color: #333;
}

[data-theme="dark"] .weather-hourly-time {
    color: #888;
}

[data-theme="dark"] .weather-hourly-temp {
    color: #e5e5e5;
}

[data-theme="dark"] .weather-hourly-wind {
    color: #666;
}

[data-theme="dark"] .weather-day-agro-summary {
    border-top-color: #333;
}

[data-theme="dark"] .weather-agro-label {
    color: #777;
}

[data-theme="dark"] .weather-error {
    color: #999;
}

[data-theme="dark"] .weather-skeleton .skeleton-line {
    background: linear-gradient(90deg, #2a2a2a 25%, #333 50%, #2a2a2a 75%);
    background-size: 200% 100%;
}

[data-theme="dark"] .header--weather {
    background: linear-gradient(135deg, #1E293B, #1E293B);
}

[data-theme="dark"] .weather-tab-bar {
    background: #2a2a2a;
}

[data-theme="dark"] .weather-tab {
    color: #888;
}

[data-theme="dark"] .weather-tab--active {
    background: #333;
    color: #e5e5e5;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

[data-theme="dark"] .weather-radar-container {
    background: #1a1a1a;
}

[data-theme="dark"] .radar-loading {
    background: rgba(30,30,30,0.9);
    color: #999;
}

[data-theme="dark"] .radar-error-overlay {
    background: rgba(30,30,30,0.9);
    color: #999;
}

[data-theme="dark"] .radar-controls {
    background: #1e1e1e;
    border-color: #333;
}

[data-theme="dark"] .radar-btn {
    background: #2a2a2a;
    color: #ccc;
}

[data-theme="dark"] .radar-btn:active {
    background: #333;
}

[data-theme="dark"] .radar-btn--play {
    background: linear-gradient(135deg, var(--accent-600), var(--accent-700));
    color: #fff;
}

[data-theme="dark"] .radar-timeline-labels {
    color: #666;
}

[data-theme="dark"] .radar-scrubber {
    background: #333;
}

[data-theme="dark"] .radar-scrubber::-webkit-slider-thumb {
    background: var(--accent-600);
    border-color: #1e1e1e;
}

[data-theme="dark"] .radar-scrubber::-moz-range-thumb {
    background: var(--accent-600);
    border-color: #1e1e1e;
}

[data-theme="dark"] .radar-timestamp {
    color: #ccc;
}

[data-theme="dark"] .weather-radar-container .leaflet-control-attribution {
    background: rgba(30,30,30,0.7);
    color: #888;
}

[data-theme="dark"] .weather-radar-container .leaflet-control-attribution a {
    color: #0ea5e9;
}

/* =============================================================================
   Natječaji Page
   ============================================================================= */

.natjecaji-loading {
    display: flex;
    justify-content: center;
    padding: 3rem 0;
}

.natjecaji-filters {
    display: flex;
    gap: 0.5rem;
    padding: 0 1rem;
    margin-top: 0.25rem;
    margin-bottom: 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.natjecaji-filter-btn {
    padding: 0.4rem 0.85rem;
    border: 1.5px solid var(--border-color, #e2e8f0);
    border-radius: 4px;
    background: var(--bg-primary, #fff);
    color: var(--text-secondary, #64748b);
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}

.natjecaji-filter-btn.active {
    background: var(--natjecaji-primary, #312E81);
    color: #fff;
    border-color: var(--natjecaji-primary, #312E81);
}

.natjecaji-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: var(--text-secondary, #64748b);
    text-align: center;
}

.natjecaji-empty svg {
    margin-bottom: 1rem;
    opacity: 0.4;
}

.natjecaji-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0 1rem 1rem;
}

/* ── Natjecaj Card ── */

.natjecaj-card {
    background: var(--bg-primary, #fff);
    border-radius: 4px;
    padding: 1rem;
    border: 1px solid var(--border-color, #e2e8f0);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.natjecaj-card:active {
    transform: scale(0.98);
}

.natjecaj-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.natjecaj-card-ref {
    font-size: 0.7rem;
    color: var(--text-secondary, #64748b);
}

.natjecaj-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary, #1e293b);
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.natjecaj-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.natjecaj-card-dates,
.natjecaj-card-funds,
.natjecaj-card-docs {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-secondary, #64748b);
}

/* ── Status Badge ── */

.natjecaj-status-badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.natjecaj-status--open {
    background: #dcfce7;
    color: #166534;
}

.natjecaj-status--closed {
    background: #fee2e2;
    color: #991b1b;
}

.natjecaj-status--prep {
    background: #fef3c7;
    color: #92400e;
}

/* ── Detail View ── */

.natjecaj-detail {
    padding: 0 1rem 2rem;
}

.natjecaj-breadcrumb {
    font-size: 0.8rem;
    color: var(--primary-color, #16a34a);
    cursor: pointer;
    margin-bottom: 0.25rem;
    display: inline-block;
}

.natjecaj-detail-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary, #1e293b);
    line-height: 1.3;
    margin: 0 0 0.5rem;
}

.natjecaj-detail-date {
    font-size: 0.8rem;
    color: var(--text-secondary, #64748b);
    margin: 0 0 0.25rem;
}

.natjecaj-detail-ref {
    font-size: 0.8rem;
    color: var(--text-secondary, #64748b);
    margin: 0 0 1rem;
}

.natjecaj-detail-status-bar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    background: var(--bg-secondary, #f8fafc);
    border-radius: 4px;
    border: 1px solid var(--border-color, #e2e8f0);
    margin-bottom: 1.25rem;
}

.natjecaj-detail-status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
}

.natjecaj-detail-label {
    color: var(--text-secondary, #64748b);
    font-weight: 500;
}

.natjecaj-detail-section {
    margin-bottom: 1.25rem;
}

.natjecaj-detail-section h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary, #1e293b);
    margin: 0 0 0.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.natjecaj-detail-section p {
    font-size: 0.85rem;
    color: var(--text-primary, #1e293b);
    line-height: 1.5;
    margin: 0;
}

.natjecaj-rich-content {
    color: var(--text-primary, #1e293b);
    line-height: 1.55;
    font-size: 0.9rem;
}

.natjecaj-rich-content h3,
.natjecaj-rich-content h4,
.natjecaj-rich-content h5 {
    margin: 1rem 0 0.45rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    font-size: 0.95rem;
    font-weight: 700;
}

.natjecaj-rich-content h3:first-child,
.natjecaj-rich-content h4:first-child,
.natjecaj-rich-content h5:first-child {
    margin-top: 0;
}

.natjecaj-rich-content p {
    margin: 0 0 0.75rem;
    text-align: justify;
}

.natjecaj-rich-content ul,
.natjecaj-rich-content ol {
    margin: 0 0 0.85rem 1.2rem;
}

.natjecaj-rich-content li {
    margin-bottom: 0.35rem;
}

.natjecaj-rich-content hr {
    border: 0;
    border-top: 1px solid var(--border-color, #e2e8f0);
    margin: 0.85rem 0;
}

.natjecaj-rich-content a {
    color: var(--primary-color, #16a34a);
    word-break: break-word;
}

.natjecaj-source a {
    color: var(--primary-color, #16a34a);
    word-break: break-all;
    font-size: 0.85rem;
}

/* ── Document List ── */

.natjecaj-doc-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.natjecaj-doc-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    background: var(--bg-secondary, #f8fafc);
    border-radius: 4px;
    border: 1px solid var(--border-color, #e2e8f0);
    text-decoration: none;
    color: var(--primary, #22c55e);
    font-size: 0.8rem;
    font-weight: 500;
    transition: background 0.15s;
}

.natjecaj-doc-item:hover {
    background: var(--border-color, #e2e8f0);
}

.natjecaj-doc-item svg {
    flex-shrink: 0;
    color: var(--text-secondary, #64748b);
}

/* ── Admin detail meta ── */

.natjecaj-detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary, #64748b);
}

.natjecaj-form {
    max-height: none;
    overflow: hidden;
}

.natjecaj-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
    gap: 0.4rem;
    margin-bottom: 0.55rem;
}

.natjecaj-editor-btn {
    border: 1px solid var(--gray-300);
    background: white;
    color: var(--gray-700);
    border-radius: 4px;
    padding: 0.35rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    line-height: 1;
}

.natjecaj-editor-btn:hover {
    border-color: var(--primary-500);
    color: var(--primary-700);
}

.natjecaj-editor {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    min-height: 180px;
    max-height: 360px;
    overflow-y: auto;
    padding: 0.75rem;
    font-size: 0.9rem;
    line-height: 1.5;
    background: white;
}

.natjecaj-editor:focus {
    outline: none;
    border-color: var(--primary-500);
}

.natjecaj-editor[contenteditable="true"]:empty:before {
    content: attr(data-placeholder);
    color: var(--gray-400);
    pointer-events: none;
}

/* =============================================================================
   Natječaji - Dark Mode
   ============================================================================= */

[data-theme="dark"] .natjecaj-card {
    background: var(--bg-primary);
    border-color: #374151;
}

[data-theme="dark"] .natjecaj-card-title {
    color: #f8fafc;
}

[data-theme="dark"] .natjecaj-card-ref,
[data-theme="dark"] .natjecaj-card-dates,
[data-theme="dark"] .natjecaj-card-funds,
[data-theme="dark"] .natjecaj-card-docs {
    color: #cbd5e1;
}

[data-theme="dark"] .natjecaji-filter-btn {
    background: #1f2937;
    border-color: #475569;
    color: #e2e8f0;
}

[data-theme="dark"] .natjecaji-filter-btn.active {
    background: var(--natjecaji-primary, #312E81);
    color: #fff;
    border-color: var(--natjecaji-primary, #312E81);
}

[data-theme="dark"] .natjecaj-status--open {
    background: #052e16;
    color: #86efac;
}

[data-theme="dark"] .natjecaj-status--closed {
    background: #450a0a;
    color: #fca5a5;
}

[data-theme="dark"] .natjecaj-status--prep {
    background: #451a03;
    color: #fcd34d;
}

[data-theme="dark"] .natjecaj-detail-title {
    color: #f8fafc;
}

[data-theme="dark"] .natjecaj-detail-date,
[data-theme="dark"] .natjecaj-detail-ref,
[data-theme="dark"] .natjecaj-detail-label,
[data-theme="dark"] .natjecaj-detail-status,
[data-theme="dark"] .natjecaj-detail-meta {
    color: #cbd5e1;
}

[data-theme="dark"] .natjecaj-detail-status-bar {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .natjecaj-detail-section h3 {
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .natjecaj-doc-item {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--primary);
}

[data-theme="dark"] .natjecaj-doc-item:hover {
    background: var(--border-color);
}

[data-theme="dark"] .natjecaj-rich-content,
[data-theme="dark"] .natjecaj-rich-content p {
    color: #e2e8f0;
}

[data-theme="dark"] .natjecaj-detail-section p {
    color: #e2e8f0;
}

[data-theme="dark"] .natjecaj-rich-content h3,
[data-theme="dark"] .natjecaj-rich-content h4,
[data-theme="dark"] .natjecaj-rich-content h5,
[data-theme="dark"] .natjecaj-rich-content hr {
    border-color: var(--border-color);
}

[data-theme="dark"] .natjecaj-doc-item svg {
    color: #cbd5e1;
}

[data-theme="dark"] .natjecaj-editor-btn {
    background: #2a2a2a;
    border-color: #444;
    color: #d1d5db;
}

[data-theme="dark"] .natjecaj-editor-btn:hover {
    border-color: var(--primary-500);
    color: #fff;
}

[data-theme="dark"] .natjecaj-editor {
    background: #2a2a2a;
    border-color: #444;
    color: #e5e5e5;
}

/* =============================================================================
   Kalkulatori
   ============================================================================= */

.kalkulatori-page {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.kalkulatori-card {
    border-radius: 4px;
}

.kalkulatori-card--input {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 16px;
}

.kalkulatori-card--result {
    background: #1a4d2e;
    border: 1px solid #163d25;
    color: #ffffff;
    padding: 16px;
}

.kalkulatori-hero {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.kalkulatori-kicker {
    color: #2f6032;
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.kalkulatori-title {
    color: #0f172a;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.15;
}

.kalkulatori-subtitle {
    color: #475569;
    font-size: 0.875rem;
}


.kalkulatori-panel {
    margin-top: 18px;
}

.kalkulatori-section-head h3 {
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 700;
}

.kalkulatori-section-head p {
    margin-top: 4px;
    color: #475569;
    font-size: 0.875rem;
}


.kalkulatori-form-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.kalkulatori-field {
    display: block;
}

.kalkulatori-field--search {
    margin-top: 16px;
}

.kalkulatori-field-label {
    display: block;
    margin-bottom: 5px;
    color: #1e293b;
    font-size: 0.86rem;
    font-weight: 700;
}

.kalkulatori-input {
    width: 100%;
    min-height: 44px;
    height: 48px;
    padding: 0 14px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #ffffff;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 600;
}

.kalkulatori-input:focus {
    outline: none;
    border-color: #2f6032;
    box-shadow: 0 0 0 2px rgba(47, 96, 50, 0.18);
}

.kalkulatori-input:disabled {
    background: #f8fafc;
    color: #64748b;
    cursor: not-allowed;
}

.kalkulatori-search-status {
    margin-top: 8px;
    color: #475569;
    font-size: 0.82rem;
}

.kalkulatori-search-results {
    margin-top: 8px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #ffffff;
    overflow: hidden;
}

.kalkulatori-search-result {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 14px;
    border: 0;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
    color: #0f172a;
    text-align: left;
    cursor: pointer;
}

.kalkulatori-search-result:last-child {
    border-bottom: 0;
}

.kalkulatori-search-result strong {
    font-size: 0.92rem;
}

.kalkulatori-search-result span {
    color: #64748b;
    font-size: 0.8rem;
}

.kalkulatori-selected-pill,
.kalkulatori-inline-note {
    margin-top: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #f8fafc;
    padding: 12px 14px;
}

.kalkulatori-selected-pill strong {
    display: block;
    color: #0f172a;
    font-size: 0.92rem;
}

.kalkulatori-selected-pill span,
.kalkulatori-inline-note {
    color: #475569;
    font-size: 0.84rem;
    line-height: 1.45;
}

.kalkulatori-link-btn {
    margin-top: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #1e4620;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
}

.kalkulatori-results-title {
    color: #d1fae5;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.17em;
    text-transform: uppercase;
}

.kalkulatori-results-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.kalkulatori-results-grid--single {
    grid-template-columns: 1fr;
}

.kalkulatori-result-box {
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    padding: 14px;
}

.kalkulatori-result-box--hero {
    min-height: 168px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.kalkulatori-result-label {
    color: #d1fae5;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.kalkulatori-result-value {
    margin-top: 9px;
    color: #ffffff;
    font-size: 2.25rem;
    line-height: 1;
    font-weight: 700;
}

.kalkulatori-result-unit {
    margin-top: 8px;
    color: #d1fae5;
    font-size: 0.88rem;
}

.kalkulator-result-context {
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.85rem;
    line-height: 1.45;
}

[data-theme="dark"] .kalkulatori-card--input {
    background: #111827;
    border-color: #334155;
}

[data-theme="dark"] .kalkulatori-kicker {
    color: #86efac;
}

[data-theme="dark"] .kalkulatori-title,
[data-theme="dark"] .kalkulatori-section-head h3,
[data-theme="dark"] .kalkulatori-field-label,
[data-theme="dark"] .kalkulatori-search-result,
[data-theme="dark"] .kalkulatori-selected-pill strong {
    color: #f8fafc;
}

[data-theme="dark"] .kalkulatori-subtitle,
[data-theme="dark"] .kalkulatori-section-head p,
[data-theme="dark"] .kalkulatori-search-status,
[data-theme="dark"] .kalkulatori-search-result span,
[data-theme="dark"] .kalkulatori-selected-pill span,
[data-theme="dark"] .kalkulatori-inline-note {
    color: #cbd5e1;
}

[data-theme="dark"] .kalkulatori-input,
[data-theme="dark"] .kalkulatori-search-results,
[data-theme="dark"] .kalkulatori-search-result,
[data-theme="dark"] .kalkulatori-selected-pill,
[data-theme="dark"] .kalkulatori-inline-note {
    background: #0f172a;
    border-color: #334155;
}

[data-theme="dark"] .kalkulatori-input {
    color: #f8fafc;
}

[data-theme="dark"] .kalkulatori-input:disabled {
    background: #111827;
    color: #64748b;
}

[data-theme="dark"] .kalkulatori-link-btn {
    color: #86efac;
}

@media (min-width: 560px) {
    .kalkulatori-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 680px) {
    .kalkulatori-results-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .kalkulatori-results-grid--single {
        grid-template-columns: 1fr;
    }

    .kalkulatori-result-value {
        font-size: 2.9rem;
    }
}

/* =============================================================================
   Dev Panel
   ============================================================================= */
.dev-page { padding: 16px; }
.dev-page .admin-tab.active { background: #7c3aed; }

.dev-section {
    margin-bottom: 28px;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.dev-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
}

.dev-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dev-refresh-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.dev-refresh-btn:hover {
    background: var(--hover-bg, rgba(0,0,0,0.04));
    color: var(--text-primary);
}

/* Health cards grid */
.dev-health-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.dev-health-card {
    background: var(--bg-primary, #fff);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 10px;
    padding: 18px 16px;
    text-align: center;
    transition: box-shadow 0.2s;
}
.dev-health-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.dev-health-card-icon {
    margin-bottom: 8px;
    color: var(--text-secondary);
}
.dev-health-card-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-600, #16a34a);
    margin-bottom: 4px;
    word-break: break-word;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}
.dev-health-card-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.dev-health-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 24px;
    color: var(--text-secondary);
}

/* ── Badge system ──────────────────────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}
.badge--info { background: #dbeafe; color: #1e40af; }
.badge--success { background: #dcfce7; color: #166534; }
.badge--warning { background: #fef3c7; color: #92400e; }
.badge--error { background: #fee2e2; color: #991b1b; }
.badge--purple { background: #ede9fe; color: #6d28d9; }
.badge--muted { background: #f3f4f6; color: #6b7280; }

[data-theme="dark"] .badge--info { background: #1e3a5f; color: #93c5fd; }
[data-theme="dark"] .badge--success { background: #14532d; color: #86efac; }
[data-theme="dark"] .badge--warning { background: #451a03; color: #fcd34d; }
[data-theme="dark"] .badge--error { background: #450a0a; color: #fca5a5; }
[data-theme="dark"] .badge--purple { background: #3b1764; color: #c4b5fd; }
[data-theme="dark"] .badge--muted { background: #27272a; color: #a1a1aa; }

/* ── Scraper cards ─────────────────────────────────────────────────────────── */
.dev-scraper-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 8px;
    overflow: hidden;
}
.dev-scraper-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    gap: 12px;
    flex-wrap: wrap;
}
.dev-scraper-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.dev-scraper-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
}
.dev-scraper-schedule {
    font-size: 0.75rem;
    color: var(--text-secondary);
}
.dev-scraper-status-area {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.dev-scraper-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}
.dev-scraper-toggle {
    padding: 4px 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}
.dev-scraper-toggle:hover {
    background: var(--hover-bg, rgba(0,0,0,0.04));
    color: var(--text-primary);
}
.dev-scraper-meta {
    padding: 0 16px 14px;
    border-top: 1px solid var(--border-color);
}
.dev-scraper-meta pre {
    margin: 10px 0 0;
    padding: 12px;
    background: #f8fafc;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--text-primary);
}
[data-theme="dark"] .dev-scraper-meta pre {
    background: #161b22;
}

/* ── Filters ───────────────────────────────────────────────────────────────── */
.dev-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.dev-filter {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}
.dev-filter select {
    padding: 7px 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary, #fff);
    color: var(--text-primary);
    font-size: 0.84rem;
    min-width: 120px;
}

/* ── Responsive lists ──────────────────────────────────────────────────────── */
.dev-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.dev-list-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary, #fff);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.dev-list-card__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    flex-wrap: wrap;
}
.dev-list-card__main {
    flex: 1 1 220px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.dev-list-card__side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex: 0 1 auto;
    min-width: 0;
}
.dev-list-card__title {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.35;
    word-break: break-word;
}
.dev-list-card__meta,
.dev-list-card__timestamp {
    color: var(--text-secondary);
    font-size: 0.76rem;
    line-height: 1.45;
}
.dev-list-card__meta {
    word-break: break-word;
}
.dev-list-card__meta--stack {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.dev-list-card__meta-label {
    font-weight: 700;
    color: var(--text-primary);
}
.dev-list-card__topline {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}
.dev-list-card__category {
    min-width: 0;
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.35;
    word-break: break-word;
}
.dev-list-card__timestamp {
    margin-left: auto;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.dev-list-card__message {
    color: var(--text-primary);
    font-size: 0.82rem;
    line-height: 1.5;
    overflow: hidden;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}
.dev-list-card__actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.analytics-bar-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: 8px;
    margin-bottom: 8px;
    border-radius: 4px;
    z-index: 1;
    overflow: hidden;
}

.analytics-bar-container:last-child {
    margin-bottom: 0;
}

.analytics-bar-fill {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    border-radius: 4px;
    background: rgba(139, 92, 246, 0.15);
    z-index: -1;
    transition: width 0.3s ease;
}

/* ── Tables ────────────────────────────────────────────────────────────────── */
.dev-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.dev-logs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.dev-logs-table th {
    text-align: left;
    padding: 10px 16px;
    font-weight: 700;
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}
.dev-logs-table tbody tr {
    transition: background 0.1s;
}
.dev-logs-table tbody tr:hover {
    background: rgba(0,0,0,0.02);
}
[data-theme="dark"] .dev-logs-table tbody tr:hover {
    background: rgba(255,255,255,0.03);
}
.dev-log-cell {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}
.dev-log-cell--ts {
    white-space: nowrap;
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}
.dev-log-cell--msg {
    word-break: break-word;
    max-width: 400px;
}

.dev-logs-loading,
.dev-logs-empty {
    text-align: center;
    padding: 32px 16px;
    color: var(--text-secondary);
    font-size: 0.88rem;
}

/* ── Pagination ────────────────────────────────────────────────────────────── */
.dev-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 14px;
    padding: 8px 0;
}
.dev-pagination-btn {
    padding: 7px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}
.dev-pagination-btn:hover { background: var(--hover-bg, rgba(0,0,0,0.04)); }
.dev-pagination-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.dev-pagination-info {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.user-role-badge--dev {
    background: #7c3aed;
    color: white;
}

/* ── User management ───────────────────────────────────────────────────────── */
.dev-user-search {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.dev-user-search > * {
    min-width: 0;
}
.dev-user-search-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary, #fff);
    color: var(--text-primary);
    font-size: 0.85rem;
    min-width: 0;
}
.dev-user-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.dev-broadcast-intro {
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 0.84rem;
    line-height: 1.5;
}
.dev-broadcast-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.dev-broadcast-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.dev-broadcast-field--full {
    grid-column: 1 / -1;
}
.dev-broadcast-field span {
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.dev-broadcast-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary, #fff);
    color: var(--text-primary);
    font-size: 0.86rem;
    font-family: inherit;
}
.dev-broadcast-input:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}
.dev-broadcast-textarea {
    resize: vertical;
    min-height: 136px;
}
.dev-broadcast-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
}
.dev-broadcast-submit {
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    background: #7c3aed;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s, opacity 0.15s;
}
.dev-broadcast-submit:hover {
    background: #6d28d9;
}
.dev-broadcast-submit:active {
    transform: translateY(1px);
}
.dev-broadcast-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}
.dev-privacy-intro {
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 0.84rem;
    line-height: 1.5;
}
.dev-privacy-note {
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(124, 58, 237, 0.06);
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.5;
}
.dev-privacy-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.dev-privacy-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.dev-privacy-field--full {
    grid-column: 1 / -1;
}
.dev-privacy-field span {
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.dev-privacy-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary, #fff);
    color: var(--text-primary);
    font-size: 0.86rem;
    font-family: inherit;
}
.dev-privacy-textarea {
    resize: vertical;
    min-height: 112px;
}
.dev-privacy-footer {
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.dev-privacy-updated {
    color: var(--text-secondary);
    font-size: 0.8rem;
}
.dev-action-btn {
    padding: 5px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}
.dev-action-btn--compact {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
}
.dev-action-btn--impersonate {
    background: #dbeafe;
    color: #1e40af;
    border-color: #93c5fd;
}
.dev-action-btn--impersonate:hover { background: #bfdbfe; }
.dev-action-btn--revoke {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
}
.dev-action-btn--revoke:hover { background: #fecaca; }

/* ── Impersonation banner ──────────────────────────────────────────────────── */
.impersonation-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: #dc2626;
    color: white;
    font-size: 0.82rem;
    font-weight: 600;
    flex-shrink: 0;
    gap: 12px;
}
.impersonation-banner-text {
    display: flex;
    align-items: center;
    gap: 8px;
}
.impersonation-banner-text svg { flex-shrink: 0; }
.impersonation-banner-exit {
    padding: 4px 14px;
    border: 2px solid white;
    border-radius: 6px;
    background: transparent;
    color: white;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}
.impersonation-banner-exit:hover { background: rgba(255,255,255,0.2); }

/* ── Dark theme overrides ──────────────────────────────────────────────────── */
[data-theme="dark"] .dev-section {
    background: var(--card-bg, #1e1e1e);
    border-color: #333;
}
[data-theme="dark"] .dev-health-card {
    background: var(--bg-secondary, #161b22);
    border-color: rgba(255,255,255,0.08);
}
[data-theme="dark"] .dev-scraper-card {
    border-color: #333;
}
[data-theme="dark"] .dev-privacy-note {
    background: rgba(109, 40, 217, 0.14);
    border-color: #4c1d95;
    color: #d8b4fe;
}
[data-theme="dark"] .dev-broadcast-input {
    background: #161b22;
    border-color: #334155;
    color: #f8fafc;
}
[data-theme="dark"] .dev-broadcast-field span,
[data-theme="dark"] .dev-broadcast-intro {
    color: #cbd5e1;
}
[data-theme="dark"] .dev-broadcast-submit {
    background: #6d28d9;
}
[data-theme="dark"] .dev-broadcast-submit:hover {
    background: #5b21b6;
}
[data-theme="dark"] .dev-privacy-input {
    background: #161b22;
    border-color: #334155;
    color: #f8fafc;
}
[data-theme="dark"] .dev-privacy-field span,
[data-theme="dark"] .dev-privacy-updated,
[data-theme="dark"] .dev-privacy-intro {
    color: #cbd5e1;
}
[data-theme="dark"] .dev-list-card {
    background: #161b22;
    border-color: #334155;
    box-shadow: 0 1px 2px rgba(0,0,0,0.28);
}
[data-theme="dark"] .dev-list-card__title,
[data-theme="dark"] .dev-list-card__category,
[data-theme="dark"] .dev-list-card__message,
[data-theme="dark"] .dev-list-card__meta-label {
    color: #f8fafc;
}
[data-theme="dark"] .dev-list-card__meta,
[data-theme="dark"] .dev-list-card__timestamp {
    color: #cbd5e1;
}
[data-theme="dark"] .analytics-bar-fill {
    background: rgba(139, 92, 246, 0.25);
}
[data-theme="dark"] .dev-action-btn--impersonate { background: #1e3a5f; color: #93c5fd; border-color: #1e40af; }
[data-theme="dark"] .dev-action-btn--revoke { background: #450a0a; color: #fca5a5; border-color: #991b1b; }
[data-theme="dark"] .dev-page .admin-tab.active { background: #6d28d9; }

@media (max-width: 640px) {
    .dev-broadcast-form,
    .dev-privacy-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .dev-list-card__side {
        width: 100%;
        align-items: flex-end;
    }

    .dev-list-card__actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Maintenance toggle in dev header */
.dev-maintenance-toggle { display: flex; align-items: center; }

/* =============================================================================
   Maintenance Page
   ============================================================================= */
.maintenance-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    text-align: center;
    padding: 32px 24px;
}
.maintenance-icon {
    color: var(--text-secondary);
    margin-bottom: 24px;
    opacity: 0.6;
}
.maintenance-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px;
}
.maintenance-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
    max-width: 360px;
    line-height: 1.5;
}

/* =============================================================================
   Support / Help (Pomoć)
   ============================================================================= */
.pomoc-page { display: flex; flex-direction: column; height: 100%; }

/* ── Ticket list ── */
.pomoc-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--gray-200); }
.pomoc-header h2 { font-size: 1.1rem; font-weight: 600; margin: 0; }
.pomoc-new-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; border-radius: 4px; border: none;
    background: var(--primary-500); color: #fff;
    font-size: 0.8125rem; font-weight: 500; cursor: pointer;
}
.pomoc-new-btn svg { width: 14px; height: 14px; }
.pomoc-list { flex: 1; overflow-y: auto; padding: 8px 16px; }
.pomoc-shortcut-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 4px;
    background: linear-gradient(135deg, rgba(47, 96, 50, 0.08), rgba(230, 126, 34, 0.08)), var(--bg-primary);
    border: 1px solid var(--gray-200);
}
.pomoc-shortcut-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 4px;
    background: var(--primary-50);
    color: var(--primary-700);
}
.pomoc-shortcut-icon svg { width: 20px; height: 20px; }
.pomoc-shortcut-body {
    flex: 1;
    min-width: 0;
}
.pomoc-shortcut-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-800);
}
.pomoc-shortcut-text {
    margin-top: 4px;
    font-size: 0.75rem;
    line-height: 1.45;
    color: var(--gray-600);
}
.pomoc-shortcut-btn {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--primary-500);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--primary-700);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}
.pomoc-ticket-card {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px; margin-bottom: 8px; border-radius: 4px;
    background: var(--gray-50); border: 1px solid var(--gray-200); cursor: pointer;
    transition: background 0.15s;
}
.pomoc-ticket-card:hover { background: var(--gray-100); }
.pomoc-ticket-subject { font-size: 0.875rem; font-weight: 500; color: var(--gray-800); }
.pomoc-ticket-meta { font-size: 0.75rem; color: var(--gray-500); margin-top: 2px; }
.pomoc-ticket-status {
    font-size: 0.6875rem; font-weight: 600; padding: 2px 8px; border-radius: 10px; white-space: nowrap;
}
.pomoc-ticket-status--open { background: #dcfce7; color: #166534; }
.pomoc-ticket-status--closed { background: var(--gray-200); color: var(--gray-600); }

.pomoc-empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    flex: 1; text-align: center; padding: 40px 24px; color: var(--gray-500);
}
.pomoc-empty svg { width: 48px; height: 48px; stroke: var(--gray-300); margin-bottom: 12px; }
.pomoc-empty h3 { font-size: 1rem; font-weight: 600; color: var(--gray-700); margin: 0 0 4px; }
.pomoc-empty p { font-size: 0.8125rem; margin: 0; }

/* ── New ticket form ── */
.pomoc-form { display: flex; flex-direction: column; gap: 12px; padding: 16px; flex: 1; }
.pomoc-form-label { font-size: 0.8125rem; font-weight: 500; color: var(--gray-700); margin-bottom: 4px; display: block; }
.pomoc-form-input {
    width: 100%; padding: 10px 12px; border: 1px solid var(--gray-300); border-radius: 4px;
    font-size: 0.875rem; font-family: inherit; resize: none; box-sizing: border-box;
}
.pomoc-form-input:focus { outline: none; border-color: var(--primary-500); box-shadow: 0 0 0 2px rgba(22,163,74,0.15); }
.pomoc-form-textarea { min-height: 120px; }
.pomoc-form-submit {
    padding: 10px 20px; border: none; border-radius: 4px;
    background: var(--primary-500); color: #fff;
    font-size: 0.875rem; font-weight: 500; cursor: pointer; align-self: flex-end;
}
.pomoc-form-submit:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Thread / chat view ── */
.pomoc-thread { display: flex; flex-direction: column; height: 100%; }
.pomoc-thread-header {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 16px; border-bottom: 1px solid var(--gray-200);
    flex-shrink: 0;
}
.pomoc-back-btn {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border: none; border-radius: 4px;
    background: var(--gray-100); cursor: pointer; flex-shrink: 0;
}
.pomoc-back-btn svg { width: 18px; height: 18px; stroke: var(--gray-600); }
.pomoc-thread-title { font-size: 0.9375rem; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pomoc-close-btn {
    font-size: 0.75rem; padding: 4px 10px; border-radius: 4px; border: 1px solid var(--gray-300);
    background: transparent; color: var(--gray-600); cursor: pointer; white-space: nowrap;
}

.pomoc-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; min-height: 0; }

.chat-bubble {
    max-width: 80%; padding: 10px 14px; border-radius: 12px;
    font-size: 0.8125rem; line-height: 1.45; word-wrap: break-word;
    position: relative;
}
.chat-bubble-user {
    align-self: flex-end; background: #166534; color: #fff;
    border-bottom-right-radius: 4px;
    padding-right: 34px;
    padding-bottom: 16px;
}
.chat-bubble-support {
    align-self: flex-start; background: #f3f4f6; color: var(--gray-800);
    border-bottom-left-radius: 4px;
}
.chat-bubble-sender { font-size: 0.6875rem; font-weight: 600; margin-bottom: 2px; }
.chat-bubble-time { font-size: 0.625rem; margin-top: 4px; opacity: 0.7; }
.msg-status {
    position: absolute;
    right: 9px;
    bottom: 5px;
    display: inline-flex;
    align-items: center;
    color: #d1d5db;
    line-height: 1;
}
.msg-status svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2.25;
}
.check-read { color: #22c55e; }

.pomoc-closed-bar {
    padding: 10px 16px; text-align: center;
    font-size: 0.8125rem; color: var(--gray-500);
    background: var(--gray-50); border-top: 1px solid var(--gray-200); flex-shrink: 0;
}

.pomoc-input-bar {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 16px; border-top: 1px solid var(--gray-200);
    background: #fff; flex-shrink: 0;
}
.pomoc-input {
    flex: 1; padding: 10px 12px; border: 1px solid var(--gray-300); border-radius: 20px;
    font-size: 0.8125rem; font-family: inherit; outline: none;
}
.pomoc-input:focus { border-color: var(--primary-500); }
.pomoc-send-btn {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border: none; border-radius: 50%;
    background: var(--primary-500); color: #fff; cursor: pointer; flex-shrink: 0;
}
.pomoc-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pomoc-send-btn svg { width: 16px; height: 16px; }

/* ── Dark theme overrides ── */
[data-theme="dark"] .pomoc-ticket-card { background: #2a2a2a; border-color: #444; }
[data-theme="dark"] .pomoc-ticket-card:hover { background: #333; }
[data-theme="dark"] .pomoc-shortcut-card {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.14), rgba(234, 179, 8, 0.10)), #1f2422;
    border-color: #444;
}
[data-theme="dark"] .pomoc-shortcut-icon {
    background: rgba(34, 197, 94, 0.14);
    color: #86efac;
}
[data-theme="dark"] .pomoc-shortcut-title { color: #f1f5f9; }
[data-theme="dark"] .pomoc-shortcut-text { color: #cbd5e1; }
[data-theme="dark"] .pomoc-shortcut-btn {
    background: #111827;
    border-color: #166534;
    color: #bbf7d0;
}
[data-theme="dark"] .pomoc-ticket-subject { color: #e5e5e5; }
[data-theme="dark"] .pomoc-ticket-status--open { background: #064e3b; color: #6ee7b7; }
[data-theme="dark"] .pomoc-ticket-status--closed { background: #374151; color: #9ca3af; }
[data-theme="dark"] .pomoc-thread-header { border-color: #444; }
[data-theme="dark"] .pomoc-back-btn { background: #333; }
[data-theme="dark"] .pomoc-back-btn svg { stroke: #aaa; }
[data-theme="dark"] .pomoc-input-bar { background: #1a1a1a; border-color: #444; }
[data-theme="dark"] .pomoc-input { background: #2a2a2a; border-color: #444; color: #e5e5e5; }
[data-theme="dark"] .pomoc-closed-bar { background: #1a1a1a; border-color: #444; }
[data-theme="dark"] .chat-bubble-support { background: #374151; color: #e5e5e5; }
[data-theme="dark"] .pomoc-form-input { background: #2a2a2a; border-color: #444; color: #e5e5e5; }
[data-theme="dark"] .pomoc-header { border-color: #444; }
[data-theme="dark"] .pomoc-empty h3 { color: #ccc; }

/* =============================================================================
   About / Privacy Page
   ============================================================================= */
.about-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
}

.about-hero,
.about-panel,
.about-fact-card,
.about-meta-card,
.about-legal-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.about-hero {
    padding: 18px 16px;
    background:
        linear-gradient(135deg, rgba(47, 96, 50, 0.12), rgba(230, 126, 34, 0.12)),
        var(--bg-primary);
}

.about-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary-700);
    margin-bottom: 10px;
}

.about-hero-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.about-hero-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.about-hero-text,
.about-panel-text {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.about-version-chip,
.about-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 10px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-700);
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(188, 200, 194, 0.9);
    border-radius: 9999px;
    white-space: nowrap;
}

.about-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.about-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.about-action-btn {
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
}

.about-action-btn--primary {
    background: var(--primary-600);
    border-color: var(--primary-600);
    color: #fff;
}

.about-fact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.about-fact-card {
    display: flex;
    gap: 12px;
    padding: 14px;
}

.about-fact-icon {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: var(--primary-50);
    color: var(--primary-700);
}

.about-fact-icon svg {
    width: 20px;
    height: 20px;
}

.about-fact-body h3,
.about-panel-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-primary);
}

.about-fact-body p {
    margin-top: 6px;
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--text-secondary);
}

.about-panel {
    padding: 16px;
}

.about-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.about-panel-head--stacked {
    flex-direction: column;
    align-items: stretch;
}

.about-section-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary-700);
    margin-bottom: 6px;
}

.about-policy-controls {
    display: flex;
    justify-content: flex-start;
}

.about-policy-toggle {
    display: inline-flex;
    padding: 3px;
    background: var(--gray-100);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.about-policy-toggle-btn {
    min-height: 34px;
    min-width: 94px;
    padding: 0 12px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
}

.about-policy-toggle-btn.is-active {
    background: var(--bg-primary);
    color: var(--primary-700);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.about-meta-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.about-meta-card {
    padding: 12px;
}

.about-meta-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
    margin-bottom: 4px;
}

.about-meta-value {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.about-legal-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.about-legal-item {
    overflow: hidden;
}

.about-legal-item summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-primary);
}

.about-legal-item summary::-webkit-details-marker {
    display: none;
}

.about-legal-item summary svg {
    width: 18px;
    height: 18px;
    color: var(--gray-500);
    transition: transform 0.2s ease;
}

.about-legal-item[open] summary svg {
    transform: rotate(180deg);
}

.about-legal-body {
    padding: 0 16px 16px;
    border-top: 1px solid var(--border-color);
}

.about-richtext {
    color: var(--text-secondary);
    font-size: 0.9125rem;
    line-height: 1.65;
}

.about-richtext p,
.about-richtext ul {
    margin: 0 0 12px;
}

.about-richtext ul {
    padding-left: 18px;
}

.about-richtext li {
    margin-bottom: 8px;
}

.about-richtext strong {
    color: var(--text-primary);
}

[data-theme="dark"] .about-hero,
[data-theme="dark"] .about-panel,
[data-theme="dark"] .about-fact-card,
[data-theme="dark"] .about-meta-card,
[data-theme="dark"] .about-legal-item {
    background: #1f2422;
    border-color: #374151;
}

[data-theme="dark"] .about-hero {
    background:
        linear-gradient(135deg, rgba(34, 197, 94, 0.16), rgba(234, 179, 8, 0.14)),
        #1f2422;
}

[data-theme="dark"] .about-kicker,
[data-theme="dark"] .about-section-label,
[data-theme="dark"] .about-policy-toggle-btn.is-active {
    color: #bbf7d0;
}

[data-theme="dark"] .about-hero-title,
[data-theme="dark"] .about-fact-body h3,
[data-theme="dark"] .about-panel-title,
[data-theme="dark"] .about-meta-value,
[data-theme="dark"] .about-legal-item summary,
[data-theme="dark"] .about-richtext strong {
    color: #f8fafc;
}

[data-theme="dark"] .about-hero-text,
[data-theme="dark"] .about-panel-text,
[data-theme="dark"] .about-fact-body p,
[data-theme="dark"] .about-richtext {
    color: #cbd5e1;
}

[data-theme="dark"] .about-version-chip,
[data-theme="dark"] .about-chip {
    background: rgba(15, 23, 42, 0.6);
    border-color: #475569;
    color: #e2e8f0;
}

[data-theme="dark"] .about-action-btn {
    background: #111827;
    border-color: #475569;
    color: #f8fafc;
}

[data-theme="dark"] .about-action-btn--primary {
    background: #166534;
    border-color: #166534;
}

[data-theme="dark"] .about-fact-icon {
    background: rgba(34, 197, 94, 0.14);
    color: #86efac;
}

[data-theme="dark"] .about-policy-toggle {
    background: #111827;
    border-color: #475569;
}

[data-theme="dark"] .about-policy-toggle-btn {
    color: #cbd5e1;
}

[data-theme="dark"] .about-meta-label,
[data-theme="dark"] .about-legal-item summary svg {
    color: #94a3b8;
}

[data-theme="dark"] .about-legal-body {
    border-color: #374151;
}

@media (min-width: 640px) {
    .about-meta-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* =============================================================================
   Desktop
   ============================================================================= */
@media (min-width: 481px) {
    .app-container {
        height: calc(100vh - 32px);
        height: calc(100dvh - 32px);
        box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    }
    body:not(.login-page-active) { padding: 16px; }
}
