/* ============================================ */
/* CSS VARIABLES */
/* ============================================ */
:root {
    --primary: #2d7a3a;
    --primary-dark: #1e5a28;
    --primary-light: #4a9e5a;
    --secondary: #6b8f3a;
    --accent: #e8a838;
    --danger: #d9534f;
    --text: #333333;
    --text-light: #666666;
    --text-muted: #999999;
    --bg: #f8f9f4;
    --bg-white: #ffffff;
    --bg-light: #f0f4e8;
    --border: #dde4d0;
    --border-light: #e8eddd;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
    --radius: 8px;
    --radius-lg: 12px;
    --max-width: 1200px;
    --transition: 0.2s ease;
}

/* ============================================ */
/* RESET & BASE */
/* ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* ============================================ */
/* HEADER */
/* ============================================ */
.header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: white;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}
.logo:hover { color: #e0e0e0; }

/* ============================================ */
/* HEADER LOGO & HAMBURGER */
/* ============================================ */
.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-logo-link {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.header-logo-img {
    height: 44px;
    width: auto;
    border-radius: 4px;
}

.hamburger-wrapper {
    position: relative;
}

.hamburger-btn {
    background: none;
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: var(--radius);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 6px 12px;
    transition: all var(--transition);
    line-height: 1;
}

.hamburger-btn:hover {
    border-color: white;
    background: rgba(255,255,255,0.1);
}

.hamburger-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 240px;
    z-index: 200;
    overflow: hidden;
}

.hamburger-menu.open {
    display: block;
}

.hamburger-link {
    display: block;
    padding: 14px 20px;
    color: var(--text);
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition);
}

.hamburger-link:last-child {
    border-bottom: none;
}

.hamburger-link:hover {
    background: var(--bg-light);
    color: var(--primary);
}

/* ============================================ */
/* HERO (Home) */
/* ============================================ */
.hero {
    text-align: center;
    padding: 60px 0 40px;
}

.hero h1 {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 12px;
}

.subtitle {
    font-size: 1.15rem;
    color: var(--text-light);
    margin-bottom: 30px;
}

.search-box {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    outline: none;
    transition: border var(--transition);
}
.search-box input:focus { border-color: var(--primary); }

/* ============================================ */
/* CATEGORY CARDS */
/* ============================================ */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding: 20px 0 60px;
}

.category-card {
    background: var(--bg-white);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 40px 24px;
    text-align: center;
    transition: all var(--transition);
    display: block;
    color: var(--text);
}
.category-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    color: var(--text);
}

.category-card-icon { font-size: 3rem; margin-bottom: 16px; }
.category-card h3 { font-size: 1.3rem; color: var(--primary-dark); margin-bottom: 8px; }
.category-card p { color: var(--text-light); font-size: 0.9rem; margin-bottom: 12px; }
.category-count { color: var(--text-muted); font-size: 0.85rem; }

/* ============================================ */
/* BREADCRUMB */
/* ============================================ */
.breadcrumb {
    padding: 20px 0 10px;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.breadcrumb a { color: var(--primary); }
.breadcrumb a:hover { text-decoration: underline; }

/* ============================================ */
/* CATEGORY FILTERS (inline bar) */
/* ============================================ */
.category-filters {
    margin-bottom: 20px;
}

.filter-bar {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.filter-input {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    outline: none;
}
.filter-input:focus { border-color: var(--primary); }

.filter-select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    background: var(--bg-white);
    cursor: pointer;
    outline: none;
}
.filter-select:focus { border-color: var(--primary); }

.filter-bar .filter-input {
    flex: 1;
    min-width: 200px;
    max-width: 350px;
}

.filter-bar-group {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-radio {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
}

.filter-bar-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-bar-meta span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.per-page-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.per-page-selector select {
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.85rem;
}

/* ============================================ */
/* SEEDS TABLE */
/* ============================================ */
.seeds-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.seeds-table th {
    background: var(--bg-light);
    padding: 12px 16px;
    text-align: left;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border);
}

.seeds-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.95rem;
}

