 body {
            transition: background-color 0.3s, color 0.3s;
            background-color: #f3f3f3;
        }

        /* HEADER */
        header {
            background-color: #fff;
            border-bottom: 1px solid #ddd;
            padding: 10px 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 1000;
            height: 56px;
        }
        header img.logo {
            height: 40px;
            transition: opacity 0.2s ease;
        }

        /* SIDEBAR */
        .sidebar {
            width: 240px;
            position: fixed;
            top: 56px; /* ispod hedera */
            left: 0;
            height: calc(100% - 56px);
            background-color: #f8f9fa;
            border-right: 1px solid #ddd;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            transition: transform 0.3s ease;
            z-index: 900;
        }
        .sidebar.closed {
            transform: translateX(-100%);
        }
        .sidebar a {
            display: flex;
            align-items: center;
            padding: 12px 20px;
            text-decoration: none;
            color: #333;
            font-weight: 500;
        }
        .sidebar a:hover {
            background-color: #e9ecef;
        }
        .sidebar i {
            margin-right: 10px;
            font-size: 1.2rem;
        }
        .sidebar-bottom {
            border-top: 1px solid #ddd;
            padding: 12px 20px;
        }

        /* CONTENT */
        .content {
            margin-left: 240px;
            margin-top: 56px;
            padding: 15px;
            transition: margin-left 0.3s;
        }
        .content.expanded {
            margin-left: 0;
        }

        /* USER MENU */
        .user-menu {
            position: relative;
            cursor: pointer;
        }
        .user-dropdown {
            display: none;
            position: absolute;
            right: 0;
            background: white;
            border: 1px solid #ddd;
            border-radius: 4px;
            margin-top: 8px;
            min-width: 140px;
            z-index: 100;
        }
        .user-dropdown a {
            display: block;
            padding: 8px 12px;
            color: #333;
            text-decoration: none;
        }
        .user-dropdown a:hover {
            background-color: #f0f0f0;
        }

        /* NOĆNI REŽIM */
        body.dark-mode {
            background-color: #1e1e1e;
            color: #e0e0e0;
        }
        body.dark-mode .sidebar {
            background-color: #2a2a2a;
            border-color: #444;
        }
        body.dark-mode .card {
            background-color: #2a2a2a;
            border-color: #444;
            color: #e0e0e0;
        }

        body.dark-mode .sidebar a {
            color: #ddd;
        }
        body.dark-mode .sidebar a:hover {
            background-color: #333;
        }
        body.dark-mode header {
            background-color: #2a2a2a;
            border-color: #444;
        }
        body.dark-mode .user-dropdown {
            background-color: #2a2a2a;
            border-color: #555;
        }
        body.dark-mode .user-dropdown a {
            color: #ddd;
        }

        @media (max-width: 992px) {
            .sidebar {
                transform: translateX(-100%);
            }
            .sidebar.open {
                transform: translateX(0);
            }
            .content {
                margin-left: 0;
                padding: 10px;
            }
        }

          /* Mobile-specific header adjustments (phones) */
        @media (max-width: 576px) {
            /* hide user full name on small phones, keep brand text and logo as on desktop */
            .user-menu .user-name {
                display: none !important;
            }
        }

        /* Ensure muted text is readable in dark mode */
        body.dark-mode .text-muted {
            color: rgba(230, 238, 248, 0.8) !important; /* light, but slightly muted */
        }
        /* Also adjust any smaller muted note text inside cards */
        body.dark-mode .card .text-muted {
            color: rgba(230, 238, 248, 0.7) !important;
        }

        :root {
  --bg: #0f1115;
  --card: #161a22;
  --text: #e6e6e6;
  --muted: #9aa4b2;
  --accent: #4aa3ff;
  --danger: #ff4a6f;
  --success: #0bd067;
}

.status { margin-top: 10px; min-height: 20px; color: var(--muted); }
.hidden { display: none; }
.status.ok { color: var(--success); }
.status.err { color: var(--danger); }