/* ============================================================
   flipbook.css — Layout & UI utama (non-animation)
   ============================================================ */

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:      #2563eb;
  --primary-dark: #1d4ed8;
  --surface:      #ffffff;
  --surface-2:    #f8fafc;
  --border:       #e2e8f0;
  --text-1:       #0f172a;
  --text-2:       #475569;
  --text-3:       #94a3b8;
  --danger:       #ef4444;
  --success:      #22c55e;
  --warning:      #f59e0b;
  --radius:       10px;
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg:    0 8px 32px rgba(0,0,0,0.14);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  color: var(--text-1);
  background: var(--surface-2);
  line-height: 1.6;
}

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

img { display: block; max-width: 100%; }

/* ============================================================
   NAVBAR (halaman publik)
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

.navbar-brand {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar-brand .logo-icon {
  width: 28px;
  height: 28px;
  background: var(--primary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
}

/* ============================================================
   INDEX — GRID KATALOG
   ============================================================ */
.catalog-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 24px;
}

.catalog-header {
  margin-bottom: 32px;
}

.catalog-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-1);
}

.catalog-header p {
  color: var(--text-2);
  margin-top: 6px;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}

/* ---- Catalog Card ---- */
.catalog-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  border: 1px solid var(--border);
}

.catalog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.catalog-card__cover {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  background: #f1f5f9;
}

.catalog-card__cover--placeholder {
  aspect-ratio: 3/4;
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: #94a3b8;
}

.catalog-card__body {
  padding: 14px 16px;
}

.catalog-card__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.catalog-card__meta {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 4px;
}

.catalog-card__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
}

.catalog-card__btn:hover {
  background: var(--primary-dark);
  text-decoration: none;
  color: #fff;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-3);
}

.empty-state__icon { font-size: 64px; margin-bottom: 16px; }
.empty-state__title { font-size: 20px; font-weight: 600; color: var(--text-2); }
.empty-state__desc { margin-top: 8px; font-size: 14px; }

/* ============================================================
   BADGE STATUS
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.badge--published { background: #dcfce7; color: #15803d; }
.badge--draft     { background: #fef9c3; color: #854d0e; }
.badge--archived  { background: #f1f5f9; color: #64748b; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .catalog-container { padding: 20px 16px; }
  .catalog-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
  .catalog-header h1 { font-size: 22px; }
}

@media (max-width: 480px) {
  .catalog-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

/* ============================================================
   UTILITY
   ============================================================ */
.hide-mobile { display: inline; }
@media (max-width: 640px) { .hide-mobile { display: none; } }

.text-muted { color: var(--text-2); }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
