/* Academy CCNA Study Planner - Light Theme */
@import 'https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap';

:root {
    /* Light theme colors */
    --planner-bg: #efefef;
    --planner-surface: #ffffff;
    --planner-surface-muted: #fafafa;
    --planner-border: #e0e0e0;
    --planner-text: #333333;
    --planner-text-muted: #757575;

    /* Academy orange/gold palette - exact from Figma */
    --academy-orange: #E8A651;
    --academy-orange-light: #f5d7b0;
    --academy-orange-border: #E8A651;

    --planner-accent: var(--academy-orange);
    --planner-accent-soft: rgba(232, 166, 81, 0.15);
    --planner-accent-border: var(--academy-orange);
    --planner-accent-shadow: rgba(232, 166, 81, 0.2);
    --planner-accent-shadow-strong: rgba(232, 166, 81, 0.3);
    --planner-warning: #dc2626;

    --planner-font: 'Open Sans', sans-serif;
}

.is-hidden {
    display: none !important;
}

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

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--planner-font);
    background: var(--planner-bg);
    color: #242426;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--planner-accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem clamp(1.25rem, 4vw, 3rem);
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.app-header {
    background: var(--planner-surface);
    border: 1px solid var(--planner-border);
    border-radius: 20px;
    padding: clamp(2rem, 3vw, 3rem);
    display: flex;
    flex-direction: column;
    gap: clamp(1.5rem, 3vw, 2rem);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: relative;
}

.brand {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 3vw, 1.5rem);
    margin-bottom: clamp(1.5rem, 3vw, 2rem);
}

.brand-logo {
    width: clamp(70px, 10vw, 85px);
    height: auto;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.brand-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.brand-content h1 {
    margin: 0;
    font-weight: 700;
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    color: #242426;
    line-height: 1.2;
}

.brand-description {
    margin: 0;
    color: #242426;
    font-size: 0.95rem;
    line-height: 1.5;
}

.stats-header {
    display: flex;
    justify-content: flex-end;
    gap: 1.5rem;
    margin-bottom: 0.75rem;
}

.stats-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    background: var(--planner-surface);
    border: 1.5px solid var(--academy-orange-light);
    border-radius: 16px;
    padding: 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.stat-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.7rem;
    color: #242426;
    font-weight: 600;
}

.action-link {
    color: #D39F45;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: opacity 160ms ease;
    white-space: nowrap;
}

.action-link:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.stat-value {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1;
    color: #242426;
}

.stat-sub {
    color: #242426;
    font-size: 0.85rem;
}

