/* ============================================================
   EDU Admin Panel — style.css
   Tema: Industrial Minimal / Dark Accent
   ============================================================ */

:root {
  --bg:          #0e0f11;
  --bg-card:     #16181c;
  --bg-hover:    #1e2127;
  --border:      #2a2d35;
  --accent:      #4f8ef7;
  --accent-dim:  #1e3a6e;
  --danger:      #e05252;
  --success:     #3ecf8e;
  --warning:     #f5a623;
  --text:        #e8eaf0;
  --text-muted:  #6b7280;
  --sidebar-w:   240px;
  --topbar-h:    60px;
  --radius:      8px;
  --font-mono:   'Space Mono', monospace;
  --font-body:   'DM Sans', sans-serif;
  --shadow:      0 4px 24px rgba(0,0,0,.45);
}

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

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
}

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

/* ---- LAYOUT ---- */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ---- SIDEBAR ---- */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform .25s ease;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 18px;
  border-bottom: 1px solid var(--border);
}

.logo-icon {
  font-size: 28px;
  color: var(--accent);
  font-family: var(--font-mono);
}

.logo-text {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .05em;
  line-height: 1.3;
  color: var(--text);
}
.logo-text small { color: var(--text-muted); font-weight: 400; }

.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
  transition: background .15s, color .15s;
  margin-bottom: 2px;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text); text-decoration: none; }
.nav-item.active { background: var(--accent-dim); color: var(--accent); }
.nav-icon { width: 20px; text-align: center; font-size: 15px; }

.sidebar-footer {
  padding: 14px;
  border-top: 1px solid var(--border);
}

.admin-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.admin-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
}

.admin-detail {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.admin-name  { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-email { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.btn-logout {
  display: block;
  text-align: center;
  padding: 8px;
  border-radius: var(--radius);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  transition: all .15s;
}
.btn-logout:hover { background: var(--danger); color: #fff; border-color: var(--danger); text-decoration: none; }

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

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

.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
}

.page-title {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .04em;
  flex: 1;
}

.topbar-right { display: flex; align-items: center; gap: 10px; }

.domain-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--accent-dim);
  color: var(--accent);
  padding: 3px 10px;
  border-radius: 99px;
  border: 1px solid var(--accent);
}

/* ---- PAGE BODY ---- */
.page-body { padding: 28px 28px; flex: 1; }

/* ---- CARDS ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 20px;
}
.card-title {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .05em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ---- STAT CARDS ---- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
}
.stat-card.danger::before  { background: var(--danger); }
.stat-card.success::before { background: var(--success); }
.stat-card.warning::before { background: var(--warning); }

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 8px;
}
.stat-value {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.stat-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ---- TABLE ---- */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
}
th {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-hover); }

/* ---- BADGES ---- */
.badge {
  display: inline-block;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 99px;
  font-weight: 600;
  letter-spacing: .05em;
}
.badge-active    { background: #0e3d27; color: var(--success); }
.badge-suspended { background: #3d1717; color: var(--danger); }
.badge-domain    { background: var(--accent-dim); color: var(--accent); }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .15s;
  font-family: var(--font-body);
}
.btn-primary   { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #3a7ce8; color: #fff; text-decoration: none; }
.btn-danger    { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c44040; text-decoration: none; }
.btn-ghost     { background: transparent; border-color: var(--border); color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); text-decoration: none; }
.btn-sm        { padding: 5px 10px; font-size: 12px; }

/* ---- FORM ---- */
.form-group {
  margin-bottom: 16px;
}
.form-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}
.form-control {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 12px;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-family: var(--font-body);
  transition: border .15s;
}
.form-control:focus {
  outline: none;
  border-color: var(--accent);
}
select.form-control option { background: var(--bg-card); }

/* ---- SEARCH BAR ---- */
.search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.search-bar .form-control { max-width: 320px; }

/* ---- MODAL ---- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  width: 480px;
  max-width: 95vw;
  box-shadow: var(--shadow);
  animation: slideUp .2s ease;
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.modal-title {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* ---- ALERT ---- */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
}
.alert-danger  { background: #3d1717; color: var(--danger); border: 1px solid #5a2020; }
.alert-success { background: #0e3d27; color: var(--success); border: 1px solid #1a5c3a; }

/* ---- PAGINATION ---- */
.pagination {
  display: flex;
  gap: 6px;
  margin-top: 16px;
  align-items: center;
}
.page-info { font-size: 12px; color: var(--text-muted); flex: 1; }

/* ---- LOG TABLE ---- */
.log-action {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  background: var(--bg);
  border-radius: 4px;
  color: var(--accent);
}

/* ---- LOGIN PAGE ---- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(79,142,247,.07) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(62,207,142,.05) 0%, transparent 50%);
}

.login-box {
  width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px 36px;
  text-align: center;
  box-shadow: var(--shadow);
}
.login-logo {
  font-family: var(--font-mono);
  font-size: 48px;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}
.login-title {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}
.login-sub {
  color: var(--text-muted);
  font-size: 12.5px;
  margin-bottom: 28px;
}
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  background: #fff;
  color: #333;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: box-shadow .15s;
  text-decoration: none;
}
.btn-google:hover { box-shadow: 0 4px 16px rgba(255,255,255,.15); text-decoration: none; }
.google-logo { width: 20px; height: 20px; }

.login-domains {
  margin-top: 22px;
  font-size: 11.5px;
  color: var(--text-muted);
}
.login-domains code {
  background: var(--bg);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--accent);
  font-size: 11px;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,.5);
  }
  .main-content { margin-left: 0; }
  .sidebar-toggle { display: block; }
  .page-body { padding: 20px 16px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---- LOADING SKELETON ---- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 4px;
  height: 14px;
  margin-bottom: 6px;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
