/* 
 * YourSelfAndMe - 2035 SaaS UI Kit 
 */

:root {
  --bg-main: #0b0b0f;
  --bg-soft: #11111a;
  --bg-card: rgba(255, 255, 255, 0.055);
  --bg-glass: rgba(255, 255, 255, 0.075);

  --primary: #7c3aed;
  --primary-soft: rgba(124, 58, 237, 0.22);
  --secondary: #22d3ee;
  --gold: #c9a84c;
  --gold-soft: rgba(201, 168, 76, 0.22);

  --text-main: #ffffff;
  --text-muted: #a7a7b8;
  --text-soft: #d6d6e7;

  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #38bdf8;

  --border-soft: rgba(255, 255, 255, 0.09);
  --shadow-glow: 0 24px 80px rgba(124, 58, 237, 0.22);
  --shadow-card: 0 20px 60px rgba(0, 0, 0, 0.35);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --space-xs: 6px;
  --space-sm: 10px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;

  --font-main: Inter, Satoshi, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-main);
  background:
    radial-gradient(circle at top left, rgba(124,58,237,0.22), transparent 35%),
    radial-gradient(circle at top right, rgba(34,211,238,0.14), transparent 30%),
    var(--bg-main);
  color: var(--text-main);
  overflow-x: hidden;
}

img, video {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(100% - 32px, 1200px);
  margin-inline: auto;
}

.section {
  padding: clamp(56px, 8vw, 110px) 0;
}

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-lg);
}

.two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-xl);
  align-items: center;
}

@media (max-width: 900px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

.eyebrow {
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.title-xl {
  font-size: clamp(36px, 6vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.title-lg {
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.text-muted {
  color: var(--text-muted);
  line-height: 1.75;
}

.gradient-text {
  background: linear-gradient(135deg, var(--gold), var(--secondary), var(--primary));
  -webkit-background-clip: text;
  color: transparent;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(22px);
  padding: var(--space-lg);
}

.card-hover {
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}

.card-hover:hover {
  transform: translateY(-6px);
  border-color: rgba(201,168,76,0.35);
  box-shadow: var(--shadow-glow);
}

.glass-panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.035));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(26px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: all .25s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), #f3d783);
  color: #111;
  box-shadow: 0 12px 40px rgba(201,168,76,0.24);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 60px rgba(201,168,76,0.34);
}

.btn-secondary {
  background: rgba(255,255,255,0.06);
  color: var(--text-main);
  border-color: var(--border-soft);
}

.btn-secondary:hover {
  border-color: rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.1);
}

.btn-danger {
  background: rgba(239,68,68,0.16);
  color: #fecaca;
  border-color: rgba(239,68,68,0.25);
}

@media (max-width: 520px) {
  .btn {
    width: 100%;
  }
}

.form-group {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.form-label {
  font-size: 13px;
  color: var(--text-soft);
  font-weight: 700;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 48px;
  background: rgba(255,255,255,0.055);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  color: var(--text-main);
  padding: 12px 14px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.textarea {
  min-height: 120px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: rgba(34,211,238,0.55);
  box-shadow: 0 0 0 4px rgba(34,211,238,0.1);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid var(--border-soft);
  background: rgba(255,255,255,0.06);
}

.badge-success {
  color: #a7f3d0;
  background: rgba(16,185,129,0.14);
  border-color: rgba(16,185,129,0.22);
}

.badge-warning {
  color: #fde68a;
  background: rgba(245,158,11,0.14);
  border-color: rgba(245,158,11,0.22);
}

.badge-danger {
  color: #fecaca;
  background: rgba(239,68,68,0.14);
  border-color: rgba(239,68,68,0.22);
}

.badge-info {
  color: #bae6fd;
  background: rgba(56,189,248,0.14);
  border-color: rgba(56,189,248,0.22);
}

.navbar {
  position: sticky;
  top: 16px;
  z-index: 100;
  width: min(100% - 32px, 1200px);
  margin: 16px auto 0;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(11,11,15,0.72);
  border: 1px solid var(--border-soft);
  backdrop-filter: blur(22px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  color: var(--gold);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.nav-links {
  display: flex;
  gap: 18px;
  align-items: center;
}

.nav-link {
  color: var(--text-muted);
  font-size: 14px;
  transition: color .2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-main);
}

.mobile-menu-btn {
  display: none;
}

@media (max-width: 860px) {
  .mobile-menu-btn {
    display: inline-flex;
  }

  .nav-links {
    position: fixed;
    inset: 80px 16px auto 16px;
    display: none;
    flex-direction: column;
    padding: 20px;
    border-radius: var(--radius-lg);
    background: rgba(11,11,15,0.96);
    border: 1px solid var(--border-soft);
    backdrop-filter: blur(24px);
  }

  .nav-links.open {
    display: flex;
  }
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
  background: var(--bg-main);
}

.sidebar {
  padding: 22px;
  border-right: 1px solid var(--border-soft);
  background: rgba(255,255,255,0.035);
  backdrop-filter: blur(22px);
}

.main-content {
  padding: clamp(18px, 3vw, 36px);
  overflow-x: hidden;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-lg);
}

.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-6 { grid-column: span 6; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    z-index: 200;
    inset: 0 auto 0 0;
    width: 280px;
    transform: translateX(-100%);
    transition: transform .25s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .col-3,
  .col-4,
  .col-6,
  .col-8 {
    grid-column: span 12;
  }
}

.chat-shell {
  display: grid;
  grid-template-columns: 340px 1fr;
  height: calc(100vh - 48px);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-soft);
  background: rgba(255,255,255,0.04);
}

.chat-list {
  border-right: 1px solid var(--border-soft);
  overflow-y: auto;
}

.chat-thread {
  padding: 16px;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  transition: background .2s ease;
}

.chat-thread:hover,
.chat-thread.active {
  background: rgba(255,255,255,0.07);
}

.chat-window {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
}

.chat-header,
.chat-input {
  padding: 16px;
  border-bottom: 1px solid var(--border-soft);
}

.chat-input {
  border-bottom: 0;
  border-top: 1px solid var(--border-soft);
  display: flex;
  gap: 10px;
}

.messages {
  padding: 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message {
  max-width: min(72%, 620px);
  padding: 12px 14px;
  border-radius: 18px;
  line-height: 1.55;
  word-wrap: break-word;
}

.message-user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--primary), #5b21b6);
}

.message-admin {
  align-self: flex-start;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border-soft);
}

