/* ================================================================
   Cricket PMS — Complete Design System
   Theme: Cricket Ground | Cream + Red + Forest Green
   ================================================================

   Color Palette:
   --cream:        white  (page background, topbar)
   --cream-dark:   #e8d4a8  (card borders, inputs)
   --red:          #b62117  (buttons, accents, active)
   --red-dark:     #8c1910  (hover states)
   --green-dark:   #012581  (sidebar top, page headers)
   --green-mid:    #2a6a2a  (sidebar body)
   --green-light:  #3d8c3d  (sidebar hover)
   --gold:         #d4a017  (accent, active nav)
   --white:        #ffffff
   ================================================================ */

/* ---- Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=Open+Sans:wght@400;500;600;700&display=swap');

/* ---- Font Awesome 6 Free (CDN fallback handled in HTML) ---- */

/* ================================================================
   CSS CUSTOM PROPERTIES
================================================================ */
:root {
    /* Brand - AthletixOS */
    --primary:         #FF8126;
    --primary-light:   #FFF0E6;
    --success:         #85D47A;
    --text-main:       #202224;
    --text-muted:      #5E6278;
    --bg-page:         #F5F6FA;
    --bg-card:         #FFFFFF;
    
    /* Layout */
    --sidebar-width:   260px;
    --topbar-height:   70px;

    /* Sidebar */
    --sidebar-bg:      #FFFFFF;
    --sidebar-border:  #E4E6EF;
    --sidebar-hover:   #F8F9FA;
    --sidebar-active:  #FFF0E6;
    --sidebar-text:    #5E6278;

    /* Page */
    --page-bg:         #F8F9FB;
    --card-bg:         #FFFFFF;
    --card-shadow:     0px 4px 20px rgba(0, 0, 0, 0.03);
    --card-radius:     14px;
    --topbar-bg:       #FFFFFF;
    --input-border:    #E4E6EF;
    --transition:      0.22s ease;
}

/* ================================================================
   RESET & BASE
================================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    font-family: 'Poppins', 'Segoe UI', system-ui, sans-serif;
    font-size: 14px;
    background: var(--bg-page);
    color: #000000;
}

a { text-decoration: none; color: inherit; }

h1,h2,h3,h4,h5,h6 { font-family: 'Poppins', 'Segoe UI', sans-serif; letter-spacing: 0.3px; }

/* ================================================================
   ██████╗  SIDEBAR
================================================================ */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 1050;
    overflow: hidden;
    transition: transform var(--transition), width var(--transition);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    box-shadow: 4px 0 24px rgba(0,0,0,0.05);
}

/* Pitch line texture on sidebar */
.sidebar::before { display: none;
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 38px,
            rgba(255,255,255,0.025) 38px,
            rgba(255,255,255,0.025) 39px
        );
    pointer-events: none;
    z-index: 0;
}

.sidebar > * { position: relative; z-index: 1; }

/* ---- Brand / Logo ---- */
.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 70px;
    background: #ffffff;
    border-bottom: 1px solid var(--sidebar-border);
    flex-shrink: 0;
}
.sidebar-brand-link { display: flex; align-items: center; gap: 10px; overflow: hidden; flex: 1; }
.sidebar-brand-icon {
    width: 36px; height: 36px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    color: var(--primary);
    flex-shrink: 0;
}
.brand-name {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-main);
    letter-spacing: 0.2px;
}
.brand-sub { display: none; }

.sidebar-close-btn {
    display: none;
    background: none; border: none;
    color: var(--text-muted); font-size: 1.2rem;
    cursor: pointer; padding: 6px; border-radius: 6px;
    transition: all var(--transition);
    flex-shrink: 0;
}
.sidebar-close-btn:hover { background: var(--sidebar-hover); color: var(--text-main); }

/* ---- User Card ---- */
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 20px;
    border-bottom: 1px solid var(--sidebar-border);
    flex-shrink: 0;
    background: #ffffff;
    color: var(--text-main);
}
.sidebar-user-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: #111D35;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
}
.sidebar-user-info { overflow: hidden; }
.sidebar-user-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
}
.sidebar-user-role {
    background: rgba(133, 212, 122, 0.2) !important;
    color: #4CAF50 !important;
    font-size: 0.65rem;
    padding: 4px 10px;
    border-radius: 20px;
    margin-top: 4px;
    display: inline-block;
    font-weight: 600;
}

