/* ============================================================
   Wirral U11s Rugby Portal — Custom Stylesheet
   Vipers: navy #1B2550  (accent #4A6FBD)
   Wolves: maroon #2B162D (accent #8B4A8E)
   ============================================================ */

/* --- Variables -------------------------------------------- */
:root {
    --vipers:        #4A6FBD;
    --vipers-dark:   #1B2550;
    --vipers-light:  #D8E0F5;
    --vipers-glow:   rgba(74,111,189,.25);
    --wolves:        #8B4A8E;
    --wolves-dark:   #2B162D;
    --wolves-light:  #EDD5ED;
    --wolves-glow:   rgba(139,74,142,.25);
    --sidebar-width: 260px;
    --nav-bg:        #080d18;
    --nav-accent:    #0d1a2e;
    --body-bg:       #f0f4f8;
    --card-bg:       #ffffff;
    --text-main:     #0d1b2a;
    --text-muted:    #6c757d;
    --border:        #dee2e6;
    --shadow-sm:     0 2px 8px rgba(0,0,0,.08);
    --shadow-md:     0 4px 20px rgba(0,0,0,.12);
    --radius:        12px;
    --radius-sm:     8px;
}

/* --- Base ------------------------------------------------- */
*,*::before,*::after { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--body-bg);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Sidebar ---------------------------------------------- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--nav-bg) 0%, #0b1220 100%);
    border-right: 1px solid rgba(0,168,232,.1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 1030;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1.25rem 1rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,.06);
    text-decoration: none;
}
.sidebar-brand:hover { text-decoration: none; }

.nav-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--vipers), var(--wolves));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 0 12px var(--vipers-glow);
}

.nav-title-block { display: flex; flex-direction: column; line-height: 1.1; }
.nav-main-title  { font-size: 1rem; font-weight: 700; color: #fff; letter-spacing: .02em; }
.nav-sub-title   { font-size: .7rem; color: rgba(255,255,255,.4); letter-spacing: .06em; text-transform: uppercase; }

.sidebar-nav {
    flex: 1;
    padding: .75rem 0;
    overflow-y: auto;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .5rem 1rem;
    color: rgba(255,255,255,.6);
    font-size: .875rem;
    font-weight: 500;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all .15s;
}
.sidebar-link:hover {
    color: #fff;
    background: rgba(255,255,255,.07);
    text-decoration: none;
}
.sidebar-link.active {
    color: #fff;
    background: rgba(74,111,189,.18);
    border-left-color: var(--vipers);
    font-weight: 600;
}
.sidebar-link i { font-size: 1rem; width: 18px; flex-shrink: 0; text-align: center; }

.sidebar-section {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: rgba(255,255,255,.28);
    padding: 1rem 1rem .3rem;
}

/* --- Sidebar User ----------------------------------------- */
.sidebar-user {
    padding: .75rem;
    border-top: 1px solid rgba(255,255,255,.06);
}

.sidebar-user-btn {
    display: flex;
    align-items: center;
    gap: .65rem;
    width: 100%;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--radius-sm);
    padding: .5rem .75rem;
    color: rgba(255,255,255,.8);
    font-size: .85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s;
}
.sidebar-user-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.sidebar-user-btn .user-name {
    flex: 1;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sidebar-user-btn .bi-chevron-up { font-size: .7rem; color: rgba(255,255,255,.4); }

.coach-avatar {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, var(--vipers-dark), var(--vipers));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .75rem; font-weight: 700; color: #fff;
    flex-shrink: 0;
}

/* --- Mobile sidebar overlay ------------------------------- */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 1025;
}
.sidebar-backdrop.show { display: block; }

