/* ============================================================
   BITEL VPN — style.css  v4
   Teme: light (default) | slate (Tamna)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

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

/* ============================================================
   TEMA: LIGHT (default / bijela)
   ============================================================ */
:root,
[data-theme="light"] {
    --bg-base:      #f0f2f8;
    --bg-surface:   #ffffff;
    --bg-card:      #ffffff;
    --bg-elevated:  #f5f7fd;
    --bg-hover:     #eceffe;
    --border:       #d8ddf0;
    --border-light: #bfc7e8;

    --text-primary:   #1a1d2e;
    --text-secondary: #4a5180;
    --text-muted:     #8890b5;

    --accent:       #3b6ef5;
    --accent-hover: #2558e0;
    --accent-glow:  rgba(59,110,245,0.12);

    --green:        #16a34a;
    --green-bg:     rgba(22,163,74,0.1);
    --yellow:       #d97706;
    --yellow-bg:    rgba(217,119,6,0.1);
    --red:          #dc2626;
    --red-bg:       rgba(220,38,38,0.1);
    --purple:       #7c3aed;
    --teal:         #0d9488;
    --orange:       #ea580c;

    --shadow:       0 2px 12px rgba(0,0,0,0.08);
    --shadow-sm:    0 1px 4px rgba(0,0,0,0.06);
    --input-bg:     #ffffff;
    --table-stripe: rgba(0,0,0,0.02);
    --code-bg:      rgba(59,110,245,0.07);
    --code-color:   #2558e0;
}

/* ============================================================
   TEMA: SLATE (tamna / siva)
   ============================================================ */
[data-theme="slate"] {
    --bg-base:      #1c1f26;
    --bg-surface:   #242830;
    --bg-card:      #2a2f3a;
    --bg-elevated:  #303643;
    --bg-hover:     #363c4a;
    --border:       #3d4455;
    --border-light: #4a5268;

    --text-primary:   #dce0ec;
    --text-secondary: #8d96b0;
    --text-muted:     #5c6480;

    --accent:       #60a5fa;
    --accent-hover: #93c5fd;
    --accent-glow:  rgba(96,165,250,0.15);

    --green:        #34d399;
    --green-bg:     rgba(52,211,153,0.12);
    --yellow:       #fbbf24;
    --yellow-bg:    rgba(251,191,36,0.12);
    --red:          #f87171;
    --red-bg:       rgba(248,113,113,0.12);
    --purple:       #c084fc;
    --teal:         #2dd4bf;
    --orange:       #fb923c;

    --shadow:       0 4px 20px rgba(0,0,0,0.35);
    --shadow-sm:    0 2px 8px rgba(0,0,0,0.2);
    --input-bg:     #1c1f26;
    --table-stripe: rgba(255,255,255,0.02);
    --code-bg:      rgba(96,165,250,0.08);
    --code-color:   #93c5fd;
}

/* ============================================================
   BASE
   ============================================================ */
:root {
    --sidebar-w: 240px;
    --radius:    10px;
    --radius-sm: 6px;
    --font:      'IBM Plex Sans', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
}

html { font-size: 15px; }
body {
    font-family: var(--font);
    background: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    transition: background 0.25s, color 0.25s;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
    width: var(--sidebar-w); min-height: 100vh;
    background: var(--bg-surface); border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    position: fixed; top: 0; left: 0; z-index: 100;
    transition: background 0.25s, border-color 0.25s;
}
.sidebar-logo {
    display: flex; align-items: center; gap: 10px;
    padding: 22px 20px 18px; border-bottom: 1px solid var(--border);
}
.logo-icon-sm { font-size: 26px; color: var(--accent); filter: drop-shadow(0 0 8px var(--accent)); }
.logo-text-sm { display: flex; flex-direction: column; line-height: 1.1; }
.logo-bitel-sm { font-size: 16px; font-weight: 700; letter-spacing: 0.1em; }
.logo-vpn-sm   { font-size: 11px; font-weight: 500; letter-spacing: 0.2em; color: var(--accent); }