/* ---- Navigation ---- */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 0 6px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.1) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 2px; }

/* Section Labels */
.sidebar-nav-label {
    font-family: 'Poppins', sans-serif;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #012581;
    opacity: 1;
    padding: 12px 18px 4px;
    white-space: nowrap;
}

/* Nav Items */
.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
    margin: 4px 16px;
    border-radius: 8px;
    color: var(--text-muted);
    background: transparent;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    border-left: 4px solid transparent;
    width: calc(100% - 32px);
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
}

.sidebar-nav-item .fa, .sidebar-nav-item .fas,
.sidebar-nav-item .far, .sidebar-nav-item .fab,
.sidebar-nav-item .fa-solid, .sidebar-nav-item .fa-regular {
    font-size: 1.15rem;
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    color: var(--text-muted) !important;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.sidebar-nav-item:hover {
    color: var(--text-main);
    background: var(--sidebar-hover);
    transform: none;
    box-shadow: none;
}

.sidebar-nav-item:hover .fa,
.sidebar-nav-item:hover .fas,
.sidebar-nav-item:hover .fa-solid {
    color: var(--text-main) !important;
    transform: none;
}

.sidebar-nav-item.active {
    color: var(--primary) !important;
    background: linear-gradient(90deg, var(--sidebar-active) 0%, rgba(255,255,255,0) 100%);
    border-left: 4px solid var(--primary);
    border-radius: 0 8px 8px 0;
    box-shadow: none;
    margin-left: 0;
    padding-left: 28px;
    width: 100%;
}

.sidebar-nav-item.active .fa,
.sidebar-nav-item.active .fas,
.sidebar-nav-item.active .fa-solid {
    color: var(--primary) !important;
    background: transparent !important;
}

/* Accordion toggle */
.sidebar-nav-toggle {
    color: var(--green-dark);
}
.sidebar-nav-item.sidebar-nav-toggle:hover {
    color: #0273bf;
    background: rgba(2, 115, 191, 0.08);
    border-color: rgba(2, 115, 191, 0.2);
}
.sidebar-nav-item.sidebar-nav-toggle:hover span { 
    color: #0273bf !important; 
}
.sidebar-nav-item.sidebar-nav-toggle:hover .fa,
.sidebar-nav-item.sidebar-nav-toggle:hover .fas {
    color: #0273bf !important;
    background: rgba(2, 115, 191, 0.1);
}
.sidebar-nav-toggle .sidebar-chevron {
    font-size: 0.68rem;
    transition: transform var(--transition);
    opacity: 0.8;
    flex-shrink: 0;
    margin-left: auto;
    color: #0273bf;
}
.sidebar-nav-group.open .sidebar-nav-toggle .sidebar-chevron { transform: rotate(180deg); }
.sidebar-nav-group.open > .sidebar-nav-toggle { 
    color: #0273bf; 
    background: rgba(2, 115, 191, 0.1); 
    font-weight: 600;
}

.sidebar-nav-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.32s ease;
    background: transparent;
}
.sidebar-nav-group.open .sidebar-nav-submenu { max-height: 600px; }

/* Sub items */
.sidebar-nav-sub {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px 10px 48px;
    background: #2c6699;
    color: #ffffff;
    font-size: 0.85rem;
    text-decoration: none;
    transition: color var(--transition), background var(--transition);
}

.sidebar-nav-sub .fa,
.sidebar-nav-sub .fas,
.sidebar-nav-sub .fa-solid {
    font-size: 0.85rem;
    width: 15px;
    text-align: center;
    flex-shrink: 0;
    color: #ffffff !important;
    transition: color var(--transition);
}

.sidebar-nav-sub:hover {
    background: #245885;
    color: #ffffff;
}

