.avail-body {
    background: #0f1419;
    color: #e8edf4;
    min-height: 100vh;
}

.avail-shell {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 20px 48px;
}

.avail-topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.avail-back-link {
    color: #93c5fd;
    text-decoration: none;
    font-size: 0.9rem;
}

.avail-page-title {
    margin: 8px 0 4px;
    font-size: 1.75rem;
}

.avail-page-sub {
    margin: 0;
    color: #94a3b8;
    font-size: 0.95rem;
}

.avail-session {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avail-user-badge {
    background: #1e293b;
    border: 1px solid #334155;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
}

.avail-logout-btn,
.avail-btn-primary,
.avail-btn-secondary,
.avail-btn-danger {
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.avail-logout-btn,
.avail-btn-secondary {
    background: #1e293b;
    color: #e2e8f0;
    border: 1px solid #334155;
}

.avail-btn-primary {
    background: #4f46e5;
    color: #fff;
}

.avail-btn-danger {
    background: #7f1d1d;
    color: #fecaca;
    border: 1px solid #991b1b;
}

.avail-auth {
    background: #111827;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 24px;
    max-width: 420px;
}

.avail-auth form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.avail-auth input {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #334155;
    background: #0f172a;
    color: #f8fafc;
}

.avail-auth button[type="submit"] {
    background: #4f46e5;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px;
    font-weight: 600;
    cursor: pointer;
}

.hidden {
    display: none !important;
}

.avail-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.avail-poll-title {
    margin: 0 0 4px;
    font-size: 1.25rem;
}

.avail-poll-meta {
    margin: 0;
    color: #94a3b8;
    font-size: 0.9rem;
}

.avail-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.avail-card {
    background: #111827;
    border: 1px solid #1f2937;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.avail-card h3 {
    margin: 0 0 8px;
}

.avail-hint {
    margin: 0 0 16px;
    color: #94a3b8;
    font-size: 0.9rem;
}

.avail-best-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.avail-best-card {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 14px;
}

.avail-best-card.is-top {
    border-color: #22c55e;
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.25);
}

.avail-best-date {
    font-weight: 700;
    font-size: 1rem;
}

.avail-best-hour {
    color: #a5b4fc;
    font-size: 0.95rem;
}

.avail-best-count {
    margin-top: 8px;
    font-size: 0.85rem;
    color: #cbd5e1;
}

.avail-best-users {
    margin-top: 6px;
    font-size: 0.8rem;
    color: #94a3b8;
}

.avail-day-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.avail-day-tab {
    background: #1e293b;
    border: 1px solid #334155;
    color: #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.85rem;
}

.avail-day-tab.is-active {
    background: #4f46e5;
    border-color: #6366f1;
}

.avail-grid-wrap {
    overflow-x: auto;
}

.avail-grid {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

.avail-grid th,
.avail-grid td {
    border: 1px solid #1f2937;
    text-align: center;
    padding: 0;
}

.avail-grid-hour-col {
    width: 64px;
    padding: 8px !important;
    color: #94a3b8;
    font-size: 0.8rem;
    background: #0f172a;
    position: sticky;
    left: 0;
    z-index: 1;
}

.avail-grid th:not(.avail-grid-hour-col) {
    padding: 8px 6px;
    font-size: 0.75rem;
    background: #0f172a;
    color: #cbd5e1;
    min-width: 56px;
}

.avail-cell {
    width: 100%;
    min-height: 36px;
    border: none;
    background: #0b1220;
    cursor: pointer;
    position: relative;
}

.avail-cell:hover {
    background: #172033;
}

.avail-cell.is-selected {
    background: rgba(34, 197, 94, 0.35);
}

.avail-cell.has-others::after {
    content: '';
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #60a5fa;
}

.avail-legend {
    display: flex;
    gap: 16px;
    margin: 12px 0 0;
    font-size: 0.85rem;
    color: #94a3b8;
}

.avail-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.avail-swatch {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    display: inline-block;
}

.avail-swatch--mine {
    background: rgba(34, 197, 94, 0.5);
}

.avail-swatch--others {
    background: #60a5fa;
}

.avail-admin-wrap {
    overflow: auto;
    max-height: 480px;
}

.avail-admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.avail-admin-table th,
.avail-admin-table td {
    border: 1px solid #1f2937;
    padding: 6px 8px;
    text-align: center;
    white-space: nowrap;
}

.avail-admin-table th {
    background: #0f172a;
    position: sticky;
    top: 0;
    z-index: 1;
}

.avail-admin-table th.avail-admin-user-col,
.avail-admin-table td.avail-admin-user-col {
    text-align: left;
    position: sticky;
    left: 0;
    background: #111827;
    z-index: 2;
    min-width: 140px;
}

.avail-admin-table td.is-yes {
    background: rgba(34, 197, 94, 0.25);
    color: #86efac;
}

.avail-admin-table td.is-no {
    color: #475569;
}

.avail-admin-table tr.not-voted td.avail-admin-user-col {
    color: #fbbf24;
}

.avail-status {
    margin-top: 12px;
    min-height: 1.2em;
    font-size: 0.9rem;
}

.avail-status.is-error {
    color: #fca5a5;
}

.avail-status.is-success {
    color: #86efac;
}

@media (max-width: 768px) {
    .avail-toolbar-actions {
        width: 100%;
    }

    .avail-toolbar-actions button {
        flex: 1 1 auto;
    }
}
