:root {
    --bg: #0a0a0a;
    --panel: #141414;
    --border: #2a2a2a;
    --text: #f1efe9;
    --muted: #99968e;
    --danger: #ff766f;
    --success: #95d59b;
}

* { box-sizing: border-box; }

html {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
}

a { color: inherit; }

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: clamp(20px, 4vw, 42px);
}

.auth-panel {
    width: min(460px, 100%);
}

.auth-panel h1,
.panel h1,
.panel h2 {
    margin: 12px 0 18px;
    font-weight: 500;
}

.back {
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
}

label {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: .02em;
}

input,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 13px 14px;
    background: #0e0e0e;
    color: var(--text);
    font: inherit;
    outline: none;
}

input:focus,
textarea:focus {
    border-color: #5a5a5a;
}

button {
    border: 0;
    border-radius: 999px;
    min-height: 44px;
    padding: 0 18px;
    background: var(--text);
    color: #0a0a0a;
    cursor: pointer;
    font-weight: 700;
}

.admin-header {
    min-height: 64px;
    padding: 0 clamp(16px, 3vw, 36px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(10,10,10,.92);
    backdrop-filter: blur(12px);
}

.admin-header a {
    text-decoration: none;
    font-size: 12px;
    letter-spacing: .08em;
}

.admin-header-right {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--muted);
    font-size: 12px;
}

.admin-main {
    width: min(1180px, calc(100% - 28px));
    margin: 28px auto 80px;
    display: grid;
    gap: 24px;
}

.eyebrow {
    margin: 0;
    font-size: 10px;
    letter-spacing: .18em;
    color: var(--muted);
}

.intro {
    color: var(--muted);
    max-width: 62ch;
    line-height: 1.5;
    font-size: 14px;
}

.alert {
    margin: 18px 0;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
}

.alert.error {
    color: var(--danger);
    background: rgba(255,118,111,.08);
}

.alert.success {
    color: var(--success);
    background: rgba(149,213,155,.08);
}

.file-drop {
    border: 1px dashed #434343;
    border-radius: 16px;
    padding: 28px;
    cursor: pointer;
    background: #0f0f0f;
}

.file-drop input {
    padding: 0;
    border: 0;
    background: transparent;
}

.file-drop-title {
    color: var(--text);
    font-size: 16px;
}

.file-drop-sub {
    font-size: 12px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 18px;
}

.panel-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
}

.admin-photos {
    display: grid;
    gap: 12px;
}

.admin-photo {
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 14px;
    display: grid;
    grid-template-columns: 260px 1fr auto;
    gap: 18px;
    align-items: center;
    background: #0d0d0d;
}

.admin-photo img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.admin-photo-info {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.admin-photo-info strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-photo-info span {
    color: var(--muted);
    font-size: 12px;
}

button.danger {
    background: transparent;
    color: var(--danger);
    border: 1px solid rgba(255,118,111,.3);
}

@media (max-width: 760px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .admin-photo {
        grid-template-columns: 1fr;
    }

    .admin-photo form {
        justify-self: start;
    }
}


.auth-note {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.auth-note a {
    color: var(--text);
}

.auth-panel .eyebrow {
    margin-top: 24px;
}

.field-help {
    color: #6f6c66;
    font-size: 11px;
    line-height: 1.4;
}

.form-span-2 {
    grid-column: 1 / -1;
}

button.secondary,
.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 15px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: transparent;
    color: var(--text);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

button.secondary:hover,
.button-link:hover {
    border-color: #555;
}

.update-panel {
    border-color: #625b36;
}

.admin-photo {
    border-left: 2px solid var(--photo-accent, var(--border));
}

.admin-photo-context {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.color-swatch {
    width: 11px;
    height: 11px;
    flex: 0 0 11px;
    border-radius: 50%;
    background: var(--photo-accent, #555);
    box-shadow: 0 0 0 1px rgba(255,255,255,.12);
}

.admin-photo-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.admin-photo-actions form {
    margin: 0;
}

.edit-main {
    width: min(900px, calc(100% - 28px));
}

.edit-preview {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 0 24px;
    border-radius: 12px;
}

.checkbox-label {
    display: flex;
    grid-template-columns: none;
    align-items: center;
    gap: 10px;
    margin: 6px 0 22px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    padding: 0;
    flex: 0 0 auto;
}

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

@media (max-width: 760px) {
    .form-span-2 {
        grid-column: auto;
    }

    .panel-heading {
        align-items: flex-start;
        gap: 14px;
        flex-direction: column;
    }

    .admin-photo-actions {
        justify-content: flex-start;
    }
}
