/* =====================================================
   StockEnvato - Professional Dark Theme
   ===================================================== */

:root {
  --bg-base:      #070B14;
  --bg-sidebar:   #0C1120;
  --bg-card:      #111827;
  --bg-card-2:    #0F172A;
  --bg-input:     #1a2235;
  --border:       #1E293B;
  --border-light: #263048;
  --text-primary: #F1F5F9;
  --text-muted:   #64748B;
  --text-soft:    #94A3B8;
  --accent:       #7C3AED;
  --accent-2:     #4F46E5;
  --accent-grad:  linear-gradient(135deg, #7C3AED, #4F46E5);
  --accent-glow:  0 0 24px rgba(124,58,237,.25);
  --green:        #10B981;
  --red:          #EF4444;
  --yellow:       #F59E0B;
  --blue:         #3B82F6;
  --sidebar-w:    240px;
  --radius:       12px;
  --radius-sm:    8px;
  --shadow:       0 4px 24px rgba(0,0,0,.4);
  --transition:   .2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* === LAYOUT === */
.app-wrapper { display: flex; min-height: 100vh; }

/* === SIDEBAR === */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto; overflow-x: hidden;
  transition: transform var(--transition);
}

.sidebar-logo {
  padding: 20px 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo a { display: flex; align-items: center; gap: 10px; }

.logo-icon {
  width: 36px; height: 36px;
  background: var(--accent-grad);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: #fff;
  box-shadow: var(--accent-glow);
  flex-shrink: 0;
}

.logo-text {
  font-size: 17px; font-weight: 500;
  color: var(--text-primary); letter-spacing: -.2px;
}

.logo-text strong {
  font-weight: 800;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-nav { padding: 12px 0; flex: 1; }

.nav-section-title {
  font-size: 10px; font-weight: 700; letter-spacing: 1.2px;
  color: var(--text-muted);
  padding: 18px 20px 6px;
  text-transform: uppercase;
}

.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 20px;
  color: var(--text-soft); font-size: 14px; font-weight: 500;
  border-radius: 0;
  transition: all var(--transition);
  position: relative;
}

.nav-item i { font-size: 15px; width: 18px; text-align: center; flex-shrink: 0; }
.nav-item:hover { color: var(--text-primary); background: rgba(255,255,255,.04); }
.nav-item.active { color: #fff; background: rgba(124,58,237,.15); }
.nav-item.active::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent-grad);
  border-radius: 0 3px 3px 0;
}

.coming-soon-badge {
  margin-left: auto;
  font-size: 10px; font-weight: 600;
  padding: 2px 7px;
  background: rgba(245,158,11,.12); color: var(--yellow);
  border-radius: 20px; border: 1px solid rgba(245,158,11,.2);
}

/* === MAIN CONTENT === */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1; display: flex; flex-direction: column; min-height: 100vh;
}

/* === TOPBAR === */
.topbar {
  height: 60px;
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 24px; gap: 16px;
  position: sticky; top: 0; z-index: 50;
}

.menu-toggle {
  background: none; border: none; color: var(--text-soft);
  font-size: 18px; padding: 6px; display: none;
  border-radius: var(--radius-sm); transition: all var(--transition);
}
.menu-toggle:hover { color: var(--text-primary); background: var(--border); }

