/* ===================== FONT GOLDEN GATE (URW DIN) ===================== */
@font-face {
  font-family: "URW DIN";
  src: url("fonts/URWDIN-Light.otf") format("opentype");
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "URW DIN";
  src: url("fonts/URWDIN-Regular.otf") format("opentype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "URW DIN";
  src: url("fonts/URWDIN-Medium.otf") format("opentype");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "URW DIN";
  src: url("fonts/URWDIN-Demi.otf") format("opentype");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "URW DIN";
  src: url("fonts/URWDIN-Bold.otf") format("opentype");
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ===================== BẢNG MÀU THƯƠNG HIỆU ===================== */
:root {
  --gg-gold:        #8C6E1F;   /* nâu vàng logo */
  --gg-gold-dark:   #6F561596;
  --gg-gold-deep:   #5E4910;
  --gg-cream:       #F6F1E7;   /* nền kem */
  --gg-cream-soft:  #FBF8F1;
  --gg-ink:         #2B2417;   /* chữ đậm */
  --gg-muted:       #8A8167;
  --gg-line:        #E4DAC4;
  --gg-error:       #B4231F;
  --gg-bg-gold:     #D8A732;   /* nền vàng theo brand guideline */
  --gg-bg-gold-dk:  #CC9C2B;   /* gold đậm hơn cho gradient đáy */
  --shadow:         0 14px 36px rgba(94, 73, 16, 0.22);
}

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

/* Đảm bảo thuộc tính [hidden] luôn ẩn, kể cả khi .screen đặt display:flex */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  font-family: "URW DIN", "Segoe UI", system-ui, sans-serif;
  color: var(--gg-ink);
  background:
    url("assets/symbol-watermark.png") -6% 118% / min(72vh, 600px) no-repeat,
    linear-gradient(180deg, #DDAE38 0%, var(--gg-bg-gold) 45%, var(--gg-bg-gold-dk) 100%);
  background-attachment: fixed, fixed;
  background-color: var(--gg-bg-gold);
  -webkit-font-smoothing: antialiased;
}

.screen {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.page-foot {
  margin-top: auto;
  padding: 18px;
  text-align: center;
  font-size: 13px;
  letter-spacing: .04em;
  color: rgba(255, 255, 255, 0.8);
}

/* ===================== MÀN ĐĂNG NHẬP ===================== */
#login-screen {
  align-items: center;
  justify-content: center;
}

.login-card {
  width: min(380px, 92vw);
  margin: auto;
  background: var(--gg-cream-soft);
  border: 1px solid var(--gg-line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 38px 32px 32px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.login-logo {
  width: 96px;
  height: auto;
  align-self: center;
  margin-bottom: 18px;
}

.login-title {
  text-align: center;
  font-weight: 700;
  font-size: 26px;
  letter-spacing: .06em;
  color: var(--gg-gold-deep);
  text-transform: uppercase;
}

.login-sub {
  text-align: center;
  color: var(--gg-muted);
  font-size: 14px;
  margin: 6px 0 26px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.field > span {
  font-size: 13px;
  font-weight: 500;
  color: var(--gg-gold-deep);
  letter-spacing: .02em;
}

.field input {
  font-family: inherit;
  font-size: 15px;
  padding: 12px 14px;
  border: 1.5px solid var(--gg-line);
  border-radius: 10px;
  background: #fff;
  color: var(--gg-ink);
  transition: border-color .15s, box-shadow .15s;
}

.field input:focus {
  outline: none;
  border-color: var(--gg-gold);
  box-shadow: 0 0 0 3px rgba(140, 110, 31, 0.15);
}

.login-error {
  background: #fbe9e7;
  border: 1px solid #f0c4c0;
  color: var(--gg-error);
  font-size: 13.5px;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 14px;
}

/* ===================== NÚT ===================== */
.btn-primary {
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .04em;
  color: #fff;
  background: linear-gradient(180deg, var(--gg-gold) 0%, var(--gg-gold-deep) 100%);
  border: none;
  border-radius: 10px;
  padding: 13px 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: filter .15s, transform .05s;
}
.btn-primary:hover { filter: brightness(1.07); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: .6; cursor: default; }

.btn-ghost {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-ghost:hover { background: #fff; color: var(--gg-gold-deep); border-color: #fff; }

.spinner {
  width: 16px; height: 16px;
  border: 2.5px solid rgba(255,255,255,.5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===================== MÀN DANH SÁCH ===================== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 28px;
  background: var(--gg-gold-deep);
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
}
.topbar-logo { height: 38px; width: auto; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.hello-user { font-size: 14px; color: rgba(255, 255, 255, 0.92); }

.content {
  width: min(720px, 92vw);
  margin: 40px auto 20px;
  flex: 1;
}
.content-title {
  font-weight: 800;
  font-size: 28px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #fff;
}
.content-sub {
  color: rgba(255, 255, 255, 0.85);
  margin: 6px 0 24px;
  font-size: 15px;
}

.assistant-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  counter-reset: item;
}

.assistant-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--gg-cream-soft);
  border: 1px solid var(--gg-line);
  border-radius: 12px;
  padding: 14px 18px;
  transition: box-shadow .15s, border-color .15s, transform .05s;
}
.assistant-row:hover {
  border-color: var(--gg-gold);
  box-shadow: var(--shadow);
}

.assistant-num {
  flex: 0 0 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  background: linear-gradient(180deg, var(--gg-gold) 0%, var(--gg-gold-deep) 100%);
}

.assistant-name {
  flex: 1;
  font-size: 16.5px;
  font-weight: 500;
  color: var(--gg-ink);
}

.btn-open {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .03em;
  color: #fff;
  background: var(--gg-gold);
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  cursor: pointer;
  white-space: nowrap;
  transition: filter .15s, transform .05s;
}
.btn-open:hover { filter: brightness(1.08); }
.btn-open:active { transform: translateY(1px); }
.btn-open.disabled {
  background: #cfc3a3;
  cursor: not-allowed;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 520px) {
  .topbar { padding: 12px 16px; }
  .topbar-logo { height: 30px; }
  .assistant-row { padding: 12px 14px; gap: 12px; }
  .assistant-name { font-size: 15px; }
  .btn-open { padding: 8px 14px; }
}