.message-time {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: rgba(255,255,255,0.6);
}

@media (max-width: 860px) {
  .chat-shell {
    grid-template-columns: 1fr;
    height: calc(100vh - 16px);
  }

  .chat-list {
    display: none;
  }

  .chat-list.open {
    display: block;
  }

  .message {
    max-width: 86%;
  }
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.table th,
.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-soft);
  text-align: left;
}

.table th {
  color: var(--text-soft);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.table td {
  color: var(--text-muted);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s ease, transform .55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.bg-aurora {
  position: relative;
  overflow: hidden;
}

.bg-aurora::before {
  content: "";
  position: absolute;
  inset: -30%;
  background:
    radial-gradient(circle at 20% 30%, rgba(124,58,237,0.32), transparent 30%),
    radial-gradient(circle at 80% 20%, rgba(34,211,238,0.22), transparent 28%),
    radial-gradient(circle at 50% 80%, rgba(201,168,76,0.18), transparent 32%);
  animation: auroraMove 14s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes auroraMove {
  from { transform: translate3d(-2%, -2%, 0) rotate(0deg); }
  to { transform: translate3d(2%, 2%, 0) rotate(6deg); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

html[dir="rtl"] body {
  direction: rtl;
}

html[dir="rtl"] .sidebar {
  border-right: 0;
  border-left: 1px solid var(--border-soft);
}

html[dir="rtl"] .message-user {
  align-self: flex-start;
}

html[dir="rtl"] .message-admin {
  align-self: flex-end;
}

html[dir="rtl"] .table th,
html[dir="rtl"] .table td {
  text-align: right;
}