.sidebar-toggle {
    position: fixed;
    top: .75rem;
    left: .75rem;
    z-index: 1020;
    background: var(--nav-bg);
    border: 1px solid rgba(255,255,255,.15);
    color: rgba(255,255,255,.8);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
}
.sidebar-toggle:hover { color: #fff; border-color: rgba(255,255,255,.3); }

/* --- Main ------------------------------------------------- */
.main-content { flex: 1; padding: 1.5rem 1.25rem; margin-left: var(--sidebar-width); }

/* --- Page Header ------------------------------------------ */
.page-header {
    display: flex; align-items: flex-start;
    justify-content: space-between; flex-wrap: wrap;
    gap: 1rem; margin-bottom: 1.75rem;
}
.page-header h1 { font-size: 1.6rem; font-weight: 800; color: var(--text-main); margin: 0; }
.page-header .page-sub { font-size: .9rem; color: var(--text-muted); margin: .2rem 0 0; }

/* --- Cards ------------------------------------------------ */
.portal-card {
    background: var(--card-bg); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); border: 1px solid rgba(0,0,0,.04);
    transition: box-shadow .2s, transform .15s; overflow: hidden;
}
.portal-card:hover { box-shadow: var(--shadow-md); }
.portal-card .card-header-custom {
    padding: 1rem 1.25rem .75rem; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between; gap: .5rem;
}
.portal-card .card-header-custom h5,
.portal-card .card-header-custom h6 { margin: 0; font-weight: 700; }
.portal-card .card-body-custom { padding: 1.25rem; }

/* --- Stat Cards ------------------------------------------- */
.stat-card {
    background: var(--card-bg); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); padding: 1.25rem 1.5rem;
    display: flex; align-items: center; gap: 1rem;
    border-left: 4px solid transparent; transition: box-shadow .2s, transform .15s;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-card.vipers  { border-left-color: var(--vipers); }
