@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

html,
body {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html,
    body {
        scroll-behavior: auto;
    }
}

:root {
    --bg-0: #050505;
    --bg-1: #0a0a0a;
    --bg-2: #121212;
    --bg-3: #1a1a1a;
    --border-1: #202020;
    --border-2: #2a2a2a;
    --text-1: #ffffff;
    --text-2: #a1a1aa;
    --text-3: #71717a;
    --accent: #22c55e;
    --accent-hover: #16a34a;
    --accent-dim: rgba(34, 197, 94, 0.15);
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #9ca3af;
    --radius-s: 8px;
    --radius-m: 16px;
    --radius-l: 24px;
    --font-main: 'Plus Jakarta Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-font-smoothing: antialiased; }

body {
    background-color: var(--bg-1); color: var(--text-1);
    font-family: var(--font-main);
    line-height: 1.5; min-height: 100vh; overflow-x: hidden;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; outline: none; border: none; color: inherit; background: transparent; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; display: block; }

#dotPattern {
    position: fixed; inset: 0; z-index: -1;
    width: 100%; height: 100%; pointer-events: none;
    opacity: 0.15;
}

.magic-card {
    position: relative; overflow: hidden;
    background: var(--bg-2);
    border: 1px solid var(--border-1);
    border-radius: var(--radius-m);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.magic-card::before {
    content: ""; position: absolute; inset: 0;
    border-radius: inherit; z-index: 1; opacity: 0;
    transition: opacity 0.3s;
    background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(255,255,255,0.06), transparent 40%);
    pointer-events: none;
}
.magic-card:hover::before { opacity: 1; }
.magic-card-content { position: relative; z-index: 2; height: 100%; }

.auth-magic-card {
    --mouse-x: 50%;
    --mouse-y: 50%;
    position: relative;
    isolation: isolate;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #070708;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.auth-magic-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: radial-gradient(
        240px circle at var(--mouse-x) var(--mouse-y),
        rgba(34, 197, 94, 0.95) 0%,
        rgba(34, 197, 94, 0.45) 30%,
        rgba(255, 255, 255, 0.16) 48%,
        rgba(255, 255, 255, 0) 72%
    );
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.22s ease;
    pointer-events: none;
    z-index: 3;
}

.auth-magic-card:hover::after {
    opacity: 1;
}

.auth-magic-card::before {
    display: none;
}

.dynamic-island {
    position: fixed; top: 15px; left: 50%; transform: translateX(-50%);
    background: rgba(10, 10, 10, 0.7); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-1); border-radius: 100px;
    padding: 8px 18px; display: flex; align-items: center; gap: 20px;
    z-index: 2000; box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}
.island-logo { font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.island-logo .emogir-logo { width: 34px !important; height: 34px !important; margin-right: 0; }
.island-nav a { font-size: 13px; font-weight: 600; color: var(--text-2); transition: var(--transition); }
.island-nav a:hover { color: var(--accent); }
.island-buttons { display: flex; gap: 8px; }
.island-btn { background: var(--bg-3); padding: 7px 14px; border-radius: 100px; font-size: 12px; font-weight: 700; border: 1px solid var(--border-2); transition: var(--transition); color: var(--text-1); display: inline-block; cursor: pointer; }
.island-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); transform: translateY(-1px); }

.auth-page, .auth-wrapper {
    width: 100vw; height: 100vh;
    display: flex; align-items: center; justify-content: center;
    position: fixed; top: 0; left: 0; z-index: 1000;
}

.auth-box { text-align: left; width: 100%; max-width: 440px; padding: 20px; }
.auth-card { padding: 40px; }

.auth-logo { font-size: 26px; font-weight: 800; letter-spacing: -1px; margin-bottom: 5px; color: var(--text-1); }
.auth-subtitle { color: var(--text-2); margin-bottom: 30px; font-size: 14px; }
.auth-links { margin-top: 20px; font-size: 13px; color: var(--text-3); text-align: center; }
.auth-links a { color: var(--accent); font-weight: 600; text-decoration: none; }

.auth-notice {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding: 11px 12px;
    border-radius: 12px;
    border: 1px solid transparent;
    overflow: hidden;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    animation: authNoticeIn 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-notice i {
    position: relative;
    z-index: 2;
    font-size: 14px;
}

.auth-notice span {
    position: relative;
    z-index: 2;
}

.auth-notice::after {
    content: "";
    position: absolute;
    top: -1px;
    bottom: -1px;
    left: -42%;
    width: 42%;
    transform: skewX(-18deg);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: authNoticeSweep 1.05s ease;
    pointer-events: none;
}

.auth-notice-success {
    color: #dcfce7;
    border-color: rgba(34, 197, 94, 0.45);
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.22), rgba(34, 197, 94, 0.08));
    box-shadow: 0 10px 24px rgba(34, 197, 94, 0.14);
}

