/* ============================================================
   LUUPS NEWS - Platform Stylesheet
   ============================================================ */

:root {
    --color-primary: #1a1a2e;
    --color-primary-light: #16213e;
    --color-accent: #e94560;
    --color-accent-hover: #d63851;
    --color-bg: #f4f5f7;
    --color-surface: #ffffff;
    --color-text: #1a1a2e;
    --color-text-secondary: #6b7280;
    --color-text-muted: #9ca3af;
    --color-border: #e5e7eb;
    --color-border-light: #f3f4f6;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-info: #3b82f6;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.5;
    min-height: 100vh;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover {
    color: var(--color-accent-hover);
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */

.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    padding: 40px 40px 0;
    text-align: center;
}

.login-logo-img {
    height: 32px;
    width: auto;
    margin-bottom: 8px;
}

.login-subtitle {
    color: var(--color-text-secondary);
    font-size: 14px;
    margin-bottom: 0;
}

.login-body {
    padding: 32px 40px 40px;
}

/* ---- Steps ---- */
.login-step {
    display: none;
}
.login-step.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ---- Form Elements ---- */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    font-family: var(--font-family);
    color: var(--color-text);
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.1);
}

.form-input::placeholder {
    color: var(--color-text-muted);
}

.form-input.input-otp {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 10px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    padding: 16px;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 24px;
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font-family);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--color-accent);
    color: #fff;
}
.btn-primary:hover:not(:disabled) {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(233, 69, 96, 0.3);
}
.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}
.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-ghost {
    background: transparent;
    color: var(--color-text-secondary);
    font-size: 13px;
    padding: 8px;
    width: auto;
    margin: 12px auto 0;
    display: block;
}
.btn-ghost:hover {
    color: var(--color-accent);
}

/* ---- Spinner ---- */
.btn .spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
.btn.loading .spinner {
    display: block;
}
.btn.loading .btn-text {
    opacity: 0;
}

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

/* ---- Messages ---- */
.message {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
    align-items: center;
    gap: 8px;
    line-height: 1.4;
}
.message.show {
    display: flex;
}
.message-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.message-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.message-info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* ---- OTP info ---- */
.otp-info {
    text-align: center;
    margin-bottom: 24px;
}
.otp-info p {
    color: var(--color-text-secondary);
    font-size: 14px;
    line-height: 1.5;
}
.otp-info .otp-email {
    font-weight: 600;
    color: var(--color-text);
}

/* ---- Desk Picker (Login step 3) ---- */
.desk-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.desk-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    text-align: left;
    width: 100%;
    font-family: var(--font-family);
}
.desk-item:hover {
    border-color: var(--color-accent);
    background: #fff;
    box-shadow: 0 2px 8px rgba(233, 69, 96, 0.1);
    transform: translateY(-1px);
}
.desk-item:active {
    transform: translateY(0);
}

.desk-item-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--color-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    flex-shrink: 0;
}

.desk-item-info {
    flex: 1;
    min-width: 0;
}
.desk-item-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.3;
}
.desk-item-role {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: 2px;
}

.desk-item-arrow {
    color: var(--color-text-muted);
    flex-shrink: 0;
    transition: transform var(--transition);
}
.desk-item:hover .desk-item-arrow {
    color: var(--color-accent);
    transform: translateX(3px);
}

.desk-item-default {
    border-color: rgba(233, 69, 96, 0.3);
    background: rgba(233, 69, 96, 0.03);
}

/* ============================================================
   DASHBOARD LAYOUT
   ============================================================ */

.app-layout {
    display: flex;
    min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
    width: 260px;
    background: var(--color-primary);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo-img {
    height: 22px;
    width: auto;
    filter: brightness(0) invert(1);
}

.sidebar-desk {
    margin-top: 8px;
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    gap: 6px;
}
.sidebar-desk .desk-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-success);
    flex-shrink: 0;
}

/* ---- Navigation ---- */
.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.35);
    padding: 0 8px;
    margin-bottom: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}
.nav-item:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}
.nav-item.active {
    background: rgba(233, 69, 96, 0.15);
    color: var(--color-accent);
}
.nav-item .nav-icon {
    width: 20px;
    height: 20px;
    opacity: 0.7;
    flex-shrink: 0;
}
.nav-item.active .nav-icon {
    opacity: 1;
}
.nav-item .nav-badge {
    margin-left: auto;
    background: var(--color-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* ---- Sidebar Footer ---- */
.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition);
}
.user-info:hover {
    background: rgba(255,255,255,0.08);
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.user-details {
    flex: 1;
    min-width: 0;
}
.user-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-role {
    font-size: 11px;
    color: rgba(255,255,255,0.45);
}

/* ---- Main Content ---- */
.main-content {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
}

.topbar {
    height: 64px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
}

.topbar-desk-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-secondary);
    line-height: 1;
    white-space: nowrap;
}
.topbar-desk-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-success);
    flex-shrink: 0;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
    transition: all var(--transition);
    position: relative;
}
.topbar-btn:hover {
    background: var(--color-bg);
    color: var(--color-text);
}
.topbar-btn .notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-accent);
    border: 2px solid var(--color-surface);
}