.sidebar-nav { flex: 1; padding: 16px 12px; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: var(--radius-sm);
    color: var(--text-secondary); text-decoration: none;
    font-weight: 500; font-size: 0.88rem; transition: all 0.15s;
    border: 1px solid transparent;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active { background: var(--accent-glow); color: var(--accent); border-color: rgba(59,110,245,0.2); }
.nav-icon { font-size: 15px; }

/* Theme switcher */
.theme-switcher {
    padding: 10px 14px 8px;
    border-top: 1px solid var(--border);
}
.theme-label {
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px;
}
.theme-options { display: flex; flex-direction: column; gap: 2px; }
.theme-btn {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 8px; border-radius: var(--radius-sm);
    font-size: 0.82rem; color: var(--text-secondary);
    text-decoration: none; transition: all 0.15s;
    border: 1px solid transparent;
}
.theme-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.theme-btn.active { background: var(--accent-glow); color: var(--accent); border-color: rgba(59,110,245,0.2); font-weight: 600; }
.theme-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.light-dot { background: #f0f2f8; border: 2px solid #3b6ef5; }
.slate-dot { background: #2a2f3a; border: 2px solid #60a5fa; }

.sidebar-footer {
    padding: 12px; border-top: 1px solid var(--border);
    display: flex; align-items: center; gap: 10px;
}
.user-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.user-avatar {
    width: 34px; height: 34px; background: var(--accent); color: white;
    border-radius: 8px; display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.user-details { min-width: 0; }
.user-name { font-size: 0.82rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.btn-logout {
    background: none; border: 1px solid var(--border); color: var(--text-muted);
    width: 32px; height: 32px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; text-decoration: none; font-size: 14px;
    transition: all 0.15s; flex-shrink: 0;
}
.btn-logout:hover { border-color: var(--red); color: var(--red); background: var(--red-bg); }

/* ============================================================
   LAYOUT
   ============================================================ */
.main-wrapper { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }
.main-content { flex: 1; padding: 28px 32px; max-width: 1400px; width: 100%; }
.main-footer { padding: 14px 32px; font-size: 0.78rem; color: var(--text-muted); border-top: 1px solid var(--border); margin-top: auto; }

/* ============================================================
   STATS
   ============================================================ */
.stats-row { display: grid; grid-template-columns: repeat(5,1fr); gap: 12px; margin-bottom: 28px; }
.stat-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 16px 18px; text-align: center;
    transition: border-color 0.2s, background 0.25s;
}
.stat-card:hover { border-color: var(--border-light); }
.stat-value { font-size: 2rem; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 0.72rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.stat-online  .stat-value { color: var(--green); }
.stat-servis  .stat-value { color: var(--yellow); }
.stat-offline .stat-value { color: var(--red); }
.stat-devices .stat-value { color: var(--accent); }

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-title  { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.page-desc   { font-size: 0.88rem; color: var(--text-secondary); margin-top: 2px; }
.page-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: var(--radius-sm);
    font-family: var(--font); font-size: 0.875rem; font-weight: 500;
    cursor: pointer; text-decoration: none; border: 1px solid transparent;
    transition: all 0.15s; white-space: nowrap; line-height: 1;
}
.btn-primary { background: var(--accent); color: white; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-outline { background: transparent; color: var(--text-primary); border-color: var(--border-light); }
.btn-outline:hover { background: var(--bg-hover); border-color: var(--accent); color: var(--accent); }
.btn-danger  { background: transparent; color: var(--red); border-color: rgba(220,38,38,0.35); }
.btn-danger:hover  { background: var(--red-bg); border-color: var(--red); }
.btn-ghost   { background: transparent; color: var(--text-secondary); border-color: var(--border); }
.btn-ghost:hover   { background: var(--bg-hover); color: var(--text-primary); }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 5px 12px; font-size: 0.82rem; }
.btn-xs { padding: 3px 8px;  font-size: 0.78rem; }

/* ============================================================
   SEARCH
   ============================================================ */
.search-bar { margin-bottom: 24px; }
.search-form { display: flex; gap: 8px; align-items: center; }
.search-input-wrap { position: relative; flex: 1; max-width: 480px; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 14px; pointer-events: none; }
.search-input { width: 100%; padding: 9px 12px 9px 36px; }

/* ============================================================
   FORMS
   ============================================================ */
input, select, textarea {
    width: 100%; background: var(--input-bg); border: 1px solid var(--border);
    color: var(--text-primary); padding: 8px 12px; border-radius: var(--radius-sm);
    font-family: var(--font); font-size: 0.875rem; transition: border-color 0.15s, box-shadow 0.15s; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
input::placeholder, textarea::placeholder { color: var(--text-muted); }
select {
    cursor: pointer; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238890b5' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px;
}
textarea { resize: vertical; min-height: 64px; }
.input-disabled { opacity: 0.5; cursor: not-allowed; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 0.78rem; font-weight: 600; color: var(--text-secondary); letter-spacing: 0.03em; text-transform: uppercase; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group-full { grid-column: 1 / -1; }
.form-footer { display: flex; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }

/* ============================================================
   CARD
   ============================================================ */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.card-header { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; margin-bottom: 20px; border-bottom: 1px solid var(--border); }

/* ============================================================
   LOCATION CARDS
   ============================================================ */
.location-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); margin-bottom: 14px; overflow: hidden;
    transition: border-color 0.2s;
}
.location-card:hover { border-color: var(--border-light); }
.location-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 16px; padding: 14px 18px; background: var(--bg-elevated);
    user-select: none; transition: background 0.15s;
}
.location-header:hover { background: var(--bg-hover); }
.location-title-row { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; flex-wrap: wrap; }
.location-name { font-size: 0.98rem; font-weight: 700; }
.location-meta { display: flex; flex-wrap: wrap; gap: 14px; }
.meta-item { font-size: 0.81rem; color: var(--text-secondary); }
.location-actions { display: flex; gap: 6px; flex-shrink: 0; align-items: flex-start; }
.collapse-arrow { font-size: 13px; color: var(--text-muted); }
.device-count-badge {
    display: inline-flex; align-items: center;
    padding: 2px 9px; border-radius: 20px; font-size: 0.7rem; font-weight: 700;
    background: var(--accent-glow); color: var(--accent); border: 1px solid rgba(59,110,245,0.22);
}

/* ============================================================
   STATUS BADGES
   ============================================================ */
.status-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 2px 9px; border-radius: 20px;
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
}
.status-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.status-online  { background: var(--green-bg);  color: var(--green);  border: 1px solid rgba(22,163,74,0.3); }
.status-online::before  { background: var(--green); box-shadow: 0 0 5px var(--green); }
.status-servis  { background: var(--yellow-bg); color: var(--yellow); border: 1px solid rgba(217,119,6,0.3); }
.status-servis::before  { background: var(--yellow); }
.status-offline { background: var(--red-bg);    color: var(--red);    border: 1px solid rgba(220,38,38,0.3); }
.status-offline::before { background: var(--red); }

/* ============================================================
   VPN / ROLE BADGES
   ============================================================ */
.vpn-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: 600; }
.vpn-wireguard { background: rgba(13,148,136,0.1);  color: var(--teal);   border: 1px solid rgba(13,148,136,0.3); }
.vpn-openvpn   { background: rgba(124,58,237,0.1);  color: var(--purple); border: 1px solid rgba(124,58,237,0.3); }
.vpn-ipsec     { background: rgba(234,88,12,0.1);   color: var(--orange); border: 1px solid rgba(234,88,12,0.3); }
.role-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.role-admin { background: var(--accent-glow); color: var(--accent); border: 1px solid rgba(59,110,245,0.3); }
.role-user  { background: rgba(139,145,181,0.12); color: var(--text-secondary); border: 1px solid var(--border); }

/* ============================================================
   TABLES
   ============================================================ */
.devices-section { border-bottom: 1px solid var(--border); }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 0.845rem; }
.table th {
    background: var(--bg-elevated); color: var(--text-muted);
    font-weight: 600; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em;
    padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table th.sortable { cursor: pointer; }
.table th.sortable:hover { color: var(--accent); }
.sort-icon { font-size: 10px; opacity: 0.45; margin-left: 2px; }
.table th.sortable:hover .sort-icon { opacity: 1; }
.table td { padding: 8px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:nth-child(even) td { background: var(--table-stripe); }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: var(--bg-hover); }

code {
    font-family: var(--font-mono); font-size: 0.8rem;
    background: var(--code-bg); color: var(--code-color);
    padding: 1px 6px; border-radius: 4px;
}
.copyable { cursor: pointer; border-bottom: 1px dashed rgba(59,110,245,0.35); transition: background 0.15s; }
.copyable:hover { background: var(--accent-glow) !important; }
.vpn-ip { color: var(--teal) !important; background: rgba(13,148,136,0.07) !important; }
.td-note { max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-secondary); font-size: 0.8rem; }
.td-actions { white-space: nowrap; }

.copy-tooltip {
    position: fixed; z-index: 9999; background: var(--green); color: white;
    padding: 4px 10px; border-radius: 6px; font-size: 0.78rem; font-weight: 600;
    font-family: var(--font-mono); pointer-events: none; opacity: 0; transition: opacity 0.2s;
}
.copy-tooltip.show { opacity: 1; }

/* ============================================================
   ADD DEVICE
   ============================================================ */
.add-device-section { padding: 12px 18px; }
.add-device-form { margin-top: 12px; padding: 18px; background: var(--bg-elevated); border-radius: var(--radius-sm); border: 1px solid var(--border); }
.add-device-form h4 { font-size: 0.8rem; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 14px; }

/* ============================================================
   ALERTS
   ============================================================ */
.alert { display: flex; align-items: center; justify-content: space-between; padding: 11px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: 0.875rem; gap: 10px; }
.alert-success { background: var(--green-bg); color: var(--green); border: 1px solid rgba(22,163,74,0.25); }
.alert-error   { background: var(--red-bg);   color: var(--red);   border: 1px solid rgba(220,38,38,0.25); }
.alert-info    { background: var(--accent-glow); color: var(--accent); border: 1px solid rgba(59,110,245,0.25); }
.alert-close { background: none; border: none; color: inherit; cursor: pointer; font-size: 18px; line-height: 1; opacity: 0.7; padding: 0; flex-shrink: 0; }
.alert-close:hover { opacity: 1; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-secondary); }
.empty-icon  { font-size: 48px; margin-bottom: 14px; opacity: 0.35; }
.empty-state h3 { font-size: 1.1rem; margin-bottom: 6px; color: var(--text-primary); }

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(4px); }
.modal-overlay.active { display: flex; }
.modal { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius); width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow); animation: modalIn 0.2s ease; }
.modal-wide { max-width: 700px; }
@keyframes modalIn { from { transform: translateY(-14px) scale(0.97); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-header h3 { font-size: 1rem; font-weight: 700; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 22px; cursor: pointer; line-height: 1; padding: 0; transition: color 0.15s; }
.modal-close:hover { color: var(--red); }
.modal-body { padding: 20px; }
.modal-footer { display: flex; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--bg-elevated); border-radius: 0 0 var(--radius) var(--radius); }

/* ============================================================
   MISC
   ============================================================ */
.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--text-muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.divider::before, .divider::after { content: ''; flex: 1; border-top: 1px solid var(--border); }
.profile-avatar { width: 50px; height: 50px; background: var(--accent); color: white; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 22px; flex-shrink: 0; }
.text-muted { color: var(--text-muted); font-size: 0.82rem; }

/* ============================================================
   LOGIN
   ============================================================ */
.login-body { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; background: var(--bg-base); }
.login-wrapper { width: 100%; max-width: 400px; padding: 20px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.login-card { width: 100%; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 36px 32px; box-shadow: var(--shadow); }
.login-logo { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 6px; }
.logo-icon { font-size: 38px; color: var(--accent); filter: drop-shadow(0 0 12px var(--accent)); }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-bitel { font-size: 24px; font-weight: 800; letter-spacing: 0.12em; }
.logo-vpn   { font-size: 12px; font-weight: 600; letter-spacing: 0.25em; color: var(--accent); }
.login-subtitle { text-align: center; color: var(--text-muted); font-size: 0.85rem; margin-bottom: 26px; }
.login-card .form-group { margin-bottom: 16px; }
.login-footer { font-size: 0.78rem; color: var(--text-muted); }

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) { .stats-row { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .main-wrapper { margin-left: 0; }
    .main-content { padding: 16px; }
    .form-grid { grid-template-columns: 1fr; }
    .form-group-full { grid-column: auto; }
    .page-header { flex-direction: column; }
    .location-header { flex-direction: column; }
    .search-form { flex-wrap: wrap; }
    .search-input-wrap { max-width: 100%; }
    .stats-row { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 480px) { .login-card { padding: 24px 18px; } }

/* ============================================================
   VPN IP — ISTAKNUTO U APLIKACIJI
   ============================================================ */

/* Zaglavlje kolone VPN IP — posebna boja */
/* Zaglavlje VPN IP kolone */
.th-vpnip-DISABLED {
    background: rgba(0,0,0,0.12) !important;
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--border) !important;
}

/* Cijeli stupac VPN IP — 20% tamniji od ostatka */
.td-vpnip { }



/* Tekst VPN IP — bold, malo veći */
code.vpn-ip-code,
td.td-vpnip code {
    font-family: var(--font-mono) !important;
    font-size: 0.88rem !important;
    font-weight: 800 !important;
    color: var(--text-primary) !important;
    background: transparent !important;
    padding: 2px 0 !important;
    border-radius: 0 !important;
    letter-spacing: 0.02em !important;
    cursor: pointer;
    border-bottom: none !important;
    text-decoration: none !important;
}
code.vpn-ip-code:hover,
td.td-vpnip code:hover {
    opacity: 0.7;
}

/* ============================================================
   RESPONSIVE SIDEBAR — hamburger menu
   ============================================================ */
.hamburger {
    display: none;
    position: fixed;
    top: 12px; left: 12px;
    z-index: 200;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    width: 40px; height: 40px;
    align-items: center; justify-content: center;
    cursor: pointer; font-size: 20px;
    box-shadow: var(--shadow);
    color: var(--text-primary);
}

.sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
    backdrop-filter: blur(2px);
}

/* ============================================================
   RESPONSIVE — MOBITEL (tablica → kartice)
   ============================================================ */
@media (max-width: 900px) {
    .stats-row { grid-template-columns: repeat(3,1fr); }
}

@media (max-width: 768px) {
    /* Sidebar slide-in */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 150;
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay.open { display: block; }
    .hamburger { display: flex; }

    .main-wrapper { margin-left: 0; }
    .main-content { padding: 14px 12px; padding-top: 60px; }

    /* Stats */
    .stats-row { grid-template-columns: repeat(2,1fr); gap: 8px; margin-bottom: 16px; }
    .stat-value { font-size: 1.6rem; }

    /* Page header */
    .page-header { flex-direction: column; gap: 10px; margin-bottom: 16px; }
    .page-title { font-size: 1.2rem; }
    .page-actions { width: 100%; }
    .page-actions .btn { flex: 1; justify-content: center; font-size: 0.82rem; }

    /* Search */
    .search-form { flex-wrap: wrap; }
    .search-input-wrap { max-width: 100%; flex: 1 1 100%; }

    /* Location header */
    .location-header { flex-direction: column; gap: 10px; }
    .location-actions { width: 100%; justify-content: flex-end; }

    /* Tablica → kartice na mobitelu */
    .table thead { display: none; }
    .table tbody tr {
        display: block;
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        margin-bottom: 10px;
        padding: 4px 0;
    }
    .table tbody tr:nth-child(even) { background: var(--bg-card); }
    .table tbody tr:hover td { background: transparent; }

    .table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 7px 14px;
        border-bottom: 1px solid var(--border);
        font-size: 0.85rem;
    }
    .table td:last-child { border-bottom: none; }

    /* data-label kao labela s lijeve strane */
    .table td[data-label]::before {
        content: attr(data-label);
        font-size: 0.7rem;
        font-weight: 700;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.06em;
        flex-shrink: 0;
        margin-right: 12px;
        min-width: 80px;
    }

    /* VPN IP — tamnija na mobitelu */
    .table td.td-vpnip { }
    .table td.td-vpnip::before {
        font-weight: 800 !important;
    }

    /* Akcije */
    .td-actions { justify-content: flex-end; gap: 6px; }
    .td-actions::before { display: none; }

    /* td-note puni tekst na mobitelu */
    .td-note { max-width: none; white-space: normal; }

    /* Forme */
    .form-grid { grid-template-columns: 1fr; }
    .form-group-full { grid-column: auto; }

    /* Modali */
    .modal { max-width: 100%; margin: 10px; }
    .modal-wide { max-width: 100%; }

    .main-footer { padding: 12px 16px; }
}