.progress-track {
    position: relative;
    height: 6px;
    background: var(--planner-border);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-bar {
    position: absolute;
    inset: 0;
    width: 0;
    background: var(--academy-orange);
    border-radius: inherit;
    transition: width 220ms ease;
}


.ghost-button {
    font: inherit;
    font-weight: 700;
    font-size: 0.8rem;
    border-radius: 10px;
    padding: 0.6rem 1rem;
    cursor: pointer;
    background: var(--planner-surface);
    color: #242426;
    border: 1px solid #242426;
    transition: all 160ms ease;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.ghost-button:hover:not(:disabled) {
    background: #D39F45;
    border-color: #242426;
}

.ghost-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.ghost-button--compact {
    padding: 0.5rem 0.85rem;
    font-size: 0.75rem;
}

.ghost-button--danger {
    color: var(--planner-warning);
    border-color: var(--planner-border);
}

.ghost-button--danger:hover:not(:disabled) {
    border-color: var(--planner-warning);
}

.app-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.planner-config {
    background: var(--planner-surface);
    border-radius: 20px;
    border: 1px solid var(--planner-border);
    padding: clamp(1.5rem, 3.5vw, 2.5rem);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.planner-config[aria-hidden="true"] {
    display: none;
}

.config-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.config-header h2 {
    margin: 0 0 0.25rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #242426;
}

.config-sub {
    margin: 0;
    color: #242426;
    font-size: 0.9rem;
}

.plan-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.weekdays-fieldset {
    border: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.fieldset-legend {
    font-size: 1rem;
    font-weight: 700;
    color: #242426;
    margin-bottom: 0.25rem;
}

.fieldset-sub {
    margin: 0 0 0.5rem;
    color: #242426;
    font-size: 0.85rem;
}

.weekdays-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    gap: 0.5rem;
}

.week-chip {
    position: relative;
    border-radius: 10px;
    border: 1px solid #242426;
    background: var(--planner-surface);
    padding: 0.65rem 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 180ms ease;
    user-select: none;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.week-chip span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    color: #242426;
}

.week-chip:hover {
    border-color: var(--academy-orange);
}

.week-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.week-chip input:checked + span {
    color: #242426;
}

.week-chip:has(input:checked) {
    border-color: #242426;
    background: #D39F45;
}

.week-chip:has(input:checked) span {
    color: #242426;
}

.fieldset-summary {
    margin: 0.5rem 0 0;
    color: #242426;
    font-size: 0.85rem;
}

.fieldset-error {
    margin: 0.5rem 0 0;
    color: var(--planner-warning);
    font-size: 0.85rem;
    font-weight: 600;
}

.weekdays-fieldset--error .week-chip {
    border-color: rgba(220, 38, 38, 0.3);
}

.form-row {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 720px) {
    .form-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.field-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #242426;
}

.field input[type='date'] {
    background: #F2F2F2;
    border: 1px solid #242426;
    border-radius: 10px;
    padding: 0.7rem 0.85rem;
    color: #242426;
    font: inherit;
    font-size: 0.9rem;
    transition: border-color 160ms ease;
}

.field input[type='date']::-webkit-calendar-picker-indicator {
    filter: invert(10%);
}

.field input[type='date']::-webkit-datetime-edit-fields-wrapper {
    color: #242426;
}

.field input[type='date']::-webkit-datetime-edit-text,
.field input[type='date']::-webkit-datetime-edit-month-field,
.field input[type='date']::-webkit-datetime-edit-day-field,
.field input[type='date']::-webkit-datetime-edit-year-field {
    color: #242426;
}

.field input[type='date']::-webkit-datetime-edit {
    color: #242426;
}

.field input[type='date']::-webkit-date-and-time-value {
    text-align: left;
    color: #242426;
}

.field input[type='date']:focus {
    outline: none;
    border-color: var(--academy-orange);
}

.field input[type='date']:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--planner-surface-muted);
}

.field-hint {
    font-size: 0.8rem;
    color: #242426;
}

.timeline-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    border: none;
    padding: 0;
    margin: 0;
}

.timeline-options legend {
    width: 100%;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #242426;
}

.chip {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    align-items: flex-start;
    align-self: flex-start;
    padding: 0.75rem 0.9rem 0.65rem;
    border-radius: 10px;
    border: 1px solid #242426;
    background: #F2F2F2;
    cursor: pointer;
    transition: all 180ms ease;
}

.chip:hover {
    border-color: var(--academy-orange);
}

.chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.chip-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #242426;
    line-height: 1.2;
}

.chip-hint {
    font-size: 0.75rem;
    color: #242426;
    line-height: 1.2;
}

.chip:has(input:checked) {
    border-color: #242426;
    background: #D39F45;
}

.chip input:checked ~ .chip-label {
    color: #242426;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
}

.primary-button {
    font: inherit;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 10px;
    padding: 0.75rem 1.75rem;
    cursor: pointer;
    transition: all 160ms ease;
    background: #D39F45;
    color: #242426;
    border: none;
    box-shadow: 0 1px 3px var(--planner-accent-shadow);
}

.primary-button:hover {
    background: #E8A651;
    box-shadow: 0 2px 6px var(--planner-accent-shadow-strong);
}

.primary-button:active {
    transform: scale(0.98);
}

.primary-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.day-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 960px) {
    .day-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.day-card {
    background: var(--planner-surface);
    border: 1px solid var(--planner-border);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 300px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 180ms ease;
}

.day-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.day-card--drop-target {
    border-color: var(--academy-orange);
    box-shadow: 0 4px 16px var(--planner-accent-shadow-strong);
}

.day-card__header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.day-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #242426;
}

.day-date {
    font-size: 0.85rem;
    color: #242426;
}

.task-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.task-item {
    background: var(--planner-surface);
    border: 1px solid var(--planner-border);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: stretch;
    transition: all 160ms ease;
}

.task-item:hover {
    border-color: var(--planner-text-muted);
}

.task-check {
    display: flex;
    width: 100%;
    gap: 0.85rem;
    align-items: flex-start;
    cursor: pointer;
}