.topbar-title { font-size: 15px; font-weight: 600; flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.btn-admin {
  display: flex; align-items: center; gap: 7px;
  background: rgba(124,58,237,.15); color: #a78bfa;
  border: 1px solid rgba(124,58,237,.3);
  padding: 7px 14px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; transition: all var(--transition);
}
.btn-admin:hover { background: rgba(124,58,237,.25); color: #c4b5fd; }

.admin-badge {
  display: flex; align-items: center; gap: 6px;
  background: rgba(124,58,237,.15); color: #a78bfa;
  border: 1px solid rgba(124,58,237,.25);
  padding: 5px 12px; border-radius: 20px;
  font-size: 12px; font-weight: 600;
}

.user-menu { position: relative; cursor: pointer; }
.user-avatar {
  width: 36px; height: 36px;
  background: var(--accent-grad); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px; box-shadow: var(--accent-glow);
}

.user-dropdown {
  position: absolute; right: 0; top: calc(100% + 10px);
  background: #1a2235; border: 1px solid var(--border-light);
  border-radius: var(--radius); width: 210px;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  display: none; z-index: 200; overflow: hidden;
}
.user-dropdown.show { display: block; }

.user-info-header { padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.user-info-header strong { font-size: 14px; font-weight: 600; }
.user-info-header small { font-size: 12px; color: var(--text-muted); }

.user-dropdown-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px; border-bottom: 1px solid var(--border);
}
.user-dropdown-avatar {
  width: 44px; height: 44px; flex-shrink: 0;
  background: var(--accent-grad); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px; box-shadow: var(--accent-glow);
}
.user-dropdown-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.user-dropdown-info strong { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-dropdown-info small { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }

.dropdown-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 16px;
  background: none; border: none; text-decoration: none;
  color: var(--text-soft); font-size: 14px;
  transition: all var(--transition); text-align: left; cursor: pointer;
}
.dropdown-item:hover { background: rgba(255,255,255,.05); color: var(--text-primary); }
.dropdown-item-danger { color: #f87171; }
.dropdown-item-danger:hover { background: rgba(239,68,68,.08); color: #ef4444; }

/* === PAGE CONTENT === */
.page-content { padding: 24px; flex: 1; }

/* === CARDS === */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}

.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--border); gap: 12px;
}
.card-header h3 { font-size: 15px; font-weight: 600; }
.card-subtitle { font-size: 12px; color: var(--text-muted); }
.mb-4 { margin-bottom: 16px; }

/* === BUTTONS === */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 10px 20px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; border: none; cursor: pointer;
  transition: all var(--transition); white-space: nowrap;
}

.btn-primary {
  background: var(--accent-grad); color: #fff;
  box-shadow: 0 4px 15px rgba(124,58,237,.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(124,58,237,.45); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity:.5; transform:none; box-shadow:none; cursor:not-allowed; }

.btn-success {
  background: linear-gradient(135deg, #10B981, #059669);
  color: #fff; box-shadow: 0 4px 15px rgba(16,185,129,.25);
}
.btn-success:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(16,185,129,.35); }

.btn-secondary { background: var(--border-light); color: var(--text-soft); }
.btn-secondary:hover { background: #2d3f5c; color: var(--text-primary); }

.btn-outline {
  background: transparent; border: 1px solid var(--border-light); color: var(--text-soft);
}
.btn-outline:hover { border-color: var(--accent); color: #a78bfa; background: rgba(124,58,237,.08); }

.btn-danger { background: linear-gradient(135deg, #EF4444, #DC2626); color: #fff; }

.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; }

/* Download button */
.btn-download {
  background: var(--accent-grad); color: #fff;
  padding: 13px 28px; font-size: 15px; font-weight: 700;
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(124,58,237,.35);
  min-width: 160px; flex-shrink: 0;
}
.btn-download:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(124,58,237,.5); }
.btn-download:disabled { opacity:.5; transform:none; cursor:not-allowed; }

/* === FORMS === */
.form-control {
  width: 100%; background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary); padding: 10px 14px;
  font-size: 14px; transition: all var(--transition); outline: none;
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124,58,237,.15); }
.form-control::placeholder { color: var(--text-muted); }
.form-control:disabled { opacity:.5; cursor:not-allowed; }
.form-control-lg { padding: 13px 16px; font-size: 15px; }

.form-group { margin-bottom: 18px; }
.form-label, .form-group label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text-soft); margin-bottom: 7px;
}

.field-error { font-size: 12px; color: var(--red); margin-top: 4px; display: block; }

.input-password { position: relative; }
.input-password .form-control { padding-right: 44px; }
.toggle-password {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text-muted); font-size: 15px; padding: 4px;
}
.toggle-password:hover { color: var(--text-soft); }

/* === BADGES === */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600;
}

