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

:root {
    --sidebar-w: 220px;
    --sidebar-bg: #1e2640;
    --sidebar-hover: #2a3354;
    --sidebar-active: #6366f1;
    --sidebar-text: #94a3b8;
    --sidebar-text-active: #fff;

    --bg: #f1f5f9;
    --surface: #ffffff;
    --border: #e2e8f0;
    --text: #1e293b;
    --text-muted: #64748b;

    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --success: #10b981;
    --warning: #f59e0b;

    --radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
}

html, body { height: 100%; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; }

/* ===== Layout ===== */
#app { min-height: 100vh; }

/* ===== Sidebar ===== */
#sidebar {
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--sidebar-w);
    overflow: hidden;
    z-index: 100;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0px 18px 0px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .3px;
    border-bottom: 1px solid rgba(255,255,255,.07);
}
.sidebar-logo svg#logopic { width: 40px; color: var(--primary); flex-shrink: 0; }
.sidebar-logo svg#logotype { width: 185px; padding-top: 20px; color: var(--primary); flex-shrink: 0; }

#main-nav { padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius);
    color: var(--sidebar-text);
    text-decoration: none;
    font-weight: 500;
    transition: background .15s, color .15s;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item:hover { background: var(--sidebar-hover); color: #cbd5e1; }
.nav-item.active { background: var(--primary); color: var(--sidebar-text-active); }

/* ===== Main ===== */
#main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; width: calc(100% - var(--sidebar-w)); }

#topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow);
}
#page-title { font-size: 20px; font-weight: 700; color: var(--text); }
#topbar-actions { display: flex; gap: 10px; align-items: center; }

#content { padding: 24px 28px; flex: 1; }

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius);
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, transform .1s;
    text-decoration: none;
    white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--border); color: var(--text); }
.btn-secondary:hover { background: #d1d5db; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger-hover); }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-icon { background: transparent; border: none; cursor: pointer; color: var(--text-muted); display: flex; align-items: center; justify-content: center; padding: 4px; border-radius: 4px; }
.btn-icon:hover { background: var(--border); color: var(--text); }

/* ===== Cards ===== */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card-body { padding: 20px; }

/* ===== Tables ===== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th { text-align: left; padding: 10px 14px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); border-bottom: 2px solid var(--border); background: #f8fafc; }
tbody tr { border-bottom: 1px solid var(--border); transition: background .1s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #f8fafc; }
tbody td { padding: 12px 14px; vertical-align: middle; }
.td-actions { display: flex; gap: 6px; }
.td-actions .btn { padding: 4px 10px; font-size: 12px; }

/* ===== Badges ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.badge-green { background: #dcfce7; color: #15803d; }
.badge-yellow { background: #fef9c3; color: #a16207; }
.badge-red { background: #fee2e2; color: #b91c1c; }
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-gray { background: #f1f5f9; color: #475569; }
.badge-purple { background: #ede9fe; color: #6d28d9; }

/* ===== Tags (chips) ===== */
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag { background: #ede9fe; color: #6d28d9; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 500; }

/* ===== Forms ===== */
.form-grid { display: grid; gap: 14px; }
.form-grid-2 { grid-template-columns: 1fr 1fr; }
.form-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1 / -1; }
label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; }

input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="file"],
input[type="password"],
select,
textarea {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: var(--text);
    transition: border-color .15s, box-shadow .15s;
    width: 100%;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}
textarea { resize: vertical; min-height: 80px; }
input[type="file"] { padding: 6px 10px; cursor: pointer; }

/* Passwort-Feld mit Toggle */
.pw-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.pw-wrap input[type="password"],
.pw-wrap input[type="text"] {
    padding-right: 40px;
}
.pw-toggle {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    border-radius: 0 var(--radius) var(--radius) 0;
    transition: color .15s;
}
.pw-toggle:hover { color: var(--primary); }

.form-section { margin-top: 8px; }
.form-section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); padding: 10px 0 6px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }

