/* ============================================================
   Ustayetiş — Global Theme
   ============================================================ */
:root {
  --primary:        #4f46e5;
  --primary-dark:   #4338ca;
  --primary-light:  #818cf8;
  --primary-soft:   rgba(79, 70, 229, 0.1);
  --dark-nav:       #1a1f36;
  --dark-nav-mid:   #252c4a;
  --accent:         #f59e0b;
  --accent-hover:   #d97706;
  --success:        #10b981;
  --danger:         #ef4444;
  --text-base:      #1e293b;
  --text-muted:     #64748b;
  --bg-base:        #f8fafc;
  --border-color:   #e2e8f0;
  --radius:         0.75rem;
  --radius-sm:      0.5rem;
  --shadow-card:    0 4px 24px rgba(30, 41, 59, 0.08);
  --shadow-lg:      0 12px 48px rgba(30, 41, 59, 0.14);

  /* Legacy aliases (keep for backward compat) */
  --uy-teal:       var(--primary);
  --uy-teal-dark:  var(--primary-dark);
  --uy-teal-light: var(--primary-light);
  --uy-slate:      var(--dark-nav);
  --uy-slate-mid:  var(--dark-nav-mid);
  --uy-accent:     var(--accent);
  --uy-accent-hover: var(--accent-hover);
  --uy-radius:     var(--radius);
}

/* ─── Base ─────────────────────────────────────────────── */
html {
  font-size: 15px;
  scroll-behavior: smooth;
}