.badge-primary  { background: rgba(124,58,237,.15); color: #a78bfa; border: 1px solid rgba(124,58,237,.2); }
.badge-success  { background: rgba(16,185,129,.12);  color: #34d399; border: 1px solid rgba(16,185,129,.2); }
.badge-danger   { background: rgba(239,68,68,.12);   color: #f87171; border: 1px solid rgba(239,68,68,.2); }
.badge-warning  { background: rgba(245,158,11,.12);  color: #fbbf24; border: 1px solid rgba(245,158,11,.2); }
.badge-secondary{ background: rgba(100,116,139,.12); color: #94a3b8; border: 1px solid rgba(100,116,139,.2); }
.badge-purple   { background: rgba(139,92,246,.15);  color: #c4b5fd; border: 1px solid rgba(139,92,246,.25); }

.status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600;
}

.status-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.badge-success .status-dot { background: var(--green); box-shadow: 0 0 6px var(--green); }
.badge-danger  .status-dot { background: var(--red); }
.badge-secondary .status-dot { background: var(--text-muted); }
.ml-2 { margin-left: 8px; }

/* === SERVICE DETAIL === */
.service-detail-title {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.service-icon-wrap {
  width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff; flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
}
.service-detail-title h2 { font-size: 20px; font-weight: 700; }

.service-stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
}
.stat-pill {
  padding: 16px 20px; text-align: center;
  border-right: 1px solid var(--border);
}
.stat-pill:last-child { border-right: none; }
.stat-pill-value { display: block; font-size: 24px; font-weight: 700; line-height: 1.2; }
.stat-pill-label {
  display: block; font-size: 11px; font-weight: 500;
  color: var(--text-muted); margin-top: 4px; letter-spacing: .5px;
}

/* Download area */
.download-form {
  display: flex; gap: 12px; padding: 20px 24px; align-items: center;
}
.download-form .form-control { flex: 1; }

.no-key-notice {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 24px;
  background: rgba(245,158,11,.08); border-top: 1px solid rgba(245,158,11,.15);
  font-size: 13px; color: var(--yellow);
}

/* Download status inside card */
.download-processing {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 24px;
  background: rgba(124,58,237,.06);
  border-top: 1px solid rgba(124,58,237,.15);
  font-size: 14px; color: #a78bfa;
}

.download-done {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 24px;
  background: rgba(16,185,129,.06);
  border-top: 1px solid rgba(16,185,129,.15);
  font-size: 14px; color: var(--green); font-weight: 500;
}

.spin { animation: spin .8s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Collapsible */
.collapsible-section { border-top: 1px solid var(--border); }
.collapsible-toggle {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 14px 24px;
  background: none; border: none; color: var(--text-soft); font-size: 14px;
  text-align: left; cursor: pointer; transition: all var(--transition);
}
.collapsible-toggle:hover { color: var(--text-primary); background: rgba(255,255,255,.02); }
.toggle-icon { margin-left: auto; }
.collapsible-body { padding: 16px 24px; background: rgba(0,0,0,.15); }

/* === HISTORY === */
.table-filters {
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,.1);
}
.filter-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.filter-item { display: flex; align-items: center; gap: 8px; }
.filter-item label { font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.filter-item .form-control { padding: 7px 10px; font-size: 13px; min-width: 80px; }
.search-input-wrap { position: relative; }
.search-input-wrap .form-control { padding-right: 30px; }
.clear-search { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 13px; }
.clear-search:hover { color: var(--red); }
.filter-summary { font-size: 12px; color: var(--text-muted); margin-left: auto; }

.history-item {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.history-item:last-child { border-bottom: none; }
.history-item:hover { background: rgba(255,255,255,.02); }

.history-no {
  width: 28px; height: 28px; background: var(--border); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--text-muted); flex-shrink: 0;
}

.history-details { flex: 1; min-width: 0; }
.history-label { font-size: 11px; color: var(--text-muted); margin-bottom: 3px; }
.history-url { font-size: 13px; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.history-meta { text-align: right; flex-shrink: 0; }
.history-date-label { font-size: 11px; color: var(--text-muted); }
.history-date { font-size: 13px; color: var(--text-soft); }

.history-actions { flex-shrink: 0; }
.empty-row { padding: 32px; text-align: center; color: var(--text-muted); font-size: 14px; }

/* Pagination */
.pagination-wrap { display: flex; align-items: center; gap: 6px; padding: 14px 20px; border-top: 1px solid var(--border); }
.page-btn {
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); font-size: 13px; font-weight: 600;
  color: var(--text-muted); border: 1px solid var(--border); transition: all var(--transition);
}
.page-btn:hover { border-color: var(--accent); color: #a78bfa; }
.page-btn.active { background: var(--accent-grad); border-color: transparent; color: #fff; box-shadow: 0 2px 12px rgba(124,58,237,.3); }

/* === DASHBOARD === */
.profile-card {}
.profile-info {
  display: flex; align-items: center; gap: 18px;
  padding: 24px; border-bottom: 1px solid var(--border);
}
.profile-avatar {
  width: 56px; height: 56px; background: var(--accent-grad);
  border-radius: 16px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #fff; flex-shrink: 0; box-shadow: var(--accent-glow);
}
.profile-details h2 { font-size: 18px; font-weight: 700; }
.profile-details p { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.profile-details small { font-size: 12px; color: var(--text-muted); }

.profile-lang { display: flex; align-items: center; gap: 14px; padding: 14px 24px; background: rgba(0,0,0,.1); }
.lang-label { font-size: 13px; color: var(--text-muted); }
.lang-flags { display: flex; gap: 6px; flex-wrap: wrap; }
.lang-flag {
  background: var(--border); border: 1px solid var(--border-light);
  border-radius: var(--radius-sm); padding: 5px 10px;
  font-size: 13px; color: var(--text-soft); cursor: pointer; transition: all var(--transition);
}
.lang-flag:hover { border-color: var(--accent); color: var(--text-primary); }
.lang-flag.active { background: rgba(124,58,237,.15); border-color: rgba(124,58,237,.35); color: #a78bfa; }

.service-status-card {}
.service-status-header {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.service-status-header h3 { font-size: 16px; font-weight: 700; }
.service-status-stats { padding: 16px 24px; display: flex; flex-direction: column; gap: 14px; }

.stat-item { display: flex; align-items: center; gap: 14px; }
.stat-icon {
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.stat-icon.blue { background: rgba(59,130,246,.12); color: var(--blue); }
.stat-icon.red  { background: rgba(239,68,68,.1);   color: var(--red); }
.stat-icon.green{ background: rgba(16,185,129,.1);  color: var(--green); }
.stat-info { flex: 1; }
.stat-value { font-size: 16px; font-weight: 700; }
.stat-label { font-size: 12px; color: var(--text-muted); }
.stat-bar { width: 80px; height: 4px; background: var(--border-light); border-radius: 2px; overflow: hidden; }
.stat-bar-fill { height: 100%; background: var(--blue); border-radius: 2px; transition: width .5s ease; }
.stat-bar-fill.red { background: var(--red); }

.service-action { padding: 16px 24px; border-top: 1px solid var(--border); }

.empty-service-card {}
.empty-service-content {
  display: flex; flex-direction: column; align-items: center;
  padding: 48px 24px; gap: 16px; text-align: center;
}
.empty-service-content i { color: var(--accent); opacity: .8; }
.empty-service-content h3 { font-size: 18px; font-weight: 700; }
.empty-service-content p { color: var(--text-muted); font-size: 14px; max-width: 280px; }

/* === DATA TABLE === */
.table-responsive { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  padding: 12px 16px; background: rgba(0,0,0,.2);
  font-size: 11px; font-weight: 700; letter-spacing: .8px;
  color: var(--text-muted); text-align: left; text-transform: uppercase;
}
.data-table td {
  padding: 12px 16px; border-top: 1px solid var(--border);
  color: var(--text-soft); vertical-align: middle;
}
.data-table tbody tr:hover td { background: rgba(255,255,255,.02); }
.data-table .url-cell { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: monospace; font-size: 12px; }
.text-muted { color: var(--text-muted); }

/* === MODAL === */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 999; opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.show { opacity: 1; pointer-events: all; }

.modal-box {
  background: #14213a; border: 1px solid var(--border-light);
  border-radius: 16px; width: 420px; max-width: calc(100vw - 32px);
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
  transform: scale(.95); transition: transform var(--transition);
}
.modal-overlay.show .modal-box { transform: scale(1); }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 16px; font-weight: 700; }
.modal-close {
  background: none; border: none; color: var(--text-muted); font-size: 18px;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); transition: all var(--transition);
}
.modal-close:hover { background: var(--border); color: var(--text-primary); }
.modal-body { padding: 20px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--border); }

.key-message { padding: 10px 12px; border-radius: var(--radius-sm); font-size: 13px; }
.key-message.success { background: rgba(16,185,129,.1); color: var(--green); border: 1px solid rgba(16,185,129,.2); }
.key-message.error   { background: rgba(239,68,68,.1);  color: var(--red);   border: 1px solid rgba(239,68,68,.2); }

/* === TOAST === */
.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: 9999; max-width: 360px;
}

.toast {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  background: #1a2235; border: 1px solid var(--border-light);
  border-radius: var(--radius); box-shadow: 0 8px 32px rgba(0,0,0,.4);
  animation: slideIn .25s ease; font-size: 14px;
}
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.toast.fade-out { animation: slideOut .3s ease forwards; }
@keyframes slideOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }

.toast-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.toast.success .toast-icon { color: var(--green); }
.toast.error   .toast-icon { color: var(--red); }
.toast.warning .toast-icon { color: var(--yellow); }
.toast.info    .toast-icon { color: var(--blue); }
.toast-content { flex: 1; }
.toast-title { font-weight: 600; margin-bottom: 2px; }
.toast-msg { color: var(--text-soft); font-size: 13px; }

/* === ADMIN === */
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  display: flex; flex-direction: column; gap: 12px;
}
.stat-card-header { display: flex; align-items: center; justify-content: space-between; }
.stat-card-title { font-size: 13px; font-weight: 500; color: var(--text-muted); }
.stat-card-icon { width: 36px; height: 36px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 15px; }
.stat-card-value { font-size: 28px; font-weight: 800; }
.stat-card-sub { font-size: 12px; color: var(--text-muted); }

.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 180px; }

/* === AUTH === */
.auth-body { min-height: 100vh; background: var(--bg-base); display: flex; }
.auth-page { display: flex; min-height: 100vh; width: 100%; }

.auth-illustration {
  flex: 1; background: var(--bg-sidebar); border-right: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.auth-illustration::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(124,58,237,.18), transparent 60%),
              radial-gradient(ellipse at 80% 80%, rgba(79,70,229,.12), transparent 60%);
}

.auth-illustration-content { position: relative; z-index: 2; text-align: center; }

.illus-icon {
  width: 120px; height: 120px;
  background: rgba(124,58,237,.12); border: 1px solid rgba(124,58,237,.25);
  border-radius: 32px; display: flex; align-items: center; justify-content: center;
  margin: 0 auto; font-size: 48px; color: #7C3AED;
  box-shadow: 0 0 60px rgba(124,58,237,.2);
}

.gear-1, .gear-2 { position: absolute; color: rgba(124,58,237,.15); animation: gearSpin 12s linear infinite; }
.gear-1 { top: 30%; left: 15%; }
.gear-2 { bottom: 25%; right: 15%; animation-direction: reverse; animation-duration: 18s; }
@keyframes gearSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.auth-form-side { width: 460px; display: flex; align-items: center; justify-content: center; padding: 40px 32px; }
.auth-form-container { width: 100%; max-width: 380px; }

.auth-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 32px; }
.auth-logo .logo-text { font-size: 22px; }

.form-actions-row { display: flex; justify-content: flex-end; margin-bottom: 16px; }
.forgot-link { font-size: 13px; color: var(--text-muted); }
.forgot-link:hover { color: #a78bfa; }

.auth-switch { text-align: center; font-size: 13px; color: var(--text-muted); margin-top: 20px; }
.auth-switch a { color: #a78bfa; font-weight: 600; }
.auth-switch a:hover { color: #c4b5fd; }

.auth-languages { display: flex; gap: 10px; justify-content: center; margin-top: 28px; }
.auth-languages span { font-size: 20px; cursor: pointer; opacity: .6; transition: opacity var(--transition); }
.auth-languages span:hover { opacity: 1; }

.alert { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 16px; }
.alert-success { background: rgba(16,185,129,.1); color: var(--green); border: 1px solid rgba(16,185,129,.2); }
.alert-danger  { background: rgba(239,68,68,.1);  color: var(--red);   border: 1px solid rgba(239,68,68,.2); }

/* === MISC === */
.text-center { text-align: center; }
.py-5 { padding-top: 48px; padding-bottom: 48px; }
.w-100 { width: 100%; }
.text-left { text-align: left; }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .service-stats-row { grid-template-columns: repeat(2, 1fr); }
  .stat-pill:nth-child(2) { border-right: none; }
}

@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .auth-illustration { display: none; }
  .auth-form-side { width: 100%; }
  .download-form { flex-direction: column; }
  .download-form .btn-download { width: 100%; }
  .service-stats-row { grid-template-columns: repeat(2, 1fr); }
  .history-item { flex-wrap: wrap; }
  .history-meta { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .filter-row { flex-direction: column; align-items: flex-start; }
  .filter-summary { margin-left: 0; }
}

@media (max-width: 480px) {
  .page-content { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr; }
}
