/* ==============================================
   SPREMENLJIVKE
   ============================================== */
:root {
    --bg:            #f5f5f3;
    --bg-card:       #ffffff;
    --bg-input:      #f8f8f6;
    --bg-muted:      #f2f2f0;

    --ink:           #1a1a1a;
    --ink-2:         #555555;
    --ink-3:         #999999;
    --ink-4:         #cccccc;

    --border:        #e8e8e5;
    --border-2:      #d8d8d4;

    --accent-t:      #c0834a;
    --accent-v:      #4a7c8a;
    --accent-z:      #7a6aaa;
    --accent-w:      #4a7c59;

    --danger:        #a03030;
    --danger-bg:     #fdf0ef;
    --danger-border: #f0d0ce;

    --success-bg:    #eaf3ee;
    --success-ink:   #2d6a45;

    --warn-bg:       #fef8e7;
    --warn-ink:      #8a6800;

    --radius-sm:     6px;
    --radius-md:     10px;
    --radius-lg:     16px;
    --radius-xl:     24px;

    --shadow-sm:     0 1px 3px rgba(0,0,0,0.07);
    --shadow-md:     0 4px 16px rgba(0,0,0,0.08);
}

/* ==============================================
   OSNOVA
   ============================================== */

* {
  -webkit-tap-highlight-color: transparent;
}
*:focus-visible {
  outline: 2px solid #0055ff; /* Vidna obroba samo za uporabnike s tipkovnico */
}

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.main-container {
    padding: 12px;
    max-width: 640px;
    margin: 0 auto;
    padding-bottom: 80px;
}

h2, h3 { font-weight: 700; margin: 0 0 16px; color: var(--ink); }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; }

/* ==============================================
   NAVIGACIJA
   ============================================== */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    background: var(--ink);
    color: white;
    height: 48px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-left   { flex: 1; display: flex; justify-content: flex-start; align-items: center; }
.nav-center { flex: 1; display: flex; justify-content: center; align-items: center; }
.nav-right  { flex: 1; display: flex; justify-content: flex-end; align-items: center; gap: 4px; }

