:root {
    --bg: #121212;
    --bg-soft: #181818;
    --surface: #1f1f1f;
    --surface-2: #262626;
    --surface-3: #303030;
    --yellow: #ffd400;
    --yellow-soft: rgba(255, 212, 0, .14);
    --text: #f4f4f5;
    --text-soft: #c7c7c7;
    --muted: #8f8f8f;
    --border: rgba(255, 255, 255, .08);
    --green: #22c55e;
    --red: #ef4444;
    --orange: #f59e0b;
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --shadow: 0 18px 45px rgba(0, 0, 0, .35);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background: radial-gradient(circle at top left, rgba(255, 212, 0, .09), transparent 34%), linear-gradient(180deg, #111 0%, #171717 100%);
    color: var(--text);
    font-family: "Manrope", system-ui, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

.o3tt-app {
    min-height: 100vh;
    padding-bottom: 100px;
}

/* HEADER */

.top-header {
    height: 78px;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(18, 18, 18, .86);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 22px;
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: var(--yellow);
    color: #111;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 20px;
    box-shadow: 0 10px 28px rgba(255, 212, 0, .25);
    text-decoration: none;
}

.brand-main {
    font-size: 15px;
    font-weight: 900;
    letter-spacing: .8px;
}

.brand-sub {
    font-size: 12px;
    color: var(--yellow);
    font-weight: 800;
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.app-content {
    max-width: 1320px;
    margin: 0 auto;
    padding: 24px;
}

/* TYPOGRAPHY */

.page-title,
.calendar-head h1,
.attendance-header h1 {
    margin: 0;
    color: var(--text);
    font-size: 30px;
    font-weight: 900;
    letter-spacing: -.6px;
}

.page-subtitle,
.calendar-head p,
.attendance-header p {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    margin: 6px 0 0;
}

.section-title {
    margin: 28px 0 14px;
    font-size: 19px;
    font-weight: 900;
}

/* LAYOUT */

.home-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    align-items: start;
}

.calendar-card,
.summary-panel,
.attendance-card,
.athletes-card,
.card {
    background: linear-gradient(180deg, rgba(38, 38, 38, .96), rgba(28, 28, 28, .96));
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 26px;
    box-shadow: var(--shadow);
}

/* BUTTONS */

button,
.btn {
    border: 0;
    border-radius: var(--radius-md);
    background: var(--yellow);
    color: #111;
    padding: 13px 18px;
    font-weight: 900;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    transition: transform .18s ease, box-shadow .18s ease;
}

    button:hover,
    .btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 12px 28px rgba(255, 212, 0, .20);
    }

    button.secondary,
    .btn.secondary {
        background: var(--surface-3);
        color: var(--yellow);
        border: 1px solid rgba(255, 212, 0, .25);
    }

    button.danger,
    .btn.danger {
        background: rgba(239, 68, 68, .13);
        color: #ff9b9b;
        border: 1px solid rgba(239, 68, 68, .32);
    }

.icon-button {
    width: 48px;
    height: 48px;
    padding: 0;
}

/* FORMS */

input,
select {
    width: 100%;
    background: #171717;
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: var(--radius-md);
    padding: 14px 15px;
    font-size: 15px;
    font-weight: 700;
    outline: none;
}

    input:focus,
    select:focus {
        border-color: rgba(255, 212, 0, .65);
        box-shadow: 0 0 0 4px rgba(255, 212, 0, .10);
    }

label {
    color: var(--text-soft);
}

/* BOTTOM NAV */

.bottom-nav {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    height: 74px;
    z-index: 200;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: rgba(20, 20, 20, .92);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 212, 0, .18);
    border-radius: 28px;
    box-shadow: 0 18px 45px rgba(0,0,0,.55);
    overflow: hidden;
}

    .bottom-nav.four-items {
        grid-template-columns: repeat(4, 1fr);
    }

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

    .nav-item svg {
        width: 22px;
        height: 22px;
    }

    .nav-item span {
        font-size: 12px;
        line-height: 1;
    }

    .nav-item.active {
        color: var(--yellow);
        background: rgba(255, 212, 0, .08);
    }