@media (max-width: 480px) {
    .stats-row { grid-template-columns: 1fr 1fr; gap: 6px; }
    .stat-card { padding: 12px 10px; }
    .stat-value { font-size: 1.4rem; }
    .login-card { padding: 24px 18px; }
    .page-actions { flex-direction: column; }
    .page-actions .btn { width: 100%; }
}

/* === GREETING BAR === */
.greeting-bar {
    margin-bottom: 20px;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: inline-block;
}
.greeting-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
}
.greeting-text strong {
    color: var(--text-primary);
    font-weight: 700;
}

/* === KAMERE / SNIMAČI === */
.cameras-section {
    border-top: 1px dashed var(--border);
    background: var(--bg-elevated);
}
.cameras-title {
    padding: 7px 20px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.03em;
}
.cameras-title em {
    color: var(--text-primary);
    font-style: normal;
    font-weight: 700;
}
.table-cameras th {
    background: var(--bg-base);
    font-size: 0.68rem;
}
.cam-badge {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}
.cam-kamera { background: rgba(59,110,245,0.1); color: var(--accent); border: 1px solid rgba(59,110,245,0.25); }
.cam-nvr    { background: rgba(13,148,136,0.1); color: var(--teal);   border: 1px solid rgba(13,148,136,0.25); }
.cam-dvr    { background: rgba(168,85,247,0.1); color: var(--purple); border: 1px solid rgba(168,85,247,0.25); }
.cam-snimač { background: rgba(249,115,22,0.1); color: var(--orange); border: 1px solid rgba(249,115,22,0.25); }
.add-camera-wrap { border-top: 1px dashed var(--border); }