.stat-card.wolves  { border-left-color: var(--wolves); }
.stat-card.primary { border-left-color: var(--vipers); }
.stat-card.green   { border-left-color: #27ae60; }
.stat-card.red     { border-left-color: #e74c3c; }
.stat-card.purple  { border-left-color: #9b59b6; }

.stat-icon {
    width: 52px; height: 52px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; flex-shrink: 0;
}
.stat-card.vipers  .stat-icon { background: var(--vipers-dark); color: var(--vipers-dark); }
.stat-card.wolves  .stat-icon { background: var(--wolves-dark); color: var(--wolves-dark); }
.stat-card.primary .stat-icon { background: var(--vipers-light); color: var(--vipers-dark); }
.stat-card.green   .stat-icon { background: #d5f5e3; color: #1e8449; }
.stat-card.red     .stat-icon { background: #fadbd8; color: #c0392b; }
.stat-card.purple  .stat-icon { background: #e8daef; color: #7d3c98; }
.stat-value { font-size: 2rem; font-weight: 800; line-height: 1; color: var(--text-main); }
.stat-label { font-size: .8rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; margin-top: .2rem; }

/* --- Team Cards ------------------------------------------- */
.team-card {
    background: var(--card-bg); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); overflow: hidden;
    transition: box-shadow .2s, transform .15s;
}
.team-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.team-card-header { padding: 1.5rem; color: #fff; display: flex; align-items: center; gap: 1rem; min-height: calc(125px + 3rem); }

/* Vipers: deep navy gradient */
.team-card-header.vipers {
    background: linear-gradient(135deg, #0c1128 0%, #1B2550 55%, #2D3D78 100%);
    border-bottom: 2px solid var(--vipers);
}
/* Wolves: deep maroon/purple gradient */
.team-card-header.wolves {
    background: linear-gradient(135deg, #130810 0%, #2B162D 55%, #4A1F4B 100%);
    border-bottom: 2px solid var(--wolves);
}

.team-shield-img { width: 125px; height: 125px; object-fit: contain; flex-shrink: 0; }
.team-card-header > i { width: 125px; height: 125px; font-size: 5rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.team-card-header.vipers .team-shield-img { filter: drop-shadow(0 0 8px rgba(0,168,232,.7)); }
.team-card-header.wolves .team-shield-img { filter: drop-shadow(0 0 6px rgba(139,74,142,.6)); }
.team-card-header.all {
    background: linear-gradient(135deg, #080808 0%, #161616 55%, #242424 100%);
    border-bottom: 2px solid #444;
}
/* Due Assessment: red gradient */
.team-card-header.due {
    background: linear-gradient(135deg, #1a0000 0%, #3d0a0a 55%, #5c1010 100%);
    border-bottom: 2px solid #DC2626;
}
/* Heatmap: amber gradient */
.team-card-header.heatmap {
    background: linear-gradient(135deg, #1a0800 0%, #3d1a00 55%, #5c2e00 100%);
    border-bottom: 2px solid #D97706;
}
/* Splinter Groups: green gradient */
.team-card-header.splinter {
    background: linear-gradient(135deg, #001508 0%, #0a3018 55%, #154d28 100%);
    border-bottom: 2px solid #16A34A;
}
/* Manage Skills: yellow gradient */
.team-card-header.skills {
    background: linear-gradient(135deg, #181200 0%, #352800 55%, #504000 100%);
    border-bottom: 2px solid #CA8A04;
}
.team-card-body { padding: 1.25rem; }

/* --- Player Cards ----------------------------------------- */
.player-card {
    background: var(--card-bg); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); padding: 1rem 1.25rem;
    display: flex; align-items: center; gap: 1rem;
    transition: box-shadow .2s, transform .15s; border: 1px solid rgba(0,0,0,.04);
    text-decoration: none; color: inherit;
}
.player-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); color: inherit; }

.player-avatar {
    width: 48px; height: 48px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; font-weight: 700; color: #fff; flex-shrink: 0;
}
.player-avatar.vipers { background: linear-gradient(135deg, var(--vipers-dark), var(--vipers)); box-shadow: 0 0 10px var(--vipers-glow); }
.player-avatar.wolves { background: linear-gradient(135deg, var(--wolves-dark), var(--wolves)); box-shadow: 0 0 10px var(--wolves-glow); }
.player-avatar.none   { background: linear-gradient(135deg, #95a5a6, #7f8c8d); }

.player-info { flex: 1; min-width: 0; }
.player-name { font-weight: 700; font-size: .95rem; line-height: 1.2; }
.player-meta { font-size: .78rem; color: var(--text-muted); margin-top: .15rem; }

/* --- Team Badge ------------------------------------------- */
.team-badge { font-size: .72rem; font-weight: 700; padding: .25em .6em; border-radius: 6px; letter-spacing: .03em; }

/* --- Score Bar -------------------------------------------- */
.score-label { font-size: .78rem; font-weight: 700; color: var(--text-muted); min-width: 34px; text-align: right; }

/* --- Skill Grid ------------------------------------------- */
.skill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.skill-item { background: var(--body-bg); border-radius: var(--radius-sm); padding: .75rem 1rem; }
.skill-item .skill-name { font-size: .78rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: .35rem; }

/* --- Sub-skill Accordion ---------------------------------- */
.subskill-section { margin-bottom: .75rem; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }

.subskill-header {
    background: #f8fafb; padding: .7rem 1rem; cursor: pointer;
    display: flex; align-items: center; justify-content: space-between;
    user-select: none; transition: background .15s;
    border-bottom: 1px solid transparent;
}
.subskill-header:hover { background: #eef2f7; }
.subskill-header.open { border-bottom-color: var(--border); background: #eef2f7; }
.subskill-header .cat-icon { color: var(--vipers); margin-right: .5rem; }
.subskill-header .toggle-icon { font-size: .8rem; color: var(--text-muted); transition: transform .2s; }
.subskill-header.open .toggle-icon { transform: rotate(180deg); }

.subskill-overall { display: flex; align-items: center; gap: 1rem; padding: .75rem 1rem; background: #fff; border-bottom: 1px solid var(--border); }
.subskill-overall label { font-weight: 700; font-size: .9rem; margin-bottom: 0; min-width: 80px; }

.subskill-body { padding: .5rem 1rem 1rem; background: #fff; display: none; }
.subskill-body.show { display: block; }

.subskill-row {
    display: flex; align-items: center; gap: .75rem;
    padding: .45rem 0; border-bottom: 1px solid #f5f5f5;
}
.subskill-row:last-child { border-bottom: none; }
.subskill-label { width: 200px; font-size: .82rem; color: var(--text-main); flex-shrink: 0; }
.subskill-desc { font-size: .72rem; color: var(--text-muted); }
.subskill-toggle { font-size: .75rem; color: var(--text-muted); text-decoration: none; display: inline-flex; align-items: center; gap: .2rem; transition: color .2s; }
.subskill-toggle:hover { color: var(--vipers); text-decoration: none; }
.subskill-toggle .bi-chevron-right { transition: transform .2s; }
.subskill-toggle[aria-expanded="true"] .bi-chevron-right { transform: rotate(90deg); }

/* --- Player Profile --------------------------------------- */
.profile-hero {
    border-radius: var(--radius); padding: 2rem; color: #fff;
    display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
    margin-bottom: 1.5rem; box-shadow: var(--shadow-md); position: relative; overflow: hidden;
}
.profile-hero.vipers {
    background: linear-gradient(135deg, #0c1128 0%, #1B2550 60%, #2D3D78 100%);
    border: 1px solid rgba(74,111,189,.2);
    box-shadow: 0 4px 30px rgba(74,111,189,.2);
}
.profile-hero.wolves {
    background: linear-gradient(135deg, #130810 0%, #2B162D 60%, #4A1F4B 100%);
    border: 1px solid rgba(139,74,142,.2);
    box-shadow: 0 4px 30px rgba(139,74,142,.15);
}
.profile-hero.none { background: linear-gradient(135deg, #1a1a2e, #2c3e50); border: 1px solid rgba(255,255,255,.1); }

.profile-avatar {
    width: 80px; height: 80px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; font-weight: 800; color: #fff; flex-shrink: 0;
    border: 3px solid rgba(255,255,255,.2);
}
.profile-avatar.vipers { background: linear-gradient(135deg, var(--vipers-dark), var(--vipers)); box-shadow: 0 0 20px var(--vipers-glow); }
.profile-avatar.wolves { background: linear-gradient(135deg, var(--wolves-dark), var(--wolves)); box-shadow: 0 0 20px var(--wolves-glow); }
.profile-avatar.none   { background: linear-gradient(135deg, #666, #888); }

.profile-name { font-size: 1.8rem; font-weight: 800; line-height: 1.1; }
.profile-meta { font-size: .9rem; color: rgba(255,255,255,.7); margin-top: .4rem; display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

.overall-score-circle {
    width: 72px; height: 72px; border-radius: 50%;
    background: rgba(255,255,255,.1); border: 3px solid rgba(255,255,255,.3);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    margin-left: auto; flex-shrink: 0;
}
.overall-score-circle .score-num { font-size: 1.5rem; font-weight: 800; line-height: 1; }
.overall-score-circle .score-lbl { font-size: .6rem; color: rgba(255,255,255,.6); text-transform: uppercase; letter-spacing: .06em; }

.pos-badge { display: inline-block; padding: .3em .7em; border-radius: 20px; font-size: .78rem; font-weight: 600; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25); margin: .15rem; }

/* --- Change Summary --------------------------------------- */
.change-summary { font-size: .75rem; color: var(--vipers-dark); background: var(--vipers-light); border-radius: 4px; padding: .2rem .5rem; display: inline-block; margin-top: .2rem; }

/* --- Table ------------------------------------------------ */
.portal-table { border-radius: var(--radius-sm); overflow: hidden; }
.portal-table thead th { background: var(--nav-bg); color: rgba(255,255,255,.85); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; border: none; padding: .75rem 1rem; }
.portal-table tbody tr { transition: background .15s; }
.portal-table tbody tr:hover { background: rgba(0,168,232,.04); }
.portal-table tbody td { vertical-align: middle; padding: .65rem 1rem; border-color: rgba(0,0,0,.05); }

/* --- Filter Bar ------------------------------------------- */
.filter-bar { background: var(--card-bg); border-radius: var(--radius); padding: 1rem 1.25rem; box-shadow: var(--shadow-sm); margin-bottom: 1.5rem; display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; }
.filter-bar label { font-size: .78rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .3rem; }

/* --- Heatmap --------------------------------------------- */
.heatmap-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.heatmap-table { border-collapse: separate; border-spacing: 2px; }
.heatmap-table th.th-v { height: 90px; vertical-align: bottom; padding: 4px 6px 6px; width: 36px; min-width: 36px; }
.heatmap-table th.th-v span { writing-mode: vertical-rl; transform: rotate(180deg); display: block; }
.heatmap-table th { background: var(--nav-bg); color: rgba(255,255,255,.8); font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .6rem .8rem; white-space: nowrap; }
.heatmap-table th:first-child { border-radius: var(--radius-sm) 0 0 0; min-width: 150px; }
.heatmap-table td { padding: .5rem .6rem; font-size: .88rem; font-weight: 700; text-align: center; border-radius: 4px; min-width: 48px; transition: transform .15s; cursor: default; }
.heatmap-table td:hover { transform: scale(1.15); z-index: 5; position: relative; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.heatmap-table .player-col { text-align: left; min-width: 150px; font-weight: 600; font-size: .82rem; background: var(--card-bg) !important; }
.hs-na  { background:#e8e8e8; color:#aaa; font-size:.7rem; }
.hs-1,.hs-2  { background:#c0392b; color:#fff; }
.hs-3        { background:#e74c3c; color:#fff; }
.hs-4        { background:#e67e22; color:#fff; }
.hs-5        { background:#f39c12; color:#fff; }
.hs-6        { background:#d4ac0d; color:#fff; }
.hs-7        { background:#2ecc71; color:#fff; }
.hs-8        { background:#27ae60; color:#fff; }
.hs-9        { background:#1e8449; color:#fff; }
.hs-10       { background:#145a32; color:#fff; }

/* --- Radar Chart ------------------------------------------ */
.radar-wrap { position: relative; width: 100%; max-width: 360px; margin: 0 auto; }

/* --- Catch-up -------------------------------------------- */
.catchup-player-card { background: var(--card-bg); border-radius: var(--radius); padding: .75rem 1rem; display: flex; align-items: center; gap: 1rem; box-shadow: var(--shadow-sm); border-left: 4px solid #e74c3c; margin-bottom: .5rem; }
.catchup-score { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; font-weight: 800; color: #fff; flex-shrink: 0; }

/* --- Forms ------------------------------------------------ */
.portal-form .form-label { font-weight: 600; font-size: .875rem; color: var(--text-main); }
.portal-form .form-control, .portal-form .form-select { border-radius: var(--radius-sm); border-color: var(--border); padding: .5rem .85rem; font-size: .9rem; }
.portal-form .form-control:focus, .portal-form .form-select:focus { border-color: var(--vipers); box-shadow: 0 0 0 .2rem var(--vipers-glow); }
.score-input-wrap { display: flex; align-items: center; gap: .75rem; }
.score-input-wrap input[type=number] { width: 70px; text-align: center; font-weight: 700; font-size: 1.1rem; }
.score-preview-bar { flex: 1; }

/* --- Section Titles --------------------------------------- */
.section-title { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); padding: .5rem 0; border-bottom: 2px solid var(--vipers); margin-bottom: 1rem; display: flex; align-items: center; gap: .5rem; }

/* --- Buttons --------------------------------------------- */
.btn-vipers { background: var(--vipers); border-color: var(--vipers-dark); color: #fff; font-weight: 600; }
.btn-vipers:hover { background: var(--vipers-dark); color: #fff; }
.btn-wolves { background: var(--wolves); border-color: var(--wolves-dark); color: #fff; font-weight: 600; }
.btn-wolves:hover { background: var(--wolves-dark); color: #fff; }
.btn-primary { background-color: var(--vipers); border-color: var(--vipers-dark); }
.btn-primary:hover, .btn-primary:focus { background-color: var(--vipers-dark); border-color: var(--vipers-dark); }
.btn-primary:focus { box-shadow: 0 0 0 .2rem var(--vipers-glow); }
.btn-outline-primary { color: var(--vipers); border-color: var(--vipers); }
.btn-outline-primary:hover { background-color: var(--vipers); border-color: var(--vipers); color:#fff; }

/* --- Footer ----------------------------------------------- */
.portal-footer { background: var(--nav-bg); color: rgba(255,255,255,.4); font-size: .8rem; padding: .85rem 1.25rem; margin-top: auto; border-top: 1px solid rgba(0,168,232,.08); margin-left: var(--sidebar-width); }
.footer-brand { color: rgba(255,255,255,.6); font-weight: 600; }

/* --- Login Page ------------------------------------------- */
.login-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #040b18 0%, #0d1a2e 50%, #08203c 100%); padding: 2rem; }
.login-card { background: #fff; border-radius: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.5), 0 0 40px rgba(0,168,232,.1); padding: 2.5rem 2rem; width: 100%; max-width: 420px; border: 1px solid rgba(0,168,232,.1); }
.login-logo { width: 64px; height: 64px; background: linear-gradient(135deg, var(--vipers), var(--wolves)); border-radius: 18px; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; color: #fff; margin: 0 auto 1.25rem; box-shadow: 0 0 20px var(--vipers-glow); }

/* --- Responsive ------------------------------------------- */
@media (max-width: 767.98px) {
    .sidebar {
        transform: translateX(calc(-1 * var(--sidebar-width)));
        transition: transform .25s ease;
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0,0,0,.4);
    }
    .main-content,
    .portal-footer { margin-left: 0; }
    .main-content { padding-top: 3.5rem; }
}
@media (max-width: 576px) {
    .main-content { padding: 3.5rem .75rem 1rem; }
    .profile-hero { padding: 1.25rem; }
    .profile-name { font-size: 1.4rem; }
    .overall-score-circle { display: none; }
    .skill-grid { grid-template-columns: 1fr 1fr; }
    .subskill-label { width: 130px; }
}
@media (max-width: 380px) { .skill-grid { grid-template-columns: 1fr; } }

/* --- Utilities -------------------------------------------- */
.rounded-xl { border-radius: var(--radius) !important; }
.fw-800 { font-weight: 800 !important; }
.text-vipers { color: var(--vipers) !important; }
.text-wolves  { color: var(--wolves)  !important; }
.bg-vipers-light { background-color: var(--vipers-light) !important; }
.bg-wolves-light { background-color: var(--wolves-light) !important; }
.bg-nav { background-color: var(--nav-bg) !important; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--vipers-dark); border-radius: 3px; }

/* --- Hero position row ------------------------------------ */
.hero-pos-row { display: flex; gap: 2rem; margin-top: .75rem; flex-wrap: wrap; }
.hero-col-label { font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.45); margin-bottom: .3rem; }
.hero-col-val { font-size: .88rem; color: rgba(255,255,255,.9); }
.hero-pos-select {
    background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
    color: #fff; border-radius: 8px; padding: .25rem .65rem;
    font-size: .85rem; cursor: pointer; outline: none; max-width: 200px;
}
.hero-pos-select option, .hero-pos-select optgroup { background: #1a1f3c; color: #fff; }
.hero-pos-select:focus { border-color: rgba(255,255,255,.4); box-shadow: 0 0 0 2px rgba(255,255,255,.1); }

/* --- Sub-skill Hover Tooltip ------------------------------ */
.skill-has-tip { position: relative; cursor: help; }
.skill-subtip {
    display: none; position: absolute; bottom: calc(100% + 8px); left: 50%;
    transform: translateX(-50%); z-index: 200;
    background: #1a1f3c; border: 1px solid rgba(255,255,255,.15);
    border-radius: 10px; padding: 10px 14px; min-width: 200px;
    box-shadow: 0 8px 24px rgba(0,0,0,.4); color: #fff; white-space: nowrap;
}
.skill-subtip::after {
    content: ''; position: absolute; top: 100%; left: 50%;
    transform: translateX(-50%); border: 6px solid transparent;
    border-top-color: #1a1f3c;
}
.skill-has-tip:hover .skill-subtip { display: block; }
.skill-subtip-header {
    font-size: .68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .08em; color: rgba(255,255,255,.45);
    margin-bottom: 7px; padding-bottom: 6px; border-bottom: 1px solid rgba(255,255,255,.1);
}
.skill-subtip-row { display: flex; justify-content: space-between; align-items: center; padding: 3px 0; font-size: .8rem; gap: 1.5rem; }
.skill-subtip-score { font-weight: 700; color: #7dcfff; font-size: .82rem; flex-shrink: 0; }

/* JS takes over tooltip positioning — cancel CSS defaults without !important
   so JS inline styles can override (inline > non-!important class) */
.skill-subtip {
    bottom: auto;
    left: auto;
    transform: none;
}