.sidebar-nav-sub:hover .fa,
.sidebar-nav-sub:hover .fas { color: #ffffff !important; }

.sidebar-nav-sub.active {
    color: #fff;
    font-weight: 600;
    background: #fe4606;
}

.sidebar-nav-sub.active .fa,
.sidebar-nav-sub.active .fas { color: #fff !important; }

/* ---- Sidebar Footer ---- */
.sidebar-footer {
    border-top: 1px solid var(--sidebar-border);
    padding: 0;
    margin-top: auto;
    flex-shrink: 0;
    background: transparent;
}

.sidebar-logout { 
    background: #ffffff !important; 
    color: var(--text-main) !important; 
    border: 1px solid var(--sidebar-border) !important;
    margin: 20px 20px; 
    padding: 12px 16px; 
    border-radius: 8px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    text-align: center; 
    gap: 10px; 
    font-size: 0.95rem;
    font-weight: 600; 
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.sidebar-logout:hover { 
    background: #F5F6FA !important; 
    color: var(--text-main) !important; 
    border-color: #D5D8E2 !important;
}
.sidebar-logout .fa, .sidebar-logout .fas, .sidebar-logout .fa-solid { 
    color: var(--text-main) !important; 
    font-size: 1.1rem;
}

/* Collapsed sidebar (desktop) */
@media (min-width: 992px) {
    .layout-wrapper.sidebar-collapsed { margin-left: 66px; }
    .sidebar.sidebar-collapsed { width: 66px; }

    .sidebar.sidebar-collapsed .sidebar-brand-text,
    .sidebar.sidebar-collapsed .sidebar-user-info,
    .sidebar.sidebar-collapsed .sidebar-nav-item > span,
    .sidebar.sidebar-collapsed .sidebar-nav-label,
    .sidebar.sidebar-collapsed .sidebar-chevron,
    .sidebar.sidebar-collapsed .sidebar-nav-submenu { display: none !important; }

    .sidebar.sidebar-collapsed .sidebar-brand { padding: 0; justify-content: center; }
    .sidebar.sidebar-collapsed .sidebar-user { padding: 12px 0; justify-content: center; }
    .sidebar.sidebar-collapsed .sidebar-nav-item { padding: 12px 0; justify-content: center; gap: 0; border-left: none; border-bottom: none; }
    .sidebar.sidebar-collapsed .sidebar-nav-item .fa,
    .sidebar.sidebar-collapsed .sidebar-nav-item .fas,
    .sidebar.sidebar-collapsed .sidebar-nav-item .fa-solid { width: 66px; text-align: center; font-size: 1.1rem; }
    .sidebar.sidebar-collapsed .sidebar-footer .sidebar-nav-item { padding: 12px 0; justify-content: center; }
    .sidebar.sidebar-collapsed .sidebar-footer .sidebar-nav-item > span { display: none; }
    .sidebar.sidebar-collapsed .logo-full { display: none !important; }
    .sidebar.sidebar-collapsed .logo-icon { display: block !important; }
    .sidebar.sidebar-collapsed .sidebar-logout span { display: none !important; }
    .sidebar.sidebar-collapsed .sidebar-logout { padding: 12px 0 !important; margin: 20px 10px !important; justify-content: center !important; }
}

/* ================================================================
   LAYOUT WRAPPER
================================================================ */
.layout-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition);
}

/* ================================================================
   ████████╗ TOPBAR
================================================================ */
.topbar {
    position: sticky;
    top: 0;
    z-index: 1050;
    height: var(--topbar-height);
    background: var(--topbar-bg);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    gap: 16px;
    flex-shrink: 0;
}

.topbar-left  { display: flex; align-items: center; gap: 14px; overflow: hidden; flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* Toggle Hamburger */
.topbar-toggle {
    background: none; border: none;
    width: 40px; height: 40px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
    color: var(--green-dark);
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
    flex-shrink: 0;
}
.topbar-toggle:hover { background: var(--cream-dark); color: var(--red); }

/* Breadcrumb */
.topbar-breadcrumb { font-size: 0.85rem; }
.topbar-breadcrumb .breadcrumb-item a { color: var(--text-main); font-weight: 600; }
.topbar-breadcrumb .breadcrumb-item.active { color: var(--primary); font-weight: 600; }
.topbar-breadcrumb .breadcrumb-item + .breadcrumb-item::before { color: var(--text-muted); }

.topbar-page-title { font-size: 0.88rem; color: var(--text-main); font-weight: 600; max-width: 180px; }

/* User Button */
.topbar-user-btn {
    background: #fff;
    border: none;
    border-radius: 20px;
    display: flex; align-items: center; gap: 10px;
    padding: 2px 10px 2px 2px; cursor: pointer;
    transition: all var(--transition); color: var(--text-main);
}
.topbar-user-btn:hover { background: var(--bg-page); }

.topbar-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: #111D35;
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    flex-shrink: 0;
}

.topbar-user-name { font-size: 0.85rem; font-weight: 700; white-space: nowrap; line-height: 1.2; color: var(--text-main); }
.topbar-user-role { font-size: 0.65rem; color: var(--text-muted); white-space: nowrap; }
.topbar-chevron { font-size: 0.65rem; color: var(--text-muted); margin-left: 2px; }

.topbar-dropdown {
    min-width: 210px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(100,60,10,0.15);
    border: 1.5px solid var(--cream-dark);
    overflow: hidden;
    background: #ffffff !important;
}

/* ================================================================
   OVERLAY (mobile)
================================================================ */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1040;
    backdrop-filter: blur(3px);
}
.sidebar-overlay.active { display: block; }

