* {
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    margin: 0;
    background: #f5f7fb;
    color: #1f2933;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: #1f2933;
    color: #ffffff;
}

.top-bar__brand {
    font-size: 1.25rem;
    font-weight: bold;
}

.top-bar nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
    margin: 0;
    padding: 0;
}

.top-bar nav a {
    color: #ffffff;
    text-decoration: none;
}

.top-bar nav a:hover {
    text-decoration: underline;
}

.content {
    padding: 2rem;
    min-height: calc(100vh - 140px);
}

.footer {
    text-align: center;
    padding: 1rem 0;
    background: #e4e7eb;
}

.auth-container {
    max-width: 320px;
    margin: 10vh auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.1);
}

.auth-container h1 {
    margin-bottom: 1.5rem;
}

form label {
    display: block;
    margin-bottom: 1rem;
}

form input,
form select,
form textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #cbd2d9;
    border-radius: 6px;
    margin-top: 0.35rem;
}

button {
    padding: 0.7rem 1.2rem;
    border: none;
    background-color: #2563eb;
    color: #ffffff;
    border-radius: 6px;
    cursor: pointer;
}

button.secondary {
    background-color: #6b7280;
}

button.tertiary,
.button.tertiary {
    background-color: #f3f4f6;
    color: #1f2937;
    border: 1px solid #e5e7eb;
}

button:disabled,
button.disabled,
.button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.button,
.button.secondary,
.button.tertiary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    text-decoration: none;
}

.button {
    padding: 0.7rem 1.2rem;
    background-color: #2563eb;
    color: #ffffff;
    border-radius: 6px;
    font-weight: 600;
}

.button.secondary {
    background-color: #6b7280;
    color: #ffffff;
}

.button.tertiary {
    background-color: #f3f4f6;
    color: #1f2937;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
}

table th,
table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
}

table tr:nth-child(even) {
    background-color: #f9fafb;
}

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

.card {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.05);
}

.error {
    padding: 0.75rem;
    background: #fee2e2;
    color: #b91c1c;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.success {
    padding: 0.75rem;
    background: #dcfce7;
    color: #166534;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.flex {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.flex-item {
    flex: 1;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }

.badge {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.1rem 0.4rem;
    font-size: 0.75rem;
    background: #fef3c7;
    color: #d97706;
    border-radius: 999px;
}

.week-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.week-controls {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.week-table-wrapper {
    margin-top: 1.5rem;
    overflow-x: auto;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
}

.week-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    min-width: 900px;
}

.week-table th,
.week-table td {
    border: 1px solid #e5e7eb;
    padding: 0.65rem;
    text-align: center;
}

.week-table .col-name {
    text-align: left;
    min-width: 220px;
    background: #f8fafc;
    font-weight: 600;
}

.week-table .col-note {
    min-width: 200px;
    text-align: left;
}

.status-cell {
    border-radius: 6px;
    min-width: 100px;
    height: 60px;
    vertical-align: middle;
    font-weight: 600;
}

.status-cell.status-empty {
    background: #f8fafc;
}

.status-cell.status-absence {
    box-shadow: inset 0 0 0 2px rgba(15, 23, 42, 0.08);
}

.status-cell.status-manual {
    box-shadow: inset 0 0 0 3px rgba(99, 102, 241, 0.35);
}

.hint-auto {
    margin-top: 0.35rem;
    font-size: 0.85rem;
    color: #1d4ed8;
}

.week-table.editable select {
    width: 100%;
    padding: 0.45rem 0.5rem;
    border-radius: 6px;
    border: 1px solid #cbd2d9;
}

.week-table.editable textarea {
    width: 100%;
    border-radius: 6px;
    border: 1px solid #cbd2d9;
    padding: 0.5rem;
}

.editable-cell.manual-changed {
    background: #eef2ff;
}

.group-divider td {
    background: #e0f2fe;
    font-weight: 700;
    text-align: left;
}

.quick-week {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quick-week-select {
    display: none;
    padding: 0.45rem 0.5rem;
    border-radius: 6px;
    border: 1px solid #cbd2d9;
    background: #ffffff;
    position: absolute;
    top: 110%;
    right: 0;
    z-index: 5;
}

.quick-week-select.visible {
    display: block;
}

@media print {
    body {
        background: #ffffff;
    }

    .top-bar,
    .footer,
    .week-controls,
    .form-actions,
    .quick-week,
    .success,
    .error,
    button,
    a.button {
        display: none !important;
    }

    .content {
        padding: 0;
    }

    .week-table {
        border: 1px solid #000;
    }
}


