/* ============================================
   SPORTS LINK — Main Stylesheet
   Navy Blue #0a1628 | Orange #f97316 | White
   ============================================ */

/* ── Google Font ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ── Reset & Base ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f4f6f9;
    color: #1e293b;
    font-size: 14px;
    line-height: 1.6;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ══════════════════════════════════════════
   NAVBAR
══════════════════════════════════════════ */
.sl-navbar {
    background: #0a1628;
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0,0,0,.25);
}

.sl-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #f97316;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 1px;
}

.sl-brand:hover { color: #fb923c; }

.sl-brand-icon {
    width: 34px;
    height: 34px;
    background: #f97316;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.sl-nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.sl-nav-links a {
    color: #94a3b8;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all .2s;
}

.sl-nav-links a:hover,
.sl-nav-links a.active {
    color: white;
    background: rgba(255,255,255,.1);
}

.sl-nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sl-user-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e2e8f0;
    font-size: 13px;
}

.sl-role-pill {
    background: #f97316;
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    letter-spacing: .5px;
}

.sl-role-pill.user {
    background: #334155;
}

/* ══════════════════════════════════════════
   PAGE WRAPPER
══════════════════════════════════════════ */
.sl-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 24px;
}

.sl-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.sl-page-title {
    font-size: 20px;
    font-weight: 600;
    color: #0a1628;
    margin: 0;
}

.sl-page-sub {
    font-size: 13px;
    color: #94a3b8;
    margin-top: 2px;
}

/* ══════════════════════════════════════════
   CARDS
══════════════════════════════════════════ */
.sl-card {
    background: white;
    border-radius: 14px;
    border: none;
    box-shadow: 0 1px 4px rgba(0,0,0,.06),
                0 4px 16px rgba(0,0,0,.04);
    overflow: hidden;
}

.sl-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sl-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #0a1628;
}

.sl-card-body {
    padding: 20px;
}

/* ══════════════════════════════════════════
   STAT CARDS
══════════════════════════════════════════ */
.sl-stat {
    border-radius: 14px;
    padding: 20px 22px;
    color: white;
    position: relative;
    overflow: hidden;
    min-height: 100px;
}

.sl-stat::after {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
}

.sl-stat-label {
    font-size: 11px;
    font-weight: 500;
    opacity: .8;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 8px;
}

.sl-stat-value {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

.sl-stat-sub {
    font-size: 11px;
    opacity: .7;
    margin-top: 4px;
}

.sl-stat-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    opacity: .15;
}

