/* Tiger OTT Admin — UI styles on top of Bootstrap 5. */

:root {
  --brand-bg: #0f172a;
  --brand-hover: #1e293b;
  --page-bg: #f1f5f9;
  --card-shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --card-shadow-hover: 0 4px 12px rgba(0,0,0,.12);
}

/* ── Base ─────────────────────────────────────────────── */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--page-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-main  { flex: 1; }
.page-footer { background: #fff; }

/* ── Navbar ───────────────────────────────────────────── */
.navbar {
  background: var(--brand-bg) !important;
  padding-top: .6rem;
  padding-bottom: .6rem;
}
.navbar-brand {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: #fff !important;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.navbar-brand .brand-icon {
  width: 28px;
  height: 28px;
  background: #3b82f6;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  color: #fff;
}
.navbar-toggler { border-color: rgba(255,255,255,.25); }
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,.7%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.navbar .nav-link {
  color: rgba(255,255,255,.75) !important;
  font-size: .88rem;
  padding: .4rem .7rem;
  border-radius: 5px;
  transition: color .15s, background .15s;
}
.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: #fff !important;
  background: rgba(255,255,255,.1);
}
.navbar .dropdown-menu {
  border: none;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  border-radius: 8px;
  padding: .4rem;
  margin-top: 6px;
}
.navbar .dropdown-item {
  border-radius: 5px;
  font-size: .875rem;
  padding: .45rem .8rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.navbar .dropdown-item:hover { background: #f1f5f9; }
.navbar .dropdown-divider { margin: .3rem 0; }
.navbar-text {
  color: rgba(255,255,255,.65) !important;
  font-size: .82rem;
}
.nav-user-badge {
  background: rgba(255,255,255,.15);
  border-radius: 20px;
  padding: .3rem .75rem;
  font-size: .82rem;
  color: rgba(255,255,255,.85) !important;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.nav-user-badge .badge {
  font-size: .68rem;
}

/* ── Cards ────────────────────────────────────────────── */
.card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: var(--card-shadow);
}
.card-header {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: .85rem 1.25rem;
  border-radius: 10px 10px 0 0 !important;
  font-weight: 600;
  font-size: .9rem;
}

/* Stat cards */
.stat-card {
  border-radius: 10px;
  padding: 1.4rem 1.5rem;
  color: #fff;
  position: relative;
  overflow: hidden;
  border: none;
  box-shadow: var(--card-shadow);
  transition: transform .15s, box-shadow .15s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--card-shadow-hover); }
.stat-card .stat-icon {
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.8rem;
  opacity: .25;
}
.stat-card .stat-label { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; opacity: .85; }
.stat-card .stat-value { font-size: 2.2rem; font-weight: 700; line-height: 1.1; margin: .2rem 0; }
.stat-card .stat-link { font-size: .8rem; opacity: .9; color: #fff; text-decoration: none; }
.stat-card .stat-link:hover { opacity: 1; text-decoration: underline; }
.stat-card.blue  { background: linear-gradient(135deg, #2563eb, #3b82f6); }
.stat-card.green { background: linear-gradient(135deg, #059669, #10b981); }
.stat-card.amber { background: linear-gradient(135deg, #d97706, #f59e0b); }

/* ── Tables ───────────────────────────────────────────── */
.table { font-size: .875rem; }
.table th {
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #64748b;
  background: #f8fafc;
  border-bottom-width: 1px;
  white-space: nowrap;
}
.table td { vertical-align: middle; }
.table-hover tbody tr:hover { background: #f8fafc; }

.table-projects { font-size: .875rem; }
.table-projects td.url {
  word-break: break-all;
  font-family: SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .8rem;
}

/* ── Badges ───────────────────────────────────────────── */
.badge { font-weight: 500; }
.action-badge { font-size: .72rem; font-weight: 600; padding: .3em .6em; border-radius: 4px; }

/* ── Forms ────────────────────────────────────────────── */
.form-control, .form-select {
  border-color: #cbd5e1;
  border-radius: 6px;
  font-size: .9rem;
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, .form-select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
.form-label { font-size: .83rem; font-weight: 600; color: #374151; margin-bottom: .35rem; }
.form-text  { font-size: .78rem; }

/* ── Buttons ──────────────────────────────────────────── */
.btn { border-radius: 6px; font-size: .875rem; font-weight: 500; transition: all .15s; }
.btn-primary   { background: #2563eb; border-color: #2563eb; }
.btn-primary:hover { background: #1d4ed8; border-color: #1d4ed8; }
.btn-success   { background: #059669; border-color: #059669; }
.btn-success:hover { background: #047857; border-color: #047857; }
.btn-sm { font-size: .8rem; padding: .28rem .65rem; }

/* ── Login page ───────────────────────────────────────── */
body.login-page {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
}
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.login-card {
  width: 100%;
  max-width: 400px;
  border-radius: 14px;
  border: none;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.login-card .login-header {
  padding: 2rem 2rem 1rem;
  text-align: center;
}
.login-card .login-logo {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: #fff;
  margin: 0 auto 1rem;
}
.login-card .card-body { padding: 1rem 2rem 2rem; }

/* ── Page headers ─────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.page-header h2 { margin: 0; font-size: 1.4rem; font-weight: 700; color: #0f172a; }
.page-header .page-subtitle { font-size: .82rem; color: #64748b; margin-top: .1rem; }

/* ── Flash messages ───────────────────────────────────── */
.alert { border-radius: 8px; border: none; font-size: .875rem; display: flex; align-items: center; gap: .6rem; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-danger  { background: #fee2e2; color: #991b1b; }
.alert-warning { background: #fef9c3; color: #854d0e; }
.alert-info    { background: #dbeafe; color: #1e40af; }

/* ── Empty state ──────────────────────────────────────── */
.empty {
  padding: 3.5rem 1rem;
  text-align: center;
  color: #94a3b8;
}
.empty i { font-size: 2.5rem; display: block; margin-bottom: .75rem; }

/* ── Breadcrumb ───────────────────────────────────────── */
.breadcrumb { font-size: .82rem; }

/* ── List group ───────────────────────────────────────── */
.list-group-item-action {
  border-color: #e2e8f0;
  transition: background .12s;
}
.list-group-item-action:hover { background: #f8fafc; }

/* ── Setup stepper (project creation flow) ────────────── */
.setup-stepper {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 1.25rem 1.5rem 1.5rem;
}
.setup-step-header {
  font-size: .9rem;
  margin-bottom: .25rem;
}
.setup-step-card {
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.25rem;
  height: 100%;
  display: flex;
  gap: 1rem;
  transition: border-color .15s;
}
.setup-step-card.active {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,.1);
}
.setup-step-card.disabled {
  opacity: .55;
}
.setup-step-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #3b82f6;
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.setup-step-card.disabled .setup-step-number {
  background: #94a3b8;
}
.setup-step-body { flex: 1; min-width: 0; }
.setup-step-title {
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: .5rem;
}
