/* WhoZex Shell Market — Admin Panel Styles */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
    font-family: 'Inter', -apple-system, Arial, sans-serif;
    font-size: 14px;
    color: #e5e7eb;
    background: #0a0a0b;
    line-height: 1.55;
}
a { color: #60a5fa; text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: 'SF Mono', Consolas, monospace; font-size: 12px;
       background: #1f2125; padding: 2px 6px; border-radius: 4px; }
.small { font-size: 12px; }
.muted { color: #6b7280; }
.green { color: #22c55e; }
.right { text-align: right; }

/* Layout */
.sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: 240px;
    background: #121317; border-right: 1px solid #262730;
    display: flex; flex-direction: column;
    padding: 18px 0;
    z-index: 10;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 0 20px 20px; border-bottom: 1px solid #262730; margin-bottom: 12px; }
.logo { font-size: 28px; }
.brand-title { font-weight: 700; font-size: 16px; letter-spacing: 0.5px; }
.brand-sub { font-size: 11px; color: #6b7280; letter-spacing: 1.2px; text-transform: uppercase; }

.nav { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 0 12px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px;
            border-radius: 8px; color: #9ca3af; font-weight: 500; font-size: 13px;
            transition: background 0.15s, color 0.15s; }
.nav-item:hover { background: #1f2125; color: #fff; text-decoration: none; }
.nav-item.active { background: #2f3642; color: #fff; }
.nav-icon { font-size: 15px; width: 20px; text-align: center; }

.sidebar-footer { padding: 12px 16px; border-top: 1px solid #262730; }
.user-pill { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.user-avatar { width: 28px; height: 28px; border-radius: 50%; background: #6366f1;
               display: grid; place-items: center; font-weight: 700; font-size: 12px; color: #fff; }
.user-name { font-size: 13px; font-weight: 500; }
.logout-link { display: block; font-size: 12px; color: #ef4444; }

.main { margin-left: 240px; min-height: 100vh; padding: 24px 32px; }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.page-header h1 { font-size: 22px; font-weight: 700; }

/* Stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat-grid-sm { grid-template-columns: repeat(5, 1fr); }
.stat-card { background: #121317; border: 1px solid #262730; border-radius: 12px; padding: 18px; position: relative; overflow: hidden; }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: #6366f1; }
.stat-card.stat-green::before  { background: #22c55e; }
.stat-card.stat-blue::before   { background: #3b82f6; }
.stat-card.stat-purple::before { background: #a855f7; }
.stat-card.stat-orange::before { background: #f97316; }
.stat-label { font-size: 11px; color: #6b7280; text-transform: uppercase; letter-spacing: 0.8px; font-weight: 600; margin-bottom: 6px; }
.stat-value { font-size: 22px; font-weight: 700; color: #fff; }
.stat-value small { font-size: 12px; color: #6b7280; font-weight: 400; }
.stat-value-sm { font-size: 18px; font-weight: 700; color: #fff; }
.stat-sub { font-size: 11px; color: #6b7280; margin-top: 4px; }

/* Cards */
.card { background: #121317; border: 1px solid #262730; border-radius: 12px; margin-bottom: 16px; overflow: hidden; }
.card-header { padding: 14px 18px; border-bottom: 1px solid #262730; display: flex; justify-content: space-between; align-items: center; }
.card-header h2 { font-size: 14px; font-weight: 600; }
.card-link { font-size: 12px; color: #9ca3af; }
.card-body { padding: 18px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Tables */
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { padding: 10px 14px; text-align: left; border-bottom: 1px solid #262730; }
.tbl th { font-size: 11px; color: #6b7280; text-transform: uppercase; letter-spacing: 0.6px; font-weight: 600; background: #0f1014; }
.tbl tr:hover td { background: #1a1b1f; }
.tbl td.right, .tbl th.right { text-align: right; }

/* Toolbar */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.search-form { display: flex; gap: 8px; flex: 1; }
.search-form input[type="text"], .search-form select {
    background: #121317; border: 1px solid #262730; color: #e5e7eb;
    padding: 8px 12px; border-radius: 8px; font-size: 13px;
    min-width: 200px;
}
.search-form input[type="text"] { flex: 1; }
.search-form input:focus, .search-form select:focus { outline: none; border-color: #6366f1; }
.count-pill { padding: 6px 14px; background: #1f2125; border-radius: 20px; font-size: 12px; color: #9ca3af; }

/* Tabs */
.tabs { display: flex; gap: 4px; }
.tab { padding: 8px 14px; border-radius: 8px; color: #9ca3af; font-size: 13px; font-weight: 500; border: 1px solid transparent; }
.tab:hover { background: #1f2125; color: #fff; text-decoration: none; }
.tab.active { background: #2f3642; color: #fff; border-color: #3a4252; }

/* Buttons */
.btn { padding: 9px 16px; border-radius: 8px; border: 1px solid #262730; background: #1f2125;
       color: #e5e7eb; cursor: pointer; font-size: 13px; font-weight: 500;
       transition: background 0.15s, border 0.15s; }
.btn:hover { background: #2a2c32; }
.btn-primary { background: #6366f1; border-color: #6366f1; color: #fff; }
.btn-primary:hover { background: #4f46e5; border-color: #4f46e5; }
.btn-block { width: 100%; }
.btn-sm { padding: 4px 10px; border-radius: 6px; border: 1px solid #262730; background: #1f2125;
          color: #e5e7eb; cursor: pointer; font-size: 12px; margin-left: 4px; }
.btn-sm:hover { background: #2a2c32; }
.btn-sm.btn-green { background: #065f46; border-color: #065f46; color: #d1fae5; }
.btn-sm.btn-red   { background: #7f1d1d; border-color: #7f1d1d; color: #fecaca; }
.btn-sm.btn-balance { background: #1e40af; border-color: #1e40af; color: #dbeafe; font-weight: 600; }
.btn-sm.btn-balance:hover { background: #1d4ed8; }

/* Badges */
.bdg { padding: 3px 8px; border-radius: 12px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; }
.bdg-green  { background: #065f46; color: #d1fae5; }
.bdg-yellow { background: #78350f; color: #fde68a; }
.bdg-red    { background: #7f1d1d; color: #fecaca; }
.bdg-blue   { background: #1e3a8a; color: #bfdbfe; }
.bdg-gray   { background: #374151; color: #d1d5db; }

/* Alerts */
.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 13px; }
.alert-error { background: #7f1d1d; color: #fecaca; border: 1px solid #991b1b; }
.alert-info  { background: #1e40af; color: #dbeafe; border: 1px solid #1d4ed8; }

/* Login page */
.login-page { background: linear-gradient(135deg, #0a0a0b 0%, #1a1b24 100%);
              display: grid; place-items: center; min-height: 100vh; }
.login-box { background: #121317; border: 1px solid #262730; border-radius: 16px;
             padding: 40px; width: 360px; text-align: center; }
.login-logo { font-size: 48px; margin-bottom: 12px; }
.login-box h1 { font-size: 24px; margin-bottom: 4px; }
.login-box .muted { margin-bottom: 24px; font-size: 12px; }
.login-form { text-align: left; display: flex; flex-direction: column; gap: 14px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12px; color: #9ca3af; font-weight: 500; }
.field input { background: #1f2125; border: 1px solid #2a2c32; color: #e5e7eb;
               padding: 10px 14px; border-radius: 8px; font-size: 14px; font-family: inherit; }
.field input:focus { outline: none; border-color: #6366f1; }
.field small { color: #6b7280; font-size: 11px; }

/* Tickets */
.ticket-list { display: flex; flex-direction: column; gap: 12px; }
.ticket-card { background: #121317; border: 1px solid #262730; border-radius: 12px; padding: 16px; }
.ticket-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.ticket-body { background: #0f1014; padding: 12px; border-radius: 8px; border-left: 3px solid #6366f1; color: #d1d5db; font-size: 13px; }
.ticket-actions { display: flex; gap: 8px; margin-top: 10px; }

.empty { padding: 40px; text-align: center; color: #6b7280; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: grid; place-items: center; z-index: 100; }
.modal { background: #121317; border: 1px solid #262730; border-radius: 12px; width: 520px; max-width: 92vw; max-height: 84vh; overflow: hidden; display: flex; flex-direction: column; }
.modal-hd { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid #262730; font-weight: 600; }
.modal-close { background: transparent; border: none; color: #9ca3af; font-size: 18px; cursor: pointer; }
.modal-close:hover { color: #fff; }
.modal-body { padding: 18px; overflow-y: auto; font-size: 13px; }

.settings-form { max-width: 720px; }

/* Bar chart */
.bar-chart { display: flex; justify-content: space-around; align-items: flex-end; height: 200px; gap: 8px; padding: 20px 8px 0; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bar-val { font-size: 13px; font-weight: 700; color: #e5e7eb; }
.bar { width: 100%; max-width: 54px; background: linear-gradient(180deg, #6366f1 0%, #4338ca 100%);
       border-radius: 6px 6px 0 0; min-height: 2px; position: relative;
       box-shadow: 0 4px 12px rgba(99,102,241,0.2); transition: filter 0.15s; }
.bar:hover { filter: brightness(1.2); }
.bar-new { font-size: 11px; color: #22c55e; font-weight: 600; }
.bar-label { font-size: 11px; color: #9ca3af; text-align: center; margin-top: 4px; line-height: 1.4; }
.bar-label small { color: #6b7280; }
.chart-legend { display: flex; gap: 24px; justify-content: center; padding: 16px 0 0; font-size: 12px; color: #9ca3af; }
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.legend-blue  { background: #6366f1; }
.legend-green { background: #22c55e; }

@media (max-width: 860px) {
    .sidebar { width: 64px; }
    .sidebar-brand > div, .nav-item span:not(.nav-icon), .sidebar-footer .user-name, .sidebar-footer .logout-link { display: none; }
    .main { margin-left: 64px; padding: 16px; }
    .stat-grid, .stat-grid-sm, .two-col { grid-template-columns: 1fr; }
}
