:root {
    color-scheme: dark;
    font: 15px/1.55 "Inter", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
    --bg: #121115; --panel: #1b191f; --line: #343039; --text: #f5f0ed;
    --muted: #bbb0b7; --accent: #ff9258; --danger: #ff9e9a;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 15% 5%, #301e25, transparent 55%), var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; background: #242128; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: .65rem .95rem; }
button:hover { border-color: var(--accent); }
button:disabled { opacity: .55; cursor: wait; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.primary { color: #211208; background: var(--accent); border-color: var(--accent); font-weight: 700; }
.primary:hover { background: #ffac7d; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 70px; border-bottom: 1px solid var(--line); padding: 12px max(24px, calc((100vw - 1120px)/2)); background: #17151be8; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 750; white-space: nowrap; }
.brand i { display: inline-block; width: 18px; height: 18px; border: 3px solid var(--accent); transform: rotate(45deg); border-radius: 4px; }
.account { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
#username { color: var(--muted); overflow-wrap: anywhere; }
main { width: min(1120px, calc(100% - 48px)); margin: 0 auto; padding: 42px 0 56px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(26px, 4vw, 38px); line-height: 1.2; }
h2 { font-size: 22px; }
.login-layout { display: grid; place-items: center; min-height: 68vh; }
.login-panel, .panel, .table-panel, dialog { background: var(--panel); border: 1px solid var(--line); border-radius: 15px; }
.login-panel { width: min(100%, 420px); padding: clamp(22px, 5vw, 38px); box-shadow: 0 20px 80px #0004; }
.login-panel h1 { margin-bottom: 24px; }
label:not(.choice) { display: block; margin: 14px 0 6px; }
input:not([type=checkbox]) { width: 100%; min-width: 0; padding: 11px 13px; background: #131216; border: 1px solid var(--line); border-radius: 8px; color: var(--text); }
.password-field { display: flex; gap: 6px; }
.password-field button { flex: 0 0 auto; }
.wide { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 22px; }
.error { color: var(--danger); margin-top: 12px; }
.error:empty { display: none; }
.status { padding: 12px 16px; background: #27202a; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 20px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 23px; }
.table-panel { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
th, td { padding: 14px 18px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: 13px; }
tbody tr:last-child td { border-bottom: 0; }
.row-actions, .dialog-actions { display: flex; gap: 8px; }
.quiet-danger { color: var(--danger); }
.danger { background: #7f302e; border-color: #a64543; }
.empty { padding: 24px; color: var(--muted); }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 20px; }
.project-card { display: block; position: relative; isolation: isolate; overflow: hidden; width: 100%; aspect-ratio: 4/5; max-height: 435px; border: 1px solid var(--line); border-radius: 15px; background: #48262e; }
.project-card:hover { border-color: var(--accent); }
.cover { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 26%; z-index: -2; }
.project-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, #121015 2%, #12101591 26%, transparent 59%); }
.card-copy { position: absolute; inset: auto 0 0; padding: 22px; }
.card-copy p { margin-top: 5px; color: #ffbe95; }
dialog { width: min(440px, calc(100vw - 32px)); max-height: 90vh; padding: 22px; color: var(--text); }
dialog::backdrop { background: #08070bb8; }
.dialog-title, .dialog-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.dialog-actions { justify-content: flex-end; margin-top: 16px; }
.dialog-title .close { padding: 3px 10px; font-size: 21px; }
fieldset { min-width: 0; margin: 16px 0 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.choice { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
input[type=checkbox] { accent-color: var(--accent); width: 18px; height: 18px; }
#delete-message { margin-top: 12px; overflow-wrap: anywhere; }
@media (max-width: 600px) {
    main { width: calc(100% - 28px); padding-top: 24px; }
    .top { padding: 12px 14px; }
    .account button { padding: .45rem .55rem; }
    th, td { padding: 10px 12px; }
    .login-layout { min-height: 61vh; }
}

.captcha-field { display: flex; gap: 6px; align-items: stretch; }
.captcha-field button { flex: 0 0 auto; padding: 0; overflow: hidden; }
.captcha-field img { display: block; max-width: 100%; }
.captcha-field input { text-transform: uppercase; }
