/* ═══════════════════════════════════════════════════════════════
   SiKopi — Sistem Kompetensi Pendidik
   Static Version — Coffee Theme
   ═══════════════════════════════════════════════════════════════ */

/* ── Theme Variables ── */
:root {
  --primary: #8a4317;
  --primary-light: #a85a1c;
  --primary-dark: #5e2d0f;
  --primary-foreground: #fff7ec;
  --primary-rgb: 138, 67, 23;

  --background: #fdfaf5;
  --card: #ffffff;
  --foreground: #2a1a0f;
  --muted: #f5ede0;
  --muted-foreground: #8a7560;
  --border: #e8dcc8;

  --success: #5a7a3a;
  --success-light: #e8f0d8;
  --warning: #c97a1c;
  --warning-light: #fdf0dc;
  --destructive: #b53d2d;
  --destructive-light: #fce8e5;
  --info: #4a6a8a;
  --info-light: #dce8f2;

  --radius: 0.75rem;
  --radius-sm: 0.5rem;
  --shadow-sm: 0 1px 2px rgba(42, 26, 15, 0.06);
  --shadow: 0 2px 8px rgba(42, 26, 15, 0.08);
  --shadow-lg: 0 8px 24px rgba(42, 26, 15, 0.12);

  --sidebar-w: 260px;
  --header-h: 64px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Dark mode */
[data-theme="dark"] {
  --primary: #c97a3c;
  --primary-light: #d9945a;
  --primary-dark: #8a4317;
  --primary-foreground: #1a0f08;
  --primary-rgb: 201, 122, 60;

  --background: #1a120b;
  --card: #2a1f15;
  --foreground: #f5ede0;
  --muted: #352818;
  --muted-foreground: #a89580;
  --border: #3d2f1f;

  --success-light: #2a3a1f;
  --warning-light: #3a2a14;
  --destructive-light: #3a1f1a;
  --info-light: #1f2a3a;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }
img, svg { display: block; max-width: 100%; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted-foreground); }

/* ═══════════════════════════════════════════════════════════════
   LOGIN SCREEN
   ═══════════════════════════════════════════════════════════════ */
.login-container {
  display: flex;
  min-height: 100vh;
}

/* Left brand panel */
.login-brand {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 50%;
  padding: 2.5rem;
  background: linear-gradient(135deg, #6b3410 0%, #4a230a 50%, #2e1605 100%);
  color: #fff7ec;
  position: relative;
  overflow: hidden;
}
.login-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,247,236,0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255,247,236,0.06) 0%, transparent 40%);
  pointer-events: none;
}
.login-brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
  z-index: 1;
}
.login-brand-logo .logo-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
}
.login-brand-logo svg { width: 28px; height: 28px; }
.login-brand-logo h1 { font-size: 1.25rem; font-weight: 700; }
.login-brand-logo p { font-size: 0.75rem; opacity: 0.7; }

.login-brand-hero { position: relative; z-index: 1; max-width: 420px; }
.login-brand-hero h2 {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}
.login-brand-hero p { font-size: 0.875rem; opacity: 0.8; }
.login-brand-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.login-brand-feature {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(4px);
  font-size: 0.75rem;
  font-weight: 500;
}
.login-brand-feature svg { width: 16px; height: 16px; flex-shrink: 0; }

.login-brand-footer { position: relative; z-index: 1; }
.login-brand-footer p { font-size: 0.75rem; opacity: 0.6; }
.login-brand-footer p + p { font-size: 0.65rem; opacity: 0.45; margin-top: 0.25rem; }

/* Right login form */
.login-form-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 2.5rem 1.5rem;
}
.login-form-wrapper { width: 100%; max-width: 400px; }

.login-mobile-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 2rem;
}
.login-mobile-logo .logo-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
}
.login-mobile-logo svg { width: 24px; height: 24px; }
.login-mobile-logo h1 { font-size: 1.1rem; font-weight: 700; }
.login-mobile-logo p { font-size: 0.7rem; color: var(--muted-foreground); }

.login-form-wrapper h2 { font-size: 1.5rem; font-weight: 700; }
.login-form-wrapper > p { font-size: 0.875rem; color: var(--muted-foreground); margin-top: 0.25rem; }

/* Form card */
.form-card {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
}
.form-input {
  width: 100%;
  height: 44px;
  padding: 0 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--background);
  color: var(--foreground);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}
.password-wrapper { position: relative; }
.password-wrapper .form-input { padding-right: 2.75rem; }
.password-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-foreground);
  padding: 4px;
}
.password-toggle:hover { color: var(--foreground); }
.password-toggle svg { width: 18px; height: 18px; }

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}
.checkbox-wrapper input { width: 16px; height: 16px; accent-color: var(--primary); }
.checkbox-wrapper span { font-size: 0.75rem; color: var(--muted-foreground); }
.forgot-link {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
}
.forgot-link:hover { text-decoration: underline; }