/* Panel: horizontal scroll tables on small screens */
main .overflow-x-auto {
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 1023px) {
  main .overflow-x-auto table {
    font-size: 0.8125rem;
  }
  main .overflow-x-auto th,
  main .overflow-x-auto td {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

body.app-body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: #f1f5f9;
  color: var(--text-base);
}

/* ─── Navbar ────────────────────────────────────────────── */
.app-header .navbar {
  background: var(--dark-nav);
  box-shadow: 0 2px 16px rgba(26, 31, 54, 0.45);
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}

.app-header .navbar-brand {
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.brand-mark {
  width: 2.2rem;
  height: 2.2rem;
  background: rgba(129, 140, 248, 0.18);
  color: var(--primary-light);
  border-radius: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.app-header .nav-link {
  color: rgba(255, 255, 255, 0.82) !important;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  padding: 0.45rem 0.9rem !important;
}

.app-header .nav-link:hover,
.app-header .nav-link:focus {
  background: rgba(255, 255, 255, 0.1);
  color: #fff !important;
  border-radius: 0.4rem;
}

.app-main { flex: 1; }

.app-footer {
  background: var(--dark-nav);
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* ─── Buttons ───────────────────────────────────────────── */
.btn-uy-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-bg: var(--primary-dark);
  --bs-btn-hover-border-color: var(--primary-dark);
  --bs-btn-focus-shadow-rgb: 79, 70, 229;
  --bs-btn-active-bg: var(--primary-dark);
  font-weight: 500;
}

.btn-uy-accent {
  --bs-btn-color: #1e293b;
  --bs-btn-bg: var(--accent);
  --bs-btn-border-color: var(--accent);
  --bs-btn-hover-bg: var(--accent-hover);
  --bs-btn-hover-border-color: var(--accent-hover);
  font-weight: 600;
}

/* ─── Cards ─────────────────────────────────────────────── */
.card.shadow-uy,
.card.hover-card {
  box-shadow: var(--shadow-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  transition: box-shadow 0.2s, transform 0.2s;
}

.card.hover-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

/* ─── Stat Cards ─────────────────────────────────────────── */
.stat-card {
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  color: #fff;
  border: none;
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
}

.stat-card .stat-label {
  font-size: 0.8rem;
  opacity: 0.85;
  margin-top: 0.25rem;
}

.stat-card .stat-icon {
  font-size: 2rem;
  opacity: 0.25;
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.stat-primary  { background: linear-gradient(135deg, #4f46e5, #7c3aed); }
.stat-success  { background: linear-gradient(135deg, #10b981, #059669); }
.stat-info     { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.stat-warning  { background: linear-gradient(135deg, #f59e0b, #d97706); color: #1e293b !important; }
.stat-warning .stat-label { opacity: 0.7; }
.stat-secondary{ background: linear-gradient(135deg, #64748b, #475569); }
.stat-dark     { background: linear-gradient(135deg, #1e293b, #0f172a); }

/* ─── Hero ───────────────────────────────────────────────── */
.hero-uy {
  background: linear-gradient(135deg, var(--dark-nav) 0%, var(--dark-nav-mid) 50%, #312e81 100%);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

/* ─── Badges ─────────────────────────────────────────────── */
.badge-verified {
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.75rem;
  padding: 0.3em 0.65em;
  border-radius: 99px;
}

.badge-active {
  background: #d1fae5;
  color: #065f46;
  font-size: 0.75rem;
  padding: 0.3em 0.65em;
  border-radius: 99px;
}

.badge-limited {
  background: #fef3c7;
  color: #92400e;
  font-size: 0.75rem;
  padding: 0.3em 0.65em;
  border-radius: 99px;
}

.badge-inactive {
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.75rem;
  padding: 0.3em 0.65em;
  border-radius: 99px;
}

/* ─── Forms ─────────────────────────────────────────────── */
.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.2);
}

.form-control, .form-select {
  border-radius: var(--radius-sm);
  border-color: #cbd5e1;
  font-size: 0.9rem;
}

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

.input-group-text {
  background: #f8fafc;
  border-color: #cbd5e1;
}

/* ─── Tables ─────────────────────────────────────────────── */
.table-hover tbody tr:hover {
  background-color: rgba(79, 70, 229, 0.04);
}

.table th {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

/* ─── Auth Layout ────────────────────────────────────────── */
body.auth-body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', system-ui, sans-serif;
  display: flex;
  align-items: stretch;
}

.auth-hero {
  background: linear-gradient(145deg, var(--dark-nav) 0%, var(--dark-nav-mid) 45%, #312e81 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  min-height: 100vh;
}

.auth-form-pane {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 2rem;
  min-height: 100vh;
}

.auth-form-inner {
  width: 100%;
  max-width: 420px;
}

.brand-logo {
  display: block;
  width: auto;
  object-fit: contain;
  object-position: left center;
}

/* Header / yan yana wordmark */
.brand-lockup {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.625rem;
  text-decoration: none;
  color: inherit;
}

.brand-lockup--nav {
  flex-wrap: nowrap;
  gap: 0.625rem;
}

.brand-lockup--panel {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}

.brand-lockup__icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 0.5rem;
  background: #fff;
}

.brand-logo--nav-mark {
  height: 2.75rem;
  width: 2.75rem;
  object-fit: cover;
  object-position: top center;
}

@media (min-width: 768px) {
  .brand-logo--nav-mark {
    height: 3rem;
    width: 3rem;
  }
}

.brand-wordmark {
  display: inline-flex;
  align-items: baseline;
  font-size: 1.375rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .brand-wordmark {
    font-size: 1.5rem;
  }
}

.brand-wordmark__usta {
  color: #002147;
}

.brand-wordmark__yetis {
  color: #ff6600;
}

.brand-lockup--footer .brand-wordmark {
  font-size: 1.25rem;
}

.brand-lockup--footer .brand-wordmark__usta {
  color: #fff;
}

.brand-lockup--footer:hover .brand-wordmark__usta {
  color: rgba(255, 255, 255, 0.92);
}

.brand-lockup--footer .brand-logo--footer-mark {
  height: 2.5rem;
  width: 2.5rem;
}

.brand-lockup--auth .brand-wordmark {
  font-size: 1.25rem;
}

.brand-logo--auth-mark {
  height: 2.5rem;
  width: 2.5rem;
  object-fit: cover;
  object-position: top center;
}

.brand-logo--panel-mark {
  height: 2.25rem;
  width: 2.25rem;
  object-fit: cover;
  object-position: top center;
}

.brand-lockup--panel .brand-wordmark {
  font-size: 1.125rem;
}

.brand-lockup:hover .brand-wordmark__usta,
.brand-lockup:hover .brand-wordmark__yetis {
  opacity: 0.92;
}

.brand-logo--nav {
  height: 2.25rem;
  max-width: 9.5rem;
}

@media (min-width: 640px) {
  .brand-logo--nav {
    height: 2.5rem;
    max-width: 10.5rem;
  }
}

@media (min-width: 768px) {
  .brand-logo--nav {
    height: 2.625rem;
    max-width: 11.25rem;
  }
}

.brand-logo--auth {
  height: 2.5rem;
  max-width: 10rem;
}

.brand-logo--auth-hero {
  height: 3.25rem;
  max-width: 12rem;
}

.brand-logo--footer {
  height: 2.5rem;
  max-width: 10rem;
}

.brand-logo--panel {
  height: 2.125rem;
  max-width: 100%;
  object-position: left top;
}

.auth-card {
  border-radius: var(--radius) !important;
  overflow: hidden;
}

.tracking-tight { letter-spacing: -0.03em; }

/* ─── Sector picker (Setup) ──────────────────────────────── */
.sector-card {
  cursor: pointer;
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}

.sector-card:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.sector-card.selected,
input[type=radio]:checked + label .sector-card {
  border-color: var(--primary);
  background: var(--primary-soft);
}

/* ─── Wizard progress ────────────────────────────────────── */
.wizard-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 2rem;
}

.wizard-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

.wizard-step.active { color: var(--primary); }
.wizard-step.done   { color: var(--success); }

.wizard-step .step-num {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 2px solid currentColor;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.wizard-step.active .step-num {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.wizard-step.done .step-num {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.wizard-connector {
  flex: 1;
  height: 2px;
  background: var(--border-color);
  margin: 0 0.5rem;
}

/* ─── Availability badge ─────────────────────────────────── */
.availability-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  margin-right: 0.35rem;
}

/* ─── Avatar ─────────────────────────────────────────────── */
.bg-uy-avatar {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

/* ─── Misc ───────────────────────────────────────────────── */
.rounded-uy { border-radius: var(--radius); }

.section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

@media (max-width: 767px) {
  .auth-hero { display: none; }
  .auth-form-pane { min-height: 100vh; padding: 2rem 1.25rem; }
}

/* Blog içerik (Quill HTML) */
.prose-blog h2 { font-size: 1.35rem; font-weight: 700; margin: 1.25rem 0 0.5rem; }
.prose-blog h3 { font-size: 1.1rem; font-weight: 600; margin: 1rem 0 0.5rem; }
.prose-blog ul, .prose-blog ol { margin: 0.5rem 0 0.5rem 1.25rem; padding-left: 0.25rem; }
.prose-blog li { margin: 0.25rem 0; }
.prose-blog blockquote { border-left: 3px solid var(--primary); padding-left: 1rem; color: var(--text-muted); margin: 1rem 0; }
.prose-blog a { color: var(--primary); text-decoration: underline; }
.prose-blog p { margin: 0.5rem 0; }
#blog-editor .ql-editor { min-height: 240px; font-size: 0.875rem; }
