/*
    Admin area base styles on top of the shared tokens (dayone.css): dense
    tables and plain form controls, hand-rolled, no component library.
*/

body {
    -webkit-user-select: auto;
    user-select: auto;
}

a {
    color: var(--info);
}

h1 {
    font-size: 1.6rem;
    margin-bottom: 8px;
}

input, select, textarea {
    font: inherit;
    color: var(--text);
    min-height: 40px;
    padding: 8px 12px;
    border: 2px solid var(--border-strong);
    border-radius: var(--radius-small);
    background: var(--surface);
}

input:focus, select:focus, textarea:focus {
    border-color: var(--info);
    outline: none;
}

.button {
    min-height: 42px;
    padding: 8px 18px;
    border: none;
    border-radius: var(--radius-small);
    background: var(--primary);
    color: var(--on-primary);
    box-shadow: 0 3px 0 var(--primary-edge);
    font-weight: 900;
    cursor: pointer;
}

.link-button {
    border: none;
    background: none;
    padding: 6px 8px;
    color: var(--info);
    font-weight: 800;
    cursor: pointer;
}

.table {
    width: 100%;
    max-width: 960px;
    margin-top: 16px;
    border-collapse: collapse;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-small);
    font-size: 0.92rem;
}

.table th, .table td {
    padding: 7px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.table th {
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.button.secondary {
    background: var(--surface);
    color: var(--primary-dark);
    border: 2px solid var(--border);
    box-shadow: 0 3px 0 var(--card-edge);
}

.button:disabled {
    background: var(--locked);
    color: var(--text-muted);
    box-shadow: 0 3px 0 var(--locked-edge);
    cursor: default;
}

.link-button.danger {
    color: var(--error);
}

/* Question editors (server/Components/Questions). */
.editor {
    display: grid;
    gap: 6px;
    max-width: 720px;
}

.editor label {
    margin-top: 8px;
    font-weight: 800;
    font-size: 0.9rem;
}

.editor textarea {
    resize: vertical;
}

.options {
    display: grid;
    gap: 8px;
    margin: 8px 0 0;
    padding: 0;
    border: none;
}

.options legend {
    margin-bottom: 6px;
    font-weight: 800;
    font-size: 0.9rem;
}

.option {
    display: flex;
    gap: 10px;
    align-items: center;
}

.option input[type=radio] {
    width: 20px;
    height: 20px;
    min-height: 0;
    accent-color: var(--primary);
}

.option .text {
    flex: 1;
}

input[type=checkbox] {
    min-height: 0;
    width: 18px;
    height: 18px;
    vertical-align: -3px;
    accent-color: var(--primary);
}

/* Narrow windows: wide tables scroll inside themselves, never the page. */
@media (max-width: 760px) {
    .table {
        display: block;
        overflow-x: auto;
    }
}