.form-error {
  margin-bottom: 1rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--destructive-light);
  border: 1px solid rgba(181, 61, 45, 0.3);
  color: var(--destructive);
  font-size: 0.8125rem;
  animation: shake 0.4s;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 44px;
  padding: 0 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--primary-foreground);
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.25);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.35);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--foreground);
}
.btn-outline:hover { background: var(--muted); border-color: var(--primary); }
.btn-ghost { background: transparent; color: var(--muted-foreground); }
.btn-ghost:hover { background: var(--muted); color: var(--foreground); }
.btn-danger { background: var(--destructive); color: #fff; }
.btn-danger:hover { opacity: 0.9; }
.btn-sm { height: 36px; padding: 0 0.875rem; font-size: 0.8125rem; }
.btn-icon { width: 36px; height: 36px; padding: 0; }

.security-note {
  margin-top: 1.5rem;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--muted);
  border: 1px solid var(--border);
  display: flex;
  gap: 0.625rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}
.security-note svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--primary); margin-top: 2px; }

.login-footer {
  margin-top: 2rem;
  text-align: center;
}
.login-footer p { font-size: 0.75rem; color: var(--muted-foreground); }
.login-footer p + p { font-size: 0.65rem; opacity: 0.7; margin-top: 0.25rem; }

/* ═══════════════════════════════════════════════════════════════
   APP SHELL
   ═══════════════════════════════════════════════════════════════ */
.app-container {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  background: var(--card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform 0.3s;
}
.sidebar-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.sidebar-header .logo-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
}
.sidebar-header svg { width: 22px; height: 22px; }
.sidebar-header h1 { font-size: 1.1rem; font-weight: 700; }
.sidebar-header p { font-size: 0.65rem; color: var(--muted-foreground); }

.sidebar-nav {
  flex: 1;
  padding: 0.75rem;
  overflow-y: auto;
}
.nav-section { margin-bottom: 0.5rem; }
.nav-section-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
  padding: 0.5rem 0.75rem 0.25rem;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 2px;
}
.nav-item:hover { background: var(--muted); }
.nav-item.active {
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
  font-weight: 600;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item .badge {
  margin-left: auto;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.625rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
}

.sidebar-footer {
  padding: 0.75rem;
  border-top: 1px solid var(--border);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}
.sidebar-user:hover { background: var(--muted); }
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--primary-foreground);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 0.8125rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 0.65rem; color: var(--muted-foreground); }

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

/* Header */
.app-header {
  height: var(--header-h);
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-left { display: flex; align-items: center; gap: 0.75rem; }
.header-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
}
.header-menu-btn:hover { background: var(--muted); }
.header-menu-btn svg { width: 22px; height: 22px; }
.header-title { font-size: 1.125rem; font-weight: 700; }
.header-subtitle { font-size: 0.75rem; color: var(--muted-foreground); }

.header-right { display: flex; align-items: center; gap: 0.5rem; }
.header-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
}
.header-btn:hover { background: var(--muted); color: var(--foreground); }
.header-btn svg { width: 20px; height: 20px; }

/* Main content */
.main-content {
  flex: 1;
  padding: 1.5rem;
  max-width: 1400px;
  width: 100%;
}

/* Footer */
.app-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--muted);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}
.app-footer strong { color: var(--foreground); }
.app-footer .dot { color: var(--border); }

/* ═══════════════════════════════════════════════════════════════
   COMPONENTS
   ═══════════════════════════════════════════════════════════════ */

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: var(--shadow); }
.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.card-header h3 { font-size: 1rem; font-weight: 600; }
.card-header p { font-size: 0.75rem; color: var(--muted-foreground); }
.card-body { padding: 1.25rem; }

/* Stat cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.stat-card-label { font-size: 0.75rem; font-weight: 600; color: var(--muted-foreground); text-transform: uppercase; letter-spacing: 0.03em; }
.stat-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stat-card-icon svg { width: 18px; height: 18px; }
.stat-card-icon.primary { background: rgba(var(--primary-rgb), 0.1); color: var(--primary); }
.stat-card-icon.success { background: var(--success-light); color: var(--success); }
.stat-card-icon.warning { background: var(--warning-light); color: var(--warning); }
.stat-card-icon.info { background: var(--info-light); color: var(--info); }
.stat-card-value { font-size: 1.75rem; font-weight: 700; line-height: 1.2; }
.stat-card-hint { font-size: 0.7rem; color: var(--muted-foreground); margin-top: 0.25rem; }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
}
.badge-neutral { background: var(--muted); color: var(--muted-foreground); }
.badge-pending { background: var(--warning-light); color: var(--warning); }
.badge-submitted { background: var(--info-light); color: var(--info); }
.badge-reviewed { background: var(--success-light); color: var(--success); }
.badge-draft { background: var(--muted); color: var(--muted-foreground); }
.badge-published { background: var(--success-light); color: var(--success); }
.badge-score {
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
  font-weight: 700;
}

/* Progress bar */
.progress {
  height: 8px;
  background: var(--muted);
  border-radius: 4px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* Tables */
.table-wrapper { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted-foreground);
  background: var(--muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--muted); }

