/* =============================================================================
   XenoActive — Verified Design System
   Shared base styles for VI and VC applications.
   Served from https://assets.xenoactive.net/css/verified.css
   ============================================================================= */

/* ---- Bungee font (wordmark) ---- */
@font-face {
  font-family: 'Bungee';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('https://assets.xenoactive.net/fonts/bungee-latin.woff2') format('woff2');
}

/* ---- Line Awesome icon font ---- */
@font-face {
  font-family: 'Line Awesome Free';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('https://assets.xenoactive.net/fonts/la-regular-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Line Awesome Brands';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('https://assets.xenoactive.net/fonts/la-brands-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Line Awesome Free';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('https://assets.xenoactive.net/fonts/la-solid-900.woff2') format('woff2');
}

.la, .lar, .lab, .las {
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  display: inline-block;
  font-style: normal;
  font-variant: normal;
  text-rendering: auto;
  line-height: 1;
}

.lar {
  font-family: 'Line Awesome Free';
  font-weight: 400;
}

.lab {
  font-family: 'Line Awesome Brands';
  font-weight: 400;
}

.las {
  font-family: 'Line Awesome Free';
  font-weight: 900;
}

/* Icons from VI and VC combined */
.la-angle-right::before        { content: "\f105"; }
.la-book::before               { content: "\f02d"; }
.la-briefcase::before          { content: "\f0b1"; }
.la-building::before           { content: "\f1ad"; }
.la-certificate::before        { content: "\f0a3"; }
.la-check::before              { content: "\f00c"; }
.la-check-circle::before       { content: "\f058"; }
.la-chevron-down::before       { content: "\f078"; }
.la-chevron-right::before      { content: "\f054"; }
.la-circle::before             { content: "\f111"; }
.la-clock::before              { content: "\f017"; }
.la-cog::before                { content: "\f013"; }
.la-credit-card::before        { content: "\f09d"; }
.la-cube::before               { content: "\f1b2"; }
.la-desktop::before            { content: "\f108"; }
.la-download::before           { content: "\f019"; }
.la-edit::before               { content: "\f044"; }
.la-ellipsis-h::before         { content: "\f141"; }
.la-envelope::before           { content: "\f0e0"; }
.la-exclamation-circle::before { content: "\f06a"; }
.la-eye::before                { content: "\f06e"; }
.la-file-alt::before           { content: "\f15c"; }
.la-fingerprint::before        { content: "\f577"; }
.la-globe::before              { content: "\f0ac"; }
.la-graduation-cap::before     { content: "\f19d"; }
.la-hands-helping::before      { content: "\f4c4"; }
.la-home::before               { content: "\f015"; }
.la-id-badge::before           { content: "\f2c1"; }
.la-id-card::before            { content: "\f2c2"; }
.la-key::before                { content: "\f084"; }
.la-language::before           { content: "\f1ab"; }
.la-link::before               { content: "\f0c1"; }
.la-lock::before               { content: "\f023"; }
.la-lock-open::before          { content: "\f3c1"; }
.la-map-marker::before         { content: "\f041"; }
.la-pen::before                { content: "\f304"; }
.la-phone::before              { content: "\f095"; }
.la-plus::before               { content: "\f067"; }
.la-project-diagram::before    { content: "\f542"; }
.la-shield::before             { content: "\f3ed"; }
.la-sign-out-alt::before       { content: "\f2f5"; }
.la-sliders-h::before          { content: "\f1de"; }
.la-star::before               { content: "\f005"; }
.la-tachometer-alt::before     { content: "\f3fd"; }
.la-times::before              { content: "\f00d"; }
.la-tools::before              { content: "\f7d9"; }
.la-trash-alt::before          { content: "\f2ed"; }
.la-trophy::before             { content: "\f091"; }
.la-user::before               { content: "\f007"; }
.la-user-circle::before        { content: "\f2bd"; }
.la-user-friends::before       { content: "\f500"; }
.la-user-shield::before        { content: "\f505"; }
.la-users::before              { content: "\f0c0"; }

/* ---- Variables ---- */
:root {
  --primary:        #FF6600;
  --primary-hover:  #e05500;
  --blue:           #227ded;
  --blue-hover:     #1877ec;
  --dark:           #242931;
  --text:           #454d5d;
  --text-dark:      #3a414e;
  --text-muted:     #667189;
  --border:         #e7e9ed;
  --muted:          #acb3c2;
  --bg:             #ffffff;
  --bg-light:       #f8f9fb;
  --sidebar-width:  240px;
  --font: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", sans-serif;
  --radius: 5px;
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.06);
}

/* ---- Reset / Base ---- */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font);
  color: var(--text-dark);
  margin: 0 0 0.75rem;
  line-height: 1.3;
  font-weight: 600;
}

h1 { font-size: 1.8rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1rem; }

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

/* ---- Wordmark ---- */
.wordmark-brand {
  display: block;
  font-family: 'Bungee', var(--font);
  font-weight: 400;
  color: var(--primary);
  line-height: 1;
}

