/* ============================================
   EKANG VILLAGE REPOSITORY — SDG ACADEMY ID
   Palette: bright green + white
   ============================================ */

:root {
  --green-50:  #f0fdf4;
  --green-100: #dcfce7;
  --green-200: #bbf7d0;
  --green-300: #86efac;
  --green-400: #4ade80;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --green-700: #15803d;
  --green-800: #166534;
  --green-900: #14532d;

  --ink-900: #0b1f14;
  --ink-700: #294b39;
  --ink-500: #5a7566;
  --ink-400: #8ba193;
  --ink-300: #b7c5bc;
  --ink-200: #dbe4de;
  --ink-100: #eef3ef;
  --ink-50:  #f7faf8;
  --white:   #ffffff;

  --accent-lime: #a3e635;
  --danger: #dc2626;
  --warning: #f59e0b;

  --shadow-sm: 0 1px 2px rgba(20, 83, 45, 0.06), 0 1px 3px rgba(20, 83, 45, 0.04);
  --shadow-md: 0 4px 12px rgba(20, 83, 45, 0.08), 0 2px 4px rgba(20, 83, 45, 0.04);
  --shadow-lg: 0 12px 32px rgba(20, 83, 45, 0.12), 0 4px 8px rgba(20, 83, 45, 0.06);
  --shadow-xl: 0 24px 60px rgba(20, 83, 45, 0.18);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --font-sans: 'Plus Jakarta Sans', -apple-system, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html, body {
  font-family: var(--font-sans);
  color: var(--ink-900);
  background: var(--ink-50);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button { cursor: pointer; border: none; background: none; }

a { color: var(--green-700); text-decoration: none; }

/* ============================================
   LANDING PAGE
   ============================================ */
.landing {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1200px 600px at 85% -10%, var(--green-200) 0%, transparent 55%),
    radial-gradient(900px 500px at -10% 100%, var(--green-100) 0%, transparent 60%),
    linear-gradient(180deg, #ffffff 0%, var(--green-50) 100%);
}

.landing-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 56px;
  position: relative;
  z-index: 3;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--green-500), var(--green-700));
  display: grid; place-items: center;
  color: white; font-weight: 800; font-size: 20px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.brand-mark::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.3), transparent 60%);
}

.brand-text .brand-title {
  font-weight: 800; font-size: 16px; letter-spacing: -0.01em;
  color: var(--ink-900);
}
.brand-text .brand-sub {
  font-size: 12px; color: var(--ink-500);
  font-family: var(--font-mono);
}

.admin-badge-btn {
  padding: 10px 18px;
  background: white;
  border: 1px solid var(--ink-200);
  border-radius: 999px;
  font-weight: 600; font-size: 13px;
  color: var(--ink-700);
  display: flex; align-items: center; gap: 8px;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}
.admin-badge-btn:hover {
  border-color: var(--green-500);
  color: var(--green-700);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.admin-badge-btn .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green-500);
  box-shadow: 0 0 0 3px var(--green-100);
}

.landing-hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 40px 56px 80px;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  background: white;
  border: 1px solid var(--green-200);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--green-800);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.hero-eyebrow .chip {
  padding: 2px 8px;
  background: var(--green-500);
  color: white;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.04em;
}

.hero-title {
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink-900);
  margin-bottom: 20px;
}
.hero-title .accent {
  background: linear-gradient(120deg, var(--green-600), var(--green-400));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
}

.hero-desc {
  font-size: 17px;
  color: var(--ink-700);
  line-height: 1.6;
  max-width: 540px;
  margin-bottom: 36px;
}

.hero-cta {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 40px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  background: var(--green-600);
  color: white;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  transition: all 0.2s;
  box-shadow: 0 8px 20px rgba(22, 163, 74, 0.25), inset 0 -2px 0 rgba(0,0,0,0.08);
}
.btn-primary:hover {
  background: var(--green-700);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(22, 163, 74, 0.35), inset 0 -2px 0 rgba(0,0,0,0.08);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 24px;
  background: white;
  color: var(--ink-900);
  border: 1px solid var(--ink-200);
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s;
}
.btn-secondary:hover {
  border-color: var(--green-500);
  color: var(--green-700);
}