/* HEADER CALENDARIO */

.calendar-head {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 16px;
    align-items: center;
    margin-bottom: 28px;
}

.calendar-icon {
    width: 58px;
    height: 58px;
    border-radius: 20px;
    background: var(--yellow-soft);
    color: var(--yellow);
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 212, 0, .18);
}

.month-nav {
    display: grid;
    grid-template-columns: 54px 1fr 54px;
    gap: 14px;
    align-items: center;
    margin-bottom: 18px;
}

    .month-nav h2 {
        text-align: center;
        margin: 0;
        font-size: 26px;
        font-weight: 900;
        text-transform: capitalize;
        color: var(--text);
    }

    .month-nav button {
        width: 54px;
        height: 54px;
        padding: 0;
        border-radius: 18px;
        font-size: 34px;
        background: var(--surface-3);
        color: var(--yellow);
    }

/* SMART CALENDAR */

.smart-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
}

    .smart-calendar-grid .weekday {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 34px;
        color: var(--yellow);
        font-size: 12px;
        font-weight: 900;
        text-align: center;
    }

.smart-calendar-day {
    min-height: 112px;
    width: 100%;
    background: rgba(255,255,255,.045);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 10px;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 8px;
    color: var(--text);
    overflow: hidden;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

    .smart-calendar-day:hover {
        transform: translateY(-2px);
        background: rgba(255,255,255,.07);
        border-color: rgba(255, 212, 0, .36);
    }

    .smart-calendar-day.today {
        background: linear-gradient(180deg, rgba(255,212,0,.18), rgba(255,255,255,.045));
        border-color: var(--yellow);
    }

    .smart-calendar-day.complete {
        border-color: rgba(34,197,94,.34);
    }

    .smart-calendar-day.partial {
        border-color: rgba(245,158,11,.38);
    }

    .smart-calendar-day.empty {
        opacity: .78;
    }

    .smart-calendar-day.muted {
        opacity: .22;
        pointer-events: none;
    }

.smart-day-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.smart-day-number {
    font-size: 18px;
    font-weight: 900;
    color: var(--text);
}

.smart-calendar-day.today .smart-day-number {
    color: var(--yellow);
}

.activity-badge {
    width: 26px;
    height: 26px;
    border-radius: 9px;
    background: rgba(255,212,0,.12);
    border: 1px solid rgba(255,212,0,.25);
    display: grid;
    place-items: center;
    font-size: 14px;
}

.smart-day-body {
    display: flex;
    flex-direction: column;
    justify-content: end;
    gap: 5px;
    min-width: 0;
}

    .smart-day-body strong {
        color: var(--yellow);
        font-size: 12px;
        font-weight: 900;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .smart-day-body span {
        color: var(--muted);
        font-size: 11px;
        font-weight: 800;
    }

.smart-day-empty {
    display: flex;
    align-items: end;
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.mini-progress {
    width: 100%;
    height: 5px;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    overflow: hidden;
}

    .mini-progress div {
        height: 100%;
        border-radius: 999px;
        background: var(--yellow);
    }

.smart-calendar-day.complete .mini-progress div {
    background: var(--green);
}

.smart-calendar-day.partial .mini-progress div {
    background: var(--orange);
}

/* LEGEND */

.calendar-legend {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

    .calendar-legend span {
        background: rgba(255,255,255,.04);
        border: 1px solid var(--border);
        border-radius: 999px;
        padding: 8px 12px;
        color: var(--text-soft);
        font-size: 13px;
        font-weight: 800;
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
}

    .status-dot.green {
        background: var(--green);
        box-shadow: 0 0 16px rgba(34, 197, 94, .55);
    }

    .status-dot.orange {
        background: var(--orange);
        box-shadow: 0 0 16px rgba(245, 158, 11, .55);
    }

    .status-dot.gray {
        background: #555;
    }

/* SUMMARY */

.panel-title,
.page-header,
.dashboard-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 20px;
}

    .panel-title h2,
    .summary-panel h2 {
        margin: 0;
        font-size: 24px;
        font-weight: 900;
    }

    .panel-title span,
    .badge-counter {
        background: var(--yellow-soft);
        color: var(--yellow);
        border: 1px solid rgba(255, 212, 0, .22);
        border-radius: 999px;
        padding: 7px 11px;
        font-size: 12px;
        font-weight: 900;
        white-space: nowrap;
    }

.summary-panel h3 {
    margin: 24px 0 12px;
    font-size: 15px;
    color: var(--text);
    font-weight: 900;
}

.summary-card,
.activity-total,
.athlete-total,
.list-row,
.athlete-stat-card {
    background: rgba(255,255,255,.045);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 10px;
}

.summary-card,
.activity-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .summary-card span,
    .activity-total span,
    .athlete-total span {
        color: var(--muted);
        font-weight: 800;
        font-size: 13px;
    }

    .summary-card strong,
    .activity-total strong {
        color: var(--yellow);
        font-size: 28px;
        font-weight: 900;
    }

.athlete-total strong {
    display: block;
    color: var(--text);
    margin-bottom: 4px;
}

/* DASHBOARD */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 28px;
}

.filter-card {
    background: rgba(255,255,255,.045);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 18px;
    margin-bottom: 22px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    align-items: end;
}

    .filter-card label {
        font-size: 12px;
        font-weight: 900;
        color: var(--yellow);
        margin-bottom: -6px;
    }

.athlete-stat-card {
    display: grid;
    gap: 12px;
}

    .athlete-stat-card strong {
        display: block;
        color: var(--text);
        font-size: 17px;
        font-weight: 900;
        margin-bottom: 4px;
    }

    .athlete-stat-card span {
        color: var(--muted);
        font-size: 13px;
        font-weight: 800;
    }

.activity-mini-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

    .activity-mini-list small {
        background: #151515;
        border: 1px solid var(--border);
        color: var(--text-soft);
        border-radius: 999px;
        padding: 7px 10px;
        font-weight: 800;
    }

.burpees-pay-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    margin-top: 10px;
}

.burpee-history-row {
    align-items: center;
}

    .burpee-history-row div {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .burpee-history-row strong {
        color: var(--text);
        font-size: 14px;
    }

    .burpee-history-row span {
        color: var(--muted);
        font-size: 12px;
        font-weight: 800;
    }

.mini-action {
    padding: 8px 10px;
    border-radius: 12px;
    font-size: 12px;
}

/* ATTENDANCE */

.attendance-page {
    max-width: 920px;
    margin: 0 auto;
}

.attendance-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.activity-box,
.form-card {
    background: rgba(255,255,255,.045);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 18px;
    margin-bottom: 20px;
}

    .activity-box label,
    .form-card label {
        display: block;
        margin-bottom: 10px;
        font-weight: 900;
        color: var(--yellow);
    }

.athlete-list,
.list-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.attendance-row {
    background: rgba(255,255,255,.045);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 18px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: center;
    transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

    .attendance-row.present {
        border-color: rgba(34, 197, 94, .28);
        background: rgba(34, 197, 94, .06);
    }

    .attendance-row:hover {
        transform: translateY(-1px);
    }

.athlete-name {
    font-size: 17px;
    font-weight: 900;
    color: var(--text);
}

.athlete-info,
.small-text {
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
    margin-top: 5px;
}

.attendance-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.switch input {
    display: none;
}

.switch span {
    width: 56px;
    height: 32px;
    background: #4a4a4a;
    border-radius: 999px;
    display: block;
    position: relative;
    cursor: pointer;
}

    .switch span::after {
        content: "";
        width: 26px;
        height: 26px;
        background: #f5f5f5;
        border-radius: 50%;
        position: absolute;
        top: 3px;
        left: 3px;
        transition: transform .18s ease;
    }

.switch input:checked + span {
    background: var(--green);
}

    .switch input:checked + span::after {
        transform: translateX(24px);
    }

.delay-controls {
    display: grid;
    grid-template-columns: 38px 38px 38px;
    gap: 6px;
    align-items: center;
    text-align: center;
}

    .delay-controls strong {
        color: var(--text);
        font-weight: 900;
    }

button.mini {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 14px;
    background: #111;
    color: var(--yellow);
    font-size: 20px;
    border: 1px solid rgba(255, 212, 0, .18);
}

.save-btn {
    width: 100%;
    margin-top: 22px;
    padding: 17px;
    font-size: 16px;
}

.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 18px;
}

.sticky-save {
    position: sticky;
    bottom: 95px;
    z-index: 50;
    box-shadow: 0 18px 40px rgba(255, 212, 0, .22);
}

/* ATHLETES */

.form-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.list-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 12px;
}

    .list-row strong {
        color: var(--text);
        font-weight: 900;
    }

/* EMPTY */

.empty-state {
    background: rgba(255,255,255,.035);
    border: 1px dashed rgba(255,255,255,.14);
    color: var(--muted);
    border-radius: 20px;
    padding: 18px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 12px;
}

/* RESPONSIVE */

@media (max-width: 980px) {
    .home-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .top-header {
        height: 70px;
        padding: 0 16px;
    }

    .brand-logo {
        width: 42px;
        height: 42px;
        border-radius: 14px;
        font-size: 18px;
    }

    .brand-main {
        font-size: 12px;
    }

    .brand-sub {
        font-size: 11px;
    }

    .app-content {
        padding: 14px;
    }

    .calendar-card,
    .summary-panel,
    .attendance-card,
    .athletes-card,
    .card {
        border-radius: 24px;
        padding: 16px;
    }

    .calendar-head {
        grid-template-columns: 48px 1fr;
        gap: 12px;
        margin-bottom: 20px;
    }

    .calendar-icon {
        width: 48px;
        height: 48px;
        border-radius: 16px;
    }

    .calendar-head h1,
    .page-title,
    .attendance-header h1 {
        font-size: 22px;
    }

    .calendar-head p,
    .page-subtitle,
    .attendance-header p {
        font-size: 12px;
    }

    .month-nav {
        grid-template-columns: 44px 1fr 44px;
        gap: 8px;
    }

        .month-nav h2 {
            font-size: 19px;
        }

        .month-nav button {
            width: 44px;
            height: 44px;
            font-size: 28px;
        }

    .smart-calendar-grid {
        gap: 5px;
    }

        .smart-calendar-grid .weekday {
            font-size: 10px;
            min-height: 24px;
        }

    .smart-calendar-day {
        min-height: 68px;
        border-radius: 13px;
        padding: 7px;
        gap: 4px;
    }

    .smart-day-number {
        font-size: 14px;
    }

    .activity-badge {
        width: 20px;
        height: 20px;
        font-size: 11px;
    }

    .smart-day-body strong {
        display: none;
    }

    .smart-day-body span {
        font-size: 9px;
    }

    .smart-day-empty {
        font-size: 8px;
    }

    .mini-progress {
        height: 4px;
    }

    .dashboard-header,
    .page-header,
    .panel-title {
        flex-direction: column;
        gap: 10px;
    }

        .dashboard-header button {
            width: 100%;
        }

    .filter-card,
    .burpees-pay-row,
    .form-row,
    .quick-actions {
        grid-template-columns: 1fr;
    }

        .burpees-pay-row button,
        .quick-actions button {
            width: 100%;
        }

    .attendance-row {
        grid-template-columns: 1fr;
    }

    .attendance-actions {
        justify-content: space-between;
    }

    .bottom-nav {
        left: 10px;
        right: 10px;
        bottom: 10px;
        height: 70px;
        border-radius: 24px;
    }

    .burpee-history-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .mini-action {
        width: 100%;
    }

    .training-duration {
        color: var(--text-soft);
        font-size: 10px;
        font-weight: 900;
        line-height: 1.1;
    }

}
