body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    height: 100vh;
}
.container {
    display: flex;
    width: 100%;
    align-items: stretch;
}

/* ════════════════════════════════════════════════
   Sidebar
   ════════════════════════════════════════════════ */
.sidebar {
    width: 220px;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(184, 146, 42, 0.18) 0%, rgba(184, 146, 42, 0.02) 48%, transparent 72%),
        linear-gradient(180deg, #f7f0e1 0%, #efe4cf 54%, #e4d6bc 100%);
    border-right: 1px solid rgba(133, 92, 32, 0.20);
    box-shadow: 2px 0 18px rgba(80, 52, 18, 0.14);
    padding: 18px 14px 14px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.content {
    margin-left: 220px;
    flex: 1;
    padding: 20px;
}

/* ── Brand ── */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 16px;
    margin-bottom: 6px;
    border-bottom: 1px solid rgba(133, 92, 32, 0.16);
}

.sidebar-ornament {
    font-size: 18px;
    color: #9a6a18;
    opacity: 0.92;
    line-height: 1;
    flex-shrink: 0;
}

.sidebar-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 14px;
    font-weight: 700;
    color: #4f2f12;
    letter-spacing: 0.03em;
    line-height: 1.25;
}

.sidebar-subtitle {
    font-family: system-ui, sans-serif;
    font-size: 9px;
    color: rgba(79, 47, 18, 0.58);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-top: 2px;
}

/* ── Nav ── */
.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-nav ul li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 7px;
    color: rgba(73, 48, 18, 0.76);
    font-family: system-ui, sans-serif;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.14s, color 0.14s;
}

.sidebar-nav ul li a i {
    width: 16px;
    text-align: center;
    font-size: 12px;
    color: rgba(154, 106, 24, 0.80);
    flex-shrink: 0;
    transition: color 0.14s;
}

.sidebar-nav ul li a:hover {
    background: rgba(154, 106, 24, 0.10);
    color: #3f250d;
}

.sidebar-nav ul li a:hover i {
    color: #8a5a10;
}

/* Coming-soon items */
.sidebar-soon a {
    opacity: 0.45;
    cursor: not-allowed !important;
}

.sidebar-soon a:hover {
    background: transparent !important;
    color: rgba(73, 48, 18, 0.42) !important;
}

.sidebar-soon a:hover i {
    color: rgba(154, 106, 24, 0.42) !important;
}

/* Divider */
.sidebar-divider {
    height: 1px;
    background: rgba(133, 92, 32, 0.14);
    margin: 6px 4px;
}

/* ── Spacer ── */
.sidebar-spacer {
    flex: 1;
    min-height: 12px;
}

/* ── User section (logged in) ── */
.sidebar-user {
    padding: 10px 0 4px;
    border-top: 1px solid rgba(133, 92, 32, 0.14);
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: system-ui, sans-serif;
    font-size: 12px;
    color: rgba(73, 48, 18, 0.82);
    margin-bottom: 6px;
    overflow: hidden;
}

.sidebar-user-icon {
    font-size: 16px;
    flex-shrink: 0;
    color: #9a6a18;
}

.sidebar-user-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-badge {
    font-size: 9px;
    background: rgba(154, 106, 24, 0.14);
    color: #8a5a10;
    border: 1px solid rgba(154, 106, 24, 0.24);
    border-radius: 4px;
    padding: 1px 5px;
    flex-shrink: 0;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.sidebar-user-action {
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: system-ui, sans-serif;
    font-size: 12px;
    color: rgba(73, 48, 18, 0.64);
    text-decoration: none;
    padding: 4px 6px;
    border-radius: 6px;
    transition: background 0.13s, color 0.13s;
}

.sidebar-user-action:hover {
    background: rgba(154, 106, 24, 0.09);
    color: #3f250d;
}

.sidebar-user-logout:hover {
    color: #f87171 !important;
    background: rgba(248,113,113,0.08) !important;
}

/* ── Guest buttons ── */
.sidebar-guest {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 0 4px;
    border-top: 1px solid rgba(133, 92, 32, 0.14);
}

.sidebar-guest-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 7px;
    font-family: system-ui, sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    color: rgba(73, 48, 18, 0.78);
    border: 1px solid rgba(154, 106, 24, 0.22);
    transition: background 0.13s, color 0.13s, border-color 0.13s;
}