/* ================================================================
   PAGE HEADER — Dark green with cricket player silhouette
================================================================ */
.page-header {
    position: relative;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1440' height='120' viewBox='0 0 1440 120' preserveAspectRatio='none'%3E%3Cpath d='M0,120 C320,120 420,0 1440,60 L1440,120 L0,120 Z' fill='rgba(255,255,255,0.5)'/%3E%3Cpath d='M0,60 C400,0 800,120 1440,0 L1440,120 L0,120 Z' fill='rgba(255,255,255,0.3)'/%3E%3Cpath d='M0,0 C600,60 900,0 1440,80 L1440,0 L0,0 Z' fill='rgba(255,255,255,0.2)'/%3E%3C/svg%3E") bottom center / cover no-repeat, linear-gradient(90deg, #FF8C00 0%, #FFF3E0 45%, #82C97B 100%);
    color: var(--text-main);
    border-radius: var(--card-radius);
    padding: 1.2rem 1.5rem 1.2rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    min-height: 80px;
    overflow: hidden;
}

/* Remove silhouette */
.page-header::after, .page-header::before { display: none !important; }

.page-header > * { position: relative; z-index: 1; }

.page-header-icon {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: #fff;
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.page-header h4 {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-main);
}

.page-header small {
    opacity: 0.9;
    font-size: 0.82rem;
    color: var(--text-main);
    font-weight: 500;
}

/* ================================================================
   MAIN CONTENT
================================================================ */
.main-content { flex: 1; padding: 1.4rem; min-width: 0; }

/* ================================================================
   ████████╗ FOOTER — Cricket ground background
================================================================ */
.footer {
    position: relative;
    background:
        linear-gradient(
            rgba(1,37,129,0.92),
            rgba(1,20,70,0.97)
        ),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='200' viewBox='0 0 400 200'%3E%3C!-- Cricket oval boundary --%3E%3Cellipse cx='200' cy='100' rx='190' ry='90' fill='none' stroke='rgba(255,255,255,0.12)' stroke-width='3'/%3E%3C!-- Inner circle 30 yards --%3E%3Cellipse cx='200' cy='100' rx='100' ry='70' fill='none' stroke='rgba(255,255,255,0.07)' stroke-width='2'/%3E%3C!-- Pitch crease --%3E%3Crect x='185' y='60' width='30' height='80' fill='none' stroke='rgba(255,255,255,0.15)' stroke-width='2'/%3E%3C!-- Popping crease --%3E%3Cline x1='170' y1='75' x2='230' y2='75' stroke='rgba(255,255,255,0.15)' stroke-width='1.5'/%3E%3Cline x1='170' y1='125' x2='230' y2='125' stroke='rgba(255,255,255,0.15)' stroke-width='1.5'/%3E%3C!-- Stumps top --%3E%3Cline x1='194' y1='60' x2='194' y2='75' stroke='rgba(255,255,255,0.3)' stroke-width='2'/%3E%3Cline x1='200' y1='60' x2='200' y2='75' stroke='rgba(255,255,255,0.3)' stroke-width='2'/%3E%3Cline x1='206' y1='60' x2='206' y2='75' stroke='rgba(255,255,255,0.3)' stroke-width='2'/%3E%3C!-- Stumps bottom --%3E%3Cline x1='194' y1='125' x2='194' y2='140' stroke='rgba(255,255,255,0.3)' stroke-width='2'/%3E%3Cline x1='200' y1='125' x2='200' y2='140' stroke='rgba(255,255,255,0.3)' stroke-width='2'/%3E%3Cline x1='206' y1='125' x2='206' y2='140' stroke='rgba(255,255,255,0.3)' stroke-width='2'/%3E%3C!-- Fielder dots --%3E%3Ccircle cx='50' cy='50' r='3' fill='rgba(255,255,255,0.15)'/%3E%3Ccircle cx='350' cy='50' r='3' fill='rgba(255,255,255,0.15)'/%3E%3Ccircle cx='50' cy='150' r='3' fill='rgba(255,255,255,0.15)'/%3E%3Ccircle cx='350' cy='150' r='3' fill='rgba(255,255,255,0.15)'/%3E%3Ccircle cx='120' cy='30' r='3' fill='rgba(255,255,255,0.15)'/%3E%3Ccircle cx='280' cy='30' r='3' fill='rgba(255,255,255,0.15)'/%3E%3Ccircle cx='120' cy='170' r='3' fill='rgba(255,255,255,0.15)'/%3E%3Ccircle cx='280' cy='170' r='3' fill='rgba(255,255,255,0.15)'/%3E%3C/svg%3E")
        center / cover no-repeat;
    padding: 20px 24px;
    flex-shrink: 0;
    color: rgba(255,255,255,0.9);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-brand-icon {
    width: 36px; height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--gold), #b8870e);
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    color: var(--green-dark);
}

