/**
 * Admin Shared Styles
 * Used by all pages in /admin/
 */

:root {
    --primary-blue: #006684;
    --accent-turquoise: #0084A3;
    --brand-orange: #FF8533;
    --danger-red: #FF7A00;
    --text-dark: #1a202c;
    --text-muted: #718096;
    --border: #e2e8f0;
    --bg-light: #f7fafc;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
/*     background: var(--bg-light); */
    color: var(--text-dark);
    min-height: 100vh;
}

/* =====================
   LAYOUT
   ===================== */
.admin-container {
    max-width: 480px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
/*     box-shadow: 0 0 40px rgba(0,0,0,0.08); */
    position: relative;
}

/* =====================
   HEADER
   ===================== */
.main-header {
    background: linear-gradient(to bottom, #0D8CB9, #065D86);
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 260px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 18px 0 0 20px;
}

.header-logo-area {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.header-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.2px;
    padding-left: 2px;
}

.main-header .logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 0;
}

.logo-img {
    height: 28px;
    width: auto;
    display: block;
}

.login-logo-img {
    height: 40px;
    margin-bottom: 4px;
}

.main-header .header-actions {
    display: flex;
    align-items: flex-start;
    gap: 0;

}

.btn-header-icon {
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: white;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.15s;
    padding: 0 20px 0 16px;
}

.btn-header-label {
    font-size: 12px;
    font-weight: 600;
/*     letter-spacing: 0.5px; */
    color: white;
		padding-top: 10px;
	padding-bottom: 10px;
}

.btn-header-icon:hover {
    opacity: 0.75;
}

.btn-header-icon svg {
    width: 28px;
    height: 28px;
}

.sub-header {
    background: var(--accent-turquoise);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

/* page-header: sticky top bar without logo, used on sub-pages */
.page-header {
    background: #065E87;
    padding: 0 20px;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
}

.page-header .back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    text-decoration: none;
    margin-left: -4px;
}

.page-header .back-btn svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.page-header h2 {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
}

.page-header-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    margin-right: -4px;
    border-radius: 50%;
    transition: background 0.15s;
}

.page-header-action:hover {
    background: rgba(255, 255, 255, 0.15);
}

.page-header-action svg {
    width: 24px;
    height: 24px;
}

.sub-header .back-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.sub-header h2 {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.sub-header .help-btn {
    margin-left: auto;
    background: rgba(255,255,255,0.25);
    border: none;
    color: white;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =====================
   SECTION LABEL
   ===================== */
.section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-muted);
    text-transform: uppercase;
    padding: 16px 20px 8px;
}

/* =====================
   CARD
   ===================== */
.card {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 0px 20px;
	padding-top: 16px;
	padding-bottom: 24px;

}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-blue);
    text-transform: uppercase;
/*     letter-spacing: 0.5px; */
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--primary-blue);
	margin-top: 5px;
}

.card-title--danger {
    color: var(--danger-red);
}

.card-title--danger svg {
    color: var(--danger-red);
}

/* Card content: aligns with text after icon (icon 20px + gap 8px = 28px) */
.card-content {
    padding-left: 34px;
}

.card-subtitle {
    font-size: 12px;
    color: var(--text-muted);
	margin-top: -5px;
    margin-bottom: 20px;
}

.card-value {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-dark);
	margin-top: -5px;
	margin-bottom: 20px;
    min-height: 1.5em;
}

.card-value--muted {
    color: var(--text-muted);
}

.card-value--set {
    color: var(--text-dark);
}

/* =====================
   GUIDE LIST ITEM
   ===================== */
.guide-item {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
	    padding-top: 30px;
}

.guide-item-name {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 2px;
}

.guide-item-slug {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* =====================
   ACTION BUTTONS (4-grid)
   ===================== */
.action-buttons {
	margin-top: 20px;

    display: flex;
    flex-direction: row;
    gap: 20px;
    padding: 0;
}

.btn-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
    color: var(--primary-blue);
    padding: 0;
    font-family: inherit;
}

.btn-action-icon {
    width: 46px;
    height: 46px;
    background: var(--bg-light);
    border: 1.5px solid #00668499;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.btn-action:hover .btn-action-icon {
    background: #edf2f7;
}

.btn-action:active .btn-action-icon,
.btn-action:active {
    background: inherit;
    border-color: inherit;
    outline: none;
}

.btn-action svg {
    width: 22px;
    height: 22px;
}

