@font-face {
  font-family: 'Onest';
  src: url('/fonts/Onest.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
}

:root {
  --bg: #000000;
  --panel: #121212;
  --panel-2: #1a1a1a;
  --panel-border: #262626;
  --text: #ffffff;
  --text-dim: #9a9a9a;
  --text-dimmer: #6b6b6b;
  --orange: #ff5a1f;
  --orange-2: #ff8a3d;
  --danger: #7a1f14;
  --green: #33d17a;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --maxw: 1820px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Onest', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 40px;
}

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 40px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand img { width: 40px; height: 40px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 48px;
  color: var(--text-dim);
  font-size: 15px;
}
.nav-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
}
.nav-links a.active { color: var(--text); font-weight: 600; }
.header-left { display: flex; align-items: center; }
.header-right { display: flex; align-items: center; gap: 18px; }

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #1c1c1c;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 18px;
}
.icon-btn:hover { background: #262626; }

.btn {
  border-radius: 12px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform .12s ease, opacity .12s ease;
}
.btn:active { transform: scale(0.97); }
.btn-dark { background: #1c1c1c; color: #fff; }
.btn-dark:hover { background: #262626; }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { opacity: .9; }
.btn-outline {
  background: #fff;
  color: #111;
}
.btn-outline:hover { opacity: .9; }
.btn-discord { background: #5865F2; color: #fff; width: 100%; justify-content: center; padding: 16px; font-size: 16px; border-radius: 14px; }

.greeting-text { color: var(--text-dim); font-size: 15px; }
.avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  background: #333;
}
.avatar-menu { position: relative; }
.avatar-dropdown {
  position: absolute;
  top: 56px;
  right: 0;
  background: var(--panel-2);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  min-width: 220px;
  padding: 8px;
  display: none;
  z-index: 30;
}
.avatar-menu.open .avatar-dropdown { display: block; }
.avatar-dropdown a, .avatar-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
}
.avatar-dropdown a:hover, .avatar-dropdown button:hover { background: #262626; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, #7a1a05 0%, #ff5a1f 45%, #ffb37a 100%);
  min-height: 560px;
  padding: 56px;
  margin: 0 40px;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url('/img/bg-topo.png') center/cover no-repeat;
  opacity: .55;
  mix-blend-mode: overlay;
}
.hero-inner { position: relative; z-index: 2; }
.hero h1 {
  font-size: 52px;
  line-height: 1.08;
  margin: 0 0 18px;
  font-weight: 800;
  max-width: 560px;
}
.hero h1 .accent { color: #1a1a1a; }
.hero .ip-label { color: rgba(255,255,255,.75); font-size: 14px; margin-bottom: 6px; }
.hero .ip-value {
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
}
.hero .ip-value .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.hero .ip-value .dot.offline { background: #666; }
.hero-character {
  position: absolute;
  right: 60px;
  bottom: -20px;
  width: 420px;
  z-index: 1;
}
.hero-note {
  position: absolute;
  font-size: 13px;
  color: rgba(255,255,255,.85);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.hero-note.top-right { top: 40px; right: 50px; }
.hero-note.bottom-left { bottom: 60px; left: 56px; }

.stats-bar {
  margin: 0 40px;
  background: #111;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 44px;
  transform: translateY(-14px);
  position: relative;
  z-index: 3;
  flex-wrap: wrap;
  gap: 12px;
}
.stats-left { display: flex; gap: 48px; flex-wrap: wrap; }
.stat-item { display: flex; align-items: center; gap: 12px; }
.stat-item img, .stat-item .stat-icon { width: 20px; height: 20px; opacity: .9; }
.stat-value { font-weight: 700; font-size: 15px; }
.stat-value.na { color: var(--text-dimmer); }
.stat-label { color: var(--text-dimmer); font-size: 13px; margin-left: 6px; }
.stats-note { color: var(--text-dimmer); font-size: 12px; }
.stats-scroll { display: flex; align-items: center; gap: 8px; color: var(--text-dimmer); font-size: 13px; }

/* ---------- Sections ---------- */
.section { padding: 100px 40px 40px; }
.section-title { font-size: 34px; font-weight: 800; text-align: center; margin: 0 0 10px; }
.section-sub { text-align: center; color: var(--text-dim); font-size: 15px; margin: 0 0 48px; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  border-radius: var(--radius-md);
  padding: 28px;
  min-height: 320px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.feature-card .num {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; margin-bottom: 20px;
}
.feature-card h3 { font-size: 20px; margin: 0 0 10px; font-weight: 700; }
.feature-card p { color: rgba(255,255,255,.8); font-size: 14px; line-height: 1.5; max-width: 240px; }
.feature-card.f1 { background: linear-gradient(160deg, #6b1a10, #ff5a1f); }
.feature-card.f2 { background: linear-gradient(160deg, #12331a, #3fae52); }
.feature-card.f3 { background: linear-gradient(160deg, #14213f, #6a3fd6, #3fbfae); }

.social-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}
.social-list { display: flex; flex-direction: column; gap: 26px; }
.social-list h3 { font-size: 22px; margin: 0 0 4px; display: flex; align-items: center; gap: 8px; }
.social-list p { color: var(--text-dim); margin: 0; font-size: 14px; }
.social-icons { display: flex; gap: 18px; }
.social-icons img { width: 64px; height: 64px; border-radius: 18px; }

.cta-banner {
  position: relative;
  margin: 40px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 420px;
  background: url('/img/cta-banner.png') center/cover no-repeat;
  display: flex;
  align-items: flex-start;
  padding: 56px;
}
.cta-banner h2 { font-size: 34px; margin: 0 0 10px; font-weight: 800; }
.cta-banner p { color: rgba(255,255,255,.85); margin: 0; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 48px 40px 60px;
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  border-top: 1px solid #161616;
  margin-top: 40px;
}
.footer-brand { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.footer-brand img { width: 40px; height: 40px; }
.footer-brand span { font-size: 22px; font-weight: 800; }
.site-footer .tagline { color: var(--text-dim); font-size: 14px; margin: 0 0 6px; }
.site-footer .tagline .accent { color: var(--orange); }
.site-footer .copyright { color: var(--text-dim); font-size: 14px; margin: 0 0 4px; }
.site-footer .disclaimer { color: var(--text-dimmer); font-size: 13px; margin: 0; }
.footer-col h4 { font-size: 17px; margin: 0 0 14px; }
.footer-col a { display: flex; align-items: center; gap: 6px; color: var(--text-dim); font-size: 14px; margin-bottom: 10px; }
.footer-col a:hover { color: var(--text); }

/* ---------- Auth pages ---------- */
.auth-page { min-height: 100vh; display: flex; }
.auth-left {
  flex: 1;
  background: linear-gradient(160deg, #7a1a05, #ff5a1f 55%, #ffb37a);
  position: relative;
  padding: 60px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.auth-left::before {
  content: '';
  position: absolute; inset: 0;
  background: url('/img/bg-topo.png') center/cover no-repeat;
  opacity: .5;
  mix-blend-mode: overlay;
}
.auth-left .content { position: relative; z-index: 2; }
.auth-left .brand { margin-bottom: 40px; }
.auth-left h1 { font-size: 36px; margin: 0 0 16px; font-weight: 800; }
.auth-left h1 .accent { color: #1a1a1a; }
.auth-left p.lead { color: rgba(255,255,255,.85); max-width: 420px; font-size: 15px; }
.auth-left .duo-char { position: absolute; bottom: 0; left: 40px; width: 60%; max-width: 480px; z-index: 1; }

.auth-right {
  flex: 1;
  background: #050505;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 90px;
}
.auth-right h2 { font-size: 32px; margin: 0 0 14px; font-weight: 800; }
.auth-right p.lead { color: var(--text-dim); margin: 0 0 40px; max-width: 460px; }
.auth-empty { text-align: center; color: var(--text-dimmer); padding: 30px 0; }
.auth-empty .q { font-size: 30px; margin-bottom: 16px; opacity: .5; }
.auth-error { background: #3a1210; border: 1px solid #7a1f14; color: #ffb3a8; padding: 14px 18px; border-radius: 12px; margin-bottom: 24px; font-size: 14px; }

.auth-secure { text-align: center; color: var(--text-dimmer); font-size: 12px; margin-top: 30px; }
.auth-secure .lbl { font-weight: 700; color: var(--text-dim); margin-bottom: 6px; }

/* ---------- Support ---------- */
.support-hero {
  background: linear-gradient(135deg, #7a1a05 0%, #ff5a1f 45%, #ffb37a 100%);
  border-radius: var(--radius-lg);
  margin: 0 40px;
  padding: 56px;
  position: relative;
  overflow: hidden;
  min-height: 420px;
}
.support-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url('/img/bg-topo.png') center/cover no-repeat;
  opacity: .5;
  mix-blend-mode: overlay;
}
.support-hero .content { position: relative; z-index: 2; max-width: 560px; }
.support-hero h1 { font-size: 40px; margin: 0 0 14px; font-weight: 800; }
.support-hero h1 .accent { color: #1a1a1a; }
.support-hero p { color: rgba(255,255,255,.85); margin: 0 0 26px; }
.support-hero .actions { display: flex; gap: 14px; margin-bottom: 40px; flex-wrap: wrap; }
.support-hero .agents-mini { display: flex; align-items: center; gap: 14px; }
.support-hero .agents-mini .stack { display: flex; }
.support-hero .agents-mini .stack img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid #ff5a1f; margin-left: -12px; object-fit: cover; }
.support-hero .agents-mini .stack img:first-child { margin-left: 0; }
.support-hero .agents-mini span { color: rgba(255,255,255,.9); font-size: 14px; max-width: 180px; }
.support-hero .char {
  position: absolute; right: 90px; bottom: 0; width: 340px; z-index: 1;
}

.faq-support-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 30px;
  padding: 90px 40px 60px;
}
.faq-col h2 { font-size: 26px; margin: 0 0 24px; font-weight: 800; }
.faq-item {
  background: var(--panel);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  margin-bottom: 14px;
  cursor: pointer;
}
.faq-item summary {
  display: flex; align-items: center; gap: 14px;
  list-style: none;
  font-weight: 700;
  font-size: 15px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item .faq-icon { width: 34px; height: 34px; border-radius: 8px; background: #262626; display: flex; align-items: center; justify-content: center; }
.faq-item p { color: var(--text-dim); font-size: 13.5px; margin: 10px 0 0 48px; }
.faq-item .chev { margin-left: auto; color: var(--text-dimmer); }

.ticket-col h2 { font-size: 26px; margin: 0 0 14px; font-weight: 800; }
.ticket-col p { color: var(--text-dim); font-size: 14px; margin: 0 0 22px; }
.ticket-form textarea {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 16px;
  font-family: inherit;
  font-size: 14px;
  min-height: 100px;
  resize: vertical;
  margin-bottom: 14px;
}
.thanks-banner {
  margin-top: 20px;
  border-radius: var(--radius-sm);
  padding: 24px;
  background: linear-gradient(120deg, #7a1a05, #ff5a1f);
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
  min-height: 90px;
}
.thanks-banner span { font-weight: 700; font-size: 15px; max-width: 200px; z-index: 2; }
.thanks-banner img { position: absolute; right: 10px; bottom: -10px; width: 90px; z-index: 1; }

/* ---------- Tickets ---------- */
.panel-2col {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 0;
  background: var(--panel);
  border-radius: var(--radius-lg);
  margin: 0 40px;
  min-height: 640px;
  overflow: hidden;
}
.panel-left { padding: 40px; border-right: 1px solid #1f1f1f; }
.panel-right { padding: 40px; display: flex; flex-direction: column; }
.panel-title { font-size: 26px; font-weight: 800; margin: 0 0 26px; }

.ticket-row {
  background: var(--panel-2);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.ticket-row .info .subj { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.ticket-row .info .last { color: var(--text-dimmer); font-size: 13px; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-row .status { color: var(--text-dimmer); font-size: 12px; text-align: right; margin-bottom: 8px; }
.ticket-row .status.open { color: var(--green); }

.empty-state { text-align: center; padding: 60px 0; color: var(--text-dimmer); }
.empty-state .icon { font-size: 64px; margin-bottom: 20px; }
.empty-state p { margin: 0 0 24px; }

.agent-list .agent-item { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 26px; }
.agent-list img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.agent-list .name { font-weight: 700; font-size: 16px; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.agent-list .role { color: var(--text-dim); font-size: 13px; margin-bottom: 10px; max-width: 420px; }
.online-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); display: inline-block; }
.online-dot.off { background: #444; }

/* Ticket detail / chat */
.ticket-detail-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 30px; }
.ticket-detail-header h1 { font-size: 26px; margin: 0 0 6px; font-weight: 800; }
.ticket-detail-header .agent-name { color: var(--text-dim); font-size: 14px; }
.ticket-detail-header .close-link { color: var(--text-dim); font-size: 14px; background: none; border: none; }
.ticket-detail-header .close-link:hover { color: var(--text); }

.chat-scroll { flex: 1; overflow-y: auto; padding-right: 6px; margin-bottom: 20px; }
.msg-row { display: flex; gap: 12px; margin-bottom: 22px; max-width: 78%; }
.msg-row img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.msg-bubble { background: var(--panel-2); border-radius: var(--radius-sm); padding: 14px 18px; font-size: 14.5px; line-height: 1.5; }
.msg-row.mine { margin-left: auto; flex-direction: row-reverse; }
.msg-row.mine .msg-bubble { background: #fff; color: #111; }
.msg-time { font-size: 11px; color: var(--text-dimmer); margin-top: 6px; }

.chat-input-row { display: flex; gap: 12px; }
.chat-input-row input {
  flex: 1;
  background: var(--panel-2);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 14px 18px;
  font-family: inherit;
  font-size: 14px;
}
.chat-input-row button { border-radius: var(--radius-sm); padding: 14px 26px; }

.rate-box {
  background: var(--panel-2);
  border-radius: var(--radius-sm);
  padding: 26px;
  margin-top: 10px;
}
.rate-box h3 { margin: 0 0 4px; font-size: 19px; font-weight: 800; }
.rate-box p { margin: 0 0 18px; color: var(--text-dim); font-size: 14px; }
.rate-row { display: flex; align-items: center; gap: 12px; }
.rate-star {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--panel-border);
  background: transparent;
  color: var(--text-dim);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.rate-star.selected { border-color: #fff; color: #fff; }
.rate-row .btn { margin-left: auto; }
.rated-note { color: var(--text-dim); font-size: 14px; }

.closed-pill { color: var(--text-dimmer); font-size: 13px; }

/* ---------- Agent dashboard ---------- */
.agent-table { margin: 0 40px; overflow-x: auto; }
.agent-table table { width: 100%; border-collapse: collapse; min-width: 720px; }
.agent-table th { text-align: left; color: var(--text-dimmer); font-size: 12px; text-transform: uppercase; padding: 12px 16px; }
.agent-table td { padding: 16px; background: var(--panel); font-size: 14px; }
.agent-table tr td:first-child { border-radius: 12px 0 0 12px; }
.agent-table tr td:last-child { border-radius: 0 12px 12px 0; }
.badge { padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; display: inline-block; }
.badge.open { background: #10331f; color: var(--green); }
.badge.closed { background: #262626; color: var(--text-dimmer); }

/* ---------- Errors ---------- */
.error-page { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.error-page h1 { font-size: 80px; margin: 0; color: var(--orange); }
.error-page p { color: var(--text-dim); margin: 10px 0 28px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .feature-grid { grid-template-columns: 1fr; }
  .panel-2col { grid-template-columns: 1fr; }
  .panel-left { border-right: none; border-bottom: 1px solid #1f1f1f; }
  .faq-support-grid { grid-template-columns: 1fr; }
  .auth-page { flex-direction: column; }
  .hero h1 { font-size: 36px; }
  .site-header { padding: 18px 20px; }
  .wrap, .hero, .stats-bar, .support-hero, .panel-2col, .cta-banner, .agent-table, .section, .faq-support-grid, .site-footer { margin-left: 16px; margin-right: 16px; padding-left: 20px; padding-right: 20px; }
}