.footer-brand-text { font-family: 'Poppins', sans-serif; font-size: 0.9rem; color: #fff; font-weight: 600; letter-spacing: 0.5px; }
.footer-brand-sub  { font-size: 0.68rem; color: rgba(255,255,255,0.4); }

.footer-links a {
    color: rgba(255,255,255,0.55);
    font-size: 0.78rem;
    margin: 0 6px;
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--gold); }

.footer-copy {
    font-size: 0.74rem;
    color: rgba(255,255,255,0.4);
}

/* Footer boundary rope decoration */
.footer-rope {
    height: 4px;
    background: repeating-linear-gradient(
        90deg,
        var(--gold) 0px,
        var(--gold) 10px,
        transparent 10px,
        transparent 16px
    );
    margin-bottom: 16px;
    border-radius: 2px;
    opacity: 0.7;
}

/* ================================================================
   BUTTONS
================================================================ */

/* Universal button base */
.btn {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s;
}

/* Primary / Cricket button */
.btn-cricket, .btn-warning, .btn-primary, .btn-success, .btn-danger {
    background: var(--red-dark) !important;
    border-color: var(--red-dark) !important;
    color: #040000 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(182, 33, 23, 0.35);
}

.btn-cricket:hover,
.btn-warning:hover,
.btn-primary:hover,
.btn-success:hover,
.btn-danger:hover {
    background: var(--red-dark) !important;
    border-color: var(--red-dark) !important;
    color: #040000 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(182, 33, 23, 0.35);
}

/* Specific style for btn-cricket btn-sm */
.btn.btn-cricket.btn-sm {
    color: #000 !important;
    border: 1px solid #000 !important;
    background: transparent !important;
}
.btn.btn-cricket.btn-sm i {
    color: #000 !important;
}
.btn.btn-cricket.btn-sm:hover {
    color: #fff !important;
    background: #000 !important;
    border-color: #000 !important;
}
.btn.btn-cricket.btn-sm:hover i {
    color: #fff !important;
}


.btn-cricket:focus,
.btn-warning:focus,
.btn-primary:focus {
    box-shadow: 0 0 0 0.2rem rgba(182,33,23,0.3) !important;
}

/* Outline buttons stay outline but use red color */
.btn-outline-primary,
.btn-outline-success,
.btn-outline-warning,
.btn-outline-danger {
    color: var(--red) !important;
    border-color: var(--red) !important;
}

.btn-outline-success:hover,
.btn-outline-warning:hover,
.btn-outline-danger:hover {
    background: var(--red) !important;
    border-color: var(--red) !important;
}

.btn-outline-primary:hover {
    background: transparent !important;
    border-color: #000000 !important;
    color: #000000 !important;
}
.btn-outline-primary:hover i {
    color: #000000 !important;
}