.btn-action-label {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
 	color: var(--primary-blue);
}

.btn-edit .btn-action-icon {
    color: var(--brand-orange);
}

/* =====================
   FORM INPUTS
   ===================== */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 13px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 15px;
    color: var(--text-dark);
    background: white;
    outline: none;
    transition: border-color 0.15s;
	font-family: Poppins, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.form-input:focus {
    border-color: var(--accent-turquoise);
}

.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px white inset;
    -webkit-text-fill-color: var(--text-dark);
    transition: background-color 5000s ease-in-out 0s;
}

.password-wrapper {
    position: relative;
}

.password-wrapper .form-input {
    padding-right: 44px;
}

.password-wrapper .form-input::placeholder {
    color: #999999;
}

.btn-toggle-pass {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
	margin-bottom: 10px;
}

.btn-toggle-pass svg {
    width: 20px;
    height: 20px;
}

.pass-messages {
    height: 36px;
    margin-top: -4px;
    margin-bottom: 4px;
}

.pass-inline-alert {
    display: none;
    align-items: center;
    font-size: 12px;
    font-weight: 500;
    color: var(--danger-red);
    padding-left: 10px;
    height: 100%;
}

.pass-inline-alert.show {
    display: flex;
}

.pass-inline-alert--success {
    color: #1bc174;

}

/* =====================
   BUTTONS
   ===================== */
.btn {
    width: calc(4 * 46px + 3 * 20px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    height: 46px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: var(--bg-light);
    border: 1.5px solid #006684aa;
    color: var(--primary-blue);
    transition: opacity 0.15s;
    text-decoration: none;
    font-family: inherit;
}

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

.btn-danger {
    border-color: var(--danger-red);
    color: var(--danger-red);
	background-color: #FFF8F2;
}

.btn-icon {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: var(--text-muted);
    border-radius: 6px;
    display: flex;
    align-items: center;
}

.btn-icon:hover { background: var(--border); }

/* =====================
   MODAL
   ===================== */
.confirm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    z-index: 10001;
}

.modal--inline {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10002;
    margin: 0;
}

.modal {
    border: none;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 300px;
    max-width: 90%;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10002;
}

.modal::backdrop {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
}

.modal-content {
    display: flex;
    flex-direction: column;
}

#confirmMessage {
    font-size: 15px;
    color: var(--text-dark);
    line-height: 1.5;
    margin: 0 0 24px 0;
    text-align: center;
}

.modal-buttons {
    display: flex;
    gap: 12px;
}

.modal-btn {
    flex: 1;
    height: 44px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
    font-family: inherit;
    outline: none;
}

.modal-btn-cancel {
    background: var(--bg-light);
    border: 1.5px solid var(--border);
    color: var(--text-muted);
}

.modal-btn-ok {
    background: var(--primary-blue);
    color: white;
}

.modal-btn:hover { opacity: 0.85; }

/* =====================
   COLOR SWATCHES
   ===================== */
.color-swatches {
    display: flex;
    gap: 20px;
    margin-top: 8px;
}

.swatch {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.15s;
}

.swatch.selected {
    box-shadow: 0 0 0 2px white, 0 0 0 4px var(--accent-turquoise);
}

.swatch-check {
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.swatch.selected .swatch-check {
    display: flex;
}

.swatch-check svg {
    width: 22px;
    height: 22px;
    fill: white;
    color: white;
}

.swatch-white .swatch-check svg {
    fill: var(--primary-blue);
    color: var(--primary-blue);
}

/* =====================
   QR PRINT AREA
   ===================== */
@media print {
    html, body { height: auto !important; min-height: 0 !important; }
    body > * { display: none !important; }
    #qr-print-area {
        display: flex !important;
        position: fixed !important;
        inset: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}

#qr-print-area {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 40px 20px;
}

#qr-print-area img,
#qr-print-area canvas {
    width: 280px;
    height: 280px;
    display: block;
    flex-shrink: 0;
}

.qr-print-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
}

.qr-print-url {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    word-break: break-all;
}

/* =====================
   QR CODE
   ===================== */
.qr-placeholder {
    width: 48px;
    height: 48px;
    background: url('img/qr.png') center/cover no-repeat;
    border: 1px solid var(--border);
    border-radius: 10px;
    flex-shrink: 0;
}

/* =====================
   LANGUAGE LIST
   ===================== */


.active-langs-list{
	margin-bottom: 20px;
}

