:root {
    --ww-black: #000000;
    --ww-white: #ffffff;
    --ww-accent: #ff6b00;
    --ww-accent-dark: #d75800;
    --ww-bg: #f8f9fa;
    --ww-border: #d7dbe0;
}

body {
    font-family: "Helvetica Neue", Arial, sans-serif;
    background:
        radial-gradient(circle at top right, rgba(255, 107, 0, 0.12), transparent 24%),
        linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    color: #111111;
}

.brand-bar {
    background: linear-gradient(90deg, #000000 0%, #171717 100%);
    padding: 0.75rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.brand-link {
    display: inline-flex;
    align-items: center;
}

.brand-logo {
    width: 148px;
    height: 40px;
    object-fit: contain;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-title {
    color: var(--ww-white);
    font-weight: 600;
    letter-spacing: 0.03em;
}

.panel {
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 20px;
    overflow: hidden;
}

.btn-brand {
    background: var(--ww-accent);
    border-color: var(--ww-accent);
    color: var(--ww-white);
}

.btn-brand:hover,
.btn-brand:focus {
    background: var(--ww-accent-dark);
    border-color: var(--ww-accent-dark);
    color: var(--ww-white);
}

.deadline-box {
    padding: 1rem;
    background: #000000;
    color: #cccccc;
    border-radius: 16px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.deadline-label {
    color: #cccccc;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
}

.deadline-value {
    color: #ff6b00;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
}

.preference-table select,
.schedule-table input,
.schedule-table select {
    min-width: 120px;
}

.schedule-table-wrap {
    overflow-x: auto;
}

.schedule-table {
    min-width: 980px;
}

.schedule-column-person {
    min-width: 250px;
    width: auto;
    white-space: normal;
}

.schedule-column-person input {
    min-width: 250px;
}

.preference-legend {
    border: 1px solid rgba(255, 107, 0, 0.22);
    border-radius: 18px;
    padding: 1rem 1.1rem;
    background: linear-gradient(135deg, rgba(255, 107, 0, 0.12), rgba(255, 255, 255, 0.95));
}

.preference-legend-title {
    font-weight: 700;
    margin-bottom: 0.65rem;
}

.preference-legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    font-weight: 600;
}

.legend-can {
    background: rgba(25, 135, 84, 0.12);
    color: #146c43;
}

.legend-cannot {
    background: rgba(220, 53, 69, 0.12);
    color: #b02a37;
}

.legend-preferred {
    background: rgba(255, 193, 7, 0.2);
    color: #9a6700;
}

.preference-table-wrap {
    overflow-x: auto;
}

.preference-table {
    min-width: 640px;
}

.preference-table th,
.preference-table td {
    text-align: center;
    vertical-align: middle;
}

.preference-table th:first-child {
    min-width: 84px;
}

.history-readonly {
    background: #f8f9fa;
    color: #111;
}

.history-table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 18px;
}

.history-table {
    min-width: 760px;
}

.history-table th,
.history-table td {
    text-align: center;
    vertical-align: middle;
}

.history-table th:first-child {
    min-width: 96px;
}

.history-cell {
    min-width: 132px;
    font-size: 1.35rem;
    font-weight: 700;
}

.history-empty {
    color: #6c757d;
}

.history-ok {
    background: rgba(25, 135, 84, 0.14);
    color: #146c43;
}

.history-bad {
    background: rgba(220, 53, 69, 0.14);
    color: #b02a37;
}

.history-preferred {
    background: rgba(255, 193, 7, 0.22);
    color: #9a6700;
}

.preference-cell {
    width: 100%;
    min-width: 108px;
    border: 1px solid transparent;
    border-radius: 14px;
    padding: 0.85rem 0.5rem;
    font-size: 1.4rem;
    line-height: 1;
    background: #fff;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.preference-cell:hover,
.preference-cell:focus {
    transform: translateY(-1px);
    outline: none;
}

.preference-cell.state-can {
    background: rgba(25, 135, 84, 0.14);
    border-color: rgba(25, 135, 84, 0.18);
}

.preference-cell.state-cannot {
    background: rgba(220, 53, 69, 0.14);
    border-color: rgba(220, 53, 69, 0.18);
}

.preference-cell.state-preferred {
    background: rgba(255, 193, 7, 0.22);
    border-color: rgba(255, 193, 7, 0.28);
}

.status-ok td {
    background: rgba(25, 135, 84, 0.08);
}

.status-warn td {
    background: rgba(255, 193, 7, 0.18);
}

.status-bad td {
    background: rgba(220, 53, 69, 0.12);
}

.admin-tabs .nav-link {
    color: #111;
    border-radius: 999px;
}

.admin-tabs .nav-link.active {
    background: #111;
    color: #fff;
}

.progress {
    height: 1.2rem;
    background: #e9ecef;
}

@media (max-width: 767px) {
    .brand-title {
        font-size: 0.9rem;
    }

    .brand-logo {
        width: 128px;
        height: 34px;
    }

    .panel {
        border-radius: 16px;
    }

    .preference-legend {
        padding: 0.9rem;
    }

    .legend-item {
        width: 100%;
        justify-content: center;
    }

    .preference-table {
        min-width: 560px;
    }

    .preference-cell {
        min-width: 96px;
        padding: 0.75rem 0.4rem;
    }
}
