/* ── Admin Site Styles ─────────────────────────────────────────────────────── */

/* Force Inter on every element inside the admin shell — prevents the public
   site's Cormorant Garamond serif from bleeding into admin headings/inputs. */
.admin-shell,
.admin-shell *,
.login-shell,
.login-shell * {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    letter-spacing: normal;
}

:root {
    --admin-sidebar-width: 240px;
    --admin-sidebar-bg: #1e293b;
    --admin-sidebar-text: #cbd5e1;
    --admin-sidebar-active: #3b82f6;
    --admin-sidebar-hover: #334155;
    --admin-bg: #f1f5f9;
    --admin-card: #ffffff;
    --admin-border: #e2e8f0;
    --admin-text: #1e293b;
    --admin-text-muted: #64748b;
    --admin-primary: #3b82f6;
    --admin-danger: #ef4444;
    --admin-success: #22c55e;
    --admin-warning: #f59e0b;
}

/* ── Layout ──────────────────────────────────────────────────────────────────── */

.admin-shell {
    display: flex;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--admin-bg);
}

/* ── Sidebar ─────────────────────────────────────────────────────────────────── */

.admin-sidebar {
    width: var(--admin-sidebar-width);
    background: var(--admin-sidebar-bg);
    color: var(--admin-sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    overflow-y: auto;
}

.admin-logo {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #334155;
}

.admin-logo-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
}

.admin-logo-sub {
    font-size: 0.7rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-nav {
    flex: 1;
    padding: 1rem 0;
}

.admin-nav-section {
    padding: 0.25rem 1rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #475569;
    margin-top: 0.75rem;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 1.5rem;
    color: var(--admin-sidebar-text);
    text-decoration: none;
    font-size: 0.875rem;
    transition: background 0.15s, color 0.15s;
    border-left: 3px solid transparent;
}

.admin-nav a:hover {
    background: var(--admin-sidebar-hover);
    color: #ffffff;
}

.admin-nav a.active {
    background: var(--admin-sidebar-hover);
    color: #ffffff;
    border-left-color: var(--admin-sidebar-active);
}

.admin-nav-icon {
    width: 1rem;
    text-align: center;
    font-style: normal;
    flex-shrink: 0;
}

.admin-user-panel {
    padding: 1rem 1.5rem;
    border-top: 1px solid #334155;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-user-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--admin-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

.admin-user-name {
    font-size: 0.8rem;
    color: #ffffff;
    font-weight: 500;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-logout-btn {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 0.25rem;
    font-size: 0.85rem;
    transition: color 0.15s;
}

.admin-logout-btn:hover { color: var(--admin-danger); }

/* ── Main Content ─────────────────────────────────────────────────────────────── */

.admin-main {
    margin-left: var(--admin-sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.admin-topbar {
    background: white;
    border-bottom: 1px solid var(--admin-border);
    padding: 0.875rem 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.admin-content {
    padding: 1.75rem;
    flex: 1;
}

/* ── Page Header ─────────────────────────────────────────────────────────────── */

.admin-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

.admin-page-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--admin-text);
    margin: 0 0 0.25rem;
    line-height: 1.2;
}

.admin-page-subtitle {
    font-size: 0.875rem;
    color: var(--admin-text-muted);
    margin: 0;
    line-height: 1.5;
}

/* ── Form Controls ───────────────────────────────────────────────────────────── */

.admin-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    margin-bottom: 1rem;
}

.admin-form-group:last-child { margin-bottom: 0; }

.admin-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--admin-text);
    line-height: 1;
}

.admin-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--admin-border);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: var(--admin-text);
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    line-height: 1.5;
}

.admin-input:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}