.hero-meta {
  display: flex;
  gap: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--ink-200);
}
.hero-meta-item {
  display: flex; flex-direction: column; gap: 4px;
}
.hero-meta-item .num {
  font-size: 24px; font-weight: 800; color: var(--green-700);
  letter-spacing: -0.02em;
}
.hero-meta-item .label {
  font-size: 12px; color: var(--ink-500);
  text-transform: uppercase; letter-spacing: 0.06em;
  font-weight: 600;
}

/* Hero visual — a stylized "file cabinet" */
.hero-visual {
  position: relative;
  height: 500px;
  perspective: 1200px;
}

.stack-card {
  position: absolute;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--ink-100);
}

.stack-card.card-1 {
  top: 40px; left: 20px;
  width: 280px; height: 340px;
  transform: rotate(-6deg);
  z-index: 1;
}
.stack-card.card-2 {
  top: 20px; right: 30px;
  width: 300px; height: 380px;
  transform: rotate(4deg);
  z-index: 2;
}
.stack-card.card-3 {
  top: 120px; left: 50%;
  transform: translateX(-50%) rotate(-1deg);
  width: 320px; height: 360px;
  z-index: 3;
}

.stack-card-head {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--ink-100);
}
.stack-card-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 11px;
  color: white;
  letter-spacing: 0.02em;
}
.stack-card-icon.pdf { background: linear-gradient(135deg, #ef4444, #dc2626); }
.stack-card-icon.ppt { background: linear-gradient(135deg, #f97316, #ea580c); }
.stack-card-icon.doc { background: linear-gradient(135deg, #3b82f6, #2563eb); }

.stack-card-head .meta {
  flex: 1; min-width: 0;
}
.stack-card-head .title {
  font-size: 13px; font-weight: 700;
  color: var(--ink-900);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stack-card-head .sub {
  font-size: 11px; color: var(--ink-500);
  font-family: var(--font-mono);
}

.stack-card-body {
  padding: 20px;
  display: flex; flex-direction: column; gap: 10px;
}
.skeleton-line {
  height: 8px;
  border-radius: 4px;
  background: var(--ink-100);
}
.skeleton-line.short { width: 60%; }
.skeleton-line.medium { width: 80%; }
.skeleton-line.long { width: 100%; }
.skeleton-line.accent { background: var(--green-200); }

.floating-badge {
  position: absolute;
  padding: 10px 14px;
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600;
  z-index: 4;
}
.floating-badge .icon {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--green-100);
  color: var(--green-700);
  display: grid; place-items: center;
  font-weight: 800;
}
.floating-badge.top-right {
  top: 30px; right: -10px;
  animation: float 4s ease-in-out infinite;
}
.floating-badge.bottom-left {
  bottom: 60px; left: -20px;
  animation: float 4s ease-in-out infinite 2s;
}
@keyframes float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.landing-footer {
  padding: 24px 56px;
  border-top: 1px solid var(--ink-200);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--ink-500);
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(10px);
  position: relative; z-index: 2;
}
.landing-footer .credit {
  font-family: var(--font-mono);
}
.landing-footer .credit strong { color: var(--ink-900); }

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: white;
}

.login-visual {
  background:
    radial-gradient(600px 400px at 20% 80%, var(--green-400) 0%, transparent 60%),
    linear-gradient(135deg, var(--green-700) 0%, var(--green-900) 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 48px;
  color: white;
}

.login-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at 30% 40%, black, transparent 70%);
}

.login-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.8);
  font-size: 14px;
  font-weight: 500;
  position: relative;
  z-index: 2;
  align-self: flex-start;
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  transition: all 0.2s;
}
.login-back:hover {
  background: rgba(255,255,255,0.1);
  color: white;
}

.login-visual-content {
  margin-top: auto;
  position: relative;
  z-index: 2;
}
.login-visual-content .kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--green-200);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}
.login-visual-content h2 {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.login-visual-content p {
  font-size: 15px;
  color: rgba(255,255,255,0.75);
  max-width: 420px;
  line-height: 1.6;
}

.login-visual-icons {
  position: absolute;
  top: 20%;
  right: 10%;
  z-index: 2;
}
.orbit-icon {
  position: absolute;
  padding: 14px 18px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: white;
  animation: float 5s ease-in-out infinite;
}
.orbit-icon:nth-child(1) { top: 0; left: 0; animation-delay: 0s; }
.orbit-icon:nth-child(2) { top: 80px; left: 120px; animation-delay: 1s; }
.orbit-icon:nth-child(3) { top: 180px; left: 20px; animation-delay: 2s; }
.orbit-icon:nth-child(4) { top: 240px; left: 140px; animation-delay: 3s; }

.login-form-side {
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.login-topbar {
  position: absolute;
  top: 32px;
  right: 32px;
  left: 32px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.admin-toggle {
  padding: 10px 18px;
  background: white;
  border: 1px solid var(--ink-200);
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  color: var(--ink-700);
  display: flex; align-items: center; gap: 8px;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}
.admin-toggle:hover {
  border-color: var(--green-500);
  color: var(--green-700);
}
.admin-toggle.active {
  background: var(--green-600);
  color: white;
  border-color: var(--green-600);
}
.admin-toggle .icon {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}

.login-form-wrap {
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
}

.login-form-wrap .role-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--green-100);
  color: var(--green-800);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.login-form-wrap.admin-mode .role-tag {
  background: #fef3c7;
  color: #92400e;
}

.login-form-wrap h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: var(--ink-900);
}
.login-form-wrap .subtitle {
  color: var(--ink-500);
  margin-bottom: 32px;
  font-size: 15px;
}

.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-700);
  margin-bottom: 8px;
}
.form-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--ink-200);
  border-radius: 10px;
  background: var(--ink-50);
  font-size: 15px;
  transition: all 0.2s;
}
.form-input:focus {
  outline: none;
  border-color: var(--green-500);
  background: white;
  box-shadow: 0 0 0 4px var(--green-100);
}

