﻿/* Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f4f6f8;
    color: #1f2933;
    line-height: 1.5;
    padding: 20px;
}

/* Layout */
header {
    margin:0 auto 30px auto;
    max-width:  900px;
}

nav a {
    margin-right: 16px;
    text-decoration: none;
    color: #2563eb;
    font-weight: 500;
}

nav a:hover {
    text-decoration: underline;
}

main {
    max-width: 900px;
    margin: 0 auto;
}

/* Primary Card */
.primary-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    margin-bottom: 24px;
}

.primary-card h1 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.payment-line {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 6px;
}

.payment-line time {
    display: inline;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #1f2937
}

.payment-label {
    color: #6b7280;
    font-weight: 500;
}

.settlement-note {
    color: #6b7280;
    margin-bottom: 6px;
}

.shifted {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 6px;
}

.muted {
    color: #6b7280;
}

/* Status colors */
.status {
    font-weight: 600;
}

.countdown-highlight {
    margin-top: 0;
}

.status-active, .status-upcoming {
    color: #16a34a;
     white-space: nowrap;
}

.status-due_today {
    color: #d97706;
}

.status-passed {
    color: #374151;
    font-weight: 500
}

.status-archived {
    color: #6b7280;
}

/* Navigation */
.month-nav,
.year-nav {
    margin-bottom: 20px;
}

.month-nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
}

.month-nav-slot {
    min-width: 0;
}

.month-nav-left {
    text-align: left;
}

.month-nav-center {
    text-align: center;
}

.month-nav-right {
    text-align: right;
}

.month-nav a,
.year-nav a {
    text-decoration: none;
    color: #2563eb;
}

.month-nav a {
    margin-right: 0;
}

.month-nav .current,
.year-nav span {
    font-weight: 600;
}

.month-nav-placeholder {
    visibility: hidden;
}

.year-nav {
    display: flex;
    justify-content: space-between;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0,0,0,0.04);
}

th, td {
    padding: 12px;
    text-align: left;
}


thead th {
  background: #ffffff;
  font-weight: 600;
  border-bottom: 2px solid #e6e8eb;
}

tbody tr:not(:last-child) {
    border-bottom: 1px solid #e5e7eb;
}

.year-table {
    margin-top: 20px;
}

.year-table a {
    text-decoration: none;
    color: #2563eb;
}

.year-table a:hover {
    text-decoration: underline;
}

.section-link {
    text-decoration: none;
    color: #2563eb;
}

.section-link:hover {
    text-decoration: underline;
}

.dashboard {
    margin-top: 20px;
}

.dashboard a {
    text-decoration: none;
    color: #2563eb;
    font-weight: 600;
}

.dashboard a:hover {
    text-decoration: underline;
}

.home-annual-card {
    margin-top: 48px;
}

.home-annual-card h1 {
    font-size: 1.5rem;
    margin-bottom: 14px;
}

.home-annual-card .payment-line {
    font-size: 1.15rem;
    margin-bottom: 6px;
}

.home-annual-card .settlement-note {
    font-size: 0.9rem;
}

.home-annual-card .status {
    font-size: 0.95rem;
}

.home-annual-card .shifted {
    font-size: 0.85rem;
}

/* Rules block */
.rules {
    margin-top: 20px;
    background: #ffffff;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.04);
}

.rules h2 {
    margin-bottom: 10px;
}

.rules ul {
    padding-left: 18px;
}

.rules-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.faq-question {
    font-size: 1.02rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.faq-title-spacing {
    margin-bottom: 18px;
}

.faq-answer {
    margin-bottom: 14px;
}

footer {
    margin-top: 40px;
    font-size: 0.9rem;
    color: #6b7280;
    text-align: center;
}


@media (max-width: 640px) {
    body {
        padding: 16px;
        font-size: 0.95rem;
    }

    .primary-card {
        padding: 16px;
    }

    .year-table {
        font-size: 0.9rem;
    }

    .year-table th:nth-child(3),
    .year-table td:nth-child(3) {
        display: none;
    }

    .primary-card h1 {
        font-size: 1.6rem;
        margin-bottom: 16px;
    }

    .payment-line {
        font-size: 1.4rem;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        line-height: 1.2;

    }

    .payment-label {
        margin-right: 0;
        margin-bottom: 0;
        line-height: 1.2;
        font-weight: normal;
        font-size: 1.2rem;
    }

    th, td {
        padding: 10px;
    }

    nav a {
        margin-right: 12px;
    }


}