/* Checkboxes */
.check-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.check-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; flex-shrink: 0; }
.check-row label { font-size: 13px; text-transform: none; letter-spacing: 0; color: var(--text); font-weight: 500; cursor: pointer; }

/* Multi-select checkboxes */
.multiselect { border: 1px solid var(--border); border-radius: var(--radius); max-height: 160px; overflow-y: auto; padding: 6px 0; background: #fff; }
.multiselect-item { display: flex; align-items: center; gap: 8px; padding: 5px 12px; transition: background .1s; cursor: pointer; }
.multiselect-item:hover { background: #f8fafc; }
.multiselect-item input { width: 15px; height: 15px; accent-color: var(--primary); cursor: pointer; flex-shrink: 0; }
.multiselect-item label { font-size: 13px; text-transform: none; letter-spacing: 0; color: var(--text); font-weight: 400; cursor: pointer; }
.multiselect-empty { padding: 10px 12px; color: var(--text-muted); font-size: 13px; }

.form-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 16px; border-top: 1px solid var(--border); margin-top: 16px; }

/* File info */
.file-info { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.file-info a { color: var(--primary); text-decoration: none; }
.file-info a:hover { text-decoration: underline; }

/* ===== Modal ===== */
#modal-overlay {
    position: fixed; inset: 0;
    background: rgba(15,23,42,.5);
    backdrop-filter: blur(2px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
#modal-overlay.hidden { display: none; }

#modal {
    background: var(--surface);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#modal.modal-xl { max-width: 880px; }
#modal.modal-fullwidth { max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); }
#modal-overlay:has(#modal.modal-fullwidth) { padding: 16px; }

#modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
#modal-title { font-size: 17px; font-weight: 700; }

#modal-body {
    padding: 22px;
    overflow-y: auto;
    flex: 1;
}

/* ===== Confirm ===== */
#confirm-overlay {
    position: fixed; inset: 0;
    background: rgba(15,23,42,.5);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
}
#confirm-overlay.hidden { display: none; }
#confirm-box { background: var(--surface); border-radius: 10px; padding: 28px; max-width: 360px; width: 100%; box-shadow: var(--shadow-lg); }
#confirm-msg { font-size: 15px; font-weight: 500; margin-bottom: 20px; }
.confirm-btns { display: flex; gap: 10px; justify-content: flex-end; }

/* ===== Toasts ===== */
#toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; }
.toast {
    padding: 12px 18px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    animation: slideIn .25s ease;
    max-width: 320px;
}
.toast-success { background: #dcfce7; color: #15803d; border-left: 4px solid var(--success); }
.toast-error   { background: #fee2e2; color: #b91c1c; border-left: 4px solid var(--danger); }
.toast-info    { background: #dbeafe; color: #1d4ed8; border-left: 4px solid #3b82f6; }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ===== Loading / Empty ===== */
.loading, .empty-state { padding: 60px 20px; text-align: center; color: var(--text-muted); font-size: 15px; }
.empty-state svg { width: 48px; height: 48px; margin: 0 auto 12px; display: block; opacity: .3; }

/* ===== Event cards ===== */
.events-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }

.event-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s, transform .15s;
}
.event-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.event-card-head { padding: 16px 16px 10px; }
.event-card-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.event-card-price { font-size: 15px; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.event-card-info  { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.event-card-locs  { padding: 8px 16px; border-top: 1px solid var(--border); }
.event-card-locs-title { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin-bottom: 5px; }
.event-card-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: auto;
}

/* ===== Artist detail ===== */
.artist-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.detail-field { margin-bottom: 10px; }
.detail-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin-bottom: 3px; }
.detail-value { font-size: 14px; color: var(--text); }
.detail-value a { color: var(--primary); text-decoration: none; }

/* ===== Location-Artist sections (Event form) ===== */
.loc-sections { display: flex; flex-direction: column; gap: 6px; }

.loc-section {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.loc-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #f8fafc;
    cursor: pointer;
    user-select: none;
}
.loc-header:hover { background: #f1f5f9; }
.loc-header input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; flex-shrink: 0; }
.loc-header-name { font-weight: 600; font-size: 14px; flex: 1; }
.loc-header-size { font-size: 12px; color: var(--text-muted); background: var(--border); padding: 1px 7px; border-radius: 999px; }

.loc-artists-panel { padding: 10px 14px 12px 38px; border-top: 1px solid var(--border); background: #fff; }
.loc-artists-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted); margin-bottom: 6px; }

/* Event card location blocks */
.event-card-locs { padding: 8px 16px 10px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.event-loc-block {}
.event-loc-name { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; }
.event-loc-artists { display: flex; flex-wrap: wrap; gap: 4px; padding-left: 2px; }
.loc-artist-tag { background: #ede9fe; color: #6d28d9; padding: 2px 7px; border-radius: 999px; font-size: 11px; font-weight: 500; }
.loc-artist-empty { font-size: 11px; color: #94a3b8; font-style: italic; }

/* Location table: event-artist groups */
.loc-ev-group { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-bottom: 4px; }
.loc-ev-name { font-size: 11px; font-weight: 700; color: var(--text-muted); background: #f1f5f9; padding: 1px 7px; border-radius: 999px; white-space: nowrap; }

/* ===== Todo list ===== */
.todo-filters { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.filter-btn { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); font-size: 12px; font-weight: 600; cursor: pointer; transition: all .15s; }
.filter-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.filter-select { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 12px; font-weight: 600; cursor: pointer; outline: none; margin-left: 8px; }

.todo-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 8px;
    transition: box-shadow .15s;
}
.todo-item:hover { box-shadow: var(--shadow); }
.todo-item.erledigt { opacity: .6; }
.todo-check { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; flex-shrink: 0; margin-top: 2px; }
.todo-body { flex: 1; }
.todo-title { font-weight: 600; margin-bottom: 2px; font-size: 14px; }
.todo-title.done { text-decoration: line-through; color: var(--text-muted); }
.todo-meta { display: flex; gap: 10px; font-size: 12px; color: var(--text-muted); flex-wrap: wrap; margin-top: 4px; }
.todo-actions { display: flex; gap: 4px; flex-shrink: 0; }

/* ===== Artist Suche ===== */
.artist-search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 14px;
    margin-bottom: 14px;
    box-shadow: var(--shadow);
}
.artist-search-bar svg { color: var(--text-muted); flex-shrink: 0; }
.artist-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    background: transparent;
    color: var(--text);
}
.artist-search-clear {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 14px;
    padding: 0 4px;
    line-height: 1;
}
.artist-search-clear:hover { color: var(--danger); }

/* ===== Artist Add-to-Event Dropdown ===== */
.artist-add-wrap { position: relative; display: inline-block; }
.artist-add-dropdown {
    position: fixed;
    z-index: 1100;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 12px;
    min-width: 220px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.artist-add-dropdown.hidden { display: none; }
.aad-label { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.aad-event-sel, .aad-loc-sel {
    width: 100%;
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    background: var(--surface);
    color: var(--text);
}
.aad-submit { width: 100%; margin-top: 4px; }

/* ===== Event-Artist Details Panel ===== */
#ea-list { display: flex; flex-direction: column; }

.ea-item { padding: 0; border-radius: var(--radius); overflow: hidden; }
.ea-divider { border: none; border-top: 1px solid var(--border); margin: 4px 0; }

.ea-item-header { display: flex; align-items: center; gap: 8px; margin-bottom: 0; }

.ea-toggle {
    cursor: pointer;
    padding: 12px 14px;
    border-radius: var(--radius);
    transition: background .12s;
    user-select: none;
}
.ea-toggle:hover { background: #f1f5f9; }
.ea-toggle-open { background: #f1f5f9; }

.ea-chevron {
    margin-left: auto;
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform .2s;
}
.ea-toggle-open .ea-chevron { transform: rotate(180deg); }

.ea-item-body {
    padding: 0 14px 14px;
}

.ea-time-badge {
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    background: #e0e7ff;
    color: #4338ca;
    border-radius: 999px;
    padding: 2px 8px;
    font-weight: 600;
    white-space: nowrap;
}

.ea-artist-name { font-size: 15px; font-weight: 700; }
.ea-cloud-btn { text-decoration: none; color: var(--primary); border-color: #c7d2fe; }
.ea-cloud-btn:hover { background: #e0e7ff; }

.btn-success-flash { background: var(--success) !important; color: #fff !important; }

.ea-loc-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    margin-bottom: 2px;
}
.ea-loc-header::before {
    content: '';
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
}

/* ===== Spielplan-Tabelle ===== */
.sched-wrap { overflow-x: auto; margin-bottom: 4px; }

.sched-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }

.sched-table thead th {
    background: var(--sidebar-bg);
    color: #fff;
    padding: 10px 14px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid rgba(255,255,255,.1);
}
.sched-loc-head { text-align: center; min-width: 100px; }

/* Jede Zeile = 1 × 15 Minuten = 28px Mindesthöhe */
.sched-table tbody tr { height: 28px; border-bottom: 1px solid var(--border); }
.sched-table tbody td { padding: 0 10px; vertical-align: middle; border-right: 1px solid var(--border); }

/* Zeitspalte sticky */
.sched-table thead th:first-child {
    position: sticky;
    left: 0;
    z-index: 3;
    background: var(--sidebar-bg);
}
.sched-time {
    position: sticky;
    left: 0;
    z-index: 2;
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    min-width: 52px;
    padding-right: 10px !important;
    border-right: 2px solid var(--border) !important;
    background: #f8fafc;
    box-shadow: 2px 0 4px rgba(0,0,0,.05);
}

.sched-cell-active {
    background: #ede9fe;
    vertical-align: top;
    padding: 6px 10px !important;
    min-width: 120px;
}
.sched-cell-empty { background: #fff; }

.sched-artist-name {
    font-weight: 600;
    font-size: 12px;
    color: var(--text);
    line-height: 1.3;
}
.sched-artist-name + .sched-artist-name {
    border-top: 1px dashed #c4b5fd;
    margin-top: 4px;
    padding-top: 4px;
}
.sched-genre {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: #7c3aed;
    opacity: .75;
}

.sched-separator {
    background: var(--sidebar-bg);
    color: rgba(255,255,255,.7);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 5px 12px !important;
}

/* ===== Sidebar Footer (User + Logout) ===== */
.sidebar-footer {
    flex-shrink: 0;
    padding: 12px 10px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(255,255,255,.07);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: var(--sidebar-text);
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
}
.sidebar-user span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-logout {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    border: none;
    border-radius: var(--radius);
    background: transparent;
    color: var(--sidebar-text);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, color .15s;
    text-align: left;
}
.btn-logout:hover { background: rgba(239,68,68,.15); color: #fca5a5; }

/* ===== Login Page ===== */
.login-body {
    background: var(--sidebar-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}
.login-wrap {
    width: 100%;
    max-width: 380px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}
.login-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}
.login-app-name {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .3px;
}
.login-card {
    width: 100%;
    background: var(--surface);
    border-radius: 14px;
    padding: 28px 28px 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,.4);
}
.login-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text);
}
.login-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    border-radius: var(--radius);
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 16px;
}
.login-form { display: flex; flex-direction: column; gap: 14px; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    :root { --sidebar-w: 60px; }
    .sidebar-logo span, .nav-item span { display: none; }
    .sidebar-logo { justify-content: center; padding: 16px 0; }
    .nav-item { justify-content: center; padding: 12px 0; }
    .sidebar-user span { display: none; }
    .sidebar-user { justify-content: center; padding: 8px 0; }
    .btn-logout span { display: none; }
    .btn-logout { justify-content: center; padding: 10px 0; }
    #topbar { padding: 14px 16px; }
    #content { padding: 16px; }
    .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
    #modal { max-height: 100vh; border-radius: 0; }
    .events-grid { grid-template-columns: 1fr; }
    .artist-detail-grid { grid-template-columns: 1fr; }
}
