:root {
    --brand: #009FD4;
    --text: #1a1a1a;
    --bg: #f7f9fa;
    --border: #dde3e6;
    --error: #c0392b;
    --success: #1e8449;
}

* { box-sizing: border-box; }

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

.topnav {
    background: var(--brand);
    color: white;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.topnav a { color: white; text-decoration: none; opacity: 0.9; }
.topnav a:hover { opacity: 1; text-decoration: underline; }
.topnav .brand { font-weight: 700; margin-right: auto; }
.topnav .logout { margin-left: auto; }

.container {
    max-width: 700px;
    margin: 0 auto;
    padding: 24px 16px 60px;
}

h1 { color: var(--brand); }

.entry-form, .month-picker {
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: white;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.month-picker { flex-direction: row; align-items: end; gap: 20px; flex-wrap: wrap; }

label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 14px;
    font-weight: 600;
}
label.checkbox {
    flex-direction: row;
    align-items: center;
    font-weight: normal;
}

input, select, textarea {
    font-family: inherit;
    font-size: 15px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
}

button, .button {
    background: var(--brand);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    width: fit-content;
}
button:hover, .button:hover { opacity: 0.9; }

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

.missing-box {
    background: #fff8e1;
    border: 1px solid #f0d878;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}
.missing-box ul { margin: 8px 0 0; padding-left: 20px; }

.missing-inline { color: #b8860b; font-weight: 600; }

.summary-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px 20px;
    margin-top: 20px;
}
.summary-card table { width: 100%; border-collapse: collapse; }
.summary-card td { padding: 4px 0; border-bottom: 1px solid #f0f0f0; }
.summary-card td:last-child { text-align: right; font-weight: 600; }

.clients-table, .data-table { width: 100%; border-collapse: collapse; background: white; margin-bottom: 24px; }
.clients-table th, .clients-table td,
.data-table th, .data-table td { text-align: left; padding: 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }

.inline-form { display: inline-block; margin: 0; }
.inline-form select { padding: 4px 6px; font-size: 14px; }

.button-small {
    background: var(--brand);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 13px;
    cursor: pointer;
}
.button-small:hover { opacity: 0.9; }
.button-reject { background: var(--error); }
.approve-actions { display: flex; gap: 6px; }

.tag {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}
.tag-pending { background: #fff3cd; color: #8a6100; }
.tag-confirmed { background: #dff5e4; color: var(--success); }
.tag-rejected { background: #fbe1de; color: var(--error); }
.tag-planned { background: #dbeeff; color: #075985; }
.tag-needs-input { background: #f0f0f0; color: #555; }

.badge {
    background: var(--error);
    color: white;
    border-radius: 20px;
    padding: 1px 7px;
    font-size: 12px;
    font-weight: 700;
}

.container--wide { max-width: 980px; }

.cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.cal-month-label { font-weight: 700; text-transform: capitalize; }

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}
.cal-dow {
    font-size: 12px;
    font-weight: 700;
    color: #888;
    text-align: center;
    padding-bottom: 4px;
}
.cal-cell {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 8px;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.cal-cell--blank { background: transparent; border: none; }
.cal-cell--today { border: 2px solid var(--brand); }
.cal-daynum { font-weight: 700; text-decoration: none; color: var(--text); }
.cal-daynum:hover { color: var(--brand); }
.cal-tag { align-self: flex-start; }
.cal-plan-label {
    font-size: 12px;
    color: #555;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cal-quickadd { margin-top: auto; font-size: 12px; }
.cal-quickadd summary {
    cursor: pointer;
    color: var(--brand);
    font-weight: 600;
    list-style: none;
}
.cal-quickadd summary::-webkit-details-marker { display: none; }
.cal-quickadd form {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 6px;
}
.cal-quickadd select,
.cal-quickadd input { font-size: 12px; padding: 4px 6px; }

@media (max-width: 700px) {
    .cal-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
    .cal-cell { min-height: 64px; padding: 4px; font-size: 12px; }
    .cal-dow { font-size: 10px; }
}

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}
.login-box {
    background: white;
    padding: 32px;
    border-radius: 10px;
    border: 1px solid var(--border);
    width: 300px;
    text-align: center;
}
.login-box .subtitle { color: #666; margin-top: -8px; margin-bottom: 20px; }
.login-box form { display: flex; flex-direction: column; gap: 14px; text-align: left; }
