/* Virtual Event Platform - Admin Panel Styles */

:root {
    --sidebar-width: 260px;
    --header-height: 64px;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-hover: #334155;
    --border-color: #334155;
    --primary: #3b82f6;
    --success: #10b981;
    --text-primary: #f1f5f9;
    --text-muted: #94a3b8;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    margin: 0;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
}
.login-container { width: 100%; max-width: 420px; padding: 1rem; }
.login-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px rgba(0,0,0,.4);
    border: 1px solid var(--border-color);
}
.login-brand { text-align: center; margin-bottom: 2rem; }
.login-brand i { font-size: 2.5rem; color: var(--primary); }
.login-brand h2 { margin: .5rem 0 0; font-weight: 700; }
.login-brand p { color: var(--text-muted); margin: 0; }

/* Admin Layout */
.admin-wrapper { display: flex; min-height: 100vh; }

.admin-sidebar {
    width: var(--sidebar-width);
    background: #0c1222;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 1000;
    transition: transform .3s ease;
}
.sidebar-brand {
    padding: 1.25rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: .75rem;
    border-bottom: 1px solid var(--border-color);
}
.sidebar-brand i { color: var(--primary); font-size: 1.5rem; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: .75rem 0; }
.nav-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem 1.5rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: all .2s;
    font-size: .9rem;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active { background: rgba(59,130,246,.15); color: var(--primary); border-right: 3px solid var(--primary); }
.nav-item i { font-size: 1.1rem; width: 20px; }
.sidebar-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border-color); }
.admin-user { display: flex; align-items: center; gap: .75rem; }
.admin-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--primary); display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: .85rem;
}
.admin-name { font-size: .85rem; font-weight: 600; }
.admin-role { font-size: .75rem; color: var(--text-muted); }

.admin-main { flex: 1; margin-left: var(--sidebar-width); }
.admin-header {
    height: var(--header-height);
    display: flex; align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(15,23,42,.8);
    backdrop-filter: blur(10px);
    position: sticky; top: 0; z-index: 100;
}
.page-title { font-size: 1.25rem; font-weight: 600; margin: 0; flex: 1; }
.admin-content { padding: 1.5rem; }

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}
.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    background: transparent;
}
.table { color: var(--text-primary); --bs-table-bg: transparent; }
.table thead th { border-color: var(--border-color); color: var(--text-muted); font-weight: 500; font-size: .85rem; }
.table td { border-color: var(--border-color); vertical-align: middle; }

/* Stat Cards */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.stat-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; color: #fff;
}
.stat-value { font-size: 1.75rem; font-weight: 700; line-height: 1; }
.stat-label { font-size: .85rem; color: var(--text-muted); margin-top: .25rem; }

/* Lobby Editor */
.lobby-editor { position: relative; min-height: 500px; background: #111; }
.lobby-canvas {
    position: relative; width: 100%; padding-top: 56.25%;
    overflow: hidden; background: #1a1a2e;
}
.lobby-canvas-inner {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background-position: center; background-repeat: no-repeat; background-size: cover;
}
.lobby-placeholder {
    position: absolute; inset: 0; display: flex; flex-direction: column;
    align-items: center; justify-content: center; color: var(--text-muted);
    z-index: 1; pointer-events: none;
}
.hotspot-zone {
    position: absolute; border: 2px dashed var(--primary);
    background: rgba(59,130,246,.2); cursor: grab;
    display: flex; align-items: center; justify-content: center;
    font-size: .75rem; color: #fff; user-select: none;
    z-index: 10; min-width: 40px; min-height: 28px;
    box-sizing: border-box;
}
.hotspot-zone:hover { background: rgba(59,130,246,.35); border-style: solid; }
.hotspot-zone.selected { border-color: #10b981; background: rgba(16,185,129,.25); border-style: solid; }
.hotspot-zone.dragging { cursor: grabbing; opacity: .9; z-index: 20; }
.hotspot-zone .hotspot-label-text {
    pointer-events: none; text-align: center; padding: 2px 6px;
    background: rgba(0,0,0,.55); border-radius: 4px; max-width: 100%;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hotspot-zone .resize-handle {
    position: absolute; right: -1px; bottom: -1px;
    width: 14px; height: 14px; cursor: nwse-resize;
    background: var(--primary); border: 2px solid #fff;
    border-radius: 2px 0 0 0; z-index: 11;
}
.hotspot-zone.selected .resize-handle { background: #10b981; }
.lobby-editor-hint {
    padding: .5rem 1rem; font-size: .8rem; color: var(--text-muted);
    border-top: 1px solid var(--border-color);
}

/* Screen Mapper */
.screen-mapper .mapper-canvas-wrap { position: relative; background: #000; border-radius: 8px; overflow: hidden; }
.screen-mapper .mapper-canvas { padding-top: 56.25%; position: relative; background-size: cover; background-position: center; }
.screen-zone-preview {
    position: absolute; border: 2px solid #f59e0b;
    background: rgba(245,158,11,.2); cursor: pointer;
}

/* Form controls dark theme */
.form-control, .form-select {
    background: var(--bg-dark); border-color: var(--border-color); color: var(--text-primary);
}
.form-control:focus, .form-select:focus {
    background: var(--bg-dark); border-color: var(--primary); color: var(--text-primary);
    box-shadow: 0 0 0 .2rem rgba(59,130,246,.25);
}

@media (max-width: 991px) {
    .admin-sidebar { transform: translateX(-100%); }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-main { margin-left: 0; }
}