.form-error {
  padding: 12px 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--danger);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 18px;
  display: none;
}
.form-error.show { display: block; }

.login-submit {
  width: 100%;
  padding: 16px;
  background: var(--green-600);
  color: white;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  transition: all 0.2s;
  box-shadow: 0 6px 16px rgba(22, 163, 74, 0.25);
  margin-top: 8px;
}
.login-submit:hover {
  background: var(--green-700);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(22, 163, 74, 0.32);
}

.hint-box {
  margin-top: 24px;
  padding: 14px 16px;
  background: var(--green-50);
  border: 1px dashed var(--green-300);
  border-radius: 10px;
  font-size: 12px;
  color: var(--green-800);
  font-family: var(--font-mono);
  line-height: 1.7;
}
.hint-box strong { color: var(--green-900); }

/* ============================================
   DASHBOARD LAYOUT
   ============================================ */
.dashboard {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
  background: var(--ink-50);
}

.sidebar {
  background: linear-gradient(180deg, var(--green-700) 0%, var(--green-800) 100%);
  color: white;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 20px;
}
.sidebar-brand .mark {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: white;
  color: var(--green-700);
  display: grid; place-items: center;
  font-weight: 800; font-size: 18px;
}
.sidebar-brand .name {
  font-size: 14px; font-weight: 700;
  line-height: 1.2;
}
.sidebar-brand .sub {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  font-family: var(--font-mono);
}

.sidebar-section-label {
  padding: 0 12px;
  margin-bottom: 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  color: rgba(255,255,255,0.8);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 2px;
  width: 100%;
  text-align: left;
  position: relative;
}
.nav-item:hover {
  background: rgba(255,255,255,0.08);
  color: white;
}
.nav-item.active {
  background: white;
  color: var(--green-800);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.nav-item.active .nav-icon {
  background: var(--green-100);
  color: var(--green-700);
}
.nav-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  display: grid; place-items: center;
  flex-shrink: 0;
  transition: all 0.15s;
}
.nav-icon svg { width: 16px; height: 16px; }
.nav-item .badge {
  margin-left: auto;
  padding: 2px 8px;
  background: rgba(255,255,255,0.15);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.nav-item.active .badge {
  background: var(--green-100);
  color: var(--green-700);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.user-card {
  padding: 12px;
  background: rgba(255,255,255,0.08);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-lime), var(--green-400));
  color: var(--green-900);
  display: grid; place-items: center;
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-info .name {
  font-size: 13px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-info .role {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  font-family: var(--font-mono);
  text-transform: uppercase;
}

.footer-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  color: rgba(255,255,255,0.8);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
  width: 100%;
  text-align: left;
}
.footer-btn:hover {
  background: rgba(255,255,255,0.08);
  color: white;
}
.footer-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.footer-btn.logout {
  color: #fca5a5;
}
.footer-btn.logout:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #fecaca;
}

/* Main content */
.main {
  padding: 32px 40px;
  overflow-x: hidden;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 20px;
}