.auth-notice-success i {
    color: #4ade80;
}

.auth-notice-error {
    color: #fee2e2;
    border-color: rgba(239, 68, 68, 0.45);
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.07));
    box-shadow: 0 10px 24px rgba(239, 68, 68, 0.14);
}

.auth-notice-error i {
    color: #fca5a5;
}

@keyframes authNoticeIn {
    0% {
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
        filter: blur(2px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes authNoticeSweep {
    0% { transform: translateX(0) skewX(-18deg); opacity: 0; }
    20% { opacity: 1; }
    100% { transform: translateX(420%) skewX(-18deg); opacity: 0; }
}

.layout { display: flex; min-height: 100vh; width: 100%; }

.sidebar {
    width: 260px; background: var(--bg-0);
    display: flex; flex-direction: column; height: 100vh;
    position: fixed; left: 0; top: 0; padding: 25px 20px; z-index: 100;
    border-right: 1px solid var(--border-1);
}

.main-content {
    flex: 1; margin-left: 260px; padding: 40px 60px;
    min-width: 0; position: relative; background: var(--bg-1);
}

.sidebar-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 35px; color: var(--text-1); }
.sidebar-logo span { font-weight: 800; font-size: 24px; letter-spacing: -1px; }

.sidebar-nav { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.sidebar-nav::-webkit-scrollbar { display: none; }

.nav-group-title {
    font-size: 11px; font-weight: 700; color: var(--text-3);
    text-transform: uppercase; letter-spacing: 1px;
    margin: 20px 0 8px 12px; display: flex; align-items: center; gap: 8px;
}
.nav-group-title i { font-size: 10px; }

.sidebar-nav a {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px;
    border-radius: var(--radius-l); color: var(--text-2);
    font-weight: 600; font-size: 14px; transition: var(--transition);
}
.sidebar-nav a i { font-size: 16px; width: 20px; text-align: center; }
.sidebar-nav a:hover { background: var(--bg-2); color: var(--text-1); }
.sidebar-nav a.active { background: var(--accent-dim); color: var(--accent); }

.sidebar-bottom { margin-top: auto; padding-top: 20px; }
.sidebar-cta { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.btn-outline-accent { background: transparent; border: 1px solid var(--accent); color: var(--accent); }
.btn-outline-accent:hover { background: var(--accent); color: #fff; }

.sidebar-user {
    display: flex; align-items: center; justify-content: space-between;
    background: transparent; padding: 10px; border-radius: var(--radius-m);
    transition: var(--transition); cursor: pointer; border: 1px solid transparent;
}
.sidebar-user:hover { background: var(--bg-2); border-color: var(--border-1); }
.user-info-left { display: flex; align-items: center; gap: 10px; overflow: hidden; }
.user-info-left img { width: 36px !important; height: 36px !important; border-radius: 8px; object-fit: cover; }
.user-info-left .name { font-weight: 700; color: var(--text-1); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-info-left .uid { font-size: 11px; color: var(--text-3); font-weight: 600; }
.logout-btn { color: var(--danger); background: rgba(239, 68, 68, 0.1); width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 8px; transition: var(--transition); }
.logout-btn:hover { background: var(--danger); color: #fff; transform: scale(1.05); }

.user-snippet { display: flex; align-items: center; justify-content: space-between; background: transparent; padding: 10px; border-radius: 12px; transition: var(--transition); cursor: pointer; border: 1px solid transparent; }
.user-snippet:hover { background: var(--bg-2); border-color: var(--border-1); }

.main-content img { max-width: 100%; height: auto; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; gap: 20px; }
.topbar h2 { font-size: 26px; font-weight: 700; display: flex; align-items: center; gap: 10px; margin: 0; }
.user-pill { display: flex; align-items: center; gap: 10px; background: var(--bg-2); padding: 8px 16px; border-radius: 100px; border: 1px solid var(--border-1); font-weight: 600; font-size: 14px; }
.user-pill img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-bottom: 30px; }
.stat-card {
    background: var(--bg-2); border: 1px solid var(--border-1);
    padding: 20px; border-radius: var(--radius-m);
    display: flex; flex-direction: column; justify-content: space-between;
    min-height: 120px; transition: var(--transition);
}
.stat-card:hover { transform: translateY(-2px); border-color: var(--border-2); }
.stat-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.stat-card-title { font-size: 13px; font-weight: 600; color: var(--text-2); }
.stat-card-icon { color: var(--accent); }
.stat-card-value { font-size: 32px; font-weight: 800; line-height: 1; }
.stat-card-footer { margin-top: 10px; font-size: 12px; color: var(--text-3); }

.badges-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 15px; }
.badge-card {
    background: var(--bg-2); border: 1px solid var(--border-1);
    padding: 18px; border-radius: var(--radius-m);
    display: flex; align-items: center; gap: 15px;
    transition: var(--transition);
}
.badge-card:hover { border-color: var(--border-2); background: var(--bg-3); }
.badge-card-icon {
    width: 44px; height: 44px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; flex-shrink: 0; background: rgba(255,255,255,0.03);
}
.badge-card-info { flex: 1; min-width: 0; }
.badge-card-title { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.badge-card-desc { font-size: 12px; color: var(--text-3); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge-card-action { display: flex; align-items: center; gap: 10px; }

.card { background: var(--bg-2); border: 1px solid var(--border-1); border-radius: var(--radius-l); padding: 30px; margin-bottom: 30px; }
.card-header, .card-title { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 12px; margin-bottom: 20px; color: var(--text-1); }

.emogir-logo {
    display: inline-block;
    width: 32px;
    height: 32px;
    background-color: var(--accent);
    -webkit-mask: url('/app/assets/dsa.png') no-repeat center / contain;
    mask: url('/app/assets/dsa.png') no-repeat center / contain;
    vertical-align: middle;
    margin-right: 4px;
}

.feature-item .feature-icon {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.feature-item:hover .feature-icon {
    color: var(--accent);
    transform: scale(1.15) translateY(-2px);
}

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--text-2); }
input[type="text"], input[type="email"], input[type="password"], input[type="url"], textarea, select {
    width: 100%; padding: 12px 16px; background: var(--bg-3);
    border: 1px solid var(--border-1); border-radius: 10px;
    color: var(--text-1); font-size: 14px; transition: var(--transition);
    outline: none;
}
input:focus, textarea:focus, select:focus { border-color: rgba(255,255,255,0.2); box-shadow: 0 0 0 4px rgba(255,255,255,0.05); }

input[type="file"] {
    background: var(--bg-3); padding: 10px; border-radius: 8px; border: 1px dashed var(--border-2);
    font-size: 12px; color: var(--text-2); cursor: pointer;
}
input[type="file"]::file-selector-button {
    background: var(--bg-2); border: 1px solid var(--border-1); padding: 5px 12px; border-radius: 6px;
    color: var(--text-1); font-size: 11px; margin-right: 15px; transition: var(--transition);
}
input[type="file"]::file-selector-button:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.btn {
    padding: 12px 24px; border-radius: 10px; font-weight: 700; font-size: 14px;
    cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    border: none;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0,0,0,0.3); }
.btn-primary { background: rgba(34, 197, 94, 0.1); border: 1px solid rgba(34, 197, 94, 0.3); color: var(--accent); }
.btn-primary:hover { filter: brightness(1.1); box-shadow: 0 0 20px var(--accent) 44; }
.btn-secondary { background: var(--bg-3); color: var(--text-1); border: 1px solid var(--border-2); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: rgba(239, 68, 68, 0.1); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.2); }
.btn-danger:hover { background: #ef4444; color: #fff; }
.btn-remove { 
    width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
    background: rgba(239,68,68,0.1); color: #ef4444; border: 1px solid rgba(239,68,68,0.15); transition: var(--transition);
}
.btn-remove:hover { background: #ef4444; color: #fff; transform: scale(1.1); }
.btn-ghost { background: transparent; color: var(--text-2); border: 1px solid transparent; }
.btn-ghost:hover { background: var(--bg-3); color: var(--accent); border-color: var(--border-1); }
.btn-sm { padding: 8px 16px; font-size: 13px; border-radius: 10px; }

input[type="file"] {
    background: rgba(255,255,255,0.02); border: 1px dashed var(--border-2);
    padding: 15px; border-radius: 12px; cursor: pointer;
    color: var(--text-2); text-align: center; display: block;
}
input[type="file"]::file-selector-button {
    background: var(--bg-3); color: var(--text-1);
    border: 1px solid var(--border-1); padding: 8px 16px;
    border-radius: 8px; margin-right: 15px; cursor: pointer;
    font-family: inherit; font-weight: 600; font-size: 13px;
    transition: var(--transition);
}
input[type="file"]:hover::file-selector-button { background: var(--accent); border-color: var(--accent); color: #fff; }

input[type="color"] {
    -webkit-appearance: none; appearance: none; border: none; width: 100%; height: 50px;
    border-radius: 12px; padding: 0; background: none; cursor: pointer;
    overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border: none; border-radius: 12px; }

input[type="checkbox"] {
    appearance: none; -webkit-appearance: none;
    width: 44px; height: 22px; background: var(--bg-3);
    border: 1px solid var(--border-1); border-radius: 20px;
    position: relative; cursor: pointer; transition: var(--transition);
}
input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent); }
input[type="checkbox"]::before {
    content: ""; position: absolute; top: 2px; left: 2px;
    width: 16px; height: 16px; background: #fff;
    border-radius: 50%; transition: var(--transition);
}
input[type="checkbox"]:checked::before { transform: translateX(22px); }

.pink-accent { color: var(--accent) !important; font-family: 'Playfair Display', serif !important; font-style: italic !important; }

.toggle { position: relative; display: inline-block; width: 44px; height: 24px; vertical-align: middle; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; cursor: pointer; left: 0; right: 0; bottom: 0; top: 0;
    background-color: var(--bg-3); transition: .4s; border-radius: 24px;
    border: 1px solid var(--border-2);
}
.toggle-slider:before {
    position: absolute; content: ""; height: 16px; width: 16px;
    left: 3px; bottom: 3px; background-color: var(--text-2);
    transition: .4s; border-radius: 50%;
}
.toggle input:checked + .toggle-slider { background-color: rgba(34, 197, 94, 0.2); border-color: var(--accent); }
.toggle input:checked + .toggle-slider:before { transform: translateX(20px); background-color: var(--accent); box-shadow: 0 0 10px var(--accent); }

.unsaved-bar {
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(100px);
    background: rgba(18, 18, 18, 0.9); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-1); padding: 12px 24px; border-radius: 100px;
    display: flex; align-items: center; gap: 30px; z-index: 5000;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    width: auto; min-width: 400px; justify-content: space-between;
}
.unsaved-bar.active { transform: translateX(-50%) translateY(0); }
.unsaved-bar span { font-weight: 600; font-size: 15px; color: var(--text-1); }
.btn-reset { background: transparent; color: var(--text-3); font-weight: 600; font-size: 14px; cursor: pointer; transition: var(--transition); border: none; }
.btn-reset:hover { color: var(--text-1); }
.btn-save-floating { background: var(--accent); color: #fff; padding: 10px 24px; border-radius: 100px; font-weight: 700; font-size: 14px; transition: var(--transition); border: none; cursor: pointer; }
.btn-save-floating:hover { transform: scale(1.05); box-shadow: 0 0 20px rgba(34, 197, 94, 0.4); }

/* --------------------------------------------------------------------------
   TABLES
-------------------------------------------------------------------------- */
.table-wrap { width: 100%; overflow-x: auto; border-radius: var(--radius-s); border: 1px solid var(--border-1); }
table { width: 100%; border-collapse: collapse; background: var(--bg-2); }
table th { text-align: left; padding: 14px 20px; color: var(--text-3); font-size: 12px; font-weight: 600; border-bottom: 1px solid var(--border-1); background: var(--bg-0); }
table td { padding: 16px 20px; border-bottom: 1px solid var(--border-1); font-size: 14px; color: var(--text-2); }
table tr:hover { background: var(--bg-3); }
table img { width: 32px !important; height: 32px !important; border-radius: 6px; }

/* --------------------------------------------------------------------------
   UTILITIES & LOADER
-------------------------------------------------------------------------- */
.badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 700; }
.badge-admin { background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(34, 197, 94, 0.3); }

/* Loader - LoaderOne (Spinner ring) */
.page-loader {
    position: fixed; inset: 0; background: var(--bg-0);
    z-index: 9999; display: flex; align-items: center; justify-content: center;
    transition: opacity 0.4s;
}
.page-loader.hidden { opacity: 0; pointer-events: none; }

.loader-one {
    width: 48px; height: 48px;
    border: 4px solid var(--border-2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Blurs & Status */
.blur-sensitive { filter: blur(6px); transition: filter 0.2s; cursor: crosshair; }
.blur-sensitive:hover { filter: blur(0); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.status-dot.online { background: var(--success); box-shadow: 0 0 10px var(--success); }
.status-dot.offline { background: var(--text-3); }

/* --------------------------------------------------------------------------
   MODAL / POPUP
-------------------------------------------------------------------------- */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px); display: none;
    align-items: center; justify-content: center; z-index: 10000;
}
.modal-overlay.active { display: flex; }
.modal-box {
    background: var(--bg-2); border: 1px solid var(--border-1);
    border-radius: var(--radius-l); padding: 30px; width: 100%; max-width: 500px;
    box-shadow: var(--shadow-m); animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.toast-msg { 
    position: fixed; bottom: 20px; right: 20px; z-index: 999999;
    background: var(--bg-2); border: 1px solid var(--border-1); 
    padding: 16px 20px; border-radius: var(--radius-m); 
    display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 600;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    animation: toastSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast-error { border-left: 4px solid var(--danger); }
.toast-success { border-left: 4px solid var(--success); }

@keyframes toastSlide {
    0% { transform: translateX(100%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}
.profile-v2 {
    max-width: 600px; width: 90%; margin: 60px auto; 
    border-radius: 12px; overflow: hidden; height: auto; 
    position: relative; z-index: 10; 
    background: rgba(10,10,10,0.6); backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,0.08);
}
.v2-banner { width: 100%; height: 180px; background-size: cover; background-position: center; position: relative; }
.v2-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent, #080808); }

.v2-content { padding: 0 40px 40px 40px; position: relative; margin-top: -50px; }
.v2-header { display: flex; align-items: flex-end; gap: 20px; margin-bottom: 20px; }
.v2-avatar {
    width: 120px; height: 120px; border-radius: 4px; border: 4px solid #080808;
    background: #000; overflow: hidden; position: relative; z-index: 5;
}
.v2-avatar img { width: 100%; height: 100%; object-fit: cover; }

.v2-info { flex: 1; }
.v2-username { font-size: 38px; font-weight: 800; color: #fff; line-height: 1; margin-bottom: 5px; display: flex; align-items: center; gap: 15px; }
.v2-badges-box { background: rgba(255,255,255,0.05); padding: 5px 12px; border-radius: 6px; display: flex; gap: 8px; align-items: center; }
.v2-bio-line { font-size: 14px; color: #999; margin: 5px 0; }
.v2-bio-line span { font-weight: 700; font-family: var(--font-serif); font-style: italic; color: #eee; }

.v2-tags { display: flex; gap: 10px; margin: 20px 0; }
.v2-tag { background: #111; border: 1px solid #222; padding: 4px 12px; border-radius: 4px; font-size: 12px; color: #eee; }

.v2-socials { display: flex; justify-content: center; gap: 25px; margin: 30px 0; }
.v2-social-link { font-size: 32px; color: #22c55e; transition: var(--transition); opacity: 0.8; }
.v2-social-link:hover { opacity: 1; transform: scale(1.1) rotate(-5deg); }

.v2-activity { background: rgba(255,255,255,0.03); border-radius: 10px; padding: 16px; display: flex; align-items: center; gap: 15px; margin-top: 24px; border: 1px solid rgba(255,255,255,0.05); position: relative; }
.v2-activity-img { width: 50px; height: 50px; border-radius: 10px; box-shadow: 0 4px 12px rgba(0,0,0,0.4); }
.v2-activity-info { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.v2-activity-title { font-size: 14px; font-weight: 800; color: #fff; text-transform: uppercase; letter-spacing: 0.5px; }
.v2-activity-sub { font-size: 13px; color: #aaa; font-weight: 500; }
.v2-activity-icon { position: absolute; top: 16px; right: 20px; font-size: 18px; color: #5865F2; opacity: 0.8; }

/* Discord Badges Block */
.v2-discord-badges { display: flex; gap: 4px; margin-top: 10px; }
.v2-discord-badge { width: 20px; height: 20px; background-size: contain; background-repeat: no-repeat; }

/* Status Rings */
.v2-avatar-wrap { position: relative; display: inline-block; }
.v2-status-dot { position: absolute; bottom: 8px; right: 8px; width: 24px; height: 24px; border-radius: 50%; border: 4px solid #080808; background: #3ba55d; z-index: 10; }
.v2-status-dot.idle { background: #faa61a; }
.v2-status-dot.dnd { background: #f04747; }
.v2-status-dot.offline { background: #747f8d; }

/* Layout Selector in Dashboard */
.layout-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 15px; margin-top: 10px; }
.layout-option { 
    position: relative; cursor: pointer; border: 2px solid var(--border-1); border-radius: 12px; overflow: hidden; 
    transition: var(--transition); background: var(--bg-0); height: 120px; 
}
.layout-option img { width: 100%; height: 100%; object-fit: cover; opacity: 0.5; filter: grayscale(1); }
.layout-option:hover { border-color: var(--border-2); }
.layout-option.active { border-color: var(--accent); scale: 1.02; box-shadow: 0 0 15px var(--accent) 44; }
.layout-option.active img { opacity: 1; filter: none; }
.layout-option input { display: none; }
.layout-label { position: absolute; bottom: 0; left: 0; right: 0; padding: 6px; background: rgba(0,0,0,0.8); text-align: center; font-size: 11px; font-weight: 700; color: #fff; }

.effect-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-1);
    border-radius: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 13px;
    color: var(--text-2);
    user-select: none;
}
.effect-toggle:hover { border-color: var(--border-2); color: var(--text-1); }
.effect-toggle input[type="checkbox"] { width: 16px; height: 16px; }
.effect-toggle span { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }

.profile-v3 { 
    max-width: 900px; width: 95%; margin: 100px auto; 
    display: grid; grid-template-columns: 320px 1fr; gap: 20px; 
    color: #fff; position: relative; z-index: 10; 
}
@media(max-width: 768px) { .profile-v3 { grid-template-columns: 1fr; } }
.v3-card { background: rgba(10,10,10,0.6); backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,0.05); border-radius: 24px; padding: 30px; position: relative; overflow: hidden; }
.v3-avatar { width: 100px; height: 100px; border-radius: 20px; margin-bottom: 20px; border: 2px solid rgba(255,255,255,0.1); }
.v3-username { font-size: 24px; font-weight: 800; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.v3-bio { font-size: 14px; color: #aaa; line-height: 1.6; }
.v3-stats { display: flex; gap: 15px; margin-top: 25px; }
.v3-stat { background: rgba(255,255,255,0.03); padding: 10px 15px; border-radius: 15px; flex: 1; text-align: center; }
.v3-stat-val { display: block; font-size: 16px; font-weight: 800; }
.v3-stat-lbl { font-size: 10px; color: #666; text-transform: uppercase; letter-spacing: 1px; }

.v2-music { margin-top: 30px; padding: 20px; background: rgba(10,10,10,0.5); border-radius: 12px; border: 1px solid rgba(255,255,255,0.05); backdrop-filter: blur(5px); }
.v2-music-info { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.v2-music-title { font-size: 13px; font-weight: 700; color: #ddd; }
.music-ctrl-btn { cursor: pointer; color: #fff; font-size: 18px; transition: var(--transition); opacity: 0.8; }
.music-ctrl-btn:hover { opacity: 1; transform: scale(1.1); color: var(--accent); }
.volume-wrap { display: flex; align-items: center; gap: 10px; margin-left: 15px; }
.volume-slider { -webkit-appearance: none; appearance: none; width: 60px; height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; cursor: pointer; }
.volume-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 10px; height: 10px; background: #fff; border-radius: 50%; }
.v2-music-progress { height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; position: relative; margin: 10px 0; width: 100%; cursor: pointer; }
.v2-music-bar { position: absolute; height: 100%; background: #fff; width: 0%; transition: width 0.1s linear; }
.v2-music-time { display: flex; justify-content: space-between; font-size: 11px; color: #777; font-family: 'JetBrains Mono', monospace; }

/* Custom Badge Display Fix */
.v2-badges-box i, .profile-badge i { min-width: 14px; min-height: 14px; }
.badge-icon-item { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 6px; }

/* Error Page Styling */
.error-layout { height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; background: var(--bg-1); }
.error-card { max-width: 450px; padding: 40px; border: 1px solid var(--border-1); border-radius: 24px; background: var(--bg-2); box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
.error-icon { font-size: 60px; color: #ef4444; margin-bottom: 20px; opacity: 0.8; }
.error-title { font-size: 24px; font-weight: 800; margin-bottom: 12px; }
.error-msg { color: var(--text-3); margin-bottom: 30px; line-height: 1.6; }

/* Selection highlight */
::-moz-selection { background: var(--accent) !important; color: #fff !important; }
::selection { background: var(--accent) !important; color: #fff !important; }

/* =============================================
   PANEL REWORK (dashboard/admin full UI)
============================================= */
body.panel-ui {
    --panel-bg: #0a0a0a;
    --panel-surface: #0a0a0a;
    --panel-surface-2: #0a0a0a;
    --panel-border: rgba(255, 255, 255, 0.08);
    --panel-border-strong: rgba(255, 255, 255, 0.16);
    --panel-text: #f2f4f8;
    --panel-muted: #9098a5;
    --panel-accent: #22c55e;
    --panel-accent-soft: rgba(34, 197, 94, 0.2);
    --info: #9ca3af;
    background: var(--panel-bg);
    color: var(--panel-text);
}

body.panel-ui .layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: 100vh;
}

body.panel-ui .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 220px;
    padding: 10px 10px 12px;
    background: #0a0a0a;
    border-right: 1px solid var(--panel-border);
}

body.panel-ui .sidebar-logo {
    margin-bottom: 10px;
    border: none;
    padding: 10px 6px;
    background: transparent;
}

body.panel-ui .sidebar-logo span:last-child {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

body.panel-ui .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

body.panel-ui .nav-group-title {
    margin: 10px 8px 4px;
    color: #c8ced8;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: none;
    opacity: 0.9;
}

body.panel-ui .sidebar-nav a {
    border-radius: 11px;
    border: 1px solid transparent;
    padding: 9px 11px;
    font-size: 12px;
    font-weight: 650;
    color: #c8ced9;
    background: transparent;
}

body.panel-ui .sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.02);
    border-color: var(--panel-border);
    color: #fff;
}

body.panel-ui .sidebar-nav a.active {
    background: rgba(34, 197, 94, 0.24);
    border-color: rgba(34, 197, 94, 0.38);
    color: #dcfce7;
}

body.panel-ui .sidebar-admin-link {
    margin-top: 8px;
    background: rgba(34, 197, 94, 0.16) !important;
    border-color: rgba(34, 197, 94, 0.34) !important;
    color: #bbf7d0 !important;
}

body.panel-ui .sidebar-bottom {
    margin-top: auto;
}

body.panel-ui .sidebar-cta .btn {
    border-radius: 9px;
    height: 38px;
    font-size: 12px;
}

body.panel-ui .sidebar-user {
    border: 1px solid var(--panel-border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
}

body.panel-ui .main-content {
    margin-left: 0;
    padding: 34px 32px 40px;
    background: transparent;
}

body.panel-ui .topbar {
    margin-bottom: 18px;
    border: none;
    border-radius: 0;
    padding: 6px 0;
    background: transparent;
}

body.panel-ui .topbar h2 {
    font-size: 34px;
    letter-spacing: -0.03em;
    font-weight: 850;
}

body.panel-ui .topbar-actions { display: flex; gap: 8px; }
body.panel-ui .grid-2 { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 18px; }
body.panel-ui .grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
body.panel-ui .grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }

body.panel-ui .card {
    margin-bottom: 0;
    border-radius: 24px;
    border: 1px solid var(--panel-border);
    background: #0a0a0a;
    box-shadow: none;
    padding: 24px;
}

body.panel-ui .card-header,
body.panel-ui .card-title {
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 750;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 9px;
}

body.panel-ui .stat-card {
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    background: #0a0a0a;
    min-height: 110px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
}

body.panel-ui .stat-card .label {
    font-size: 12px;
    letter-spacing: 0;
    color: var(--panel-muted);
    font-weight: 700;
    text-transform: none;
}

body.panel-ui .stat-card .number {
    font-size: 52px;
    line-height: 0.9;
    font-weight: 900;
    letter-spacing: -0.04em;
}

body.panel-ui .table-wrap {
    border: 1px solid var(--panel-border);
    border-radius: 14px;
    overflow: auto;
    background: #0a0a0a;
}

body.panel-ui table { width: 100%; border-collapse: collapse; }
body.panel-ui table th,
body.panel-ui table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    padding: 10px 11px;
    vertical-align: middle;
    font-size: 12px;
}

body.panel-ui table th {
    color: var(--panel-muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}

body.panel-ui table tr:hover td { background: rgba(255, 255, 255, 0.02); }

body.panel-ui .form-group label {
    color: #d3d8e0;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 6px;
}

body.panel-ui input[type="text"],
body.panel-ui input[type="email"],
body.panel-ui input[type="password"],
body.panel-ui input[type="url"],
body.panel-ui input[type="number"],
body.panel-ui textarea,
body.panel-ui select {
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    min-height: 38px;
    color: #edf1f7;
}

body.panel-ui input:focus,
body.panel-ui textarea:focus,
body.panel-ui select:focus {
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.04);
}

body.panel-ui .btn {
    border-radius: 9px;
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.02);
    color: #f4f6fb;
    box-shadow: none;
    font-size: 12px;
}

body.panel-ui .btn:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.24);
}

body.panel-ui .btn-primary {
    background: rgba(34, 197, 94, 0.28);
    border-color: rgba(34, 197, 94, 0.44);
    color: #ecfccb;
}

body.panel-ui .btn-ghost { background: rgba(255,255,255,0.01); color: #dbe2ec; }
body.panel-ui .btn-ghost:hover { color: #ffffff; border-color: rgba(255,255,255,0.14); background: rgba(255,255,255,0.05); }
body.panel-ui .btn-danger { background: rgba(239,68,68,0.14); border-color: rgba(239,68,68,0.3); color: #fca5a5; }
body.panel-ui .btn-warn { background: rgba(245,158,11,0.14); border-color: rgba(245,158,11,0.34); color: #facc15; }
body.panel-ui .btn-success { background: rgba(34,197,94,0.14); border-color: rgba(34,197,94,0.34); color: #86efac; }

body.panel-ui .badge {
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.13);
    background: rgba(255,255,255,0.06);
    font-size: 10px;
    padding: 3px 8px;
}

body.panel-ui .alert {
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    padding: 10px 12px;
    margin-bottom: 12px;
    font-size: 12px;
}

body.panel-ui .modal-box {
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015)), #0c0d0f;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    box-shadow: 0 28px 70px rgba(0,0,0,0.5);
}

body.panel-ui .muted { color: var(--panel-muted); }

.settings-highlight {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.1);
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
}

.twofa-setup-modal {
    max-width: 620px;
}

.twofa-secret-panel {
    margin-bottom: 18px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.12);
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
}

.twofa-label {
    display: block;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-3);
}

.twofa-secret-value {
    display: block;
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-1);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.16em;
    word-break: break-word;
}

.twofa-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.twofa-meta-grid strong {
    display: block;
    color: var(--text-1);
}

.auth-2fa-modal {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-2fa-modal.active {
    display: flex;
}

.auth-2fa-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.76);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.auth-2fa-box {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 430px;
    border-radius: 26px;
    padding: 28px;
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015)), #08090b;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 30px 90px rgba(0,0,0,0.45);
}

.auth-2fa-box h3 {
    margin-bottom: 8px;
    font-size: 28px;
    letter-spacing: -0.03em;
}

.auth-2fa-box p {
    margin-bottom: 18px;
    color: var(--text-2);
    font-size: 14px;
    line-height: 1.55;
}

.auth-2fa-icon {
    width: 58px;
    height: 58px;
    margin-bottom: 16px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: #f3f4f6;
    font-size: 22px;
}

.auth-code-input {
    text-align: center;
    font-size: 28px;
    letter-spacing: 0.34em;
    font-weight: 800;
    padding-left: calc(16px + 0.34em);
}

.auth-2fa-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

@media (max-width: 1320px) {
    body.panel-ui .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 1100px) {
    body.panel-ui .layout { grid-template-columns: 1fr; }
    body.panel-ui .sidebar {
        width: 100%;
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--panel-border);
    }
    body.panel-ui .main-content { padding: 20px 14px 28px; }
    body.panel-ui .grid-2,
    body.panel-ui .grid-3,
    body.panel-ui .grid-4 { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .twofa-meta-grid {
        grid-template-columns: 1fr;
    }

    .auth-2fa-box {
        padding: 22px;
        border-radius: 22px;
    }

    .auth-code-input {
        font-size: 24px;
        letter-spacing: 0.24em;
        padding-left: calc(16px + 0.24em);
    }

    .auth-2fa-actions {
        flex-direction: column-reverse;
    }

    .auth-2fa-actions .btn {
        width: 100%;
    }
}

.badge-success {
    background: rgba(16, 185, 129, 0.16);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-warn {
    background: rgba(245, 158, 11, 0.16);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.16);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.badge-dark {
    background: rgba(255, 255, 255, 0.06);
    color: #d4d4d8;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.tickets-modal-box {
    max-width: 1120px;
    padding: 20px;
}

.user-ticket-modal-box {
    max-width: 900px;
    padding: 20px;
}

.tickets-modal-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.tickets-modal-topbar h3 {
    font-size: 20px;
    margin-bottom: 4px;
}

.tickets-modal-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.ticket-modal-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
    gap: 12px;
    min-height: 520px;
}

.ticket-chat-panel {
    border: 1px solid var(--border-1);
    border-radius: 14px;
    background: var(--bg-3);
    padding: 10px;
    display: flex;
    flex-direction: column;
    min-height: 420px;
}

.ticket-chat-messages {
    flex: 1;
    overflow: auto;
    display: grid;
    gap: 8px;
    padding: 4px;
}

.ticket-msg {
    border-radius: 12px;
    padding: 10px;
    border: 1px solid var(--border-1);
    max-width: 88%;
}

.ticket-msg-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    margin-bottom: 5px;
}

.ticket-msg-author {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.ticket-msg-role {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    border-radius: 999px;
    padding: 2px 8px;
    border: 1px solid transparent;
}

.ticket-msg-body {
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 13px;
}

.ticket-msg.msg-admin {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.3);
    margin-left: auto;
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.2);
}

.ticket-msg.msg-admin .ticket-msg-role {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.45);
    color: #93c5fd;
}

.ticket-msg.msg-user {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.26);
    margin-right: auto;
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.16);
}

.ticket-msg.msg-user .ticket-msg-role {
    background: rgba(34, 197, 94, 0.16);
    border-color: rgba(34, 197, 94, 0.35);
    color: #86efac;
}

.ticket-chat-form {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.ticket-user-sidebar {
    border: 1px solid var(--border-1);
    border-radius: 14px;
    background: var(--bg-3);
    padding: 10px;
    overflow: auto;
    display: grid;
    gap: 10px;
    align-content: start;
}

.ticket-user-card {
    border: 1px solid var(--border-1);
    border-radius: 12px;
    background: rgba(0,0,0,0.16);
    padding: 10px;
}

.ticket-user-card h4 {
    font-size: 13px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ticket-user-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px dashed rgba(255,255,255,0.08);
    font-size: 12px;
}

.ticket-user-line:last-child {
    border-bottom: 0;
}

.ticket-user-line span {
    color: var(--text-3);
}

.ticket-user-line strong {
    max-width: 60%;
    text-align: right;
    font-weight: 700;
    color: var(--text-1);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 1080px) {
    .ticket-modal-grid {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .ticket-user-sidebar {
        max-height: 240px;
    }
}
