/* ════════════════════════════════════════════════════════════════════════════
   Trahmu Member Portal (member.trahmu.web.id) — Stylesheet
   ════════════════════════════════════════════════════════════════════════════ */

:root {
  --bg-dark: #0f1216;
  --bg-card: #181d24;
  --bg-input: #12161b;
  --gold: #d4af37;
  --gold-hover: #e5bd3b;
  --border: #2b3340;
  --border-gold: rgba(212, 175, 55, 0.4);
  --text: #f0f2f5;
  --text-muted: #9ba3af;
  --green: #10b981;
  --red: #ef4444;
  --blue: #3b82f6;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
body { background: var(--bg-dark); color: var(--text); min-height: 100vh; display: flex; flex-direction: column; }

/* Header */
.app-header { background: var(--bg-card); border-bottom: 1px solid var(--border); padding: 1rem 1.5rem; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 100; }
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: inherit; cursor: pointer; }
.brand-logo { width: 38px; height: 38px; background: var(--gold); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.brand-info h1 { font-size: 1.15rem; color: var(--gold); }
.brand-info p { font-size: 0.78rem; color: var(--text-muted); }

/* Main */
.main-container { width: 100%; max-width: 860px; margin: 2rem auto; padding: 0 1rem; flex: 1; }

/* Cards & Sections */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; box-shadow: 0 8px 24px rgba(0,0,0,0.4); margin-bottom: 1.5rem; }
.card-header { margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.65rem 1.25rem; border-radius: var(--radius-md); font-size: 0.9rem; font-weight: 600; cursor: pointer; border: none; transition: 0.2s; text-decoration: none; }
.btn-primary { background: var(--gold); color: #000; }
.btn-primary:hover { background: var(--gold-hover); }
.btn-secondary { background: #2b3340; color: var(--text); }
.btn-secondary:hover { background: #384252; }
.btn-danger { background: rgba(239, 68, 68, 0.2); color: var(--red); border: 1px solid var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-success { background: rgba(16, 185, 129, 0.2); color: var(--green); border: 1px solid var(--green); }
.btn-success:hover { background: var(--green); color: #000; }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.78rem; border-radius: var(--radius-sm); }
.btn-block { width: 100%; }

/* Form Controls */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.88rem; font-weight: 500; margin-bottom: 0.4rem; }
.form-control { width: 100%; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); padding: 0.65rem 0.9rem; font-size: 0.92rem; outline: none; transition: 0.2s; }
.form-control:focus { border-color: var(--gold); }
.form-helper { display: block; font-size: 0.78rem; color: var(--text-muted); margin-top: 0.3rem; }
.link-helper { font-size: 0.78rem; color: var(--gold); text-decoration: none; }
.link-helper:hover { text-decoration: underline; }

/* Badges */
.badge { display: inline-flex; align-items: center; padding: 0.25rem 0.65rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; }
.badge-gold { background: rgba(212, 175, 55, 0.2); color: var(--gold); border: 1px solid var(--border-gold); }
.badge-green { background: rgba(16, 185, 129, 0.2); color: var(--green); }
.badge-red { background: rgba(239, 68, 68, 0.2); color: var(--red); }
.badge-blue { background: rgba(59, 130, 246, 0.2); color: var(--blue); }

/* Tabs */
.auth-tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; }
.auth-tab-btn { flex: 1; text-align: center; padding: 0.85rem; font-size: 0.95rem; font-weight: 600; background: none; border: none; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; transition: 0.2s; }
.auth-tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); }

/* Mode selector */
.mode-selector { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
.mode-card { border: 2px solid var(--border); background: var(--bg-input); border-radius: var(--radius-md); padding: 1rem; cursor: pointer; transition: all 0.2s; }
.mode-card.active { border-color: var(--gold); background: rgba(212, 175, 55, 0.08); }

/* Progress & Checklist */
.progress-bar-bg { width: 100%; height: 10px; background: var(--bg-input); border-radius: 999px; overflow: hidden; margin-bottom: 1.5rem; }
.progress-bar-fill { height: 100%; width: 0%; background: var(--gold); transition: width 0.3s ease; }
.task-row { display: flex; align-items: center; gap: 0.75rem; font-size: 0.9rem; padding: 0.4rem 0; color: var(--text-muted); }
.task-row.running { color: var(--gold); font-weight: 600; }
.task-row.success { color: var(--green); }
.task-row.error { color: var(--red); font-weight: 600; }

.console-box { background: #080a0c; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem; font-family: monospace; font-size: 0.78rem; color: #a0aec0; max-height: 200px; overflow-y: auto; white-space: pre-wrap; margin-top: 1rem; }

/* Toast */
.toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 1000; display: flex; flex-direction: column; gap: 0.5rem; }
.toast { background: var(--bg-card); border: 1px solid var(--border); border-left: 4px solid var(--gold); padding: 0.75rem 1.25rem; border-radius: var(--radius-sm); box-shadow: 0 5px 15px rgba(0,0,0,0.5); font-size: 0.88rem; animation: slideIn 0.2s ease; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Table */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.data-table th, .data-table td { padding: 0.75rem 0.5rem; border-bottom: 1px solid var(--border); text-align: left; }
.data-table th { color: var(--text-muted); font-weight: 500; font-size: 0.8rem; }
