/* ============================================================
   Sentosa Impex — Portal 2026
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;1,400&display=swap');

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

/* ── Tokens ──────────────────────────────────────────────── */
:root {
  --bg:          #090A0D;
  --surface:     #0F1117;
  --surface-2:   #15171F;
  --border:      rgba(255,255,255,0.065);
  --border-2:    rgba(255,255,255,0.13);
  --text:        #ECEEF3;
  --text-2:      #9BA3B0;
  --text-3:      #5C6370;
  --gold:        #E8A020;
  --gold-bg:     rgba(232,160,32,0.1);
  --gold-ring:   rgba(232,160,32,0.28);
  --green:       #22C55E;
  --green-bg:    rgba(34,197,94,0.08);
  --red:         #F87171;
  --red-bg:      rgba(248,113,113,0.08);
  --r-xs:        6px;
  --r-sm:        9px;
  --r:           13px;
  --r-lg:        18px;
  --r-xl:        24px;
  --font-d:      'Outfit', sans-serif;
  --font-b:      'Plus Jakarta Sans', sans-serif;
  --shadow-card: 0 0 0 1px var(--border), 0 20px 60px rgba(0,0,0,0.55);
  --t:           0.18s cubic-bezier(0.4,0,0.2,1);
}

/* ── Light theme ─────────────────────────────────────────── */
[data-theme="light"] {
  --bg:          #F4F5F8;
  --surface:     #FFFFFF;
  --surface-2:   #ECEEF3;
  --border:      rgba(0,0,0,0.08);
  --border-2:    rgba(0,0,0,0.15);
  --text:        #0F1117;
  --text-2:      #4B5563;
  --text-3:      #9CA3AF;
  --gold:        #C87D10;
  --gold-bg:     rgba(200,125,16,0.1);
  --gold-ring:   rgba(200,125,16,0.25);
  --green:       #16A34A;
  --green-bg:    rgba(22,163,74,0.08);
  --red:         #DC2626;
  --red-bg:      rgba(220,38,38,0.07);
  --shadow-card: 0 0 0 1px var(--border), 0 8px 32px rgba(0,0,0,0.08);
}

[data-theme="light"] body::before {
  background:
    radial-gradient(ellipse 700px 600px at -5% -10%, rgba(200,125,16,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 500px 400px at 105% 110%, rgba(100,80,200,0.04) 0%, transparent 60%);
}

[data-theme="light"] .nav {
  background: rgba(244,245,248,0.88);
  border-bottom-color: rgba(0,0,0,0.08);
}

[data-theme="light"] .nav-brand img {
  filter: none;
  opacity: 1;
}

/* ── Theme toggle button ──────────────────────────────────── */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text-2);
  cursor: pointer;
  transition: color var(--t), background var(--t), border-color var(--t);
  flex-shrink: 0;
}
.theme-toggle:hover {
  color: var(--text);
  background: rgba(255,255,255,0.08);
  border-color: var(--border-2);
}
[data-theme="light"] .theme-toggle {
  background: rgba(0,0,0,0.04);
}
[data-theme="light"] .theme-toggle:hover {
  background: rgba(0,0,0,0.08);
}
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun  { display: none;  }
[data-theme="light"] .theme-toggle .icon-moon { display: none;  }
[data-theme="light"] .theme-toggle .icon-sun  { display: block; }

/* ── Base ────────────────────────────────────────────────── */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-b);
  font-size: 0.9375rem;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* subtle radial glow top-left */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 700px 600px at -5% -10%, rgba(232,160,32,0.045) 0%, transparent 60%),
    radial-gradient(ellipse 500px 400px at 105% 110%, rgba(100,80,200,0.035) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

main { position: relative; z-index: 1; flex: 1; }

/* ── Navigation ──────────────────────────────────────────── */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 200;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
  padding: 0 24px;
  background: rgba(9,10,13,0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}
.nav-brand img {
  height: 28px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.88;
}
.nav-brand-name {
  font-family: var(--font-d);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 13px;
  background: var(--gold-bg);
  border: 1px solid rgba(232,160,32,0.18);
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gold);
}
.nav-user svg { width: 14px; height: 14px; flex-shrink: 0; }

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 15px;
  border-radius: var(--r-sm);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-2);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  transition: color var(--t), background var(--t), border-color var(--t);
  cursor: pointer;
}
.nav-btn svg { width: 14px; height: 14px; }
.nav-btn:hover {
  color: var(--text);
  background: rgba(255,255,255,0.08);
  border-color: var(--border-2);
}

/* ── Eyebrow ─────────────────────────────────────────────── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 9px;
}
.eyebrow::before {
  content: '';
  display: block;
  width: 18px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  flex-shrink: 0;
}

/* ── Auth layout ─────────────────────────────────────────── */
.auth-page {
  min-height: calc(100vh - 62px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.auth-card {
  width: 100%;
  max-width: 428px;
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-card);
  padding: 40px;
  animation: rise 0.42s cubic-bezier(0.4,0,0.2,1) both;
}

.auth-card-wide { max-width: 520px; }

.auth-head { margin-bottom: 28px; }

.auth-title {
  font-family: var(--font-d);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--text);
}
.auth-sub {
  margin-top: 7px;
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.6;
}