.mobile-menu-btn {
    display: none;
    width: 38px;
    height: 38px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--color-text);
}

/* ---- Page Content ---- */
.page-content {
    padding: 32px;
}

/* ---- Dashboard Cards ---- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--color-border);
    transition: box-shadow var(--transition);
}
.stat-card:hover {
    box-shadow: var(--shadow-md);
}

.stat-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}
.stat-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: -1px;
}
.stat-change {
    font-size: 12px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.stat-change.up { color: var(--color-success); }
.stat-change.down { color: var(--color-danger); }

/* ---- Content Card ---- */
.content-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    margin-bottom: 24px;
}
.content-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
}
.content-card-title {
    font-size: 16px;
    font-weight: 700;
}
.content-card-body {
    padding: 24px;
}

/* ---- Table ---- */
.table-wrapper {
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
}
thead th {
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
}
tbody td {
    padding: 14px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--color-border-light);
    color: var(--color-text);
}
tbody tr:hover {
    background: var(--color-bg);
}
tbody tr:last-child td {
    border-bottom: none;
}

/* ---- Badges ---- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}
.badge-new { background: #dbeafe; color: #1e40af; }
.badge-read { background: #e0e7ff; color: #3730a3; }
.badge-in-progress { background: #fef3c7; color: #92400e; }
.badge-verified { background: #d1fae5; color: #065f46; }
.badge-published { background: #d1fae5; color: #065f46; }
.badge-archived { background: #f3f4f6; color: #6b7280; }
.badge-spam { background: #fee2e2; color: #991b1b; }
.badge-urgent { background: #fee2e2; color: #991b1b; }
.badge-high { background: #fef3c7; color: #92400e; }
.badge-normal { background: #f3f4f6; color: #6b7280; }
.badge-low { background: #f3f4f6; color: #9ca3af; }

/* ---- Empty State ---- */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--color-text-muted);
}
.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.4;
}
.empty-state-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
}
.empty-state-text {
    font-size: 14px;
    max-width: 360px;
    margin: 0 auto;
}

/* ============================================================
   SETTINGS / FORM EDITOR
   ============================================================ */

.editor-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
    align-items: start;
}

.editor-panel {
    min-width: 0;
}

/* ---- Tabs ---- */
.tabs {
    display: flex;
    gap: 4px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 4px;
    margin-bottom: 24px;
    overflow-x: auto;
}

.tab {
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-family);
    border: none;
    background: transparent;
    color: var(--color-text-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition);
}
.tab:hover {
    color: var(--color-text);
    background: var(--color-bg);
}
.tab.active {
    background: var(--color-accent);
    color: #fff;
}

.tab-panel {
    display: none;
}
.tab-panel.active {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

/* ---- Settings Sections ---- */
.settings-section {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
}

.settings-section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 4px;
}

.settings-section-desc {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 20px;
}

/* ---- Color Inputs ---- */
.color-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.color-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.color-picker {
    width: 40px;
    height: 40px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    padding: 2px;
    background: none;
}
.color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}
.color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

.color-hex {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 13px !important;
    padding: 8px 10px !important;
    width: 90px !important;
    text-transform: uppercase;
}

.form-input-sm {
    padding: 9px 12px !important;
    font-size: 14px !important;
}

.form-textarea {
    resize: vertical;
    min-height: 70px;
    line-height: 1.5;
}

/* ---- Toggle Switch ---- */
.toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    cursor: pointer;
}
.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--color-border);
    border-radius: 11px;
    transition: background var(--transition);
}
.toggle-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform var(--transition);
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.toggle input:checked + .toggle-slider {
    background: var(--color-accent);
}
.toggle input:checked + .toggle-slider::before {
    transform: translateX(18px);
}

