:root {
    color-scheme: dark;
    font-family: Arial, Helvetica, sans-serif;
    background: #090b10;
    color: #eef3f8;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: #090b10;
}

.shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 0 26px;
}

h1, h2, p {
    margin: 0;
}

h1 {
    font-size: 30px;
}

h2 {
    margin-bottom: 18px;
    font-size: 20px;
}

p {
    color: #aeb9c7;
    margin-top: 8px;
}

a {
    color: #55c7ff;
    text-decoration: none;
}

nav {
    display: flex;
    gap: 10px;
}

nav a, button, .secondary {
    border: 0;
    border-radius: 6px;
    background: #0ea5e9;
    color: #041016;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    font-weight: 700;
}

.secondary {
    background: #273244;
    color: #e9eef5;
}

.panel {
    background: #121821;
    border: 1px solid #253143;
    border-radius: 8px;
    padding: 22px;
}

.narrow {
    max-width: 460px;
}

.grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 18px;
    align-items: start;
}

.form-panel {
    display: grid;
    gap: 12px;
}

label {
    display: grid;
    gap: 7px;
    color: #cad4df;
    font-size: 14px;
}

input, select {
    width: 100%;
    min-height: 42px;
    border: 1px solid #344257;
    border-radius: 6px;
    background: #090d14;
    color: #f5f8fb;
    padding: 0 12px;
}

select {
    appearance: none;
}

textarea {
    width: 100%;
    border: 1px solid #344257;
    border-radius: 6px;
    background: #090d14;
    color: #f5f8fb;
    padding: 12px;
    resize: vertical;
}

.import-panel {
    margin-top: 16px;
}

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

.check input {
    width: 18px;
    min-height: 18px;
}

.login {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.notice, .error {
    border-radius: 6px;
    padding: 12px 14px;
    margin: 0 0 16px;
}

.notice {
    background: #0f3b2c;
    color: #bdf8d8;
}

.error {
    background: #471717;
    color: #ffd0d0;
}

.muted {
    color: #9aa7b7;
}

code {
    color: #f5d26a;
}

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

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    border-bottom: 1px solid #263244;
    padding: 13px 10px;
    text-align: left;
}

th {
    color: #93a4b8;
    font-size: 13px;
}

.actions {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
}

.actions form {
    margin: 0;
}

.actions button {
    background: #3b1820;
    color: #ffc7d0;
    min-height: 32px;
}

.danger {
    background: #b91c1c;
    color: #fff;
}

.list-head, .preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.list-head h2, .list-head form {
    margin: 0;
}

.preview-panel {
    margin-bottom: 18px;
}

.preview-panel video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 6px;
    display: block;
}

.admin-grid, .config-panel {
    margin-top: 18px;
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

@media (max-width: 820px) {
    .topbar, .grid {
        display: block;
    }

    nav {
        margin-top: 18px;
    }

    .panel {
        margin-bottom: 16px;
    }

    .config-grid {
        grid-template-columns: 1fr;
    }
}
