/* UMI Admin — shared dark theme */

:root {
    --bg: #0a0a0d;
    --surface-1: #14141a;
    --surface-2: #1c1c24;
    --surface-3: #25252f;
    --border: rgba(255,255,255,0.08);
    --border-hi: rgba(255,255,255,0.15);

    --text: #f5f5f7;
    --text-muted: #8888a0;
    --text-dim: #5a5a6a;

    --accent: #6366F1;
    --accent-hi: #818cf8;
    --success: #22C55E;
    --warning: #FBBF24;
    --error: #EF4444;

    --radius: 10px;
    --radius-sm: 6px;
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hi); }

/* ===== LOGIN ===== */

.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.login-card {
    width: 100%;
    max-width: 380px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 32px;
}
.login-logo {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #f5e8d0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}
.login-logo img { width: 100%; height: 100%; object-fit: contain; }
.login-title { text-align: center; font-size: 20px; font-weight: 700; margin-bottom: 4px; letter-spacing: 0.3px; }
.login-subtitle { text-align: center; color: var(--text-muted); font-size: 13px; margin-bottom: 28px; }

/* ===== FORM ===== */

.field { margin-bottom: 16px; }
.field-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 600;
}
.input {
    width: 100%;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 15px;
    padding: 12px 14px;
    transition: border-color 0.15s, background 0.15s;
    font-family: inherit;
}
.input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--surface-3);
}
.input::placeholder { color: var(--text-dim); }

.btn {
    width: 100%;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 13px 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    font-family: inherit;
}
.btn:hover:not(:disabled) { background: var(--accent-hi); transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ===== BANNERS ===== */

.banner {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.banner.error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--error);
}
.banner.success {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--success);
}
.banner.info {
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--accent-hi);
}

/* ===== DASHBOARD LAYOUT ===== */

.app {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: var(--surface-1);
    border-right: 1px solid var(--border);
    padding: 20px 0;
    display: flex;
    flex-direction: column;
}
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
}
.sidebar-brand img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f5e8d0;
    padding: 3px;
}
.sidebar-brand .name { font-size: 14px; font-weight: 700; }
.sidebar-brand .sub { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1.5px; }

.nav-section {
    padding: 0 12px;
    margin-bottom: 16px;
}
.nav-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-dim);
    padding: 8px 12px;
    font-weight: 700;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 2px;
    transition: background 0.15s, color 0.15s;
    cursor: pointer;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--surface-3); color: var(--text); }
.nav-item.disabled { opacity: 0.4; cursor: not-allowed; }
.nav-item.disabled:hover { background: transparent; color: var(--text-muted); }
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }

.sidebar-foot {
    margin-top: auto;
    padding: 16px 12px;
    border-top: 1px solid var(--border);
}
.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    font-size: 13px;
}
.user-avatar {
    width: 32px;
    height: 32px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-role { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

.btn-logout {
    width: 100%;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 12px;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn-logout:hover { background: var(--surface-2); border-color: var(--border-hi); color: var(--text); }

/* ===== MAIN CONTENT ===== */

.main { padding: 32px 40px; }
.page-header { margin-bottom: 24px; }
.page-title { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.page-subtitle { color: var(--text-muted); font-size: 14px; }

.card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 16px;
}
.card-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.card-value { font-size: 28px; font-weight: 700; }
.card-sub { color: var(--text-muted); font-size: 13px; margin-top: 4px; }

.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-muted);
}
.empty-state .icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    opacity: 0.4;
}
.empty-state .title { font-size: 16px; color: var(--text); margin-bottom: 6px; }
.empty-state .sub { font-size: 13px; }

/* Mobile */
@media (max-width: 768px) {
    .app { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 280px;
        height: 100vh;
        z-index: 50;
        transition: left 0.25s;
    }
    .sidebar.open { left: 0; }
    .main { padding: 20px; }
}