.translation-status {
    display: none;
    font-size: 12px;
    color: var(--accent-turquoise);
    font-weight: 500;
    padding: 8px 0 12px;
}

.lang-item {
    display: flex;
    align-items: center;
    padding: 12px 8px 12px 0;
    border-bottom: 1px solid var(--border);
    gap: 8px;
    font-size: 14px;
    background: white;
    user-select: none;
    cursor: grab;
}

.lang-item:active { cursor: grabbing; }

/* .lang-item:last-child { border-bottom: none; } */

.lang-drag-handle {
    display: flex;
    align-items: center;
    color: var(--border);
    cursor: grab;
    flex-shrink: 0;
	margin-left: 0px;
}

.lang-drag-handle:active { cursor: grabbing; }

.lang-drag-handle svg {
    width: 20px;
    height: 20px;
}

.lang-item-name {
    flex: 1;
    font-size: 14px;
    color: var(--text-dark);
}

.lang-item-tags {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.lang-tag {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    pointer-events: none;
}

.lang-tag--primary { color: var(--primary-blue); }
.lang-tag--muted   { color: #999999; }

.lang-item-icon {
    display: flex;
    align-items: center;
    color: var(--primary-blue);
    flex-shrink: 0;
}

.lang-item-icon--muted { color: #999999; }

.lang-item-icon svg {
    width: 20px;
    height: 20px;
}

/* Sortable drag states */
.sortable-ghost {
    opacity: 0.4;
    background: var(--bg-light);
}

.sortable-drag {
    background: white !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18) !important;
    border-radius: 8px !important;
    opacity: 1 !important;
    border-bottom: none !important;
    cursor: grabbing !important;
}

.lang-item.drag-ready {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    z-index: 1;
    position: relative;
}

.lang-default-badge {
    font-size: 11px;
    background: var(--accent-turquoise);
    color: white;
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: auto;
}

/* =====================
   SUBSCRIPTION CARDS
   ===================== */
.plan-card {
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    cursor: pointer;
}

.plan-card.active {
    border-color: var(--accent-turquoise);
    background: #f0fbff;
}

.plan-card.active .plan-name,
.plan-card.active .plan-price,
.plan-card.active .plan-icon {
    color: var(--primary-blue);
}

.plan-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--text-muted);
}

.plan-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
}

.plan-price {
    font-size: 12px;
    color: var(--text-muted);
}

/* =====================
   ALERTS
   ===================== */
.alert {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
}

.alert.show { display: block; }

.alert-error {
    background: #FFF5F5;
    color: var(--danger-red);
    border: 1px solid #FED7D7;
}

.alert-success {
    background: #F0FFF4;
    color: #276749;
    border: 1px solid #C6F6D5;
}

/* =====================
   LOADING SPINNER
   ===================== */
.spinner {
    width: 16px;
    height: 16px;
    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); } }

/* =====================
   CONTENT AREA
   ===================== */
.content {

    overflow-y: auto;
}

/* =====================
   DIVIDER
   ===================== */
.divider {
    height: 8px;
    background: var(--bg-light);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

/* =====================
   MY GUIDES header row
   ===================== */
.main-header .section-header-row {
    border-bottom: none;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0 0 0 20px;
}

.main-header .section-header-row span {
    color: white;
}

.main-header .section-header-row .btn-add {
    color: white;
}

.section-header-row {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    padding: 0 0 0 20px;
    height: 50px;
    border-bottom: 1px solid var(--border);
}

.section-header-row span {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.btn-add-wrap {
    display: flex;
    align-items: stretch;
	padding-right: 10px;
}

.section-header-row .btn-add {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--primary-blue);
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    padding: 0;
}

/* =====================
   LOGIN PAGE
   ===================== */
.login-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 32px;
}

