* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #222;
    background: #f7f7f7;
    line-height: 1.5;
}

.page {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    background: #1a3a52;
    width: 240px;
    color: #e6f0fa;
    padding: 1.5rem 0;
    flex-shrink: 0;
}

.sidebar-brand {
    padding: 0 1.5rem 1.5rem 1.5rem;
    border-bottom: 1px solid #2c5680;
    margin-bottom: 1rem;
}

.sidebar-brand h2 {
    margin: 0;
    color: #fff;
    font-size: 1.5rem;
    letter-spacing: 0.05em;
}

.sidebar-brand small {
    color: #a4c4dc;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.nav-menu {
    display: flex;
    flex-direction: column;
}

.sidebar-auth {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #2c5680;
}

.auth-name {
    display: block;
    color: #a4c4dc;
    padding: 0.5rem 1.5rem 0 1.5rem;
    font-size: 0.85rem;
    word-break: break-word;
}

.auth-roles {
    display: block;
    color: #88c0d0;
    padding: 0.1rem 1.5rem 0.4rem 1.5rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.auth-link {
    color: #c8d8e8 !important;
    font-size: 0.9rem;
}

.nav-link {
    color: #e6f0fa;
    text-decoration: none;
    display: block;
    padding: 0.625rem 1.5rem;
    transition: background 0.15s;
}

.nav-link:hover {
    background: #2c5680;
}

.nav-link.active {
    background: #2c5680;
    border-left: 3px solid #88c0d0;
    padding-left: calc(1.5rem - 3px);
}

main {
    flex: 1;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.content {
    max-width: 900px;
    padding: 2rem 3rem;
    width: 100%;
}

h1 {
    color: #1a3a52;
    border-bottom: 2px solid #1a3a52;
    padding-bottom: 0.5rem;
    margin-top: 0;
}

h2 {
    color: #1a3a52;
    margin-top: 2rem;
    font-size: 1.35rem;
}

h3 {
    color: #2c5680;
    margin-top: 1rem;
    font-size: 1.1rem;
}

.lead {
    font-size: 1.1rem;
    color: #444;
    margin-bottom: 2rem;
}

ul {
    line-height: 1.8;
}

code {
    background: #f0f0f0;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    font-family: "SF Mono", Monaco, Consolas, monospace;
    font-size: 0.9em;
}

a {
    color: #2c5680;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.stub-card {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
    background: #fafafa;
}

.stub-card h3 {
    margin-top: 0;
}

.stub-tag {
    color: #888;
    font-size: 0.85rem;
    font-style: italic;
    margin-bottom: 0;
}

.footer {
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid #eee;
    color: #888;
}

/* Status page (anonymous, focused, no sidebar) */
.status-main {
    width: 100%;
    min-height: 100vh;
    background: #fff;
    display: flex;
    justify-content: center;
}

.status-page {
    max-width: 760px;
    padding: 3rem 2rem;
    width: 100%;
}

.status-header {
    border-bottom: 3px solid #1a3a52;
    padding-bottom: 1.5rem;
    margin-bottom: 2.5rem;
}

.status-header h1 {
    color: #1a3a52;
    border: none;
    padding: 0;
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
}

.status-header .lead {
    margin: 0.5rem 0;
    font-size: 1.1rem;
}

.status-header .updated {
    color: #888;
    font-size: 0.95rem;
    margin: 0.5rem 0 0 0;
}

.status-page section {
    margin-bottom: 2.5rem;
}

.status-page h2 {
    color: #1a3a52;
    font-size: 1.35rem;
    margin: 0 0 1rem 0;
}

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

.phase {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 6px;
    border-left: 4px solid #ccc;
    background: #fafafa;
}

.phase.done {
    border-left-color: #4a8;
    background: #f4faf6;
}

.phase.active {
    border-left-color: #c80;
    background: #fdf8f0;
}

.phase.upcoming {
    border-left-color: #aab;
    background: #fafafa;
}

.phase-status {
    font-size: 1.5rem;
    font-weight: bold;
    width: 2rem;
    text-align: center;
    flex-shrink: 0;
}

.phase.done .phase-status {
    color: #4a8;
}

.phase.active .phase-status {
    color: #c80;
}

.phase.upcoming .phase-status {
    color: #aab;
}

.phase-detail h3 {
    margin: 0 0 0.25rem 0;
    color: #2c5680;
    font-size: 1.05rem;
}

.phase-detail p {
    margin: 0;
    color: #444;
    line-height: 1.5;
}

.english-version {
    margin-top: 3rem;
    padding: 1.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fafafa;
}

.english-version summary {
    cursor: pointer;
    font-weight: 600;
    color: #2c5680;
    font-size: 1rem;
}

.english-version summary:hover {
    color: #1a3a52;
}

.english-version h2,
.english-version h3 {
    color: #1a3a52;
    margin-top: 1.5rem;
}

.english-phases li {
    margin-bottom: 0.5rem;
}

.status-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
    color: #888;
    font-size: 0.9rem;
    text-align: center;
}

/* Recent-activity log on /status */
.activity-note {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    margin: 0 0 1rem 0;
}

.activity-log {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.activity-log td {
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.activity-log .date {
    color: #888;
    white-space: nowrap;
    width: 110px;
}

.activity-log .hours {
    text-align: right;
    color: #444;
    white-space: nowrap;
    width: 60px;
    font-variant-numeric: tabular-nums;
}

.activity-log tfoot td {
    border-top: 2px solid #ddd;
    border-bottom: none;
    padding-top: 0.75rem;
    color: #1a3a52;
}