.seeds-table tr:hover { background: var(--bg-light); }
.seed-name { font-weight: 500; }

.seeds-cards { display: none; }

/* ============================================ */
/* BADGES */
/* ============================================ */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-lako { background: #e8f5e9; color: #2e7d32; }
.badge-srednje { background: #fff3e0; color: #e65100; }
.badge-zahtjevno { background: #fce4ec; color: #c62828; }
.badge-available { background: #e8f5e9; color: #2e7d32; }
.badge-unavailable { background: #f5f5f5; color: #999; }
.badge-ulaz { background: #e8f5e9; color: #2e7d32; }
.badge-izlaz { background: #fff3e0; color: #e65100; }

/* ============================================ */
/* TAGS (Seed Detail) */
/* ============================================ */
.tag {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    background: var(--bg-light);
    color: var(--text);
    margin: 4px 4px 4px 0;
}
.tag-lako { background: #e8f5e9; color: #2e7d32; }
.tag-srednje { background: #fff3e0; color: #e65100; }
.tag-zahtjevno { background: #fce4ec; color: #c62828; }
.tag-available { background: #e8f5e9; color: #2e7d32; }
.tag-unavailable { background: #ffebee; color: #c62828; }

/* ============================================ */
/* SEED DETAIL */
/* ============================================ */
.seed-detail-header {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    align-items: flex-start;
}

.seed-image img { max-width: 300px; border-radius: var(--radius); }
.seed-image-placeholder {
    width: 200px;
    height: 200px;
    background: var(--bg-light);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.seed-detail-info h1 {
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 12px;
}

.seed-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.seed-section {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 16px;
}
.seed-section h3 {
    color: var(--primary-dark);
    margin-bottom: 10px;
    font-size: 1.1rem;
}
.seed-section p { color: var(--text-light); line-height: 1.7; }

.stock-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}
.stock-table th,
.stock-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}
.stock-table th {
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.stock-table td { color: var(--text); }
.stock-table tbody tr:last-child td { border-bottom: none; }

.seed-actions { padding: 20px 0; }

.seed-footer {
    padding: 16px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-light);
}

/* ============================================ */
/* SEARCH RESULTS */
/* ============================================ */
.search-count { color: var(--text-muted); margin-bottom: 16px; }

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

.search-item {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 16px 20px;
    display: block;
    color: var(--text);
    transition: all var(--transition);
}
.search-item:hover { border-color: var(--primary); box-shadow: var(--shadow); color: var(--text); }
.search-item h4 { color: var(--primary-dark); margin-bottom: 8px; }
.search-item-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.search-item-desc { color: var(--text-light); font-size: 0.9rem; }

/* ============================================ */
/* PAGINATION */
/* ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 24px 0;
}

.page-btn {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-white);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all var(--transition);
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.page-dots { padding: 8px 6px; color: var(--text-muted); }

/* ============================================ */
/* BUTTONS */
/* ============================================ */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: 2px solid transparent;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
    line-height: 1.4;
}

.btn-primary { background: var(--primary); color: white; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: white; }

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

.btn-danger { background: var(--danger); color: white; border-color: var(--danger); }
.btn-danger:hover { background: #c9302c; border-color: #c9302c; color: white; }

.btn-sm { padding: 6px 14px; font-size: 0.85rem; }
.btn-full { width: 100%; }

/* ============================================ */
/* FORMS */
/* ============================================ */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 500; font-size: 0.9rem; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border var(--transition);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--primary);
}

.image-upload-wrapper {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    flex-wrap: wrap;
}
.image-preview {
    width: 150px;
    height: 120px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    transition: border-color var(--transition);
}
.image-preview:hover {
    border-color: var(--primary);
}
.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.image-placeholder {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
    padding: 8px;
}
.image-upload-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { display: flex; gap: 12px; justify-content: flex-end; padding-top: 10px; }

.seed-form-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 28px;
    align-items: start;
}
.seed-form-col { min-width: 0; }

.error-message { color: var(--danger); font-size: 0.9rem; padding: 8px 0; }

/* ============================================ */
/* AUTOCOMPLETE */
/* ============================================ */
.autocomplete-wrapper { position: relative; }
.autocomplete-wrapper input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border var(--transition);
}
.autocomplete-wrapper input[type="text"]:focus { border-color: var(--primary); }
.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1100;
    display: none;
    box-shadow: var(--shadow-lg);
}
.autocomplete-results.active { display: block; }
.autocomplete-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover { background: var(--bg-light); }
.autocomplete-item .meta { font-size: 0.8rem; color: var(--text-muted); }

/* ============================================ */
/* STATIC / DYNAMIC PAGES */
/* ============================================ */
.static-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px 0 60px;
}

.static-page h1 {
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 20px;
}

.static-page h2 {
    font-size: 1.4rem;
    color: var(--primary-dark);
    margin-top: 30px;
    margin-bottom: 12px;
}

.static-page p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 16px;
}

.static-page-actions {
    padding-top: 30px;
}

/* ============================================ */
/* ADMIN */
/* ============================================ */
.admin-login-card {
    max-width: 400px;
    margin: 80px auto;
    background: var(--bg-white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}
.admin-login-card h2 { text-align: center; margin-bottom: 24px; color: var(--primary-dark); }

.admin-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.admin-header-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.admin-header-content h2 { font-size: 1.3rem; color: var(--primary-dark); }

.admin-user-info { display: flex; align-items: center; gap: 12px; }
.admin-user-info span { color: var(--text-light); font-size: 0.9rem; }

.admin-nav {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 4px;
}

.admin-nav-link {
    padding: 12px 20px;
    color: var(--text-light);
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all var(--transition);
}
.admin-nav-link:hover { color: var(--primary); }
.admin-nav-link.active { color: var(--primary); border-bottom-color: var(--primary); }

.admin-container { padding: 30px 20px; }

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

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.admin-table th {
    background: var(--bg-light);
    padding: 12px 16px;
    text-align: left;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    border-bottom: 2px solid var(--border);
}
.admin-table td { padding: 10px 16px; border-bottom: 1px solid var(--border-light); font-size: 0.9rem; }
.admin-table tr:hover { background: var(--bg-light); }

.admin-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.text-truncate { max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.text-muted { color: var(--text-muted); }

.seed-stock-info { margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }

/* ============================================ */
/* MODAL */
/* ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: var(--shadow-lg);
}
.modal.modal-wide { max-width: 900px; }

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
}
.modal-header h3 { font-size: 1.2rem; color: var(--primary-dark); }

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px 8px;
}
.modal-close:hover { color: var(--text); }

.modal-body { padding: 24px; }

/* ============================================ */
/* TOAST */
/* ============================================ */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius);
    color: white;
    font-size: 0.9rem;
    animation: slideIn 0.3s ease;
    min-width: 250px;
    box-shadow: var(--shadow-lg);
}

.toast-success { background: var(--primary); }
.toast-error { background: var(--danger); }
.toast-info { background: #2196F3; }
.toast-hide { animation: slideOut 0.3s ease forwards; }

@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }

/* ============================================ */
/* LOADING */
/* ============================================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 900;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================ */
/* EMPTY STATE */
/* ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.empty-state p { margin-bottom: 20px; font-size: 1.1rem; }

/* ============================================ */
/* FOOTER */
/* ============================================ */
.footer {
    margin-top: auto;
    background: var(--bg-white);
    border-top: 1px solid var(--border-light);
    padding: 20px 0;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    font-size: 0.85rem;
    color: var(--text-muted);
    gap: 20px;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-info strong {
    color: var(--text);
    font-size: 0.9rem;
}

.footer-info a {
    color: var(--primary);
}
.footer-info a:hover {
    text-decoration: underline;
}

.footer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.footer-admin-link { color: var(--text-muted); }
.footer-admin-link:hover { color: var(--primary); }

/* ============================================ */
/* STATISTICS DASHBOARD */
/* ============================================ */
.stats-section {
    margin-bottom: 28px;
}

.stats-section-title {
    font-size: 1.15rem;
    color: var(--primary-dark);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-light);
}

.stats-grid {
    display: grid;
    gap: 16px;
    margin-bottom: 16px;
}
.stats-grid-4 { grid-template-columns: repeat(4, 1fr); }
.stats-grid-3 { grid-template-columns: repeat(3, 1fr); }
.stats-grid-2 { grid-template-columns: repeat(2, 1fr); }

.stat-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform var(--transition);
}
.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 8px;
}

.stat-card-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
}
.stat-card-value.stat-success { color: #2e7d32; }
.stat-card-value.stat-danger { color: var(--danger); }
.stat-card-value.stat-warning { color: #e65100; }

.stats-table-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}
.stats-table-card h5 {
    font-size: 0.95rem;
    color: var(--primary-dark);
    margin-bottom: 12px;
}

.stats-mini-table {
    width: 100%;
    border-collapse: collapse;
}
.stats-mini-table th {
    text-align: left;
    padding: 8px 10px;
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-bottom: 2px solid var(--border-light);
}
.stats-mini-table td {
    padding: 8px 10px;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-light);
}
.stats-mini-table tbody tr:last-child td { border-bottom: none; }
.stats-mini-table tbody tr:hover { background: var(--bg-light); }

.stats-ranking-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.stats-ranking-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 4px;
    border-bottom: 1px solid var(--border-light);
}
.stats-ranking-list li:last-child { border-bottom: none; }

