/* ============================================================
   Quicks Ark — Dashboard Styles (Sidebar Layout)
   ============================================================ */

/* --- Sidebar Layout --- */
.dash-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  background: rgba(8, 8, 16, 0.95);
  border-right: 1px solid var(--steel);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  transition: transform 0.3s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.25rem;
  border-bottom: 1px solid var(--steel-light);
  text-decoration: none;
  color: var(--ink);
}

.sidebar-logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ember);
  border: 2px solid var(--ember);
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  line-height: 1.2;
}

.sidebar-brand-text {
  font-family: var(--font-body); font-weight: 600;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  color: var(--ink-dim);
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 1.25rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--ink-dim);
  text-decoration: none;
  transition: all 0.15s;
  border-left: 3px solid transparent;
}
.sidebar-link:hover {
  color: var(--ink);
  background: rgba(255, 77, 31, 0.05);
}
.sidebar-link.active {
  color: var(--ember);
  background: var(--ember-dim);
  border-left-color: var(--ember);
}

.sidebar-link svg {
  width: 18px;
  height: 18px;
  opacity: 0.7;
  flex-shrink: 0;
}

.sidebar-section-label {
  font-family: var(--font-body); font-weight: 600;
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  color: var(--ink-muted);
  padding: 1rem 1.25rem 0.35rem;
  text-transform: uppercase;
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--steel-light);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.sidebar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ember-dim);
  border: 1px solid var(--ember-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-style: italic;
  font-size: 0.75rem;
  color: var(--ember);
  flex-shrink: 0;
}

.sidebar-user-name {
  font-size: 0.85rem;
  color: var(--ink);
  line-height: 1.2;
}

.sidebar-user-role {
  font-size: 0.7rem;
  color: var(--ink-dim);
}

/* --- Main Content --- */
.dash-main {
  flex: 1;
  margin-left: 240px;
  padding: 2rem 2.5rem;
  min-height: 100vh;
}

.page-header {
  margin-bottom: 2rem;
}
.page-header .eyebrow {
  margin-bottom: 0.25rem;
  display: block;
}
.page-header h1 {
  margin-bottom: 0.25rem;
}
.page-header p {
  color: var(--ink-dim);
  font-size: 0.9rem;
}

/* --- Stats Grid --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--steel);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-align: center;
}
.stat-card .stat-value {
  font-family: var(--font-display);
  font-weight: 900;
  font-style: italic;
  font-size: 2rem;
  color: var(--ember);
  display: block;
}
.stat-card .stat-label {
  font-family: var(--font-body); font-weight: 600;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
  margin-top: 0.2rem;
  display: block;
}

/* --- Tables --- */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
th {
  font-family: var(--font-body); font-weight: 600;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-align: left;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--steel);
}
td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(42, 45, 58, 0.3);
  color: var(--ink-dim);
}
tr:hover td {
  background: rgba(255, 77, 31, 0.02);
}

/* --- NDA Fullscreen --- */
.nda-fullscreen {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
}

.nda-body {
  background: var(--bg-card);
  border: 1px solid var(--steel);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-bottom: 2rem;
  line-height: 1.8;
  color: var(--ink-dim);
}
.nda-body h1, .nda-body h2, .nda-body h3 {
  color: var(--ink);
  font-family: var(--font-body);
  font-style: normal;
  text-transform: none;
  margin: 1.5rem 0 0.75rem;
}
.nda-body h1 { font-size: 1.4rem; }
.nda-body h2 { font-size: 1.15rem; }
.nda-body p { margin-bottom: 0.75rem; }
.nda-body ul, .nda-body ol { margin: 0.5rem 0 0.75rem 1.5rem; }
.nda-body li { margin-bottom: 0.35rem; }
.nda-body hr { border: none; border-top: 1px solid var(--steel); margin: 1.5rem 0; }
.nda-body strong { color: var(--ink); }
.nda-body em { color: var(--ember); font-style: italic; }

.nda-sign-box {
  background: var(--bg-card);
  border: 1px solid var(--ember);
  border-radius: var(--radius-lg);
  padding: 2rem;
}
.nda-sign-box h3 { color: var(--ember); margin-bottom: 1rem; }

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.checkbox-row input[type="checkbox"] {
  margin-top: 0.3rem;
  accent-color: var(--ember);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* --- Login Page --- */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  position: relative;
  z-index: 10;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--steel);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  backdrop-filter: blur(12px);
}
.login-card h1 { text-align: center; margin-bottom: 0.25rem; }
.login-card .eyebrow { text-align: center; display: block; margin-bottom: 2rem; }
.login-card .form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
}
.login-card .form-footer a {
  font-size: 0.8rem;
  color: var(--ink-muted);
}
.login-card .form-footer a:hover { color: var(--ember); }

/* --- Loading --- */
.loading-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  flex-direction: column;
  gap: 1rem;
}

/* --- Mobile Toggle --- */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 200;
  background: rgba(8,8,16,0.9);
  border: 1px solid var(--steel);
  border-radius: var(--radius);
  padding: 0.5rem;
  cursor: pointer;
  color: var(--ink);
}
.sidebar-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink-dim);
  margin: 4px 0;
  border-radius: 2px;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-toggle { display: block; }
  .dash-main {
    margin-left: 0;
    padding: 3.5rem 1.25rem 2rem;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .dash-main { padding: 3.5rem 1rem 1.5rem; }
}