.btn-outline-secondary {
    color:#00000;
    border-color: var(--green-mid) !important;
}
.btn-outline-secondary:hover { background: var(--green-dark) !important; color: #070000 !important; }

.btn-outline-light { color: rgba(255,255,255,0.85) !important; border-color: rgbalack(255,255,255,0.35) !important; }
.btn-outline-light:hover { background: rgba(255,255,255,0.15) !important; color: #fff !important; }

/* Bootstrap overrides */
.btn-warning { --bs-btn-color: #000; --bs-btn-bg: var(--red); --bs-btn-border-color: var(--red); }

/* ================================================================
   CARDS
================================================================ */
.card {
    border: none;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    background: var(--card-bg);
    transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.06); }

.card-header {
    background: transparent !important;
    color: var(--text-main) !important;
    border-radius: calc(var(--card-radius) - 1px) calc(var(--card-radius) - 1px) 0 0 !important;
    border-bottom: none !important;
    padding: 1.5rem 1.5rem 0.5rem;
}

.card-header h6 { font-family: 'Poppins', sans-serif; font-weight: 700; letter-spacing: 0.2px; font-size: 1.05rem; margin: 0; color: var(--text-main); }

.card-header.bg-white { background: var(--cream-white) !important; color: var(--green-dark) !important; border-bottom-color: var(--cream-dark) !important; }

/* ================================================================
   STAT CARDS
================================================================ */
.stat-card {
    border-radius: var(--card-radius);
    padding: 1.5rem;
    color: var(--text-main);
    background: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}
.stat-card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(0,0,0,0.08); }

.stat-card::before, .stat-card::after { display: none; }

.stat-icon {
    width: 42px; height: 42px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 0;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main);
}

.stat-bottom-link {
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 15px;
}

.stat-shape {
    position: absolute;
    right: 0; bottom: 0;
    width: 90px; height: 90px;
    border-top-left-radius: 100%;
    opacity: 0.12;
    z-index: -1;
}

