/* assets/css/style.css */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:      #185FA5;
  --blue-light:#E6F1FB;
  --blue-mid:  #B5D4F4;
  --green-bg:  #EAF3DE;
  --amber-bg:  #FAEEDA;
  --pink-bg:   #FBEAF0;
  --teal-bg:   #E1F5EE;
  --purple-bg: #EEEDFE;
  --text:      #1a1a1a;
  --text-muted:#6b7280;
  --border:    rgba(0,0,0,0.1);
  --bg:        #f9fafb;
  --white:     #ffffff;
  --radius:    12px;
  --shadow:    0 1px 3px rgba(0,0,0,0.08);
}

body { font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.6; }

/* ── NAVBAR ── */
.navbar { background: var(--white); border-bottom: 1px solid var(--border); padding: 0 2rem; display: flex; align-items: center; justify-content: space-between; height: 60px; position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow); }
.navbar .logo { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 600; color: var(--blue); text-decoration: none; }
.navbar .logo-icon { width: 36px; height: 36px; background: var(--blue-light); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.navbar nav a { margin-left: 8px; padding: 6px 16px; border-radius: 8px; text-decoration: none; font-size: 14px; color: var(--text-muted); transition: background .15s; }
.navbar nav a:hover, .navbar nav a.active { background: var(--blue-light); color: var(--blue); font-weight: 500; }

/* ── LAYOUT ── */
.container { max-width: 960px; margin: 0 auto; padding: 2rem 1.5rem; }
.page-header { margin-bottom: 2rem; }
.page-header h1 { font-size: 22px; font-weight: 600; }
.page-header p  { color: var(--text-muted); font-size: 14px; margin-top: 4px; }

/* ── HERO ── */
.hero { background: linear-gradient(135deg, var(--blue-light), var(--blue-mid)); border-radius: var(--radius); padding: 2.5rem 2rem; margin-bottom: 2rem; }
.hero h1 { font-size: 26px; font-weight: 700; color: #0C447C; margin-bottom: 10px; }
.hero p  { font-size: 15px; color: #185FA5; max-width: 540px; }
.hero .badge { display: inline-block; background: var(--blue); color: #fff; padding: 8px 20px; border-radius: 20px; font-size: 13px; margin-top: 14px; font-weight: 500; }

/* ── STATS ── */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 2rem; }
.stat-card { background: var(--white); border-radius: var(--radius); padding: 1.2rem; text-align: center; border: 1px solid var(--border); }
.stat-card .num { font-size: 28px; font-weight: 700; color: var(--blue); }
.stat-card .lbl { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ── SECTION TITLE ── */
.section-title { font-size: 18px; font-weight: 600; margin-bottom: 1.2rem; }

/* ── PHOTO GRID ── */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 2rem; }
.photo-card { background: var(--white); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); }
.photo-card img { width: 100%; height: 160px; object-fit: cover; display: block; }
.photo-card .photo-placeholder { height: 160px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-size: 13px; color: var(--text-muted); }
.photo-card .caption { padding: 10px 14px; font-size: 13px; font-weight: 500; color: var(--text); border-top: 1px solid var(--border); }
.photo-card .caption span { display: block; font-size: 12px; color: var(--text-muted); font-weight: 400; }

/* ── INFO KURSUS ── */
.info-card { background: var(--white); border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; margin-bottom: 2rem; }
.info-row { display: flex; align-items: flex-start; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.info-row:last-child { border-bottom: none; }
.info-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.info-label { font-size: 12px; color: var(--text-muted); margin-bottom: 2px; }
.info-value { font-size: 15px; font-weight: 500; }

/* ── FORM (ADMIN) ── */
.card { background: var(--white); border-radius: var(--radius); border: 1px solid var(--border); padding: 1.5rem; margin-bottom: 1.5rem; }
.card h2 { font-size: 16px; font-weight: 600; margin-bottom: 1.2rem; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 5px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 13px; border-radius: 8px; border: 1px solid var(--border);
  font-size: 14px; font-family: inherit; background: var(--bg); color: var(--text);
  transition: border .15s;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--blue); background: var(--white); }
.form-group textarea { resize: vertical; min-height: 80px; }
.btn { padding: 9px 22px; border-radius: 8px; border: none; font-size: 14px; font-weight: 500; cursor: pointer; font-family: inherit; transition: background .15s, transform .1s; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: #0C447C; }
.btn-secondary { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }
.btn-danger  { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.btn-danger:hover { background: #fecaca; }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── UPLOAD AREA ── */
.upload-area { border: 2px dashed var(--border); border-radius: 10px; padding: 1.5rem; text-align: center; cursor: pointer; transition: border .15s, background .15s; color: var(--text-muted); font-size: 14px; }
.upload-area:hover { border-color: var(--blue); background: var(--blue-light); }
.upload-area input[type=file] { display: none; }

/* ── TABLE (daftar foto) ── */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; padding: 10px 14px; background: var(--bg); font-size: 13px; color: var(--text-muted); font-weight: 500; border-bottom: 1px solid var(--border); }
td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
td img { width: 60px; height: 50px; object-fit: cover; border-radius: 6px; }

/* ── ALERT ── */
.alert { padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 1.2rem; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* ── LOGIN ── */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.login-box  { background: var(--white); border-radius: var(--radius); border: 1px solid var(--border); padding: 2rem 2.5rem; width: 100%; max-width: 380px; box-shadow: var(--shadow); }
.login-box h1 { font-size: 20px; font-weight: 600; text-align: center; margin-bottom: 4px; }
.login-box .sub { text-align: center; font-size: 13px; color: var(--text-muted); margin-bottom: 1.5rem; }

/* ── BADGE STATUS ── */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.badge-active   { background: #dcfce7; color: #166534; }
.badge-inactive { background: #f3f4f6; color: #6b7280; }

/* ── SIDEBAR ADMIN ── */
.admin-layout { display: grid; grid-template-columns: 200px 1fr; min-height: 100vh; }
.sidebar { background: var(--white); border-right: 1px solid var(--border); padding: 1.5rem 1rem; }
.sidebar .brand { font-size: 15px; font-weight: 600; color: var(--blue); margin-bottom: 1.5rem; display: flex; align-items: center; gap: 8px; }
.sidebar a { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 8px; text-decoration: none; font-size: 14px; color: var(--text-muted); margin-bottom: 2px; transition: background .15s; }
.sidebar a:hover, .sidebar a.active { background: var(--blue-light); color: var(--blue); font-weight: 500; }
.sidebar .menu-icon { font-size: 16px; width: 20px; text-align: center; }
.sidebar .logout { margin-top: auto; color: #b91c1c !important; }
.sidebar .logout:hover { background: #fee2e2 !important; }

@media (max-width: 640px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .stats      { grid-template-columns: repeat(2, 1fr); }
  .admin-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}
