/* Kurtezy Admin Panel + Login Modal (Ben 2026-05-08 v10.24).
   All selectors namespaced with .kz-admin-* to avoid collision with
   anything else. Hidden by default — only revealed when the user has
   a valid kurtezy_admin_token cookie (body[data-kurtezy-admin='1']). */

/* -------------------------------------------------------------------
   Floating "🛠 Admin" badge (bottom-right)
   ------------------------------------------------------------------- */
.kz-admin-badge {
    position: fixed;
    bottom: 16px;
    right: 16px;
    z-index: 9000;
    display: none;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #111;
    color: #fff;
    border: 1px solid #333;
    border-radius: 999px;
    cursor: pointer;
    font: 600 12px/1 system-ui, -apple-system, sans-serif;
    letter-spacing: 0.02em;
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.32);
    transition: transform 0.12s ease, background 0.12s ease;
}
.kz-admin-badge:hover {
    background: #222;
    transform: translateY(-1px);
}
.kz-admin-badge[hidden] { display: none !important; }
body[data-kurtezy-admin='1'] .kz-admin-badge:not([hidden]) { display: inline-flex; }

/* -------------------------------------------------------------------
   Login Modal
   ------------------------------------------------------------------- */
.kz-admin-modal {
    position: fixed;
    inset: 0;
    z-index: 9100;
    display: flex;
    align-items: center;
    justify-content: center;
}
.kz-admin-modal[hidden] { display: none; }

.kz-admin-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 8, 12, 0.6);
    backdrop-filter: blur(4px);
}

.kz-admin-modal-card {
    position: relative;
    z-index: 1;
    width: min(420px, calc(100vw - 32px));
    background: #fff;
    color: #111;
    border-radius: 14px;
    padding: 28px 24px 24px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.32);
    font: 400 14px/1.45 system-ui, -apple-system, sans-serif;
}

.kz-admin-modal-card h3 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
}

.kz-admin-modal-sub {
    margin: 0 0 18px;
    color: #666;
    font-size: 12px;
}

.kz-admin-modal-sub code {
    background: #f3f3f3;
    padding: 1px 5px;
    border-radius: 3px;
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 11px;
}

.kz-admin-modal-x {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    color: #888;
    padding: 4px 8px;
}
.kz-admin-modal-x:hover { color: #111; }

/* -------------------------------------------------------------------
   Login modal buttons + form
   ------------------------------------------------------------------- */
.kz-admin-btn {
    display: block;
    width: 100%;
    padding: 11px 16px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font: 600 14px/1 system-ui, -apple-system, sans-serif;
    letter-spacing: 0.01em;
    transition: background 0.12s ease;
}
.kz-admin-btn:hover { background: #222; }
.kz-admin-btn:disabled { opacity: 0.5; cursor: wait; }

.kz-admin-btn-google {
    background: #fff;
    color: #1a1a1a;
    border: 1px solid #dadce0;
    margin-bottom: 12px;
}
.kz-admin-btn-google:hover {
    background: #f8f9fa;
    border-color: #c0c4cc;
}
.kz-admin-btn-google::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 10px;
    vertical-align: text-bottom;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%234285F4' d='M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z'/%3E%3Cpath fill='%2334A853' d='M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z'/%3E%3Cpath fill='%23FBBC05' d='M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z'/%3E%3Cpath fill='%23EA4335' d='M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
}

.kz-admin-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    color: #999;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.kz-admin-divider::before,
.kz-admin-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

.kz-admin-magic-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.kz-admin-magic-form input[type='email'] {
    padding: 11px 14px;
    border: 1px solid #dadce0;
    border-radius: 8px;
    font: 400 14px/1 system-ui, -apple-system, sans-serif;
    color: #111;
    background: #fff;
}
.kz-admin-magic-form input[type='email']:focus {
    outline: none;
    border-color: #111;
    box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08);
}

.kz-admin-magic-msg {
    margin: 12px 0 0;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.4;
    background: #f3f3f3;
    color: #333;
}
.kz-admin-magic-msg-success {
    background: #e8f5e9;
    color: #1b5e20;
}
.kz-admin-magic-msg-error {
    background: #ffebee;
    color: #b71c1c;
}

