/* ===========================================================
   JOY Trade Admin - Brand Styles
   Primary: energetic purple / Accent: warm orange
   =========================================================== */
:root {
    --jt-primary: #5b3df5;
    --jt-primary-dark: #4527d1;
    --jt-primary-light: #eee9fe;
    --jt-accent: #ff7a45;
    --jt-success: #1a9d5c;
    --jt-danger: #e0364a;
    --jt-warning: #f2a93b;
    --jt-bg: #f5f6fb;
    --jt-surface: #ffffff;
    --jt-border: #e6e8f0;
    --jt-text: #1f2430;
    --jt-text-muted: #6b7280;
    --jt-sidebar-bg: #1a1440;
    --jt-sidebar-text: #c9c3ec;
    --jt-sidebar-active: #5b3df5;
    --jt-radius: 12px;
}

body {
    background: var(--jt-bg);
    color: var(--jt-text);
    font-family: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
}

a { text-decoration: none; }

/* ---- Layout shell ---- */
.jt-app { display: flex; min-height: 100vh; }

.jt-sidebar {
    width: 250px;
    flex-shrink: 0;
    background: var(--jt-sidebar-bg);
    color: var(--jt-sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; bottom: 0; left: 0;
    z-index: 1030;
    transition: transform .25s ease;
}

.jt-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 22px;
    color: #fff;
    font-weight: 700;
    font-size: 20px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.jt-sidebar-brand .jt-logo-dot {
    width: 34px; height: 34px; border-radius: 9px;
    background: linear-gradient(135deg, var(--jt-accent), var(--jt-primary));
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; color: #fff; font-size: 15px;
}

.jt-nav { padding: 14px 12px; overflow-y: auto; flex: 1; }
.jt-nav-section { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: rgba(201,195,236,.5); margin: 18px 10px 8px; }
.jt-nav a {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: 9px; color: var(--jt-sidebar-text);
    font-size: 14.5px; margin-bottom: 2px; font-weight: 500;
}
.jt-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.jt-nav a.active { background: var(--jt-sidebar-active); color: #fff; }
.jt-nav a .jt-ico { width: 18px; text-align: center; }

.jt-main { margin-left: 250px; flex: 1; display: flex; flex-direction: column; min-width: 0; }

.jt-topbar {
    background: var(--jt-surface);
    border-bottom: 1px solid var(--jt-border);
    padding: 14px 24px;
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 1020;
}
.jt-topbar h1 { font-size: 19px; margin: 0; font-weight: 700; }
.jt-menu-toggle { display: none; background: none; border: 0; font-size: 22px; color: var(--jt-text); }

.jt-content { padding: 24px; flex: 1; }

.jt-user-chip { display:flex; align-items:center; gap:10px; }
.jt-user-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--jt-primary-light); color: var(--jt-primary);
    display: flex; align-items: center; justify-content: center; font-weight: 700;
}

/* ---- Cards / widgets ---- */
.jt-card { background: var(--jt-surface); border: 1px solid var(--jt-border); border-radius: var(--jt-radius); padding: 20px; }
.jt-stat-card { display: flex; align-items: center; gap: 14px; }
.jt-stat-icon { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.jt-stat-value { font-size: 22px; font-weight: 700; line-height: 1.1; }
.jt-stat-label { font-size: 13px; color: var(--jt-text-muted); }

.jt-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.jt-badge-success { background: #e4f7ee; color: var(--jt-success); }
.jt-badge-danger { background: #fdeaec; color: var(--jt-danger); }
.jt-badge-warning { background: #fef3e0; color: #a3690e; }
.jt-badge-muted { background: #eef0f4; color: var(--jt-text-muted); }
.jt-badge-primary { background: var(--jt-primary-light); color: var(--jt-primary); }

.btn-jt-primary { background: var(--jt-primary); border-color: var(--jt-primary); color: #fff; }
.btn-jt-primary:hover { background: var(--jt-primary-dark); border-color: var(--jt-primary-dark); color: #fff; }
.btn-jt-primary:focus { box-shadow: 0 0 0 .2rem rgba(91,61,245,.25); }

.jt-table thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--jt-text-muted); border-bottom: 2px solid var(--jt-border); font-weight: 700; }
.jt-table td { vertical-align: middle; }
.jt-thumb { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; background: #f0f1f6; border: 1px solid var(--jt-border); }

.jt-empty { text-align: center; padding: 60px 20px; color: var(--jt-text-muted); }

/* ---- Auth pages ---- */
.jt-auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1a1440, #5b3df5); padding: 20px; }
.jt-auth-card { background: #fff; border-radius: 16px; padding: 40px; width: 100%; max-width: 420px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.jt-auth-logo { display:flex; align-items:center; gap:10px; margin-bottom: 24px; }

/* ---- Responsive ---- */
@media (max-width: 991px) {
    .jt-sidebar { transform: translateX(-100%); }
    .jt-sidebar.jt-sidebar-open { transform: translateX(0); }
    .jt-main { margin-left: 0; }
    .jt-menu-toggle { display: block; }
}
@media (max-width: 576px) {
    .jt-content { padding: 14px; }
    .jt-topbar { padding: 12px 14px; }
    .jt-auth-card { padding: 26px; }
}

.jt-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1025; display: none; }
.jt-backdrop.show { display: block; }