.wordmark-service {
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
  color: #000000;
  line-height: 1.4;
  margin-top: 0.25rem;
}

.sidebar .wordmark-service { color: #ffffff; }

/* =============================================================================
   Auth Layout — centered card, no sidebar
   ============================================================================= */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-light);
  padding: 2rem 1rem;
}

.auth-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-card);
}

.auth-card-wordmark {
  text-align: center;
  margin-bottom: 1.75rem;
}

.auth-card-wordmark .wordmark-brand { font-size: 1.8rem; }

.auth-card > h2 {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
}

.auth-links {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.auth-links a { color: var(--primary); }
.auth-links a:hover { text-decoration: underline; }

/* =============================================================================
   App Layout — fixed left sidebar + scrollable main
   ============================================================================= */

.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-width);
  background: var(--dark);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 10;
  flex-shrink: 0;
}

.sidebar-wordmark {
  display: block;
  padding: 1.4rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  text-decoration: none;
}

.sidebar-wordmark:hover { text-decoration: none; }

.sidebar-wordmark .wordmark-brand { font-size: 1.5rem; }

.sidebar-nav {
  flex: 1;
  padding: 0.75rem 0;
  list-style: none;
  margin: 0;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1.25rem;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  border-right: 3px solid transparent;
  transition: color 0.15s, background 0.15s;
}

.sidebar-nav a .lar,
.sidebar-nav a .lab,
.sidebar-nav a .las {
  font-size: 1rem;
  width: 1.1em;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
}

.sidebar-nav a.active {
  color: #ffffff;
  background: rgba(255, 102, 0, 0.12);
  border-right-color: var(--primary);
}

.sidebar-section-label {
  padding: 1rem 1.25rem 0.25rem;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.25);
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.sidebar-user {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- Main content ---- */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  background: var(--bg-light);
  display: flex;
  flex-direction: column;
}

.page-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 2rem;
}

.page-header h1 {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0;
}

.page-body {
  padding: 2rem;
  flex: 1;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

/* =============================================================================
   Forms
   ============================================================================= */

.form-group { margin-bottom: 1.25rem; }

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 0.35rem;
}

.form-input {
  display: block;
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

.form-input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(34, 125, 237, 0.15);
}

.form-input::placeholder { color: var(--muted); }

.form-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

/* =============================================================================
   Buttons
   ============================================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.25);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #ffffff;
  text-decoration: none;
}

.btn-secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--muted);
  background: var(--bg-light);
  text-decoration: none;
}

.btn-danger {
  background: #dc3545;
  border-color: #dc3545;
  color: #ffffff;
}

.btn-danger:hover {
  background: #b02a37;
  border-color: #b02a37;
  color: #ffffff;
  text-decoration: none;
}

.btn-block { width: 100%; display: flex; }

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
}

/* =============================================================================
   Alerts
   ============================================================================= */

.alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
  border: 1px solid transparent;
  line-height: 1.5;
}

.alert-success {
  background: #e8f5e9;
  border-color: #a5d6a7;
  color: #2e7d32;
}

.alert-error {
  background: #fdecea;
  border-color: #ef9a9a;
  color: #b71c1c;
}

.alert-info {
  background: #e3f2fd;
  border-color: #90caf9;
  color: #1565c0;
}

.alert-warning {
  background: #fff8e1;
  border-color: #ffe082;
  color: #6d4c00;
}

/* =============================================================================
   Cards
   ============================================================================= */

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0;
}

/* =============================================================================
   Divider
   ============================================================================= */

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

/* =============================================================================
   Utilities
   ============================================================================= */

.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; }

.form-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* =============================================================================
   Responsive — collapse sidebar on small screens
   ============================================================================= */

@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .sidebar-nav { display: none; }
  .sidebar-footer { display: none; }

  .main-content { margin-left: 0; }
}

/* =============================================================================
   Badges
   ============================================================================= */

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.4;
}

/* =============================================================================
   Data table
   ============================================================================= */

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  padding: 0 1rem 0.6rem 0;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 0.7rem 1rem 0.7rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table td:last-child,
.data-table th:last-child {
  padding-right: 0;
}

/* =============================================================================
   Section helpers
   ============================================================================= */

.section-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.inline-form { max-width: 480px; }

/* =============================================================================
   Select input
   ============================================================================= */

select.form-input {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='12' viewBox='0 0 16 12'%3E%3Cpath d='M2 3l6 6 6-6' fill='none' stroke='%23acb3c2' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

/* =============================================================================
   Textarea
   ============================================================================= */

.form-textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

/* =============================================================================
   Empty state
   ============================================================================= */

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state h3 {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.empty-state p {
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

/* =============================================================================
   Page header actions
   ============================================================================= */

.page-header-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.page-header-actions h1 { margin: 0; }

.page-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0.25rem 0 0;
}
