main.admin { max-width: 1200px; }

header nav { display: flex; gap: 12px; }
header nav a {
    color: var(--muted); text-decoration: none; padding: 4px 10px; border-radius: 6px;
}
header nav a.active, header nav a:hover { color: var(--fg); background: #2a2f5a; }

.tabs { display: flex; gap: 4px; margin-bottom: 12px; flex-wrap: wrap; }
.tab {
    background: var(--card); color: var(--muted); border: 0;
    padding: 8px 16px; border-radius: 8px 8px 0 0; cursor: pointer; font-weight: 600;
}
.tab.active { background: var(--accent); color: white; }

.tab-pane { display: none; background: var(--card); padding: 18px; border-radius: 0 12px 12px 12px; }
.tab-pane.active { display: block; }

.toolbar { margin-bottom: 12px; }
.toolbar input, .toolbar select { width: auto; min-width: 180px; }
button.primary { background: var(--good); }
button.danger  { background: var(--bad); }

.stats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px; margin-bottom: 18px;
}
.stat-card {
    background: #11142b; border-radius: 10px; padding: 14px;
    border-left: 5px solid var(--accent);
}
.stat-card .v { font-size: 1.8rem; font-weight: 700; }
.stat-card .l { color: var(--muted); font-size: .9rem; }

.table-wrap { overflow-x: auto; }
table.data { width: max-content; min-width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th, table.data td {
    border-bottom: 1px solid #2a2f5a; padding: 8px 10px; text-align: left; vertical-align: middle;
}
table.data th { color: var(--muted); font-weight: 600; background: #11142b; position: sticky; top: 0; }
table.data tr:hover td { background: #161a37; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.badge.yes { background: rgba(37,194,107,.2); color: var(--good); }
.badge.no  { background: rgba(154,160,197,.2); color: var(--muted); }
.badge.valid     { background: rgba(37,194,107,.2);  color: var(--good); }
.badge.duplicate { background: rgba(255,180,84,.2);  color: var(--warn); }
.badge.invalid   { background: rgba(255,93,108,.2);  color: var(--bad); }

.row.right { justify-content: flex-end; }
.actions button { padding: 4px 10px; font-size: .85rem; margin-right: 4px; }
.muted { color: var(--muted); font-size: .9rem; }

/* Column picker */
.col-picker-wrap { position: relative; display: inline-block; }
.col-picker {
    position: absolute; top: calc(100% + 4px); right: 0; z-index: 20;
    background: #1a1e3a; border: 1px solid #3a3f6e; border-radius: 8px;
    padding: 8px 4px; min-width: 160px; box-shadow: 0 4px 16px rgba(0,0,0,.5);
    display: flex; flex-direction: column; gap: 2px;
}
.col-picker.hidden { display: none; }
.col-check {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 12px; border-radius: 6px; cursor: pointer;
    font-size: .88rem; color: var(--fg); transition: background .1s;
}
.col-check:hover { background: #2a2f5a; }
.col-check input { width: auto; margin: 0; cursor: pointer; accent-color: var(--accent); }

.import-help {
    color: var(--muted); font-size: .9rem;
}
.import-help code { background: #0f1226; padding: 2px 6px; border-radius: 4px; }
.import-help summary { cursor: pointer; font-weight: 600; color: var(--fg); }

#modalForm textarea {
    width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid #3a3f6e;
    background: #11142b; color: var(--fg); font-family: ui-monospace, monospace; font-size: .85rem;
}
#modalForm input[type="file"] { color: var(--fg); }

.day-checks {
    display: flex; flex-wrap: wrap; gap: 8px;
    background: #11142b; border: 1px solid #3a3f6e; border-radius: 8px;
    padding: 8px; margin-top: 4px;
}
.day-check {
    display: flex; align-items: center; gap: 6px; margin: 0;
    padding: 6px 12px; border-radius: 999px; background: #2a2f5a; cursor: pointer;
    font-size: .9rem;
}
.day-check input { width: auto; margin: 0; }
.day-check small { color: var(--muted); margin-left: 4px; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal-card { background: var(--card); padding: 22px; border-radius: 12px; width: min(520px, 92vw); }
.modal-card h3 { margin-top: 0; }
#modalForm label { display: block; margin-bottom: 10px; }