/* ---- Field Config Table ---- */
.field-config-table {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.field-config-header {
    display: grid;
    grid-template-columns: 1fr 70px 70px;
    gap: 8px;
    padding: 10px 16px;
    background: var(--color-bg);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
}
.field-config-header span:not(:first-child) {
    text-align: center;
}

.field-config-row {
    display: grid;
    grid-template-columns: 1fr 70px 70px;
    gap: 8px;
    align-items: center;
    padding: 12px 16px;
    border-top: 1px solid var(--color-border-light);
}
.field-config-row:first-of-type {
    border-top: none;
}

.field-config-label {
    font-size: 14px;
    font-weight: 500;
}

.field-config-row .toggle {
    justify-self: center;
}

/* ---- Category List ---- */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
    min-height: 40px;
}

.category-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: all var(--transition);
}
.category-row:hover {
    border-color: var(--color-border);
    box-shadow: var(--shadow-sm);
}

.category-drag {
    cursor: grab;
    color: var(--color-text-muted);
    flex-shrink: 0;
}
.category-drag:active {
    cursor: grabbing;
}

.category-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    min-width: 0;
}

.category-name-input {
    flex: 1;
    font-size: 14px;
    padding: 4px 8px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    outline: none;
    min-width: 0;
}
.category-name-input:focus {
    border-color: var(--color-accent);
}

.category-badges {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}

.category-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}
.category-badge-default {
    background: #dbeafe;
    color: #1e40af;
}
.category-badge-hidden {
    background: #f3f4f6;
    color: #9ca3af;
}

.category-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.category-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
}
.category-btn:hover {
    background: var(--color-surface);
    color: var(--color-text);
}
.category-btn-danger:hover {
    background: #fee2e2;
    color: #dc2626;
}

.category-add {
    display: flex;
    gap: 8px;
    align-items: center;
}
.category-add .form-input-sm {
    flex: 1;
}

/* ---- Range Input ---- */
.range-input-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
}

.range-input {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--color-border);
    border-radius: 3px;
    outline: none;
}
.range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--color-accent);
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.range-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    min-width: 60px;
    text-align: right;
}

/* ---- Checkbox Group ---- */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    transition: all var(--transition);
}
.checkbox-item:has(input:checked) {
    border-color: var(--color-accent);
    background: rgba(233, 69, 96, 0.04);
}
.checkbox-item input {
    accent-color: var(--color-accent);
}

/* ---- Save Button in tabs ---- */
.btn-save {
    margin-top: 4px;
}

/* ---- Toast ---- */
.settings-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    z-index: 1000;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
}
.settings-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
.settings-toast.toast-success {
    background: var(--color-success);
}
.settings-toast.toast-error {
    background: var(--color-danger);
}

/* ---- Preview Panel ---- */
.preview-panel {
    position: sticky;
    top: 88px;
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.preview-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
}

.preview-url {
    font-size: 11px;
    color: var(--color-text-muted);
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.preview-frame {
    background: #e8e8e8;
    border-radius: var(--radius-lg);
    padding: 16px;
    min-height: 500px;
}

.preview-form {
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    font-size: 11px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.pf-header {
    padding: 20px 18px 14px;
    text-align: center;
}

.pf-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}

.pf-desc {
    font-size: 11px;
    color: #888;
    line-height: 1.4;
}

.pf-fields {
    padding: 0 18px 12px;
}

.pf-field {
    margin-bottom: 10px;
}

.pf-field-label {
    font-size: 10px;
    font-weight: 600;
    margin-bottom: 3px;
    color: #555;
}

.pf-req {
    color: var(--color-accent);
}

.pf-field-input,
.pf-field-select {
    height: 26px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.pf-field-textarea {
    height: 48px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.pf-field-upload {
    height: 44px;
    border: 1px dashed #ccc;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #999;
    font-size: 10px;
}
.pf-field-upload svg {
    width: 14px;
    height: 14px;
}

.pf-submit {
    margin: 4px 18px 12px;
    padding: 10px;
    text-align: center;
    color: #fff;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.pf-privacy {
    padding: 10px 18px 14px;
    font-size: 9px;
    color: #aaa;
    text-align: center;
    line-height: 1.4;
}

.pf-field[data-hidden="true"] {
    display: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .mobile-menu-btn {
        display: flex;
    }
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 99;
    }
    .sidebar-overlay.show {
        display: block;
    }
}

@media (max-width: 1200px) {
    .editor-layout {
        grid-template-columns: 1fr;
    }
    .preview-panel {
        position: static;
    }
}

@media (max-width: 640px) {
    .color-grid {
        grid-template-columns: 1fr;
    }
    .login-card {
        border-radius: var(--radius-lg);
    }
    .login-header {
        padding: 32px 24px 0;
    }
    .login-body {
        padding: 24px;
    }
    .page-content {
        padding: 20px 16px;
    }
    .topbar {
        padding: 0 16px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .form-input.input-otp {
        font-size: 22px;
        letter-spacing: 6px;
    }
}
