/* Admin portal chrome — lifted verbatim from the pre-redesign stylesheet so
   the CMS keeps its own look while the site around it went black. */

/* ─────────── Admin portal ─────────── */

.admin-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.admin-modal[hidden] { display: none; }

.admin-modal__card {
    background: #fff;
    color: #111;
    border-radius: 12px;
    padding: 24px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.admin-modal__card h3 {
    margin: 0 0 8px;
    font-size: 1.2rem;
}

.admin-modal__card input[type="password"],
.admin-modal__card input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    margin: 6px 0;
    box-sizing: border-box;
    font-family: inherit;
}

.admin-modal__row {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

.admin-modal__card button,
.admin-bar button,
.admin-panel button {
    padding: 8px 14px;
    border: 1px solid #d0d0d0;
    background: #f5f5f5;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
}

.admin-modal__card button:hover,
.admin-bar button:hover,
.admin-panel button:hover {
    background: #e8e8e8;
}

.admin-primary {
    background: #1f6feb !important;
    color: #fff !important;
    border-color: #1f6feb !important;
}

.admin-primary:hover { background: #1858c4 !important; }

.admin-muted { color: #666; font-size: 0.88rem; margin: 4px 0; }
.admin-err { color: #c1121f; font-size: 0.88rem; margin-top: 8px; }

.admin-bar {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 900;
    background: rgba(20, 20, 20, 0.92);
    color: #fff;
    border-radius: 12px;
    padding: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    backdrop-filter: blur(8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: calc(100vw - 24px);
}

.admin-bar[hidden] { display: none; }

.admin-bar__title {
    padding: 0 10px;
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0.7;
}

.admin-bar button {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.18);
}

.admin-bar button:hover {
    background: rgba(255, 255, 255, 0.16);
}

.admin-panel {
    position: fixed;
    top: 70px;
    right: 12px;
    width: min(420px, calc(100vw - 24px));
    max-height: 75vh;
    background: #fff;
    color: #111;
    border-radius: 12px;
    z-index: 850;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.admin-panel[hidden] { display: none; }

.admin-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    font-weight: 700;
}

.admin-panel__head button {
    background: transparent;
    border: 0;
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}

.admin-panel__body {
    padding: 14px 16px;
    overflow: auto;
}

.admin-panel__body label {
    display: block;
    font-size: 0.85rem;
    color: #444;
    margin: 8px 0;
}

.admin-panel__body label input[type="text"],
.admin-panel__body label input[type="file"] {
    display: block;
    margin-top: 4px;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
    box-sizing: border-box;
}

.admin-panel__body textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.92rem;
    resize: vertical;
    box-sizing: border-box;
}

.admin-printlist {
    margin: 0 0 12px;
    padding-left: 18px;
}

.admin-printlist li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin: 4px 0;
}

.admin-printlist button {
    font-size: 0.78rem;
    padding: 4px 8px;
}

.admin-edit [data-edit-key] {
    outline: 2px dashed rgba(31, 111, 235, 0.45);
    outline-offset: 4px;
    border-radius: 3px;
    cursor: text;
    transition: outline-color 0.2s ease;
}

.admin-edit [data-edit-key]:focus {
    outline: 2px solid #1f6feb;
}

.admin-flash {
    background: rgba(46, 194, 126, 0.18);
    transition: background 0.5s ease;
}