/* -------------------------------------------------------------------
   Admin panel (Phase 2 — slide-from-right) — placeholder structure
   ------------------------------------------------------------------- */
.kz-admin-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(440px, 90vw);
    background: #0e0e10;
    color: #f0f0f0;
    border-left: 1px solid #2a2a30;
    z-index: 8800;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.22s ease;
    box-shadow: -16px 0 48px rgba(0, 0, 0, 0.48);
}
.kz-admin-panel.is-open { transform: translateX(0); }

.kz-admin-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #2a2a30;
    font: 600 13px/1.2 system-ui, sans-serif;
}
.kz-admin-panel-head .kz-admin-panel-x {
    background: transparent;
    border: none;
    color: #f0f0f0;
    font-size: 22px;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}

.kz-admin-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kz-admin-section {
    border: 1px solid #2a2a30;
    border-radius: 8px;
    overflow: hidden;
}
.kz-admin-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #1a1a1f;
    cursor: pointer;
    user-select: none;
    font: 600 12px/1.2 system-ui, sans-serif;
    letter-spacing: 0.02em;
}
.kz-admin-section-head::after {
    content: '▾';
    font-size: 10px;
    transition: transform 0.16s ease;
}
.kz-admin-section[data-collapsed='true'] .kz-admin-section-head::after { transform: rotate(-90deg); }
.kz-admin-section[data-collapsed='true'] .kz-admin-section-body { display: none; }

.kz-admin-section-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #131318;
}

.kz-admin-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font: 500 11px/1.3 system-ui, sans-serif;
}
.kz-admin-field label {
    color: #b0b0b8;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 10px;
}
.kz-admin-field input[type='text'],
.kz-admin-field input[type='number'],
.kz-admin-field input[type='color'],
.kz-admin-field select {
    padding: 7px 9px;
    background: #1f1f25;
    color: #f0f0f0;
    border: 1px solid #333;
    border-radius: 5px;
    font: 500 12px/1.2 system-ui, sans-serif;
}
.kz-admin-field input[type='color'] { padding: 2px; height: 32px; }
.kz-admin-field-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.kz-admin-radios {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.kz-admin-radios label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    background: #1f1f25;
    border: 1px solid #333;
    border-radius: 4px;
    cursor: pointer;
    text-transform: none;
    font-size: 11px;
}
.kz-admin-radios input[type='radio'] { margin: 0; accent-color: #fff; }
.kz-admin-radios label:has(input:checked) {
    background: #fff;
    color: #111;
    border-color: #fff;
}

.kz-admin-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.kz-admin-panel-foot {
    padding: 12px 18px;
    border-top: 1px solid #2a2a30;
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
}
.kz-admin-panel-foot .kz-admin-save {
    flex: 1;
    padding: 10px;
    background: #fff;
    color: #111;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font: 700 13px/1 system-ui, sans-serif;
}
.kz-admin-panel-foot .kz-admin-save:disabled {
    opacity: 0.5;
    cursor: wait;
}
.kz-admin-panel-foot .kz-admin-logout {
    background: transparent;
    border: 1px solid #444;
    color: #c0c0c8;
    padding: 9px 14px;
    border-radius: 6px;
    font: 500 11px/1 system-ui, sans-serif;
    cursor: pointer;
}
.kz-admin-panel-foot .kz-admin-logout:hover { background: #1a1a1f; }

.kz-admin-deeplink {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #6db8ff;
    text-decoration: none;
    font-weight: 600;
}
.kz-admin-deeplink:hover { text-decoration: underline; }

/* Toast notif */
.kz-admin-toast {
    position: fixed;
    bottom: 80px;
    right: 16px;
    z-index: 9200;
    padding: 10px 16px;
    background: #1a1a1f;
    color: #fff;
    border: 1px solid #333;
    border-radius: 6px;
    font: 500 12px/1.3 system-ui, sans-serif;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.32);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.16s ease, transform 0.16s ease;
    pointer-events: none;
}
.kz-admin-toast.is-show { opacity: 1; transform: translateY(0); }
.kz-admin-toast-success { border-color: #2e7d32; }
.kz-admin-toast-error   { border-color: #c62828; }