.page-title-wrap {
  flex: 1;
  min-width: 300px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-500);
  margin-bottom: 10px;
  font-family: var(--font-mono);
}
.breadcrumb span.sep { opacity: 0.5; }
.breadcrumb span.current { color: var(--green-700); font-weight: 600; }

.page-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  margin-bottom: 6px;
}
.page-subtitle {
  font-size: 15px;
  color: var(--ink-500);
  max-width: 640px;
}

.header-actions {
  display: flex; align-items: center; gap: 12px;
}

.search-box {
  position: relative;
  width: 260px;
}
.search-box input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  border: 1px solid var(--ink-200);
  border-radius: 10px;
  background: white;
  font-size: 13px;
  transition: all 0.2s;
}
.search-box input:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 4px var(--green-100);
}
.search-box svg {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--ink-400);
  width: 16px; height: 16px;
}

/* Beranda / Home */
.welcome-card {
  background: linear-gradient(120deg, var(--green-600), var(--green-500));
  color: white;
  border-radius: var(--radius-xl);
  padding: 36px 40px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(22, 163, 74, 0.25);
}
.welcome-card::before {
  content: '';
  position: absolute;
  top: -50%; right: -10%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.15), transparent 70%);
  border-radius: 50%;
}
.welcome-card::after {
  content: '';
  position: absolute;
  bottom: -30%; left: -5%;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(163, 230, 53, 0.2), transparent 70%);
  border-radius: 50%;
}
.welcome-card .kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--green-100);
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  position: relative;
}
.welcome-card h2 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  position: relative;
  max-width: 640px;
}
.welcome-card p {
  color: rgba(255,255,255,0.85);
  max-width: 640px;
  font-size: 15px;
  position: relative;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: white;
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--ink-100);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
  cursor: pointer;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--green-200);
}
.stat-card .stat-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  margin-bottom: 14px;
}
.stat-card .stat-icon svg { width: 20px; height: 20px; }
.stat-card.green .stat-icon { background: var(--green-100); color: var(--green-700); }
.stat-card.blue .stat-icon { background: #dbeafe; color: #1d4ed8; }
.stat-card.orange .stat-icon { background: #fed7aa; color: #c2410c; }
.stat-card.purple .stat-icon { background: #e9d5ff; color: #7e22ce; }

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--ink-900);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 4px;
}
.stat-card .stat-label {
  font-size: 13px;
  color: var(--ink-500);
  font-weight: 500;
}

/* Recent activity block */
.section-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-900);
}
.section-link {
  color: var(--green-700);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
  cursor: pointer;
}
.section-link svg { width: 14px; height: 14px; }
.btn-primary svg, .btn-secondary svg { width: 16px; height: 16px; }
.login-submit svg { width: 16px; height: 16px; }
.admin-toggle svg { width: 14px; height: 14px; }
.login-back svg { width: 14px; height: 14px; }
.admin-hero .icon svg { width: 28px; height: 28px; }
.floating-badge .icon svg { width: 14px; height: 14px; }

.recent-list {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--ink-100);
  overflow: hidden;
}

.recent-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--ink-100);
  transition: background 0.15s;
}
.recent-item:last-child { border-bottom: none; }
.recent-item:hover { background: var(--ink-50); }