.stat-orange .stat-icon { background: #FF8126; }
.stat-orange .stat-bottom-link { color: #FF8126; }
.stat-orange .stat-shape { background: #FF8126; }

.stat-blue .stat-icon { background: #1665D8; }
.stat-blue .stat-bottom-link { color: #1665D8; }
.stat-blue .stat-shape { background: #1665D8; }

.stat-green .stat-icon { background: #34A853; }
.stat-green .stat-bottom-link { color: #34A853; }
.stat-green .stat-shape { background: #34A853; }

.stat-pink .stat-icon { background: #D81B60; }
.stat-pink .stat-bottom-link { color: #D81B60; }
.stat-pink .stat-shape { background: #D81B60; }

.stat-yellow .stat-icon { background: #FBBC05; }
.stat-yellow .stat-bottom-link { color: #FBBC05; }
.stat-yellow .stat-shape { background: #FBBC05; }

.stat-red .stat-icon { background: #EA4335; }
.stat-red .stat-bottom-link { color: #EA4335; }
.stat-red .stat-shape { background: #EA4335; }

.stat-card .stat-icon { font-size: 2.2rem; opacity: 0.8; }
.stat-card .stat-value { font-family: 'Poppins', sans-serif; font-size: 2rem; font-weight: 700; line-height: 1; }
.stat-card .stat-label { font-size: 0.7rem; opacity: 0.85; text-transform: uppercase; letter-spacing: 0.8px; margin-top: 2px; }

/* Gradient variants — cricket themed */
.bg-gradient-green   { background: linear-gradient(135deg, #012581, #004290); }
.bg-gradient-blue    { background: linear-gradient(135deg, #1565c0, #0277bd); }
.bg-gradient-orange  { background: linear-gradient(135deg, #e65100, #ef6c00); }
.bg-gradient-purple  { background: linear-gradient(135deg, #4a148c, #6a1b9a); }
.bg-gradient-teal    { background: linear-gradient(135deg, #004d40, #00796b); }
.bg-gradient-red     { background: linear-gradient(135deg, #b62117, #c62828); }
.bg-gradient-gold    { background: linear-gradient(135deg, #b8870e, #d4a017); }

/* ================================================================
   TABLES
================================================================ */
.table-cricket thead {
    background: linear-gradient(135deg, var(--green-dark), #011d66);
    color: white;
}
.table-cricket thead th {
    border: none;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    padding: 0.82rem 1rem;
    white-space: nowrap;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.table-cricket tbody tr:hover { background-color: rgba(241,225,193,0.5); }
.table th, .table td { vertical-align: middle; }

/* ================================================================
   FORMS
================================================================ */
.form-control, .form-select {
    border-radius: 8px;
    border: 1.5px solid var(--input-border);
    padding: 0.48rem 0.85rem;
    font-size: 0.84rem;
    background: #ffffff !important;
    color: #3a2a12;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--green-mid);
    box-shadow: 0 0 0 0.2rem rgba(0,66,144,0.18);
    background: #fff;
}
.form-label { font-weight: 600; color: var(--green-dark); margin-bottom: 0.3rem; font-size: 0.82rem; }

/* Input group icons */
.input-group-text {
    background: var(--cream-mid);
    border-color: var(--input-border);
    color: var(--green-dark);
}

/* ================================================================
   BADGES
================================================================ */
.badge { font-weight: 600; padding: 0.38em 0.72em; font-size: 0.74em; border-radius: 6px; color: #000 !important; }
.bg-success   { background-color: var(--green-mid)  !important; }
.bg-primary   { background-color: #ffffff !important; }
.bg-warning   { background-color: var(--red) !important; color: #000 !important; }
.bg-danger    { background-color: var(--red) !important; }
.bg-info      { background-color: #ffffff !important; }
.bg-secondary { background-color: #0ea9e1 !important; }
.text-dark {
    color: #000000 !important;
}

/* ================================================================
   ALERTS
================================================================ */
.alert { border-radius: 10px; font-size: 0.84rem; border: none; }
.alert-success { background: #d0e1fd; color: #004290; border-left: 4px solid var(--green-mid); }
.alert-danger  { background: #f8d7da; color: #721c24; border-left: 4px solid var(--red); }
.alert-info    { background: #d1ecf1; color: #0c5460; border-left: 4px solid #17a2b8; }
.alert-warning { background: #fff3cd; color: #856404; border-left: 4px solid var(--gold); }
.alert-light   { background: #ffffff !important; color: #3a2a12; border-left: 4px solid var(--cream-dark); }

/* ================================================================
   PLAYER / AVATAR ELEMENTS
================================================================ */
.player-avatar-placeholder {
    border-radius: 50%;
    background: red;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    border: 2px solid var(--gold);
    flex-shrink: 0;
}

.master-icon-circle {
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

/* ================================================================
   PERFORMANCE METERS
================================================================ */
.perf-meter { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.perf-label { width: 85px; font-size: 0.78rem; color: var(--green-dark); font-weight: 500; }
.perf-bar { flex: 1; height: 9px; background: var(--cream-dark); border-radius: 5px; overflow: hidden; }
.perf-fill { height: 100%; border-radius: 5px; transition: width 0.7s ease; }
.perf-score { width: 30px; text-align: right; font-weight: 700; font-size: 0.8rem; color: var(--green-dark); }

.rating-bar { height: 9px; border-radius: 5px; background: var(--cream-dark); overflow: hidden; }
.rating-fill { height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--green-dark), var(--gold)); }

/* ================================================================
   LOGIN PAGE
================================================================ */
.login-page {
    min-height: 100vh;
    background:
        linear-gradient(135deg, rgba(1,37,129,0.95), rgba(1,20,70,0.9)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='800' height='500' viewBox='0 0 800 500'%3E%3Cellipse cx='400' cy='250' rx='380' ry='230' fill='none' stroke='rgba(255,255,255,0.1)' stroke-width='4'/%3E%3Cellipse cx='400' cy='250' rx='200' ry='150' fill='none' stroke='rgba(255,255,255,0.06)' stroke-width='3'/%3E%3Crect x='365' y='130' width='70' height='240' fill='none' stroke='rgba(255,255,255,0.1)' stroke-width='2'/%3E%3C/svg%3E")
        center / cover;
    display: flex; align-items: center; justify-content: center;
}

.login-card {
    width: 100%;
    max-width: 440px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
}

.login-header {
    background: linear-gradient(135deg, var(--green-dark), var(--green-mid));
    border-bottom: 3px solid var(--gold);
    padding: 2rem;
    text-align: center;
    color: white;
}

.login-card .card-body { background: #ffffff !important; }

/* ================================================================
   MISC
================================================================ */
.chart-container { position: relative; }
#sessionCalendar { background: #ffffff !important; border-radius: 10px; padding: 1rem; }

/* Upload zones */
.upload-zone { transition: all 0.2s; cursor: pointer; }
.upload-zone:hover { border-color: var(--green-mid) !important; background: rgba(241,225,193,0.4); }
.border-dashed { border-style: dashed !important; }

/* Rank badges */
.rank-badge { min-width: 36px; padding: 3px 5px; border-radius: 6px; text-align: center; font-weight: 700; font-size: 0.82rem; flex-shrink: 0; }
.rank-badge.rank-1,.rank-badge.rank-2,.rank-badge.rank-3 { background:#ffc5c5; color:var(--red-dark); }
.rank-badge.rank-4,.rank-badge.rank-5,.rank-badge.rank-6 { background:#ffe0b2; color:#e65100; }
.rank-badge.rank-7,.rank-badge.rank-8,.rank-badge.rank-9,.rank-badge.rank-10 { background:#d0e1fd; color:var(--green-dark); }

/* Rank buttons */
.rank-btn { width:28px; height:28px; border-radius:50%; border:1.5px solid var(--cream-dark); background:var(--cream-white); color:#555; font-size:0.72rem; font-weight:600; cursor:pointer; transition:all 0.15s; display:inline-flex; align-items:center; justify-content:center; padding:0; }
.rank-btn:hover { border-color:var(--green-mid); background:var(--cream); }
.rank-btn.active { color:#fff; border-color:transparent; }
.rank-btn.rank-low { background:var(--red) !important; }
.rank-btn.rank-mid { background:#fd7e14 !important; }
.rank-btn.rank-high { background:var(--green-mid) !important; }

/* Style tab pills */
.style-tab-btn { background:var(--cream); color:var(--green-dark); border:1.5px solid var(--cream-dark); font-size:0.82rem; }
.style-tab-btn.active { background:var(--green-dark); color:#fff; border-color:var(--green-dark); }

/* Accordion */
.accordion-button:not(.collapsed) { background:rgba(241,225,193,0.7); color:var(--green-dark); box-shadow:none; }
.accordion-button:focus { box-shadow:none; }

/* Breadcrumb nav */
.breadcrumb-nav { background: #ffffff !important; border-radius: 8px; padding: 0.6rem 1rem; margin-bottom: 1.2rem; box-shadow: 0 1px 4px rgba(100,60,10,0.08); border: 1px solid var(--cream-dark); }

/* Player card */
.player-card { border-radius: 14px; overflow: hidden; transition: all 0.25s; }
.player-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(100,60,10,0.15); }

/* ================================================================
   MOBILE
================================================================ */
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.sidebar-open { transform: translateX(0); }
    .sidebar-close-btn { display: flex; align-items: center; justify-content: center; }
    .layout-wrapper { margin-left: 0 !important; }
}

@media (max-width: 767px) {
    .main-content { padding: 1rem 0.75rem; }
    .page-header { padding: 0.9rem 1rem; min-height: auto; }
    .page-header h4 { font-size: 1rem; }
    .stat-card .stat-value { font-size: 1.6rem; }
    .page-header::after { display: none; }
}

@media (max-width: 575px) { .main-content { padding: 0.75rem 0.5rem; } }

/* ================================================================
   PRINT
================================================================ */
@media print {
    .sidebar, .topbar, .footer, .btn, .no-print { display: none !important; }
    .layout-wrapper { margin-left: 0 !important; }
    .card { box-shadow: none; border: 1px solid #ddd; }
    body { background: white; }
}
/* Global Icon Color */
i.fa, i.fas, i.fa-solid, i.fa-regular, i.far, i.fa-brands, i.fab, i.bi {
    color: #0273bf !important;
}
/* Except inside elements where it would be completely unreadable or override background text colors */
.btn i, .badge i, .alert i, .page-header i, .stat-card i, .sidebar-nav-item i, .sidebar-logout i {
    color: inherit !important;
}


































/* Checkbox border black */
.form-check-input[type=checkbox] {
    border-color: #000000 !important;
}