.admin-input::placeholder { color: #94a3b8; }

textarea.admin-input { resize: vertical; min-height: 80px; }

.admin-hint {
    font-size: 0.75rem;
    color: var(--admin-text-muted);
    line-height: 1.4;
}

/* ── Button Variants ─────────────────────────────────────────────────────────── */

.btn-admin-primary  { background: var(--admin-primary); color: #fff; border: 1px solid transparent; }
.btn-admin-primary:hover  { background: #2563eb; }
.btn-admin-secondary { background: #f1f5f9; color: var(--admin-text); border: 1px solid var(--admin-border); }
.btn-admin-secondary:hover { background: #e2e8f0; }
.btn-admin-danger   { background: #fee2e2; color: var(--admin-danger); border: 1px solid transparent; }
.btn-admin-danger:hover   { background: var(--admin-danger); color: #fff; }
.btn-admin-ghost    { background: transparent; color: var(--admin-text-muted); border: 1px solid var(--admin-border); }
.btn-admin-ghost:hover    { background: #f1f5f9; color: var(--admin-text); }

/* ── Cards ───────────────────────────────────────────────────────────────────── */

.admin-card {
    background: var(--admin-card);
    border: 1px solid var(--admin-border);
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.admin-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.admin-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--admin-text);
    margin: 0;
}

/* ── Stat Cards ──────────────────────────────────────────────────────────────── */

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-stat-card {
    background: white;
    border: 1px solid var(--admin-border);
    border-radius: 0.5rem;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-stat-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--admin-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--admin-text);
    line-height: 1;
}

.admin-stat-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

/* ── Tables ──────────────────────────────────────────────────────────────────── */

.admin-table-wrap {
    background: white;
    border: 1px solid var(--admin-border);
    border-radius: 0.5rem;
    overflow: hidden;
}

.admin-table-toolbar {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--admin-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.admin-table-search {
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--admin-border);
    border-radius: 0.375rem;
    font-size: 0.85rem;
    outline: none;
    width: 220px;
    transition: border-color 0.15s;
}

.admin-table-search:focus { border-color: var(--admin-primary); }

table.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.admin-table thead th {
    background: #f8fafc;
    padding: 0.65rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--admin-text-muted);
    border-bottom: 1px solid var(--admin-border);
    white-space: nowrap;
}

.admin-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.1s;
}

.admin-table tbody tr:hover { background: #f8fafc; }
.admin-table tbody tr:last-child { border-bottom: none; }

.admin-table tbody td {
    padding: 0.75rem 1rem;
    color: var(--admin-text);
    vertical-align: middle;
}

.admin-table-actions {
    display: flex;
    gap: 0.4rem;
    justify-content: flex-end;
}

/* ── Buttons ─────────────────────────────────────────────────────────────────── */

.btn-admin {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary { background: var(--admin-primary); color: white; }
.btn-primary:hover { background: #2563eb; }

.btn-secondary { background: #f1f5f9; color: var(--admin-text); border: 1px solid var(--admin-border); }
.btn-secondary:hover { background: #e2e8f0; }

.btn-danger { background: #fee2e2; color: var(--admin-danger); }
.btn-danger:hover { background: var(--admin-danger); color: white; }

.btn-success { background: #dcfce7; color: #16a34a; }
.btn-success:hover { background: var(--admin-success); color: white; }

.btn-sm { padding: 0.3rem 0.65rem; font-size: 0.8rem; }

.btn-admin:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Badges / Status ─────────────────────────────────────────────────────────── */

.badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-green { background: #dcfce7; color: #16a34a; }
.badge-red { background: #fee2e2; color: #dc2626; }
.badge-blue { background: #dbeafe; color: #2563eb; }
.badge-yellow { background: #fef9c3; color: #a16207; }
.badge-gray { background: #f1f5f9; color: #64748b; }
.badge-purple { background: #f3e8ff; color: #7c3aed; }

/* ── Modal ───────────────────────────────────────────────────────────────────── */

.admin-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.admin-modal {
    background: white;
    border-radius: 0.75rem;
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.admin-modal-lg { max-width: 860px; }

.admin-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--admin-border);
}

.admin-modal-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--admin-text);
    margin: 0;
}

.admin-modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--admin-text-muted);
    line-height: 1;
    padding: 0.25rem;
}

.admin-modal-body { padding: 1.5rem; }

.admin-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--admin-border);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* ── Forms ───────────────────────────────────────────────────────────────────── */

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

.form-col-span-2 { grid-column: span 2; }
.form-col-span-3 { grid-column: span 3; }

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--admin-text);
    display: block;
}

.form-control {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--admin-border);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.15s;
    width: 100%;
    box-sizing: border-box;
    background: white;
    color: var(--admin-text);
}

.form-control:focus { border-color: var(--admin-primary); box-shadow: 0 0 0 2px rgba(59,130,246,0.15); }

textarea.form-control { resize: vertical; min-height: 80px; }

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
}

/* ── Alert / toast ───────────────────────────────────────────────────────────── */

.admin-alert {
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.admin-alert-error { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.admin-alert-success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.admin-alert-info { background: #dbeafe; color: #1d4ed8; border: 1px solid #bfdbfe; }

/* ── Empty state ─────────────────────────────────────────────────────────────── */

.admin-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--admin-text-muted);
}

.admin-empty-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.admin-empty-title { font-size: 1rem; font-weight: 600; color: var(--admin-text); margin: 0 0 0.25rem; }
.admin-empty-sub { font-size: 0.85rem; }

/* ── Loading ─────────────────────────────────────────────────────────────────── */

.admin-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    font-size: 0.9rem;
    color: var(--admin-text-muted);
    gap: 0.5rem;
}

/* ── Login page ──────────────────────────────────────────────────────────────── */

.login-shell {
    min-height: 100vh;
    background: var(--admin-sidebar-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-card {
    background: white;
    border-radius: 0.75rem;
    padding: 2.5rem;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-logo {
    text-align: center;
    margin-bottom: 1.75rem;
}

.login-logo-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--admin-text);
    margin: 0.5rem 0 0.25rem;
}

.login-logo-sub {
    font-size: 0.8rem;
    color: var(--admin-text-muted);
}

/* ── Chat page ───────────────────────────────────────────────────────────────── */

.chat-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    border: 1px solid var(--admin-border);
    border-radius: 0.5rem;
    background: white;
    overflow: hidden;
    height: calc(100vh - 140px);
}

.chat-sessions-panel {
    border-right: 1px solid var(--admin-border);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.chat-sessions-header {
    padding: 0.875rem 1rem;
    font-weight: 600;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--admin-border);
    background: #f8fafc;
}

.chat-session-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.1s;
}

.chat-session-item:hover { background: #f8fafc; }
.chat-session-item.selected { background: #eff6ff; border-left: 3px solid var(--admin-primary); }

.chat-session-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--admin-text);
}

.chat-session-meta {
    font-size: 0.75rem;
    color: var(--admin-text-muted);
    margin-top: 0.15rem;
}

.chat-messages-panel {
    display: flex;
    flex-direction: column;
}

.chat-messages-header {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--admin-border);
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-messages-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chat-message {
    display: flex;
    flex-direction: column;
    max-width: 70%;
}

.chat-message.from-agent { align-self: flex-end; align-items: flex-end; }
.chat-message.from-visitor { align-self: flex-start; }

.chat-bubble {
    padding: 0.5rem 0.875rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    line-height: 1.4;
}

.from-agent .chat-bubble { background: var(--admin-primary); color: white; border-radius: 1rem 1rem 0.25rem 1rem; }
.from-visitor .chat-bubble { background: #f1f5f9; color: var(--admin-text); border-radius: 1rem 1rem 1rem 0.25rem; }

.chat-message-time {
    font-size: 0.7rem;
    color: var(--admin-text-muted);
    margin-top: 0.2rem;
}

.chat-compose {
    padding: 0.875rem 1rem;
    border-top: 1px solid var(--admin-border);
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.chat-compose textarea {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--admin-border);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    resize: none;
    outline: none;
    max-height: 100px;
    min-height: 38px;
}

.chat-compose textarea:focus { border-color: var(--admin-primary); }

/* ── Responsive ──────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .admin-sidebar { transform: translateX(-100%); }
    .admin-main { margin-left: 0; }
    .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
    .form-col-span-2, .form-col-span-3 { grid-column: span 1; }
    .chat-layout { grid-template-columns: 1fr; }
}

/* ── XL Modal ────────────────────────────────────────────────────────────────── */
.admin-modal-xl { max-width: 1000px; }

/* ── AI Blog Generator ───────────────────────────────────────────────────────── */

.ai-blog-section {
    border: 1px solid #c7d2fe;
    border-radius: 0.625rem;
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.ai-blog-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 0.7rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ai-blog-badge {
    margin-left: auto;
    background: rgba(255,255,255,0.2);
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 500;
}

.ai-blog-body {
    padding: 1rem;
    background: #fafafa;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.ai-subject-row {
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

.ai-subject-row .form-control { flex: 1; }

.btn-ai {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-ai:hover { filter: brightness(1.1); }
.btn-ai:disabled { opacity: 0.5; cursor: not-allowed; filter: none; }

.ai-status-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.875rem;
    background: #ede9fe;
    border: 1px dashed #a78bfa;
    border-radius: 0.375rem;
    font-size: 0.8rem;
    color: #5b21b6;
}

.ai-dots {
    display: flex;
    gap: 4px;
}

.ai-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #7c3aed;
    animation: ai-bounce 1.4s infinite ease-in-out;
}

.ai-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes ai-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

.ai-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

.ai-prompt-box {
    background: white;
    border: 1px solid #e0e7ff;
    border-radius: 0.5rem;
    padding: 0.875rem;
}

.ai-prompt-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #4f46e5;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.ai-prompt-row {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.ai-prompt-row .form-control { flex: 1; }

.ai-prompt-text {
    font-size: 0.78rem;
    color: #475569;
    line-height: 1.5;
    resize: vertical;
}

.btn-icon { padding: 0.5rem 0.65rem; flex-shrink: 0; }

/* ── Blog Image Upload ────────────────────────────────────────────────────────── */

.ai-image-section {
    border: 1px solid var(--admin-border);
    border-radius: 0.625rem;
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.ai-image-header {
    background: #f8fafc;
    padding: 0.65rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--admin-text);
    border-bottom: 1px solid var(--admin-border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ai-image-hint {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--admin-text-muted);
}

.ai-image-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ai-upload-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.ai-file-input { flex: 1; min-width: 200px; }

.form-error-msg {
    color: #dc2626;
    font-size: 0.8rem;
}

.image-preview-wrap {
    position: relative;
    border: 1px solid var(--admin-border);
    border-radius: 0.5rem;
    overflow: hidden;
}

.image-preview-img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.image-preview-badge {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: rgba(0,0,0,0.65);
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* ── Listing Photo Drop Zone ──────────────────────────────────────────────────── */

.listing-dropzone {
    position: relative;
    border: 2px dashed var(--admin-border);
    border-radius: 0.625rem;
    padding: 2.5rem 1.5rem;
    text-align: center;
    background: #f8fafc;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    overflow: hidden;
}

.listing-dropzone:hover,
.listing-dropzone.dz-drag-over {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.04);
}

.listing-dropzone.dz-drag-over {
    border-style: solid;
}

.listing-dropzone-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.listing-dropzone-content {
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    color: var(--admin-text);
}

.listing-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.listing-photo-thumb {
    position: relative;
    aspect-ratio: 1;
    border-radius: 0.375rem;
    overflow: hidden;
    border: 1px solid var(--admin-border);
    background: #f1f5f9;
}

.listing-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.listing-photo-uploading img {
    opacity: 0.45;
}

.listing-photo-spinner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.listing-photo-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 11px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 1;
    padding: 0;
}

.listing-photo-thumb:hover .listing-photo-remove {
    opacity: 1;
}