/* Grid layouts */
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* Section */
.section { margin-bottom: 1.5rem; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.section-title { font-size: 1rem; font-weight: 700; }
.section-subtitle { font-size: 0.75rem; color: var(--muted-foreground); }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--muted-foreground);
}
.empty-state svg { width: 48px; height: 48px; margin: 0 auto 1rem; opacity: 0.5; }
.empty-state h3 { font-size: 1rem; font-weight: 600; color: var(--foreground); margin-bottom: 0.25rem; }
.empty-state p { font-size: 0.8125rem; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
  animation: fadeIn 0.2s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-lg { max-width: 760px; }
.modal-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 { font-size: 1rem; font-weight: 700; }
.modal-header p { font-size: 0.75rem; color: var(--muted-foreground); }
.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
}
.modal-close:hover { background: var(--muted); color: var(--foreground); }
.modal-close svg { width: 18px; height: 18px; }
.modal-body { padding: 1.25rem; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* Toast */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.toast {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  font-size: 0.8125rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: slideInRight 0.3s;
  min-width: 240px;
}
@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--destructive); }
.toast.info { border-left: 3px solid var(--info); }
.toast svg { width: 18px; height: 18px; flex-shrink: 0; }
.toast.success svg { color: var(--success); }
.toast.error svg { color: var(--destructive); }
.toast.info svg { color: var(--info); }

/* Tabs */
.tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1rem;
}
.tab {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: all 0.15s;
}
.tab:hover { color: var(--foreground); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* File upload zone */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb), 0.03);
}
.upload-zone svg { width: 40px; height: 40px; margin: 0 auto 0.5rem; color: var(--muted-foreground); }
.upload-zone p { font-size: 0.875rem; color: var(--muted-foreground); }
.upload-zone strong { color: var(--primary); }

/* Slider */
.slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--muted);
  outline: none;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: none;
}

/* Textarea */
textarea.form-input {
  height: auto;
  min-height: 80px;
  padding: 0.625rem 0.75rem;
  resize: vertical;
}

/* Select */
select.form-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a7560' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 18px;
  padding-right: 2.5rem;
}

/* Category icon chip */
.cat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
  flex-shrink: 0;
}
.cat-icon svg { width: 20px; height: 20px; }

/* Item card */
.item-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.item-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.item-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}
.item-card-title { font-size: 0.875rem; font-weight: 600; }
.item-card-desc { font-size: 0.7rem; color: var(--muted-foreground); }
.item-card-footer { display: flex; align-items: center; gap: 0.375rem; flex-wrap: wrap; }

/* Activity item */
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  margin-top: 6px;
  flex-shrink: 0;
}
.activity-text { font-size: 0.8125rem; flex: 1; }
.activity-time { font-size: 0.7rem; color: var(--muted-foreground); }

/* Scrollable list */
.scroll-list {
  max-height: 360px;
  overflow-y: auto;
}

/* Category mini card */
.cat-mini-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.cat-mini-card:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.cat-mini-card .cat-info { flex: 1; min-width: 0; }
.cat-mini-card .cat-name { font-size: 0.8125rem; font-weight: 600; }
.cat-mini-card .cat-progress { font-size: 0.7rem; color: var(--muted-foreground); }

/* Backdrop for mobile sidebar */
.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 99;
  display: none;
}

/* Accordion */
.accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  overflow: hidden;
}
.accordion-header {
  padding: 0.875rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.875rem;
  background: var(--card);
}
.accordion-header:hover { background: var(--muted); }
.accordion-header svg { width: 18px; height: 18px; transition: transform 0.2s; }
.accordion-item.open .accordion-header svg { transform: rotate(180deg); }
.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s;
  background: var(--muted);
}
.accordion-item.open .accordion-body { max-height: 500px; }
.accordion-body-inner { padding: 0.875rem 1rem; font-size: 0.8125rem; color: var(--muted-foreground); }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (min-width: 1024px) {
  .login-brand { display: flex; }
  .login-mobile-logo { display: none; }
}

@media (max-width: 1023px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar.open + .backdrop { display: block; }
  .main-area { margin-left: 0; }
  .header-menu-btn { display: flex; }
}

@media (max-width: 768px) {
  .main-content { padding: 1rem; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 0.625rem; }
  .stat-card { padding: 0.875rem; }
  .stat-card-value { font-size: 1.375rem; }
  .login-form-side { padding: 1.5rem 1rem; }
  .app-header { padding: 0 1rem; }
  .header-title { font-size: 1rem; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .login-brand-features { grid-template-columns: 1fr; }
  .modal { max-width: 100%; max-height: 95vh; }
  .app-footer { font-size: 0.65rem; gap: 0.375rem; padding: 0.625rem 1rem; flex-direction: column; gap: 0.25rem; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
}

/* Utility */
.hidden { display: none !important; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.text-sm { font-size: 0.8125rem; }
.text-xs { font-size: 0.7rem; }
.text-muted { color: var(--muted-foreground); }
.text-primary { color: var(--primary); }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-center { text-align: center; }
.w-full { width: 100%; }
.flex-wrap { flex-wrap: wrap; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