.stats-ranking-num {
    width: 24px;
    height: 24px;
    background: var(--bg-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    flex-shrink: 0;
}

.stats-ranking-name {
    flex: 1;
    font-size: 0.9rem;
    color: var(--text);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stats-ranking-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-dark);
    white-space: nowrap;
}

/* Bar Chart */
.stats-bar-chart {
    padding: 4px 0;
}
.bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.bar-label {
    width: 70px;
    font-size: 0.82rem;
    color: var(--text-light);
    text-align: right;
    flex-shrink: 0;
}
.bar-tracks {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.bar-track {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 18px;
}
.bar {
    height: 100%;
    border-radius: 4px;
    min-width: 2px;
    transition: width 0.5s ease;
}
.bar-ulaz { background: #4caf50; }
.bar-izlaz { background: #ff9800; }
.bar-value {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.bar-legend {
    display: flex;
    gap: 18px;
    justify-content: center;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border-light);
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--text-light);
}
.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}
.legend-ulaz { background: #4caf50; }
.legend-izlaz { background: #ff9800; }

/* Zero-stock warning */
.stats-warning {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-top: 16px;
}
.stats-warning h5 {
    font-size: 0.95rem;
    color: #e65100;
    margin-bottom: 10px;
}
.stats-warning-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.stats-warning-item {
    background: #fff3e0;
    border: 1px solid #ffcc80;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.85rem;
    color: #bf360c;
}
.stats-warning-item small {
    color: #e65100;
    font-weight: 400;
}

/* Daily activity chart */
.stats-daily-chart {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 140px;
    padding-top: 10px;
}
.daily-bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    cursor: default;
}
.daily-bar-count {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.daily-bar {
    width: 100%;
    max-width: 28px;
    background: linear-gradient(180deg, var(--primary-light), var(--primary));
    border-radius: 4px 4px 0 0;
    min-height: 2px;
    transition: height 0.5s ease;
}
.daily-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 6px;
    white-space: nowrap;
}

/* Utility */
.text-success { color: #2e7d32; }
.text-warning { color: #e65100; }

/* ============================================ */
/* RESPONSIVE */
/* ============================================ */
@media (max-width: 768px) {
    .hero h1 { font-size: 1.8rem; }
    .subtitle { font-size: 1rem; }
    .search-box { flex-direction: column; }
    .footer-content { flex-direction: column; align-items: center; text-align: center; }
    .footer-right { align-items: center; }

    .categories-grid { grid-template-columns: 1fr; gap: 16px; }
    .category-card { padding: 24px 20px; }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-bar .filter-input {
        max-width: 100%;
    }
    .filter-bar-group {
        flex-wrap: wrap;
    }
    .filter-bar-meta {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .seeds-table { display: none; }
    .seeds-cards { display: flex; flex-direction: column; gap: 12px; }

    .seed-card {
        background: var(--bg-white);
        border: 1px solid var(--border-light);
        border-radius: var(--radius);
        padding: 16px;
        display: block;
        color: var(--text);
    }
    .seed-card:hover { border-color: var(--primary); }
    .seed-card h4 { margin-bottom: 8px; color: var(--primary-dark); }
    .seed-card-meta { display: flex; gap: 8px; flex-wrap: wrap; }

    .seed-detail-header { flex-direction: column; }
    .seed-image-placeholder { width: 100%; height: 150px; }

    .form-row { grid-template-columns: 1fr; }

    .admin-header-content { flex-direction: column; gap: 12px; }
    .admin-nav { overflow-x: auto; }
    .header-logo-img { height: 36px; }

    .stats-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .stats-grid-3 { grid-template-columns: 1fr; }
    .stats-grid-2 { grid-template-columns: 1fr; }
    .bar-label { width: 55px; font-size: 0.75rem; }
    .stats-daily-chart { height: 110px; }
    .daily-label { font-size: 0.6rem; }
}

@media (max-width: 480px) {
    .header-content { gap: 8px; }
    .header-left { gap: 10px; }
    .header-logo-img { height: 30px; }
    .logo { font-size: 1.1rem; }
    .hero { padding: 30px 0 20px; }
    .hero h1 { font-size: 1.5rem; }
    .stats-grid-4 { grid-template-columns: 1fr; }
    .stat-card { padding: 14px; }
    .stat-card-value { font-size: 1.3rem; }
}

/* ============================================ */
/* QR PRINT MODAL */
/* ============================================ */
#qr-print-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1100;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.qr-print-modal {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 860px;
    box-shadow: var(--shadow-lg);
    margin: 20px 0;
}

.qr-print-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-light);
}

.qr-print-actions { display: flex; gap: 8px; }

.qr-labels-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 24px;
}

.qr-label {
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: #fff;
}

.qr-code-container canvas,
.qr-code-container img {
    display: block;
    width: 120px !important;
    height: 120px !important;
}

.qr-label-info {
    text-align: center;
    line-height: 1.4;
}

.qr-label-library {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.qr-label-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text);
}

.qr-label-year {
    font-size: 0.75rem;
    color: var(--text-light);
}

.qr-label-hint {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-style: italic;
}

.qr-localhost-warning {
    grid-column: 1 / -1;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: 0.875rem;
    color: #856404;
    margin-bottom: 8px;
}

/* ============================================ */
/* PRINT STILOVI - samo naljepnice */
/* ============================================ */
@media print {
    body > *:not(#qr-print-overlay) { display: none !important; }

    #qr-print-overlay {
        display: block !important;
        position: static !important;
        background: none !important;
        padding: 0 !important;
    }

    .qr-print-modal {
        box-shadow: none !important;
        border-radius: 0 !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    .no-print { display: none !important; }

    .qr-labels-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        padding: 8px;
    }

    .qr-label {
        border: 0.5pt solid #999;
        page-break-inside: avoid;
        break-inside: avoid;
    }
}