.sidebar-guest-btn:hover {
    background: rgba(154, 106, 24, 0.09);
    color: #3f250d;
    border-color: rgba(154, 106, 24, 0.34);
}

.sidebar-guest-primary {
    background: rgba(154, 106, 24, 0.13);
    border-color: rgba(154, 106, 24, 0.26);
    color: #4f2f12;
}

.sidebar-guest-primary:hover {
    background: rgba(154, 106, 24, 0.18) !important;
}

/* ── Dark mode toggle ── */
.dark-mode-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-family: system-ui, sans-serif;
    font-size: 12px;
    width: 100%;
    text-align: left;
    transition: background 0.14s, color 0.14s, border-color 0.14s, box-shadow 0.14s, transform 0.14s;
    box-sizing: border-box;
    justify-content: flex-start;
}

.dark-mode-toggle:hover {
    transform: translateY(-1px);
}

.dark-mode-toggle.theme-toggle-target-dark {
    background:
        radial-gradient(circle at top left, rgba(184, 146, 42, 0.14), transparent 45%),
        linear-gradient(180deg, #1a1209 0%, #22160b 55%, #120d13 100%);
    border: 1px solid rgba(184, 146, 42, 0.28);
    color: #f5e6c8;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.dark-mode-toggle.theme-toggle-target-dark:hover {
    background:
        radial-gradient(circle at top left, rgba(184, 146, 42, 0.18), transparent 45%),
        linear-gradient(180deg, #21170c 0%, #2a1c10 55%, #17111a 100%);
    border-color: rgba(184, 146, 42, 0.42);
}

.dark-mode-toggle.theme-toggle-target-light {
    background: linear-gradient(180deg, #fffdf8 0%, #f6efe0 100%);
    border: 1px solid rgba(154, 106, 24, 0.24);
    color: #4f2f12;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.dark-mode-toggle.theme-toggle-target-light:hover {
    background: linear-gradient(180deg, #ffffff 0%, #f1e6d2 100%);
    border-color: rgba(154, 106, 24, 0.36);
}

/* ── Toast notifications ── */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast-notification {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
    max-width: 360px;
    min-width: 220px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    pointer-events: all;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    border-left: 4px solid transparent;
}

.toast-notification.toast-visible {
    opacity: 1;
    transform: translateY(0);
}

.toast-info    { background: #eff6ff; border-left-color: #3b82f6; color: #1e3a5f; }
.toast-warning { background: #fffbeb; border-left-color: #f59e0b; color: #78350f; }
.toast-error   { background: #fef2f2; border-left-color: #ef4444; color: #7f1d1d; }
.toast-success { background: #f0fdf4; border-left-color: #22c55e; color: #14532d; }

.toast-icon {
    margin-top: 2px;
    flex-shrink: 0;
    font-size: 15px;
}

.toast-info    .toast-icon { color: #3b82f6; }
.toast-warning .toast-icon { color: #f59e0b; }
.toast-error   .toast-icon { color: #ef4444; }
.toast-success .toast-icon { color: #22c55e; }

.toast-message { flex: 1; }

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    opacity: 0.5;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
    color: inherit;
}

.toast-close:hover { opacity: 1; }

.theme-toggle-badge {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    font-size: 0.65em;
    background: #f59e0b;
    color: #1a1a1a;
    border-radius: 4px;
    padding: 1px 5px;
    font-weight: 700;
    letter-spacing: 0.03em;
}