/* ── Alerts ──────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  font-size: 0.875rem;
  line-height: 1.55;
  margin-bottom: 20px;
}
.alert svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 3px; }

.alert-error {
  background: var(--red-bg);
  border: 1px solid rgba(248,113,113,0.18);
  color: #FCA5A5;
}
.alert-success {
  background: var(--green-bg);
  border: 1px solid rgba(34,197,94,0.18);
  color: #86EFAC;
}

/* ── Form ────────────────────────────────────────────────── */
.form {
  display: flex;
  flex-direction: column;
  gap: 17px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-2);
}

.input-wrap { position: relative; }

.input-ico {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--text-3);
  pointer-events: none;
  transition: color var(--t);
}

.input {
  display: block;
  width: 100%;
  padding: 10px 12px 10px 37px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: var(--font-b);
  font-size: 0.9375rem;
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
  -webkit-appearance: none;
}
.input::placeholder { color: var(--text-3); }
.input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-ring);
}
.input-wrap:focus-within .input-ico { color: var(--gold); }

.hint {
  font-size: 0.75rem;
  color: var(--text-3);
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 3px 0;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 12px 22px;
  border-radius: var(--r-sm);
  border: none;
  font-family: var(--font-b);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--t);
  letter-spacing: 0.005em;
  margin-top: 5px;
}
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.btn-primary {
  background: var(--gold);
  color: #0A0B0E;
}
.btn-primary:hover {
  background: #F0AA2A;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px var(--gold-ring);
}
.btn-primary:active { transform: none; box-shadow: none; }

.btn-ghost {
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--border-2);
}

/* ── Auth footer link ────────────────────────────────────── */
.auth-foot {
  margin-top: 22px;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-2);
}
.auth-foot a {
  color: var(--gold);
  font-weight: 500;
  text-decoration: none;
}
.auth-foot a:hover { text-decoration: underline; }

/* ── Feedback pages ──────────────────────────────────────── */
.feedback-page {
  min-height: calc(100vh - 62px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
}

.feedback-card {
  width: 100%;
  max-width: 460px;
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-card);
  padding: 52px 44px;
  text-align: center;
  animation: rise 0.42s cubic-bezier(0.4,0,0.2,1) both;
}

.feedback-icon {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 22px;
}
.feedback-icon svg { width: 26px; height: 26px; }

.feedback-icon-success {
  background: var(--green-bg);
  border: 1px solid rgba(34,197,94,0.22);
  color: var(--green);
}
.feedback-icon-neutral {
  background: var(--gold-bg);
  border: 1px solid rgba(232,160,32,0.22);
  color: var(--gold);
}

.feedback-title {
  font-family: var(--font-d);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 11px;
}
.feedback-text {
  font-size: 0.9375rem;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 30px;
}

/* ── Badge ───────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--gold-bg);
  border: 1px solid rgba(232,160,32,0.18);
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge svg { width: 13px; height: 13px; }

/* ── PDF Viewer ──────────────────────────────────────────── */
.viewer-page {
  display: flex;
  flex-direction: column;
  padding: 32px 28px 40px;
  max-width: 1160px;
  margin: 0 auto;
  width: 100%;
  min-height: calc(100vh - 62px);
  animation: rise 0.4s cubic-bezier(0.4,0,0.2,1) both;
}

.viewer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
}

.viewer-title {
  font-family: var(--font-d);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-top: 2px;
}

.viewer-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
}

.viewer-frame {
  flex: 1;
  min-height: 680px;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.viewer-frame iframe {
  flex: 1;
  width: 100%;
  min-height: 680px;
  border: none;
  display: block;
}

.viewer-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 80px 32px;
  text-align: center;
}
.viewer-empty-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--r);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  margin-bottom: 4px;
}
.viewer-empty-icon svg { width: 24px; height: 24px; }
.viewer-empty-title {
  font-family: var(--font-d);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-2);
}
.viewer-empty-text {
  font-size: 0.875rem;
  color: var(--text-3);
  max-width: 300px;
}

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  position: relative;
  z-index: 1;
  padding: 18px 24px;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-3);
  border-top: 1px solid var(--border);
}
.footer strong { color: var(--gold); font-weight: 500; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
  .nav { padding: 0 16px; }
  .nav-brand-name { display: none; }

  .auth-card { padding: 28px 22px; }
  .auth-title { font-size: 1.5rem; }
  .auth-card-wide { max-width: 100%; }

  .field-row { grid-template-columns: 1fr; }

  .feedback-card { padding: 36px 24px; }
  .feedback-title { font-size: 1.25rem; }

  .viewer-page { padding: 20px 16px 28px; }
  .viewer-title { font-size: 1.25rem; }
  .viewer-frame,
  .viewer-frame iframe { min-height: 420px; }
}

@media (max-width: 400px) {
  .auth-card { padding: 24px 18px; }
}