.file-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 10px;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.file-icon.pdf { background: linear-gradient(135deg, #ef4444, #dc2626); }
.file-icon.pptx { background: linear-gradient(135deg, #f97316, #ea580c); }
.file-icon.docx { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.file-icon.txt { background: linear-gradient(135deg, #64748b, #475569); }

.recent-item .info { flex: 1; min-width: 0; }
.recent-item .info .name {
  font-size: 14px; font-weight: 600;
  color: var(--ink-900);
  margin-bottom: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.recent-item .info .meta {
  font-size: 12px; color: var(--ink-500);
  font-family: var(--font-mono);
}
.recent-item .cat-pill {
  padding: 4px 10px;
  background: var(--green-50);
  color: var(--green-800);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

/* Document grid */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 8px 14px;
  background: white;
  border: 1px solid var(--ink-200);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-700);
  transition: all 0.15s;
  display: inline-flex; align-items: center; gap: 6px;
}
.filter-chip:hover {
  border-color: var(--green-500);
  color: var(--green-700);
}
.filter-chip.active {
  background: var(--green-600);
  border-color: var(--green-600);
  color: white;
}
.filter-chip .count {
  padding: 1px 7px;
  background: var(--ink-100);
  border-radius: 999px;
  font-size: 11px;
  color: var(--ink-700);
}
.filter-chip.active .count {
  background: rgba(255,255,255,0.25);
  color: white;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.doc-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--ink-100);
  overflow: hidden;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
}
.doc-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--green-200);
}

.doc-thumb {
  height: 130px;
  background: linear-gradient(135deg, var(--green-50), var(--green-100));
  position: relative;
  display: grid; place-items: center;
  overflow: hidden;
}
.doc-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(45deg, transparent 48%, rgba(22, 163, 74, 0.06) 48%, rgba(22, 163, 74, 0.06) 52%, transparent 52%);
  background-size: 12px 12px;
}
.doc-thumb .type-badge {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  color: white;
  letter-spacing: 0.05em;
  position: relative;
  box-shadow: var(--shadow-md);
}
.doc-thumb .type-badge.pdf { background: linear-gradient(135deg, #ef4444, #dc2626); }
.doc-thumb .type-badge.pptx { background: linear-gradient(135deg, #f97316, #ea580c); }
.doc-thumb .type-badge.docx { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.doc-thumb .type-badge.txt { background: linear-gradient(135deg, #64748b, #475569); }

.doc-thumb .date-badge {
  position: absolute;
  top: 12px; right: 12px;
  padding: 4px 10px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-700);
  font-family: var(--font-mono);
}

.doc-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.doc-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: 6px;
  line-height: 1.3;
}
.doc-desc {
  font-size: 13px;
  color: var(--ink-500);
  margin-bottom: 14px;
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.doc-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}
.doc-btn {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: all 0.15s;
}
.doc-btn svg { width: 14px; height: 14px; }
.doc-btn.preview {
  background: var(--green-50);
  color: var(--green-700);
  border: 1px solid var(--green-200);
}
.doc-btn.preview:hover {
  background: var(--green-100);
}
.doc-btn.download {
  background: var(--green-600);
  color: white;
}
.doc-btn.download:hover {
  background: var(--green-700);
}
.doc-btn.delete {
  padding: 10px 12px;
  flex: 0;
  background: #fef2f2;
  color: var(--danger);
  border: 1px solid #fecaca;
}
.doc-btn.delete:hover { background: #fee2e2; }

.empty-state {
  padding: 60px 20px;
  text-align: center;
  background: white;
  border: 2px dashed var(--ink-200);
  border-radius: var(--radius-lg);
}
.empty-state .empty-icon {
  width: 72px; height: 72px;
  border-radius: 20px;
  background: var(--green-50);
  color: var(--green-600);
  display: grid; place-items: center;
  margin: 0 auto 20px;
}
.empty-state .empty-icon svg { width: 32px; height: 32px; }
.empty-state h3 {
  font-size: 18px;
  color: var(--ink-900);
  margin-bottom: 6px;
  font-weight: 700;
}
.empty-state p {
  color: var(--ink-500);
  font-size: 14px;
}

/* ============================================
   PROFILE PROGRAM PAGE
   ============================================ */
.profile-block {
  background: white;
  border-radius: var(--radius-xl);
  padding: 40px;
  border: 1px solid var(--ink-100);
  margin-bottom: 24px;
}
.profile-block h3 {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink-900);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.profile-block .kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--green-700);
  margin-bottom: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
}
.profile-block p {
  color: var(--ink-700);
  line-height: 1.7;
  font-size: 15px;
  margin-bottom: 14px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.info-card {
  padding: 20px;
  background: var(--green-50);
  border: 1px solid var(--green-100);
  border-radius: var(--radius-md);
}
.info-card .lab {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--green-700);
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.info-card .val {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.01em;
}

/* ============================================
   ADMIN PANEL
   ============================================ */
.admin-hero {
  background: linear-gradient(120deg, #78350f 0%, #b45309 100%);
  color: white;
  border-radius: var(--radius-xl);
  padding: 32px 40px;
  margin-bottom: 24px;
  display: flex; align-items: center; gap: 24px;
  position: relative; overflow: hidden;
}
.admin-hero::before {
  content: '';
  position: absolute;
  top: -50%; right: -10%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.3), transparent 70%);
  border-radius: 50%;
}
.admin-hero .icon {
  width: 60px; height: 60px;
  border-radius: 16px;
  background: rgba(255,255,255,0.15);
  display: grid; place-items: center;
  position: relative;
}
.admin-hero .icon svg { width: 28px; height: 28px; }
.admin-hero .txt { position: relative; }
.admin-hero h2 {
  font-size: 24px; font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.admin-hero p {
  color: rgba(255,255,255,0.8);
  font-size: 14px;
}

.admin-columns {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
}

.admin-form-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--ink-100);
  padding: 24px;
  position: sticky;
  top: 24px;
  height: fit-content;
}
.admin-form-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: 4px;
}
.admin-form-card .desc {
  font-size: 13px;
  color: var(--ink-500);
  margin-bottom: 20px;
}

.form-select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--ink-200);
  border-radius: 10px;
  background: var(--ink-50);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.form-select:focus {
  outline: none;
  border-color: var(--green-500);
  background: white;
  box-shadow: 0 0 0 4px var(--green-100);
}

.form-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--ink-200);
  border-radius: 10px;
  background: var(--ink-50);
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 70px;
  transition: all 0.2s;
}
.form-textarea:focus {
  outline: none;
  border-color: var(--green-500);
  background: white;
  box-shadow: 0 0 0 4px var(--green-100);
}

.admin-doc-table {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--ink-100);
  overflow: hidden;
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--ink-100);
}
.table-header h3 {
  font-size: 16px;
  font-weight: 700;
}
.doc-count-badge {
  padding: 4px 12px;
  background: var(--green-100);
  color: var(--green-800);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.admin-doc-row {
  display: grid;
  grid-template-columns: 44px 1fr 100px 140px 100px;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--ink-100);
  align-items: center;
  font-size: 13px;
  transition: background 0.15s;
}
.admin-doc-row:last-child { border-bottom: none; }
.admin-doc-row:hover { background: var(--ink-50); }
.admin-doc-row .name {
  font-weight: 600;
  color: var(--ink-900);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.admin-doc-row .sub {
  font-size: 11px;
  color: var(--ink-500);
  font-family: var(--font-mono);
  margin-top: 2px;
}
.admin-doc-row .cat {
  color: var(--ink-700);
  font-size: 12px;
}
.admin-doc-row .date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-500);
}
.admin-doc-row .actions {
  display: flex; gap: 4px; justify-content: flex-end;
}
.icon-btn {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--ink-100);
  color: var(--ink-700);
  display: grid; place-items: center;
  transition: all 0.15s;
}
.icon-btn:hover { background: var(--green-100); color: var(--green-700); }
.icon-btn.danger:hover { background: #fef2f2; color: var(--danger); }
.icon-btn svg { width: 14px; height: 14px; }

/* ============================================
   MODAL
   ============================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 31, 20, 0.5);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
.modal-backdrop.show { display: flex; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal {
  background: white;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.25s ease;
}
.modal.sm { max-width: 460px; }

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--ink-100);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-900);
}
.modal-header .meta {
  font-size: 12px;
  color: var(--ink-500);
  font-family: var(--font-mono);
  margin-top: 2px;
}
.modal-close {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--ink-100);
  color: var(--ink-700);
  display: grid; place-items: center;
  transition: all 0.15s;
}
.modal-close:hover { background: var(--ink-200); }

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--ink-100);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: var(--ink-50);
}

.preview-frame {
  width: 100%;
  height: 500px;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-md);
  background: var(--ink-100);
}

.preview-info {
  background: var(--green-50);
  border: 1px solid var(--green-200);
  padding: 14px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--green-800);
  display: flex; align-items: center; gap: 10px;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 20px;
  background: var(--ink-900);
  color: white;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-xl);
  display: flex; align-items: center; gap: 10px;
  z-index: 200;
  animation: slideUp 0.3s ease;
}
.toast.success { background: var(--green-700); }
.toast.error { background: var(--danger); }

/* Responsive */
@media (max-width: 900px) {
  .landing-hero { grid-template-columns: 1fr; padding: 20px 24px 60px; }
  .hero-visual { display: none; }
  .login-page { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .dashboard { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .main { padding: 20px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-columns { grid-template-columns: 1fr; }
  .admin-form-card { position: relative; top: 0; }
  .landing-nav { padding: 20px 24px; }
  .admin-doc-row { grid-template-columns: 40px 1fr 80px; }
  .admin-doc-row .cat, .admin-doc-row .date { display: none; }
}
