:root {
    --banana: #f4d316;
    --banana-dark: #e4c116;
    --ink: #1f1f1f;
    --muted: #5a5a5a;
    --bg: #f8f7f4;
    --card: #ffffff;
    --border: #e4e1da;
    --danger: #e05656;
    --danger-dark: #c84444;
    --shadow: 0 18px 40px rgba(31, 31, 31, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Verdana", "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--bg);
}

a {
    color: inherit;
    text-decoration: none;
}

.top-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #fff;
    border-bottom: 4px solid var(--banana);
    box-shadow: 0 4px 12px rgba(31, 31, 31, 0.08);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.brand img {
    width: 42px;
    height: 42px;
}

.nav-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.nav-links a {
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 999px;
    transition: background 0.2s ease;
}

.nav-links a:hover {
    background: rgba(244, 211, 22, 0.2);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.score-pill {
    background: rgba(244, 211, 22, 0.2);
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.9rem;
    display: flex;
    gap: 8px;
    align-items: center;
}

.score-rank {
    font-weight: 600;
}

.user-menu {
    position: relative;
}

.menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.menu-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    min-width: 180px;
    box-shadow: var(--shadow);
    padding: 8px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.user-menu.is-open .menu-dropdown {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.menu-dropdown form {
    margin: 0;
}

.dropdown-item {
    width: 100%;
    border: none;
    background: transparent;
    color: inherit;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font: inherit;
    font-weight: 600;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
}

.dropdown-item:hover {
    background: rgba(244, 211, 22, 0.2);
}

.page {
    padding: 32px 0 64px;
}

.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.eyebrow {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin: 0 0 8px;
}

.subtitle {
    color: var(--muted);
    margin: 8px 0 0;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.status-pill {
    padding: 8px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--border);
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.card-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card-grid.two-column {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.card {
    background: var(--card);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.highlight-card {
    background: rgba(244, 211, 22, 0.12);
    border-color: rgba(244, 211, 22, 0.4);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.card-title {
    margin: 0 0 8px;
}

.card-subtitle {
    color: var(--muted);
    margin: 0 0 16px;
}

.badge {
    background: rgba(31, 31, 31, 0.08);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.stat-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.btn {
    border: none;
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--banana);
    color: #222;
}

.btn-primary:hover {
    background: var(--banana-dark);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--ink);
}

.btn-secondary:hover {
    border-color: var(--banana);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: var(--danger-dark);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.report-problem-form {
    display: inline-flex;
}

.report-problem-button {
    padding: 6px 10px;
    font-size: 0.95rem;
    line-height: 1;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.button-row .btn {
    min-width: 110px;
    justify-content: center;
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field-label {
    font-weight: 600;
}

.form-error {
    color: var(--danger);
    font-weight: 600;
}

.input {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
}

.input:focus {
    outline: 2px solid rgba(244, 211, 22, 0.4);
    border-color: var(--banana);
}

.search-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.input-with-icon {
    position: relative;
    flex: 1;
    min-width: 220px;
}

.input-with-icon i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
}

.input-with-icon .input {
    padding-left: 36px;
    width: 100%;
}

.table-card {
    background: var(--card);
    border-radius: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
}

.table-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    align-items: center;
}

.table-row.auto-columns {
    grid-template-columns: minmax(180px, 1.5fr) minmax(220px, 2fr) minmax(120px, 1fr) minmax(120px, 1fr) auto;
}

.table-row:last-child {
    border-bottom: none;
}

.table-header {
    background: rgba(244, 211, 22, 0.15);
    font-weight: 700;
}

.list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.list-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.section-split {
    margin-top: 32px;
}

.search-btn {
    max-width: 160px;
    width: 100%;
}

.empty-state {
    padding: 40px;
    text-align: center;
    background: #fff;
    border: 1px dashed var(--border);
    border-radius: 16px;
    color: var(--muted);
}

.text-link {
    color: #2a4d9b;
    font-weight: 600;
}

.muted {
    color: var(--muted);
    font-size: 0.9rem;
}

.topics {
    display: grid;
    gap: 12px;
}

.topic-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fff;
}

.tip-list {
    padding-left: 18px;
    margin: 0 0 16px;
    color: var(--muted);
}

.notice {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.notice.success {
    background: rgba(67, 160, 71, 0.12);
    color: #2d7a35;
}

.notice.info {
    background: rgba(25, 118, 210, 0.12);
    color: #1f5c98;
}

.question-content {
    font-size: 1.15rem;
}

.question-card .solution {
    margin-top: 20px;
    font-size: 1.15rem;
}

.solution-step {
    margin-bottom: 12px;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

@media (max-width: 768px) {
    .nav-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .table-row {
        grid-template-columns: 1fr;
    }

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