/* Stat color variants */
.sl-stat-navy   { background: linear-gradient(135deg,#0a1628,#1e3a5f); }
.sl-stat-green  { background: linear-gradient(135deg,#16a34a,#15803d); }
.sl-stat-blue   { background: linear-gradient(135deg,#0369a1,#0284c7); }
.sl-stat-orange { background: linear-gradient(135deg,#f97316,#ea6c0a); }

/* ══════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════ */
.sl-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
    white-space: nowrap;
}

.sl-btn:hover { transform: translateY(-1px); }
.sl-btn:active { transform: translateY(0); }

.sl-btn-primary {
    background: #f97316;
    color: white;
}
.sl-btn-primary:hover {
    background: #ea6c0a;
    color: white;
}

.sl-btn-navy {
    background: #0a1628;
    color: white;
}
.sl-btn-navy:hover {
    background: #1e3a5f;
    color: white;
}

.sl-btn-outline {
    background: transparent;
    color: #64748b;
    border: 1.5px solid #e2e8f0;
}
.sl-btn-outline:hover {
    background: #f8fafc;
    color: #0a1628;
    border-color: #cbd5e1;
}

.sl-btn-danger {
    background: #fee2e2;
    color: #dc2626;
}
.sl-btn-danger:hover {
    background: #fecaca;
    color: #b91c1c;
}

.sl-btn-sm {
    padding: 5px 12px;
    font-size: 12px;
}

/* ══════════════════════════════════════════
   FORMS
══════════════════════════════════════════ */
.sl-form-group {
    margin-bottom: 18px;
}

.sl-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.sl-label .req {
    color: #f97316;
    margin-left: 2px;
}

.sl-input,
.sl-select,
.sl-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: #1e293b;
    background: white;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}

.sl-input:focus,
.sl-select:focus,
.sl-textarea:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249,115,22,.12);
}

.sl-input::placeholder { color: #94a3b8; }
.sl-input[readonly] { background: #f8fafc; color: #64748b; }

.sl-form-hint {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
}

/* Calculation result box */
.sl-calc-box {
    background: #f0f9ff;
    border: 1.5px solid #bae6fd;
    border-radius: 10px;
    padding: 16px 18px;
    margin-top: 16px;
}

.sl-calc-title {
    font-size: 12px;
    font-weight: 600;
    color: #0369a1;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 12px;
}

.sl-calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid #e0f2fe;
    font-size: 13px;
}

.sl-calc-row:last-child {
    border-bottom: none;
    font-weight: 700;
    font-size: 15px;
    color: #0a1628;
    padding-top: 10px;
}

/* ══════════════════════════════════════════
   TABLES
══════════════════════════════════════════ */
.sl-table-wrap {
    overflow-x: auto;
    border-radius: 14px;
}

.sl-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.sl-table thead th {
    background: #0a1628;
    color: white;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .4px;
    white-space: nowrap;
}

.sl-table thead th:first-child {
    border-radius: 14px 0 0 0;
}

.sl-table thead th:last-child {
    border-radius: 0 14px 0 0;
}

.sl-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background .15s;
}

.sl-table tbody tr:hover {
    background: #f8fafc;
}

.sl-table tbody tr:last-child {
    border-bottom: none;
}

.sl-table td {
    padding: 12px 16px;
    color: #374151;
    vertical-align: middle;
}

.sl-table .total-row {
    background: #f0fdf4;
    font-weight: 700;
    border-top: 2px solid #86efac;
}

/* ══════════════════════════════════════════
   BADGES & PILLS
══════════════════════════════════════════ */
.sl-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.sl-badge-ok      { background: #dcfce7; color: #16a34a; }
.sl-badge-low     { background: #fee2e2; color: #dc2626; }
.sl-badge-admin   { background: #f97316; color: white; }
.sl-badge-user    { background: #e2e8f0; color: #475569; }
.sl-badge-cash    { background: #dcfce7; color: #15803d; }
.sl-badge-mpesa   { background: #dbeafe; color: #1d4ed8; }

/* ══════════════════════════════════════════
   ALERTS
══════════════════════════════════════════ */
.sl-alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sl-alert-success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #15803d;
}

.sl-alert-error {
    background: #fff1f2;
    border: 1px solid #fca5a5;
    color: #b91c1c;
}

.sl-alert-warning {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
}

/* ══════════════════════════════════════════
   LOGIN PAGE
══════════════════════════════════════════ */
.sl-login-bg {
    min-height: 100vh;
    background: linear-gradient(135deg, #0a1628 0%, #1e3a5f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.sl-login-card {
    background: white;
    border-radius: 18px;
    padding: 44px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}

.sl-login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.sl-login-logo-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg,#f97316,#ea6c0a);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 14px;
    box-shadow: 0 8px 24px rgba(249,115,22,.35);
}

.sl-login-title {
    font-size: 24px;
    font-weight: 700;
    color: #0a1628;
    letter-spacing: 1px;
}

.sl-login-sub {
    font-size: 13px;
    color: #94a3b8;
    margin-top: 4px;
}

/* ══════════════════════════════════════════
   MENU CARDS (Dashboard)
══════════════════════════════════════════ */
.sl-menu-card {
    background: white;
    border-radius: 14px;
    padding: 24px 20px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all .2s;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    border: 2px solid transparent;
}

.sl-menu-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
    border-color: #f97316;
    color: inherit;
}

.sl-menu-icon {
    font-size: 2.4rem;
    margin-bottom: 10px;
    display: block;
}

.sl-menu-title {
    font-weight: 600;
    font-size: 14px;
    color: #0a1628;
}

.sl-menu-sub {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}

/* ══════════════════════════════════════════
   ALERT ROWS (Dashboard lists)
══════════════════════════════════════════ */
.sl-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 0;
    border-bottom: 1px solid #f1f5f9;
}

.sl-list-row:last-child { border-bottom: none; }

/* ══════════════════════════════════════════
   LOW STOCK WARNING BANNER
══════════════════════════════════════════ */
.sl-stock-warning {
    background: #fff1f2;
    border: 1px solid #fca5a5;
    border-radius: 10px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #b91c1c;
    font-weight: 500;
}

/* ══════════════════════════════════════════
   PRINT STYLES
══════════════════════════════════════════ */
@media print {
    .sl-navbar,
    .no-print { display: none !important; }
    body { background: white; font-size: 12px; }
    .sl-card { box-shadow: none; border: 1px solid #e2e8f0; }
    .sl-stat { border: 1px solid #e2e8f0; color: #0a1628 !important; }
    .sl-stat * { color: #0a1628 !important; }
    .sl-page { padding: 0; }
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 768px) {
    .sl-navbar { padding: 0 16px; }
    .sl-nav-links { display: none; }
    .sl-page { padding: 16px; }
    .sl-stat-value { font-size: 18px; }
    .sl-login-card { padding: 32px 24px; }
    .sl-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}