/* ═══════════════════════════════════════════════════════
   SportsMIS – Application Stylesheet
   Bootstrap 5.3.3 override & custom components
   ═══════════════════════════════════════════════════════ */

/* ── Design Tokens ────────────────────────────────────── */
:root {
  --sbya-navy:    #0b1f3a;
  --sbya-accent:  #f59e0b;
  --sbya-teal:    #14b8a6;
  --sbya-ink:     #0f172a;
  --sbya-bg:      #f1f5f9;
  --sbya-surface: #ffffff;
  --radius-card:  1rem;
  --radius-sm:    0.5rem;
  --shadow-card:  0 2px 12px rgba(11,31,58,.07);
  --shadow-hover: 0 6px 24px rgba(11,31,58,.12);
  --nav-height:   64px;
  --transition:   0.18s ease;
}

/* ── Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body { font-family: 'Inter', system-ui, sans-serif; font-size: 14.5px; }

.sms-body {
  background: var(--sbya-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Navbar ───────────────────────────────────────────── */
.sms-navbar {
  background: var(--sbya-navy);
  height: var(--nav-height);
  box-shadow: 0 2px 16px rgba(0,0,0,.18);
  z-index: 1030;
}

.sms-navbar .navbar-brand { color: #fff !important; font-size: 1.15rem; letter-spacing: .3px; }
.sms-navbar .navbar-brand img { filter: brightness(1.1); }
.sms-navbar .nav-link { color: rgba(255,255,255,.75) !important; font-weight: 500; border-radius: var(--radius-sm); padding: .45rem .9rem !important; transition: all var(--transition); }
.sms-navbar .nav-link:hover,
.sms-navbar .nav-link.active { color: #fff !important; background: rgba(255,255,255,.1); }
.sms-navbar .navbar-toggler { border-color: rgba(255,255,255,.3); }
.sms-navbar .navbar-toggler-icon { filter: invert(1); }

/* Avatar trigger */
.sms-avatar-trigger { color: rgba(255,255,255,.85) !important; font-weight: 500; transition: all var(--transition); }
.sms-avatar-trigger:hover { color: #fff !important; }

/* ── Avatar Bubble ────────────────────────────────────── */
.sms-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--sbya-accent);
  color: var(--sbya-navy);
  font-weight: 700; font-size: .85rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sms-avatar-sm  { width: 32px; height: 32px; font-size: .75rem; }
.sms-avatar-lg  { width: 56px; height: 56px; font-size: 1.1rem; }
.sms-avatar-xl  { width: 130px; height: 130px; font-size: 2.2rem; border-radius: 50%; }

/* ── Dropdown ─────────────────────────────────────────── */
.sms-dropdown {
  border: 1px solid rgba(0,0,0,.07);
  border-radius: var(--radius-card);
  min-width: 220px;
  padding: .5rem;
}
.sms-dropdown .dropdown-item { border-radius: var(--radius-sm); font-size: .9rem; padding: .5rem .9rem; }
.sms-dropdown .dropdown-item:hover { background: #f1f5f9; }

/* ── Main Content ─────────────────────────────────────── */
.sms-main { flex: 1; padding-top: 0; }

/* ── Footer ───────────────────────────────────────────── */
.sms-footer {
  background: #fff;
  border-top: 1px solid #e2e8f0;
  padding: 1rem 0;
}

/* ── Cards ────────────────────────────────────────────── */
.sms-card {
  background: var(--sbya-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(0,0,0,.04);
  overflow: hidden;
}

.sms-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
}

/* ── Stat Cards ───────────────────────────────────────── */
.sms-stat-card {
  background: var(--sbya-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(0,0,0,.04);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: box-shadow var(--transition);
}
.sms-stat-card:hover { box-shadow: var(--shadow-hover); }
.sms-stat-icon { width: 48px; height: 48px; border-radius: .75rem; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.sms-stat-value { font-size: 1.6rem; font-weight: 700; color: var(--sbya-ink); line-height: 1.1; }
.sms-stat-label { font-size: .75rem; color: #94a3b8; font-weight: 500; text-transform: uppercase; letter-spacing: .5px; margin-top: 2px; }

/* ── Action Cards ─────────────────────────────────────── */
.sms-action-card {
  background: var(--sbya-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(0,0,0,.04);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: .85rem;
  transition: all var(--transition);
  color: inherit;
}
.sms-action-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); color: inherit; }
.sms-action-icon { width: 44px; height: 44px; border-radius: .75rem; background: #f8fafc; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; flex-shrink: 0; }

/* ── Event Cards ──────────────────────────────────────── */
.sms-event-card {
  background: var(--sbya-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(0,0,0,.04);
  overflow: hidden;
  transition: all var(--transition);
}
.sms-event-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.sms-event-status-bar { height: 4px; }
.status-approved     { background: #22c55e; }
.status-pending_approval { background: #f59e0b; }
.status-draft        { background: #94a3b8; }
.status-rejected     { background: #ef4444; }
.status-completed    { background: #14b8a6; }
.status-cancelled    { background: #f43f5e; }

.sms-event-card-body { padding: 1.25rem; }
.sms-event-icon {
  width: 48px; height: 48px;
  background: var(--sbya-navy);
  color: var(--sbya-accent);
  border-radius: .75rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}
.sms-event-icon-lg { width: 72px; height: 72px; font-size: 1.8rem; border-radius: 1rem; }

/* ── Empty State ──────────────────────────────────────── */
.sms-empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--sbya-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(0,0,0,.04);
}
.sms-empty-state i { font-size: 3.5rem; color: #cbd5e1; margin-bottom: 1rem; display: block; }
.sms-empty-state h5 { color: var(--sbya-ink); font-weight: 600; }
.sms-empty-state p  { color: #94a3b8; margin-bottom: 1.5rem; }

/* ── Info Items ───────────────────────────────────────── */
.sms-info-item { display: flex; align-items: flex-start; gap: .75rem; }
.sms-info-item i { font-size: 1.15rem; margin-top: 2px; flex-shrink: 0; }

/* ── Sport Row ────────────────────────────────────────── */
.sms-sport-row { background: #f8fafc; transition: background var(--transition); }
.sms-sport-row:has(.sport-check:checked) { background: #eff6ff; border-color: #3b82f6 !important; }

/* ── Auth Layout ──────────────────────────────────────── */
.sms-auth-body {
  background: var(--sbya-bg);
  min-height: 100vh;
}

.sms-auth-wrapper {
  display: flex;
  min-height: 100vh;
}

.sms-auth-brand {
  flex: 0 0 440px;
  background: linear-gradient(145deg, var(--sbya-navy) 0%, #1e3a5f 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}
.sms-auth-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='30'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.sms-auth-brand-inner { position: relative; z-index: 1; }
.sms-auth-logo { max-height: 52px; filter: brightness(1.3); }
.text-white-75 { color: rgba(255,255,255,.75); }

.sms-auth-feat-icon {
  width: 40px; height: 40px;
  background: rgba(255,255,255,.1);
  border-radius: .75rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  color: var(--sbya-accent);
  flex-shrink: 0;
}

.sms-auth-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.sms-auth-form-inner { width: 100%; max-width: 440px; }

/* ── Verify Icon ──────────────────────────────────────── */
.sms-verify-icon i { font-size: 3.5rem; }

/* ── Divider Text ─────────────────────────────────────── */
.sms-divider-text {
  position: relative;
  text-align: center;
  color: #94a3b8;
  font-size: .8rem;
}
.sms-divider-text::before,
.sms-divider-text::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 42%;
  height: 1px;
  background: #e2e8f0;
}
.sms-divider-text::before { left: 0; }
.sms-divider-text::after  { right: 0; }

/* ── Bootstrap Overrides ──────────────────────────────── */
.btn-primary { background-color: var(--sbya-navy); border-color: var(--sbya-navy); }
.btn-primary:hover, .btn-primary:focus { background-color: #0d2647; border-color: #0d2647; }

.btn-success  { background-color: #16a34a; border-color: #16a34a; }
.badge.bg-primary { background-color: var(--sbya-navy) !important; }

.form-control:focus, .form-select:focus { border-color: var(--sbya-navy); box-shadow: 0 0 0 0.2rem rgba(11,31,58,.15); }
.form-label { font-size: .875rem; }

.table > :not(caption) > * > * { padding: .8rem 1rem; }
.table th { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: #64748b; }

.alert { border-radius: var(--radius-sm); border: none; }
.alert-info    { background: #eff6ff; color: #1e40af; }
.alert-warning { background: #fffbeb; color: #92400e; }
.alert-success { background: #f0fdf4; color: #14532d; }
.alert-danger  { background: #fef2f2; color: #7f1d1d; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 991.98px) {
  .sms-navbar { height: auto; }
  .sms-navbar .navbar-collapse { padding: .75rem 0; }
  .sms-navbar .nav-link { margin-bottom: .2rem; }
}

@media (max-width: 767.98px) {
  .sms-stat-card { padding: 1rem; }
  .sms-stat-value { font-size: 1.3rem; }
  .sms-main > .container-fluid { padding-left: 1rem; padding-right: 1rem; }
}