.login-logo {
    font-size: 26px;
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.login-tagline {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 32px;
    text-align: center;
}

.login-form {
    width: 100%;
}

.login-form .btn {
    margin-top: 10px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.guides-status {
    color: #718096;
    font-size: 16px;
    text-align: center;
    margin-top: 50px;
}

/* ============================================
   Loader Overlay
   ============================================ */
.loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loader-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding-left: 32px;
    padding-right: 32px;
}

.loader {
    width: 50px;
    padding: 6px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: #008DB9;
    --_m:
        conic-gradient(#0000 10%,#000),
        linear-gradient(#000 0 0) content-box;
    -webkit-mask: var(--_m);
            mask: var(--_m);
    -webkit-mask-composite: source-out;
            mask-composite: subtract;
    animation: loader-spin 1s infinite linear;
}

@keyframes loader-spin {
    to { transform: rotate(1turn); }
}

.loader-message {
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    letter-spacing: 0.5px;
    white-space: pre-line;
}


.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-blue);
    cursor: pointer;
    flex-shrink: 0;
}

.remember-me label {
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
}

/* =====================
   LANGUAGE PICKER MODAL
   ===================== */
.lang-modal {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(100vw, 480px);
    z-index: 500;
    background: white;
    display: flex;
    flex-direction: column;
}

.lang-modal-header {
    background: #065E87;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    flex-shrink: 0;
    color: white;
}

.lang-modal-header h2 {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    flex: 1;
}

.lang-modal-confirm-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 8px 0 8px 16px;
}

.lang-modal-confirm-btn svg {
    width: 24px;
    height: 24px;
}

.lang-modal-list {
    flex: 1;
    overflow-y: auto;
}

.lang-modal-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
    cursor: pointer;
    color: var(--text-dark);
    user-select: none;
}

.lang-modal-item.selected {
    color: var(--primary-blue);
    background: #f0f9ff;
}

.lang-modal-item.disabled {
    color: var(--text-muted);
    cursor: default;
    pointer-events: none;
    background: white;
}

.lang-modal-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.lang-modal-icon svg {
    width: 20px;
    height: 20px;
}

/* =====================
   RIPPLE ANIMATION
   ===================== */
@keyframes ripple {
    0%   { width: 30px; height: 30px; opacity: 0.3; }
    100% { width: 70px; height: 70px; opacity: 0; }
}

.btn-action-icon,
.btn,
.page-header-action,
.back-btn,
.swatch {
    position: relative;
    overflow: hidden;
}

.btn-action-icon.ripple::before,
.btn.ripple::before,
.page-header-action.ripple::before,
.back-btn.ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: currentColor;
    border-radius: 50%;
    opacity: 0.12;
    animation: ripple 200ms ease-out forwards;
    pointer-events: none;
    z-index: 1;
}

.swatch.ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    animation: ripple 200ms ease-out forwards;
    pointer-events: none;
    z-index: 1;
}

/* ============================================================
   DESKTOP LAYOUT  (≥900px)
   Split-panel: guides on left, settings iframe on right.
   Login/signup/reset pages stay unchanged (no page class).
   ============================================================ */

/* Desktop panel — always hidden on mobile */
.desktop-panel {
    display: none;
}

@media (min-width: 900px) {
    html, body {
        background: #ffffff;
    }

    /* ── GUIDES PAGE ── */
    body.page-guides {
        display: flex;
        height: 100vh;
        overflow: hidden;
    }

    /* Left panel: guides list — pinned to left edge, scrollable, with shadow */
    body.page-guides .admin-container {
        width: 480px;
        max-width: 480px;
        flex-shrink: 0;
        margin: 0;
        height: 100vh;
        overflow-y: auto;
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.12);
    }

    /* Right panel: iframe area */
    body.page-guides .desktop-panel {
        flex: 1;
        display: flex;
        justify-content: center;
        align-items: flex-start;
        height: 100vh;
        position: relative;
    }

    /* Placeholder hint shown when no iframe is loaded */
    .desktop-panel-hint {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        color: var(--text-muted);
        font-size: 14px;
        text-align: center;
        pointer-events: none;
        white-space: nowrap;
    }

    .desktop-panel.has-content .desktop-panel-hint {
        display: none;
    }

    /* The iframe itself */
    #desktop-iframe {
        width: 480px;
        max-width: 100%;
        height: 100vh;
        border: none;
        outline: none;
        display: none;
        flex-shrink: 0;
    }

    .desktop-panel.has-content #desktop-iframe {
        display: block;
    }
}

/* ── SUB-PAGES IN IFRAME ──
   Placed outside the media query because the iframe viewport is 480px,
   so @media (min-width: 900px) never fires inside the iframe itself. */
body.in-iframe .admin-container {
    box-shadow: none !important;
}

body.in-iframe .page-header .back-btn {
    display: none !important;
}

body.in-iframe .page-header {
    background: #ffffff;
    color: #065E87;
}

body.in-iframe .page-header h2 {
    color: #065E87;
    font-size: 22px;
}

body.in-iframe .page-header .page-header-action {
    color: #065E87;
}