.nav-user-link {
    font-size: 12px;
    font-weight: 600;
    color: #888;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    transition: color 0.15s;
}
.nav-user-link:hover { color: #ccc; }

.nav-apiary-strip { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.nav-apiary-strip::-webkit-scrollbar { display: none; }

.nav-apiary-btn {
    background: transparent;
    color: #888;
    border: 1px solid #333;
    border-radius: var(--radius-sm);
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.15s;
}
.nav-apiary-btn:hover  { color: #ccc; border-color: #555; }
.nav-apiary-btn.active { background: #fff; color: var(--ink); border-color: #fff; }
.nav-apiary-single { font-size: 13px; color: #aaa; font-weight: 500; }

/* ==============================================
   MENI
   ============================================== */
.menu-container { position: relative; }

.menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 22px;
    height: 16px;
    padding: 0;
}
.menu-btn span { width: 100%; height: 1.5px; background: #ccc; border-radius: 2px; display: block; }

.menu-content {
    display: none;
    position: absolute;
    top: 36px;
    right: 0;
    width: 220px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 200;
    overflow: hidden;
    border: 1px solid var(--border);
}
.menu-content a { display: block; padding: 13px 20px; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500; transition: background 0.15s; border-bottom: 1px solid var(--border); }
.menu-content a:last-child  { border-bottom: none; }
.menu-content a:hover       { background: var(--bg-muted); }
.menu-content a.logout-link { color: var(--danger); }
.menu-content a.admin-link  { color: #4a7c8a; font-weight: 600; }
.menu-content.show { display: block; animation: menuIn 0.15s ease-out; }

@keyframes menuIn {
    from { opacity: 0; transform: translateY(-6px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ==============================================
   STATUS PIKICA
   ============================================== */
.nav-status { display: flex; align-items: center; margin-right: 20px; }

.status-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot-ok      { background: #4a7c59; box-shadow: 0 0 0 2px rgba(74,124,89,0.25); }
.dot-pending { background: #c0834a; box-shadow: 0 0 0 2px rgba(192,131,74,0.25); animation: pulse 1.5s infinite; }
.dot-error   { background: #a03030; box-shadow: 0 0 0 2px rgba(160,48,48,0.25); }
.dot-unknown { background: #555; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ==============================================
   NAV ICON GUMB
   ============================================== */
.nav-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    transition: all 0.15s;
    position: relative;
    font-size: 16px;
}
.nav-icon-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* ==============================================
   JEZIK DROPDOWN
   ============================================== */
.nav-lang { position: relative; margin-right: 4px; }

.lang-active-btn {
    background: none;
    border: 1px solid #333;
    border-radius: 20px;
    color: #ccc;
    padding: 3px 8px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s;
}
.lang-active-btn:hover { border-color: #555; color: #fff; }

.lang-dropdown {
    position:fixed;
    top: 50px;
    right: 10px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border: 1px solid var(--border);
    z-index: 200;
    min-width: 200px;
    overflow: hidden;
    display: none;
}
.lang-dropdown.show { display: block; animation: menuIn 0.15s ease-out; }

.lang-dropdown-item {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--ink);
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
    border-bottom: 1px solid var(--border);
}
.lang-dropdown-item:last-child { border-bottom: none; }
.lang-dropdown-item:hover { background: var(--bg-muted); }

.login-lang-strip { display: flex; gap: 8px; justify-content: flex-end; }
.login-lang-btn { background: none; border: none; font-size: 18px; opacity: 0.4; cursor: pointer; padding: 4px; transition: opacity 0.15s; text-decoration: none; }
.login-lang-btn.active { opacity: 1; }
.login-lang-btn:hover  { opacity: 0.8; }

/* ==============================================
   FLASH OBVESTILA
   ============================================== */
.flash-bubble-success,
.flash-bubble-error {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    z-index: 9999;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.flash-bubble-success { background: var(--ink); color: #fff; }
.flash-bubble-error   { background: var(--danger); color: #fff; }

/* ==============================================
   KARTICE
   ============================================== */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    margin-bottom: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.card-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.card-header strong { font-size: 11px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; }
.card-body { padding: 16px; }
.card > form, .card > p { padding: 16px; }

.btn-close-circle {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    height: 32px;
    padding: 12px;
    background: var(--bg-muted);
    color: var(--ink-2);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--border);
    transition: all 0.2s;
    flex-shrink: 0;
    white-space: nowrap;
    gap: 4px;
    margin-left: auto;
}
.btn-close-circle:hover { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }

/* ==============================================
   MASTER NAPRAVA KARTICA (po skici)
   ============================================== */
.master-card {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0px;
}

.master-card-img {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
  /*  background: var(--bg-input); 
    border: 1px solid var(--border); */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.master-card-img img { width: 100%; height: 100%; object-fit: contain; padding: 0px; }
.master-card-img svg { width: 100%; height: 100%; color: var(--ink-2); }

.master-card-info { flex: 1; min-width: 0; padding: 14px 0 0 0}
.master-card-info-nastavitve {padding: 0 0 0 12px;}
.master-card-name {
    font-size: 18px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.master-card-apiary { font-size: 13px; color: var(--ink-3); margin-top: 2px; font-weight: 500; }
.master-card-status {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-w);
}
.master-card-id { color: var(--ink-3); font-weight: 500; }

/* Baterija desno */
.master-card-bat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin-top: 12px;
}
.master-card-bat-pct {
    font-size: 20px;
    font-weight: 800;
    color: var(--bat-color, var(--accent-w));
    letter-spacing: -0.02em;
    line-height: 1;
}
.master-card-bat-lbl {
    font-size: 10px;
    color: var(--ink-3);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.master-card-bat-status {
    font-size: 11px;
    font-weight: 700;
    color: var(--bat-color, var(--accent-w));
}

/* Vertikalna baterija ikona */
.bat-icon-v {
    width: 34px;
    height: 56px;
    border: 2px solid var(--bat-color, var(--accent-w));
    border-radius: 5px;
    position: relative;
    padding: 3px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.bat-icon-v::before {
    content: '';
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 5px;
    background: var(--bat-color, var(--accent-w));
    border-radius: 3px 3px 0 0;
}
.bat-icon-v-fill {
    width: 100%;
    background: var(--bat-color, var(--accent-w));
    border-radius: 2px;
    transition: height 0.4s ease;
}

/* ==============================================
   PANJI STRIP (po skici)
   ============================================== */
.panji-section {
    padding: 4 8px 6px;
    border-top: 1px solid var(--border);
}

.panji-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--ink-3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 10px 0 8px;
}

.panji-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    align-items: flex-end;
}
.panji-strip::-webkit-scrollbar { display: none; }

.panj-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    flex-shrink: 0;
    cursor: pointer;
    padding: 10px;
}

.panj-pill-box {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-md);
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    color: var(--ink);
    position: relative;
    padding: 10px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.20));
   /* transition: all 0.15s; */
}

.panj-pill-box:hover { border-color: var(--ink-4); box-shadow: 0 4px 8px rgba(0,0,0,0.50);} 

/* Senca in premik se izvedeta SAMO, če element NI aktiven */
.panj-pill:not(.active) .panj-pill-box:hover {
    border-color: var(--ink-4);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.50);
}

/* Ko je element aktiven, ima fiksno pozicijo in senco (brez dodatnega hover skakanja) */
.panj-pill.active .panj-pill-box {
    border-color: var(--ink-4);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.50);
}

.panj-pill-lbl { font-size: 9px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.05em; }

.panj-dot {
    position: absolute;
    top: -3px;
    right: -3px;
    width:10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-w);
    border: 1.5px solid var(--bg-card);
    display: none;
}
.panj-dot-master {
    position: absolute;
    top: 16px;
    right: 16px;
    width:12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-w);
    border: 1.5px solid var(--bg-card);
    z-index: 2; 
    display: none;
}
.panj-pill.active .panj-dot {
    display: block;
}
.master-card-img.active .panj-dot-master {
    display: block;
}

.panj-dot.warn { background: var(--accent-t); }
.panj-dot.err  { background: var(--danger); }
.panj-dot.off  { background: var(--ink-4); }

/* ==============================================
   ACTIVE DEVICE HEADER
   ============================================== */
.active-device-card { overflow: hidden; }
.active-device-header {
    display: flex;
    align-items: flex-start;
  /*  justify-content: space-between; */
    padding: 4px 8px;
    border-bottom: 1px solid var(--border);
}
.active-device-title { font-size: 16px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.active-device-sub   { font-size: 11px; color: var(--ink-3); }

/* ==============================================
   MERITVE — 3×2 mreža
   ============================================== */
.measurements-grid-v2 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 16px;
    background: var(--bg-card);
}

.m-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    padding: 4px 6px 4px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.20) !important; 
}
/* Glavni razred za kartico */
.m-card {
    position: relative;
    background: var(--bg-card, #ffffff); /* Senca nima učinka, če ozadje ni definirano */
    border: 1.5px solid var(--border, #eedddd);
    border-radius: var(--radius-md, 12px);
    
    /* KLJUČNO: Preprečite, da bi karkoli odrezalo senco */
    overflow: visible !important; 
    
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Hover deluje samo, če kartica NI aktivna */
.m-card:not(.graf-active):hover { 
    transform: translateY(-2px); 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.40) !important; 
}

/* Stanje, ko je kartica AKTIVNA (vklopljena preko JS) */
.m-card.active { 
    border-color: var(--card-color, var(--border-2)); 
    transform: translateY(-2px) !important; 
    
    /* POPRAVEK: Močna in zelo vidna senca */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.40) !important; 
    
    /* Zagotovi, da je aktivna kartica nad ostalimi */
    z-index: 10; 
}

.m-card-label { font-size: 10px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; display: flex; align-items: center; gap: 4px; }
.m-card-icon  { font-size: 12px; }
.m-card-value { font-size: 22px; font-weight: 800; color: var(--ink); line-height: 1.1; letter-spacing: -0.02em; padding-left: 20px; }
.m-card-unit  { font-size: 12px; font-weight: 500; color: var(--ink-3); margin-left: 2px; }
.m-card-canvas { margin-top: 2px; }
.m-card-canvas canvas { display: block; border-radius: 2px; }

.m-card-teza     { --card-color: #4a7c59; }
.m-card-temp     { --card-color: #c0834a; }
.m-card-vlaga    { --card-color: #4a7c8a; }
.m-card-zvok     { --card-color: #7a6aaa; }
.m-card-zvok-moc { --card-color: #c04a4a; }
.m-card-cistost  { --card-color: #c0a04a; }

.m-card-teza     .m-card-label { color: #4a7c59; }
.m-card-temp     .m-card-label { color: #c0834a; }
.m-card-vlaga    .m-card-label { color: #4a7c8a; }
.m-card-zvok     .m-card-label { color: #7a6aaa; }
.m-card-zvok-moc .m-card-label { color: #c04a4a; }
.m-card-cistost  .m-card-label { color: #c0a04a; }

 /*Prilagoditev za manjše zaslone */
@media (max-width: 480px) {
    .measurements-grid-v2 {
        gap: 4px;
        padding: 8px;
    }
    .m-card-svg {
        height: 20px;
    }
}

/* ==============================================
   GRAF SEKCIJA (po skici)
   ============================================== */
#graf-div { border-top: 1px solid var(--border); }
.graf-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px 9px;
    gap: 10px;
}
.graf-title-text {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.graf-cas-strip { 
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    flex: 1; 
    justify-content: space-between; 
 }
.graf-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px 8px;
    flex-wrap: wrap;
}

.graf-tip-strip {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    flex: 1;
}
.graf-tip-strip::-webkit-scrollbar { display: none; }

.graf-tip-btn {
    background: var(--bg-input);
    color: var(--ink-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
    font-family: inherit;
    flex-shrink: 0;
}
.graf-tip-btn:hover  { color: var(--ink); border-color: var(--ink-4); }
.graf-tip-btn.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/*.graf-cas-strip { display: flex; gap: 4px; flex-shrink: 0; }*/

.graf-cas-btn {
    flex: 1; 
    background: var(--bg-input);
    color: var(--ink-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 5px 0;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}
.graf-cas-btn:hover  { color: var(--ink); border-color: var(--ink-4); }
.graf-cas-btn.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.graf-canvas-wrap { padding: 4px 16px 16px; }
#graf-canvas {
    width: 100% !important;
    touch-action: pan-y !important;
    max-height: 200px;
    touch-action: none; 
}

/* ==============================================
   VREME WIDGET
   ============================================== */
.weather-card {
    position: relative;
    overflow: hidden;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.weather-icon-wrap { font-size: 40px; flex-shrink: 0; }
.weather-info { flex: 1; min-width: 0; }
.weather-loc  { font-size: 12px; color: var(--ink-3); font-weight: 500; margin-bottom: 2px; }
.weather-temp { font-size: 28px; font-weight: 800; color: var(--ink); line-height: 1; letter-spacing: -0.02em; }
.weather-stats { display: flex; gap: 14px; flex-wrap: wrap; flex: 2; justify-content: flex-end; }
.weather-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 56px; }
.weather-stat-icon { font-size: 20px; }
.weather-stat-val  { font-size: 14px; font-weight: 700; color: var(--ink); }
.weather-stat-lbl  { font-size: 10px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.weather-bg-emoji  { position: absolute; bottom: -20px; right: -20px; font-size: 160px; opacity: 0.08; pointer-events: none; }

/* ==============================================
   BOTTOM NAV
   ============================================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 58px;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: var(--ink-3);
    text-decoration: none;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 20px;
    border-radius: var(--radius-md);
    transition: color 0.15s;
    font-family: inherit;
}
.bottom-nav-btn:hover,
.bottom-nav-btn.active { color: var(--ink); }

/* ==============================================
   FORME IN VNOSI
   ============================================== */
.login-container { display: flex; justify-content: center; align-items: flex-start; padding-top: 20px; }
.login-container .card { width: 100%; max-width: 360px; padding: 24px; }

input[type="number"],
input[type="text"],
input[type="password"],
input[type="email"] {
    width: 100%;
    padding: 11px 13px;
    margin: 8px 0;
    border: 1px solid var(--border-2);
    border-radius: var(--radius-md);
    font-size: 15px;
    background: var(--bg-input);
    color: var(--ink);
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus {
    border-color: var(--ink-2);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(26,26,26,0.06);
}

select.card-select,
select[name="izbran_id"] {
    width: 100%;
    padding: 11px 13px;
    margin: 8px 0;
    border: 1px solid var(--border-2);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    color: var(--ink);
    font-size: 15px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
}
select.card-select:focus,
select[name="izbran_id"]:focus {
    border-color: var(--ink-2);
    box-shadow: 0 0 0 3px rgba(26,26,26,0.06);
}

/* ==============================================
   GUMBI
   ============================================== */
button { font-family: inherit; cursor: pointer; border: none; outline: none; appearance: none; -webkit-appearance: none; }

button[type="submit"]:not(.btn-ghost):not(.btn-cmd):not(.btn-danger-soft) {
    width: 100%;
    background: var(--ink);
    color: #fff;
    padding: 12px 20px;
    margin: 12px 0 0;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: opacity 0.15s;
}
button[type="submit"]:not(.btn-ghost):not(.btn-cmd):not(.btn-danger-soft):hover  { opacity: 0.85; }
button[type="submit"]:not(.btn-ghost):not(.btn-cmd):not(.btn-danger-soft):active { opacity: 0.7; }

.btn-cmd { background: var(--bg-muted); color: var(--ink-2); border: 1px solid var(--border-2); border-radius: var(--radius-sm); padding: 8px 14px; font-size: 13px; font-weight: 600; transition: background 0.15s, border-color 0.15s; white-space: nowrap; }
.btn-cmd:hover { background: var(--border); border-color: var(--ink-4); }

.btn-danger-soft,
.btn-delete,
button[type="submit"].btn-delete {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid var(--danger-border);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.15s;
    width: auto;
    margin: 0;
}
.btn-danger-soft:hover,
.btn-delete:hover { background: #f8e0de; }

.button-row { display: flex; gap: 8px; margin-top: 12px; }
.button-row button[type="submit"] { flex: 1; margin: 0; width: auto; }
.button-row .btn-delete { flex: 0 0 auto; padding: 12px 18px; border-radius: var(--radius-md); font-size: 14px; }
/*.btn-full { width: 100%; display: block; } */
/* Gumb desna polovica — zamenjaj btn-full */
.btn-full {
    display: block;
    width: 50% !important;
    margin-left: auto !important;
}

/* ==============================================
   LOGIN
   ============================================== */
.login-logo { display: flex; flex-direction: column; align-items: center; margin-bottom: 24px; }
.login-title { font-weight: 900; font-size: 2rem; color: var(--ink); letter-spacing: 8px; margin-top: 10px; padding-left: 8px; }
.login-title span { color: var(--ink-3); }
.login-card { width: 100%; max-width: 400px; padding: 24px; }
.setup-header { text-align: center; margin-bottom: 20px; }
.setup-step { font-size: 16px; font-weight: 600; color: var(--ink); }
.setup-step small { display: block; font-size: 12px; color: var(--ink-3); font-weight: 400; margin-top: 4px; }

/* ==============================================
   NASTAVITVE
   ============================================== */
.section-label { font-size: 10px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; margin: 14px 0 8px; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.setting-item { background: var(--bg-input); border-radius: var(--radius-md); padding: 10px 12px; border: 1px solid var(--border); }
.setting-item label { display: block; font-size: 10px; color: var(--ink-3); margin-bottom: 4px; font-weight: 600; }
.setting-item input[type="number"] { width: 100%; background: transparent; border: none; font-size: 18px; font-weight: 700; color: var(--ink); text-align: center; padding: 0; margin: 0; box-shadow: none; }
.setting-item input[type="number"]:focus { box-shadow: none; border: none; }

.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px; }
.toggle-label { font-size: 14px; color: var(--ink); font-weight: 500; }
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: var(--border-2); border-radius: 24px; transition: 0.2s; }
.toggle-slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
input:checked + .toggle-slider { background: var(--ink); }
input:checked + .toggle-slider:before { transform: translateX(20px); }

/* ==============================================
   UKAZI
   ============================================== */
.cmd-grid { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 0 14px 14px; }
.cmd-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.cmd-table th { text-align: left; padding: 4px 6px; font-size: 10px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--border); }
.cmd-table td { padding: 5px 9px; border-bottom: 1px solid var(--border); color: var(--ink-2); vertical-align: middle; }
.cmd-table tr:last-child td { border-bottom: none; }
.cmd-table td:first-child { color: var(--ink-3); font-size: 11px; }

/* Poenotenje vseh gumbov .btn-cmd */
.btn-cmd {
    display: inline-block;
    padding: 8px 16px !important;
    font-size: 14px !important;
    font-weight: 600;
    line-height: 1.5;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-2);
    background: var(--bg-muted);
    color: var(--ink-2);
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
    white-space: nowrap;
}

.btn-cmd:hover {
    background: var(--border);
    border-color: var(--ink-4);
    color: var(--ink);
}

.status-badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 10px; font-weight: 700; letter-spacing: 0.03em; }
.status-pending   { background: var(--warn-bg);    color: var(--warn-ink); }
.status-sent      { background: #e8f0fe;           color: #3a5fc8; }
.status-done      { background: var(--success-bg); color: var(--success-ink); }
.status-error     { background: var(--danger-bg);  color: var(--danger); }
.status-cancelled { background: var(--bg-muted);   color: var(--ink-3); }

/* ==============================================
   POPOVER
   ============================================== */
.ukazi-popover, .notif-popover {
    position: absolute;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border: 1px solid var(--border);
    z-index: 200;
    overflow: hidden;
    animation: menuIn 0.15s ease-out;
}
.ukazi-popover-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 13px; }
.ukazi-popover-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border);}
.ukazi-popover-row:last-child { border-bottom: none; }
.ukazi-popover-info { display: flex; flex-direction: column; gap: 4px; }
.ukazi-popover-naziv { font-size: 14px; font-weight: 600; color: var(--ink); }
.ukazi-popover-sub   { font-size: 11px; color: var(--ink-3); }
.notif-item { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 13px; }
.notif-item:last-child { border-bottom: none; }
.notif-item.warning { background: var(--warn-bg); color: var(--warn-ink); }
.notif-item.danger  { background: var(--danger-bg); color: var(--danger); }

/* ==============================================
   MODAL
   ============================================== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 500; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-box { background: var(--bg-card); border-radius: var(--radius-lg); width: 100%; max-width: 360px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.modal-title  { font-size: 15px; font-weight: 700; color: var(--ink); }
.modal-body   { padding: 16px; }
.modal-footer { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); justify-content: flex-end; }

/* ==============================================
   ADMIN
   ============================================== */
.pending-device-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.pending-device-row:last-of-type { border-bottom: none; }
.pending-device-info { display: flex; flex-direction: column; gap: 2px; }
.pending-device-info strong { font-size: 13px; color: var(--ink); }
.pending-device-info small  { font-size: 11px; color: var(--ink-3); }
.admin-device-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border); gap: 12px; }
.admin-device-row:last-child { border-bottom: none; }
.admin-device-info { flex: 1; min-width: 0; }
.admin-device-title { font-size: 13px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-device-sub { font-size: 11px; color: var(--ink-3); margin-top: 3px; }

/* ==============================================
   PROFIL
   ============================================== */
.list-items { display: flex; flex-direction: column; gap: 2px; margin-bottom: 4px; }
.list-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: none; }
.list-item-info { display: flex; flex-direction: column; gap: 2px; }
.list-item-label { font-size: 14px; font-weight: 600; color: var(--ink); }
.list-item-sub   { font-size: 11px; color: var(--ink-3); }
.divider { border: none; border-top: 1px solid var(--border); margin: 14px 0; }

/* ==============================================
   INTERVAL PICKER
   ============================================== */
.interval-picker { display: flex; gap: 6px; flex-wrap: nowrap; margin: 8px 0; }
.interval-btn { flex: 1 1 0; background: var(--bg-input); color: var(--ink-2); border: 1px solid var(--border-2); border-radius: var(--radius-sm); padding: 8px 0; font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.interval-btn:hover  { border-color: var(--ink-4); color: var(--ink); }
.interval-btn.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ==============================================
   GPS
   ============================================== */
.gps-row    { display: flex; gap: 8px; align-items: flex-end; margin: 8px 0; flex-wrap: wrap; }
.gps-fields { display: flex; gap: 8px; width: 100%;}
.gps-fields input { flex: 1; margin: 0; min-width: 100px; }
.gps-current { font-size: 12px; color: var(--ink-2); background: var(--bg-input); border-radius: var(--radius-sm); padding: 8px 12px; margin: 0 0 12px; border: 1px solid var(--border); }
.gps-buttons { display: flex; gap: 8px; flex-wrap: wrap; }

/* ==============================================
   NAPRAVA KARTICA
   ============================================== */
.naprava-kartica { background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; margin: 8px 0; }
.naprava-kartica-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.naprava-kartica-row:last-child { border-bottom: none; }
.naprava-kartica-lbl { font-size: 11px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.05em; }
.naprava-kartica-val { font-size: 14px; font-weight: 700; color: var(--ink); }
.naprava-kartica-val.mono { font-family: monospace; font-size: 16px; letter-spacing: 0.1em; }

/* ==============================================
   UTILITY
   ============================================== */
.text-center { text-align: center; }
.text-accent { color: var(--ink-3); }
.text-right  { text-align: right; }
.mt-sm       { margin-top: 8px; }
.mt-md       { margin-top: 14px; }
.no-data     { text-align: center; color: var(--ink-3); font-size: 13px; padding: 20px 14px; }
.input-label { display: block; font-size: 11px; font-weight: 600; color: var(--ink-3); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.04em; }
.input-hint  { font-size: 12px; color: var(--ink-3); margin: 0 0 12px; line-height: 1.5; }
.link-center { display: block; text-align: center; margin-top: 14px; font-size: 13px; color: var(--ink-3); text-decoration: none; font-weight: 500; }
.link-center:hover { color: var(--ink); }
.lang-strip { display: flex; gap: 8px; }
.lang-btn { flex: 1; background: var(--bg-input); color: var(--ink-2); border: 1px solid var(--border-2); border-radius: var(--radius-md); padding: 10px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.15s; font-family: inherit; }
.lang-btn:hover  { border-color: var(--ink-4); color: var(--ink); }
.lang-btn.active { background: var(--ink); color: #fff; border-color: var(--ink); }

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

/* ==============================================
   RESPONSIVE
   ============================================== */
@media (max-width: 380px) {
    .main-container { padding: 8px; padding-bottom: 80px; }
    .measurements-grid-v2 { gap: 7px; padding: 10px 12px; }
    .m-card-value { font-size: 18px; }
    .graf-tip-btn { padding: 4px 9px; font-size: 11px; }
    .graf-cas-btn { padding: 4px 8px; font-size: 12px; }
    .master-card { gap: 10px; padding: 2px; }
    .master-card-name { font-size: 15px; }
}

@media (min-width: 640px) {
    .measurements-grid-v2 { grid-template-columns: repeat(6, 1fr); }
    #graf-canvas { max-height: 240px; }
}

@media (min-width: 900px) {
    .main-container { max-width: 960px; padding: 16px; padding-bottom: 80px; }
    #graf-canvas { max-height: 280px; }
}

@media print {
    body > *:not(#print-kartica) { display: none !important; }
    #print-kartica { display: block !important; border: 2px solid #000; padding: 20px; margin: 0; font-size: 16px; }
}
/* ==============================================
   VREME WIDGET — weather-card in vse podrazrede
   Dodaj na konec style.css
   ============================================== */

#weather-content { display: contents; }

.weather-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #e8f4fd 0%, #f0f8e8 100%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 8px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 12px;
    align-items: start;
}

/* Noč — temnejše ozadje 
.weather-card.night-mode {
  /*  background: linear-gradient(135deg, #e8eaf6 0%, #f3e5f5 100%); */
   /* background: linear-gradient(135deg, #0b1528 0%, #1e1b4b 100%);  
}
*/

/* Velik emoji v ozadju */
.weather-bg-emoji {
    position: absolute;
    bottom: -16px;
    right: -10px;
    font-size: 120px;
    opacity: 0.12;
    pointer-events: none;
    line-height: 1;
    user-select: none;
}

/* Leva stran — temperatura + lokacija */
.weather-left {
    position: relative;
    z-index: 1;
}

.weather-temp {
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.weather-location {
    font-size: 12px;
    font-weight: 500;
    color: var(--ink-2);
    margin-top: 6px;
}

/* Desna stran — opis + vlaga/veter */
.weather-right {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.weather-desc {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-2);
    background: rgba(255,255,255,0.7);
    padding: 4px 10px;
    border-radius: var(--radius-md);
    text-align: right;
}

.weather-details {
    display: flex;
    gap: 12px;
    background: rgba(255,255,255,0.7);
    padding: 5px 10px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-2);
}

/* Napoved — čez obe koloni */
.weather-forecast {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    gap: 6px;
    border-top: 1px solid rgba(0,0,0,0.07);
    padding-top: 10px;
}

.forecast-day {
    flex: 1;
    text-align: center;
    background: rgba(255,255,255,0.6);
    border-radius: var(--radius-md);
    padding: 8px 4px;
    min-width: 0;
}

.forecast-name {
    font-size: 10px;
    font-weight: 700;
    color: var(--ink-3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.forecast-icon-emoji {
    font-size: 22px;
    margin: 4px 0;
    line-height: 1;
}

.forecast-temp {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
}

/* Napaka stanje */
.weather-error {
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    min-height: 80px;
}

.weather-error-text {
    font-size: 13px;
    color: var(--ink-3);
    text-align: center;
}

/* Na manjših zaslonih */
@media (max-width: 380px) {
    .weather-card {
        grid-template-columns: 1fr 1fr;
        padding: 14px;
    }
    .weather-right {
        align-items: flex-start;
    }
    .weather-bg-emoji {
        font-size: 90px;
        bottom: -10px;
        right: -5px;
    }
    .weather-temp {
        font-size: 2rem;
    }
    .forecast-icon-emoji {
        font-size: 18px;
    }
}
/* MASTER slika — hover in active */
.master-card-img {
    transition: box-shadow 0.15s, border-color 0.15s;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.20));
}
.master-card-img:hover {
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.30));
   /* transform: translateY(-2px);
   /* border-color: var(--ink-4); */
}
.master-card-img.active {
   /* border-color: var(--ink); */
   border-color: var(--ink-4);
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.80));
}

/* SLAVE pill — hover in active samo senca, ne črn 
.panj-pill-box {
    transition: box-shadow 0.15s, border-color 0.15s, transform 0.15s;
}
.panj-pill:hover .panj-pill-box {
  /*  border-color: var(--ink-4); 
    transform: translateY(-2px); 
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.30));
}
.panj-pill.active .panj-pill-box {
   /* transform: translateY(-2px);
  /*  border-color: var(--ink); 
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.30));
}

/* BATERIJA — vodoravna, ožja */
.master-card-bat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
    min-width: 0;
    padding: 0 8px;
}
.master-card-bat-pct {
    font-size: 14px;
    font-weight: 800;
    color: var(--bat-color, var(--accent-w));
    line-height: 1;
}
.master-card-bat-lbl {
    font-size: 9px;
    color: var(--ink-3);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.master-card-bat-status {
    font-size: 10px;
    font-weight: 700;
    color: var(--bat-color, var(--accent-w));
}

/* Vodoravna baterija */
.bat-icon-v {
    width: 60px;
    height: 22px;
    border: 2px solid var(--bat-color, var(--accent-w));
    border-radius: 3px;
    position: relative;
    padding: 2px;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
}
.bat-icon-v::before {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 8px;
    background: var(--bat-color, var(--accent-w));
    border-radius: 0 2px 2px 0;
}
.bat-icon-v-fill {
    height: 100%;
    background: var(--bat-color, var(--accent-w));
    border-radius: 1px;
    transition: width 0.4s ease;
}

/* MASTER CARD — ožja */
.master-card {
    display: flex;
    align-items: center;
    gap: 5px;
  /*  padding: 12px 14px; */
}



.master-card-name   { font-size: 15px; }
.master-card-apiary { font-size: 12px; }
.master-card-status { font-size: 11px; margin-top: 4px; }

/* PANJI SECTION — ožja */
.panji-section { padding: 4px 8px 4px; }
.panji-label   { padding: 6px 0 6px; }
.panji-strip   { gap: 6px; }


.panj-pill-lbl { font-size: 8px; }
.master-card-img img {
    width: 95px;
    height: 100px;
    opacity: 80;
    object-fit: fill;
    padding: 2px;
}

/* Ime čebelnjaka + puščica v isti vrstici */
.master-card-apiary-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.master-card-name {
    font-size: 16px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.master-card-id {
    font-size: 11px;
    color: var(--ink-3);
    font-weight: 500;
    margin-top: 2px;
    font-family: monospace;
    letter-spacing: 0.03em;
}

.master-card-status {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-w);
}

/* Puščica gumb */
.apiary-dropdown-btn {
    background: none;
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    color: var(--ink-3);
    font-size: 10px;
    padding: 2px 6px;
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1.4;
    flex-shrink: 0;
}
.apiary-dropdown-btn:hover {
    background: var(--bg-input);
    color: var(--ink);
    border-color: var(--ink-4);
}

/* Dropdown menu */
.apiary-dropdown {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 300;
    overflow: hidden;
    min-width: 180px;
    animation: menuIn 0.15s ease-out;
}

.apiary-dropdown-header {
    padding: 10px 14px;
    font-size: 10px;
    font-weight: 700;
    color: var(--ink-3);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    border-bottom: 1px solid var(--border);
}

.apiary-dropdown a {
    display: block;
    padding: 11px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}
.apiary-dropdown a:last-child { border-bottom: none; }
.apiary-dropdown a:hover { background: var(--bg-muted); }

.flash-bubble-info {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    z-index: 9999;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    background: #2c3e50;   /* temno siva / modrikasto siva */
    color: #fff;
}

/* Gumb za namestitev PWA v meniju */
#installAppBtn, #installIOSBtn {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 13px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
    font-family: inherit;
}
#installAppBtn:hover, #installIOSBtn:hover {
    background: var(--bg-muted);
}
/* Če želiš, da je gumb na vrhu ali posebej izstopa, mu daj drugačno barvo */
#installAppBtn {
    color: #4a7c8a;
    font-weight: 600;
}

/* Paginacija – fiksni gumbi */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 12px;
}

.pagination-btn {
    flex: 0 0 auto;
    min-width: 42px;
    padding: 8px 4px;
    text-align: center;
    background: var(--bg-input);
    color: var(--ink-2);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.pagination-btn.active {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.pagination-ellipsis {
    background: transparent;
    border: none;
    min-width: 30px;
    cursor: default;
}

/* ==============================================
   GRAF KARTICA
   ============================================== */

.card-graf {
    overflow: hidden;
    padding: 0;
}

.card-graf .graf-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 14px 10px;
    border-bottom: 1px solid var(--border);
}

.card-graf .graf-cas-strip {
    width: 100%;
}

.graf-canvas-wrap-full {
    padding: 8px 0 0;
}

.graf-canvas-wrap-full #graf-canvas {
    width: 100% !important;
    display: block;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ==============================================
   UKAZI LISTA (zamenjava za cmd-table)
   ============================================== */

.ukaz-lista-header {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    border-bottom: 1px solid var(--border);
    gap: 4px;
}

.ukaz-col-h {
    font-size: 10px;
    font-weight: 700;
    color: var(--ink-3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex: 1;
    min-width: 0;
}

.ukaz-col-h:first-child  { flex: 0 0 36px; }
.ukaz-col-h:nth-child(2) { flex: 2; }
.ukaz-col-h:nth-child(4) { flex: 1.4; }
.ukaz-col-h:last-child   { flex: 0 0 36px; }

.ukaz-row {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    gap: 4px;
    flex-wrap: nowrap;
}
.ukaz-row:last-child { border-bottom: none; }

.ukaz-col {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    color: var(--ink-2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ukaz-col-panj   { flex: 0 0 36px; color: var(--ink-3); font-size: 11px; }
.ukaz-col-naziv  { flex: 2; font-weight: 600; color: var(--ink); }
.ukaz-col-status { flex: 1; }
.ukaz-col-cas    { flex: 1.4; font-size: 11px; color: var(--ink-3); }
.ukaz-col-akcija { flex: 0 0 36px; display: flex; align-items: center; justify-content: flex-end; }

/* Manjši gumb za preklic v ukaz-listi */
.btn-close-sm {
    width: 28px !important;
    height: 28px !important;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* Ikone za done/error v ukaz-listi */
.ukaz-icon        { font-size: 16px; }
.ukaz-icon-done   { color: var(--accent-w); }
.ukaz-icon-error  { color: var(--danger); }

/* ==============================================
   CMD GRID 2×2
   ============================================== */
.cmd-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

/* Gumb, ki zapolni celico */
.btn-cmd-full {
    width: 100%;
}

/* Anchor tag ki izgleda kot btn-cmd */
.btn-cmd-anchor {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

/* Form ki ne jemlje prostora v gridu */
.form-contents {
    display: contents;
}

/* Submit grid za slave ukaz */
.cmd-grid-submit {
    margin-top: 12px;
    margin-bottom: 0;
}

/* ==============================================
   SLAVE UKAZ VRSTICA
   ============================================== */
.slave-ukaz-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.slave-ukaz-col {
    flex: 1;
    min-width: 120px;
    display: flex;
    flex-direction: column;
}

.slave-ukaz-col .section-label {
    margin-bottom: 4px;
}

.slave-ukaz-col .slave-single-panj,
.slave-ukaz-col .slave-dropdown-full,
.slave-ukaz-col .card-select {
    flex: 1;
    margin-top: 8px;
}

.slave-single-panj {
    background: var(--bg-input);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    font-size: 15px;
    color: var(--ink);
}

.slave-dropdown-full {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    font-size: 15px;
    color: var(--ink);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-select-no-margin {
    margin: 0;
}

/* ==============================================
   GPS ACTIONS
   ============================================== */
.gps-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

.gps-action-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* ==============================================
   UTILITY RAZREDI
   ============================================== */

/* Gumb desno */
.btn-row-right {
    display: flex;
    justify-content: flex-end;
}

.btn-row-padded {
    padding: 10px 14px;
}

/* Toggle z razmikom */
.toggle-row-mt {
    margin-top: 16px;
}

/* Flash container z razmikom */
.flash-container-inner {
    margin-bottom: 10px;
}

/* Push gumbi vrstica */
.push-status-text {
    margin-bottom: 12px;
    font-size: 14px;
}

.push-btn-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    margin: 0 0 10px 0;
}

/* Skriti element */
.btn-hidden {
    display: none;
}

.hidden-data {
    display: none;
}

/* Shrani nastavitve — desno */
.btn-row-right .btn-cmd {
    margin: 0 0 10px 0;
}

/* Nastavitve number input — centered */
.setting-number-center {
    text-align: center;
    font-size: 16px;
    font-weight: 700;
}

/* ==============================================
   PROFIL — gumbi
   ============================================== */

/* Velik primarni gumb (enako kot submit) */
.btn-profil-primary {
    width: 50%;
    background: var(--ink);
    color: #fff;
    padding: 12px 20px;
    margin: 12px 0 0;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: opacity 0.15s;
    border: none;
    cursor: pointer;
}
.btn-profil-primary:hover  { opacity: 0.85; }
.btn-profil-primary:active { opacity: 0.7; }

/* Profil desno poravnano */
.profil-btn-row-right {
    text-align: right;
}

/* Grid za naprave gumbe */
.cmd-grid-naprave {
    margin-top: 12px;
    margin-bottom: 0;
    align-items: stretch;
}

.cmd-grid-naprave .btn-cmd,
.cmd-grid-naprave .btn-danger-soft,
.cmd-grid-naprave .btn-cmd-anchor {
    white-space: normal;
    text-align: center;
    line-height: 1.3;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Dropdown button — poln */
.apiary-dropdown-full {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    font-size: 15px;
    color: var(--ink);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.apiary-dropdown-full:hover {
    background: var(--bg-muted);
    border-color: var(--ink-4);
}

/* Card input (za čebelnjak ime) */
.card-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-2);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    color: var(--ink);
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s;
}
.card-input:focus {
    border-color: var(--ink-2);
    background: var(--bg-card);
}

.apiary-selector-row {
    margin-bottom: 8px;
}

/* Modal — skrit razred */
.modal-overlay.modal-hidden {
    display: none !important;
}
