/* Theme matches /dl/style.css (the site's other "app-like" page) rather
   than the main index.html glass/cyan-purple look -- self-contained, does
   NOT link /style.css, so nothing here fights with that page's rules. */

:root {
  --bg: #0a0d0f;
  --panel: #12181b;
  --panel-line: #1f2b2e;
  --signal: #ffb400;
  --cyan: #59d6c4;
  --paper: #eae6da;
  --muted: #66767a;
  --danger: #e0563f;

  --font-mono: 'JetBrains Mono', 'DejaVu Sans Mono', 'Liberation Mono', 'Cascadia Code', ui-monospace, monospace;
  --font-sans: -apple-system, 'Segoe UI', 'Noto Sans', Tahoma, Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  overflow-y: auto;
  min-height: 100vh;
  background: radial-gradient(ellipse at 50% -10%, #16201f 0%, var(--bg) 55%);
  color: var(--paper);
  font-family: var(--font-sans);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px 60px;
}

.account-card {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: 12px;
  padding: 28px 24px;
}

.account-card.wide {
  max-width: 720px;
}

.account-title {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  text-align: center;
  color: var(--paper);
  margin-bottom: 18px;
}

.account-field-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.account-field {
  margin-bottom: 14px;
}

.account-hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}

.account-hint.error {
  color: var(--danger);
}

.account-hint.ok {
  color: var(--cyan);
}

.account-error {
  background: rgba(224, 86, 63, 0.12);
  border: 1px solid rgba(224, 86, 63, 0.4);
  color: var(--danger);
  font-size: 12px;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
}

.account-notice {
  background: rgba(89, 214, 196, 0.1);
  border: 1px solid rgba(89, 214, 196, 0.35);
  color: var(--cyan);
  font-size: 12px;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
}

.account-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  color: var(--muted);
  font-size: 11px;
  font-family: var(--font-mono);
}

.account-divider::before,
.account-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--panel-line);
}

.account-link {
  display: block;
  text-align: center;
  margin-top: 14px;
  font-size: 12px;
  color: var(--cyan);
  text-decoration: none;
}

.account-link:hover {
  color: var(--signal);
  text-decoration: underline;
}

/* ─── Inputs (covers every type -- this is what fixes the password field
   looking different from the rest of the form) ─────────────────────── */
.input-wrapper,
.textarea-wrapper {
  position: relative;
  width: 100%;
}

.input-wrapper input,
.textarea-wrapper textarea {
  width: 100%;
  background: #0d1315;
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.7;
  padding: 9px 12px;
  outline: none;
}

.input-wrapper input[type="email"] {
  padding-right: 34px;
}

.field-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  font-weight: 700;
  pointer-events: none;
}

.field-icon.ok {
  color: var(--cyan);
}

.field-icon.bad {
  color: var(--danger);
}

.textarea-wrapper textarea {
  height: 130px;
  resize: none;
  padding-bottom: 26px;
}

.input-wrapper input::placeholder,
.textarea-wrapper textarea::placeholder {
  color: var(--muted);
}

.input-wrapper input:focus,
.textarea-wrapper textarea:focus {
  border-color: var(--signal);
  box-shadow: 0 0 0 3px rgba(255, 180, 0, 0.15);
}

.char-counter {
  position: absolute;
  bottom: 8px;
  left: 10px;
  font-size: 10px;
  color: var(--muted);
  pointer-events: none;
}

/* ─── Buttons ────────────────────────────────────────────────────────── */
.send-btn {
  width: 100%;
  padding: 10px;
  background: var(--signal);
  border: none;
  border-radius: 8px;
  color: #16130a;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: box-shadow 0.2s, opacity 0.2s;
}

.send-btn:hover:not(:disabled) {
  box-shadow: 0 0 16px rgba(255, 180, 0, 0.5);
}

.send-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.cancel-link {
  display: block;
  width: 100%;
  text-align: center;
  padding: 10px;
  background: rgba(224, 86, 63, 0.12);
  border: 1px solid rgba(224, 86, 63, 0.4);
  border-radius: 8px;
  color: var(--danger);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
}

.cancel-link:hover {
  background: rgba(224, 86, 63, 0.22);
}

.hidden {
  display: none;
}

.mt-10 {
  margin-top: 10px;
}

/* ─── Dashboard tabs ─────────────────────────────────────────────────── */
.dash-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--panel-line);
}

.dash-tab {
  flex: 1;
  text-align: center;
  padding: 10px 6px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
}

.dash-tab.active {
  color: var(--signal);
  border-bottom-color: var(--signal);
}

.dash-panel {
  display: none;
}

.dash-panel.active {
  display: block;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--panel-line);
  font-size: 13px;
}

.stat-row:last-child {
  border-bottom: none;
}

.stat-label {
  color: var(--muted);
}

.stat-value {
  font-family: var(--font-mono);
  font-weight: 700;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.status-dot.online {
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan);
}

.status-dot.offline {
  background: var(--muted);
}

/* ─── Chat / Notification tab ────────────────────────────────────────── */
.chat-thread {
  max-height: 340px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
  padding-right: 4px;
}

.chat-bubble {
  max-width: 78%;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-bubble.user {
  align-self: flex-end;
  background: var(--signal);
  color: #16130a;
}

.chat-bubble.admin {
  align-self: flex-start;
  background: #0d1315;
  border: 1px solid var(--panel-line);
  color: var(--paper);
}

.chat-bubble time {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  opacity: 0.6;
}

/* The پیام tab is a one-way admin feed, not a two-sided conversation --
   no need to reserve the other 22% width for a "user" column, so let
   these bubbles use the full panel width (fewer wrapped lines = shorter). */
#announce-thread .chat-bubble {
  max-width: 100%;
  align-self: stretch;
}

.g_id_signin_wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 4px;
}

.account-logout {
  display: block;
  text-align: center;
  margin-top: 18px;
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
}

.account-logout:hover {
  color: var(--danger);
}

/* Fixed home-page shortcut -- same markup/classes as every other
   sub-page across the site (tools, morse, dl, speedtest). Kept
   physically top-right regardless of this page's dir="ltr"/RTL content,
   since a fixed-position `right` offset isn't affected by direction. */
.home-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 50;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  border: 1px solid rgba(89, 214, 196, 0.4);
  border-radius: 50%;
  color: var(--cyan);
  text-decoration: none;
  transition: color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.home-btn:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(89, 214, 196, 0.35);
}

.home-btn svg {
  display: block;
}