.task-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkmark {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 6px;
    border: 2px solid var(--planner-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 0.15rem;
    transition: all 160ms ease;
    background: var(--planner-surface);
}

.task-check input:checked + .checkmark {
    border-color: var(--academy-orange);
    background: var(--academy-orange);
}

.task-check input:checked + .checkmark::before {
    content: '✓';
    font-size: 0.85rem;
    line-height: 1;
    color: white;
    font-weight: bold;
}

.task-copy {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.task-title {
    font-weight: 600;
    line-height: 1.4;
    color: #242426;
}

.task-detail {
    color: #242426;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.task-item--complete {
    border-color: #86efac;
    background: #f0fdf4;
}

.task-item--complete .task-title {
    text-decoration: line-through;
    color: #15803d;
}

.task-item--complete .task-detail {
    color: #22c55e;
}

.task-item--overdue {
    border-color: #fbbf24;
    background: #fffbeb;
}

.task-item--draggable {
    cursor: grab;
}

.task-item--draggable:active {
    cursor: grabbing;
}

.task-item--dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.day-card--inactive {
    opacity: 0.6;
}

.empty-state {
    margin-top: auto;
    padding: 1.5rem 1rem;
    background: var(--planner-surface-muted);
    border-radius: 12px;
    color: #242426;
    line-height: 1.5;
    text-align: left;
    border: 1px /*dashed var(--planner-border)*/;
    font-size: 0.9rem;
}

.empty-state:empty {
    display: none;
}

.month-view {
    background: var(--planner-surface);
    border-radius: 20px;
    border: 1px solid var(--planner-border);
    padding: clamp(1.5rem, 3vw, 2.5rem);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.month-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.month-header h2 {
    margin: 0 0 0.25rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #242426;
}

.month-sub {
    margin: 0;
    color: #242426;
    font-size: 0.9rem;
}

.month-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.month-label {
    font-weight: 600;
    padding: 0.55rem 0.95rem;
    border-radius: 8px;
    background: var(--academy-orange);
    color: white;
    font-size: 0.85rem;
}

.calendar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.7rem;
    color: #242426;
    font-weight: 700;
}

.calendar-weekdays span {
    text-align: center;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.5rem;
}

.calendar-cell {
    min-height: 100px;
    border-radius: 12px;
    border: 1px solid var(--planner-border);
    background: var(--planner-surface);
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: all 160ms ease;
}

.calendar-cell:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.calendar-cell--outside {
    opacity: 0.3;
}

.calendar-cell--today {
    border-color: var(--academy-orange);
    border-width: 2px;
}

.calendar-cell--overdue {
    border-color: #fbbf24;
    background: #fffbeb;
}

.calendar-cell--complete {
    border-color: #86efac;
    background: #f0fdf4;
}

.calendar-cell--upcoming {
    border-color: var(--academy-gold);
}

.calendar-day {
    font-weight: 700;
    font-size: 0.9rem;
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--planner-surface-muted);
    color: #242426;
}

.calendar-badges {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.calendar-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding: 0.25rem 0.5rem;
    text-transform: uppercase;
}

.calendar-badge--pending {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fbbf24;
}

.calendar-badge--done {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #86efac;
}

.calendar-empty {
    border-radius: 12px;
    border: 1px dashed var(--planner-border);
    padding: 2rem 1.5rem;
    text-align: center;
    color: #242426;
    background: var(--planner-surface-muted);
}

.calendar-locked {
    display: none;
    border-radius: 12px;
    border: 1px dashed var(--planner-border);
    padding: 3rem 2rem;
    text-align: center;
    color: #242426;
    background: var(--planner-surface-muted);
    margin-top: 1rem;
}

.calendar-locked p {
    margin: 0;
    font-size: 1rem;
}

.month-view.is-locked .calendar-weekdays,
.month-view.is-locked .calendar-grid {
    display: none;
}

.month-view.is-locked .calendar-locked {
    display: block;
}

@media (max-width: 720px) {
    .planner-config,
    .day-card,
    .month-view {
        padding: 1.25rem;
    }

    .calendar-cell {
        min-height: 80px;
    }
}

@media (max-width: 540px) {
    .app {
        padding: 2rem 1rem 3rem;
    }

    .brand {
        flex-direction: column;
        align-items: flex-start;
    }

    .stats-header {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .timeline-options {
        flex-direction: column;
    }

    .chip {
        width: 100%;
    }

    .month-controls {
        justify-content: flex-start;
    }
}