/* ── Anti-FOUC & Vue Cloak Shielding (Guarantees zero modal flash before Vue mounts) ── */
[v-cloak],
[v-cloak] * {
    display: none !important;
}

[v-if] {
    display: none !important;
}

.modal-overlay[v-if],
.drawer-overlay[v-if] {
    display: none !important;
}

:root {
    --bg-color: #f4f7f6;
    --panel-bg: #ffffff;
    --border-color: #e2e8f0;
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --danger-color: #ef4444;
    --danger-hover: #dc2626;
    --success-color: #16a34a;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
}

/* ── Modern Header (3 Zones) ── */
.builder-header {
    height: 64px;
    background-color: var(--panel-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    position: relative;
    z-index: 50;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 17px;
    color: var(--text-main);
    letter-spacing: -0.3px;
    user-select: none;
}

.logo-icon {
    font-size: 22px;
}

.logo-text {
    background: linear-gradient(135deg, #1e293b, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.doc-title-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.doc-title-input {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 6px 10px;
    background: transparent;
    transition: all 0.15s ease;
    max-width: 220px;
}

.doc-title-input:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.doc-title-input:focus {
    background: #ffffff;
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.save-status-pill {
    font-size: 11.5px;
    font-weight: 600;
    color: #15803d;
    background: #dcfce7;
    padding: 3px 9px;
    border-radius: 12px;
    border: 1px solid #bbf7d0;
    white-space: nowrap;
    animation: fadeIn 0.3s ease;
}

/* Header Center (Design, ATS & Lang) */
.header-center {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-nav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    font-size: 13.5px;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn-nav:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: var(--text-main);
}

.btn-nav-ats {
    border-width: 1.5px;
    font-weight: 600;
}

/* Header Right (Actions & Account) */
.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.btn-subtle {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    color: #64748b;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-subtle:hover {
    background: #f1f5f9;
    color: var(--text-main);
    border-color: #cbd5e1;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 210px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    padding: 6px;
    z-index: 100;
    animation: dropIn 0.15s ease-out;
}

.dropdown-menu-right {
    right: 0;
    left: auto;
}

.dropdown-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border: none;
    background: transparent;
    font-size: 13.5px;
    font-weight: 500;
    color: #334155;
    text-align: left;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.12s;
}

.dropdown-item:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 6px 0;
}

.dropdown-user-header {
    padding: 8px 12px;
    font-size: 12.5px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dropdown-user-header strong {
    color: var(--text-main);
}

.dropdown-user-header small {
    color: var(--text-muted);
}

.btn-hero-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 8px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(37, 99, 235, 0.25);
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn-hero-primary:hover {
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

.user-avatar-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: #eff6ff;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.15s;
}

.user-avatar-btn:hover {
    border-color: var(--primary-color);
}

.user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-avatar-placeholder {
    font-weight: 700;
    font-size: 14px;
    color: var(--primary-color);
}

.btn-cloud-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1.5px solid #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.btn-cloud-pill:hover {
    background: #dbeafe;
}

.btn-setup-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1.5px solid #fef08a;
    background: #fefce8;
    color: #a16207;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.btn-hamburger {
    display: none;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    font-size: 20px;
    line-height: 1;
    color: #334155;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

/* ── Common Buttons & Controls ── */
.btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--text-main);
    transition: all 0.2s;
    white-space: nowrap;
}

.btn:hover {
    background: #f8fafc;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

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

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

.btn-danger:hover {
    background: #fef2f2;
}

.text-danger {
    color: var(--danger-color) !important;
}

/* ── Split Layout ── */
.split-layout {
    display: flex;
    height: calc(100vh - 64px);
    overflow: hidden;
}

/* ── Sidebar Editor & Accordion Cards ── */
.builder-sidebar {
    width: 44%;
    max-width: 580px;
    min-width: 360px;
    background-color: #f8fafc;
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.accordion-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    flex-shrink: 0;
}

.accordion-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 3px 6px -1px rgba(0, 0, 0, 0.04);
}

.accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px;
    cursor: pointer;
    user-select: none;
    background: #ffffff;
    transition: background 0.12s ease;
}

.accordion-header:hover {
    background: #f8fafc;
}

.accordion-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.accordion-icon {
    font-size: 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #f1f5f9;
    flex-shrink: 0;
}

.accordion-title h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.accordion-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.accordion-arrow {
    font-size: 15px;
    color: #94a3b8;
    transition: transform 0.2s ease, color 0.15s;
    display: inline-block;
    cursor: pointer;
    user-select: none;
    flex-shrink: 0;
}

.accordion-arrow.rotated {
    transform: rotate(180deg);
    color: var(--primary-color);
}

.accordion-body {
    padding: 16px 18px 20px;
    border-top: 1px solid #f1f5f9;
    background: #ffffff;
}

/* ── iOS Switch ── */
.ios-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
}

.ios-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ios-switch .slider {
    position: absolute;
    inset: 0;
    background-color: #cbd5e1;
    border-radius: 20px;
    transition: 0.2s ease;
}

.ios-switch .slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.ios-switch input:checked + .slider {
    background-color: var(--primary-color);
}

.ios-switch input:checked + .slider:before {
    transform: translateX(16px);
}

/* ── Item Count Badge ── */
.item-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #e2e8f0;
    color: #475569;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

/* ── Form Controls & Grids ── */
.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: #475569;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13.5px;
    color: #1e293b;
    background: #ffffff;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

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

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

@media (max-width: 480px) {
    .form-row-2,
    .form-row-3 {
        grid-template-columns: 1fr;
    }
}

.sub-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin: 12px 0 6px;
}

.links-section {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.section-subheading {
    font-size: 12.5px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 10px;
}

/* ── Array Cards & Repeaters ── */
.array-card {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
    transition: border-color 0.15s;
}

.array-card:hover {
    border-color: #cbd5e1;
}

.array-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e2e8f0;
}

.array-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.btn-icon-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--danger-color);
    width: 26px;
    height: 26px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: background 0.15s ease;
}

.btn-icon-danger:hover {
    background: #fee2e2;
}

.inline-row {
    display: flex;
    margin-bottom: 7px;
    gap: 8px;
    align-items: center;
}

.btn-inline-remove {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: var(--danger-color);
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s;
}

.btn-inline-remove:hover {
    background: #fee2e2;
}

.btn-add-bullet {
    width: 100%;
    padding: 8px 12px;
    border-radius: 7px;
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
    color: #475569;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 6px;
    transition: all 0.15s;
}

.btn-add-bullet:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: var(--primary-color);
}

.btn-add-item {
    width: 100%;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1.5px dashed #cbd5e1;
    border-radius: 8px;
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.15s ease;
    margin-top: 8px;
}

.btn-add-item:hover {
    background: #eff6ff;
    border-color: var(--primary-color);
}

/* ── RTL Support ── */
[dir="rtl"] .builder-sidebar {
    border-right: none;
    border-left: 1px solid var(--border-color);
}

[dir="rtl"] .accordion-actions {
    flex-direction: row-reverse;
}

[dir="rtl"] .form-group label {
    text-align: right;
}

[dir="rtl"] .array-card-header {
    flex-direction: row-reverse;
}

/* ── Preview Pane with Canvas Tools ── */
.preview-pane {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
    background-color: #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 20px 60px;
    position: relative;
    min-width: 0;
}

.canvas-floating-toolbar {
    position: sticky;
    top: 12px;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px);
    padding: 5px 10px;
    border-radius: 30px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(203, 213, 225, 0.7);
    margin-bottom: 20px;
    flex-shrink: 0;
}

.btn-canvas-tool {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.btn-canvas-tool:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.zoom-label {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    min-width: 46px;
    text-align: center;
    user-select: none;
}

.canvas-tool-divider {
    width: 1px;
    height: 16px;
    background: #cbd5e1;
    margin: 0 4px;
}

.btn-canvas-download {
    padding: 5px 12px;
    border-radius: 20px;
    border: none;
    background: var(--primary-color);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-canvas-download:hover {
    background: var(--primary-hover);
}

.canvas-viewport {
    width: 100%;
    min-width: min-content;
    display: flex;
    justify-content: center;
}

.cv-paper {
    background: #ffffff;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 820px;
    min-height: 1160px; /* Standard A4 ratio */
    transition: transform 0.15s ease-out;
}

.cv-contacts-line {
    font-size: 0.95em;
    color: #4b5563;
    margin-bottom: 8px;
}

/* ── Empty State Guide (When CV has no content) ── */
.cv-empty-state {
    padding: 70px 24px;
    text-align: center;
    color: #64748b;
    border: 2px dashed #cbd5e1;
    border-radius: 14px;
    margin: 40px auto;
    max-width: 480px;
    background: #f8fafc;
    animation: fadeIn 0.3s ease;
}

.empty-state-icon {
    font-size: 46px;
    margin-bottom: 14px;
    line-height: 1;
}

.cv-empty-state h3 {
    font-size: 17px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px;
}

.cv-empty-state p {
    font-size: 13px;
    line-height: 1.6;
    margin: 0 0 18px;
    color: #64748b;
}

.btn-outline-sample {
    background: #ffffff;
    border: 1.5px solid var(--primary-color);
    color: var(--primary-color);
    font-size: 12.5px;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: 20px;
    transition: all 0.15s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-outline-sample:hover {
    background: #eff6ff;
    border-color: var(--primary-hover);
    color: var(--primary-hover);
}

/* ── Mobile Drawer (Slide-Over) ── */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(2px);
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 320px;
    max-width: 85vw;
    background: #ffffff;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 25px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.25s ease-out;
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.drawer-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #f1f5f9;
    font-size: 16px;
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.drawer-close:hover {
    background: #e2e8f0;
    color: var(--text-main);
}

.drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.drawer-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.drawer-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin-bottom: 2px;
}

.btn-drawer {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    color: #1e293b;
    font-size: 13.5px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-drawer:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.btn-drawer-primary {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
    font-weight: 600;
}

.btn-drawer-primary:hover {
    background: var(--primary-hover);
    color: #ffffff;
}

.drawer-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

.drawer-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.drawer-user-meta {
    display: flex;
    flex-direction: column;
    font-size: 12.5px;
}

.drawer-user-meta strong {
    color: var(--text-main);
}

.drawer-user-meta small {
    color: var(--text-muted);
}

.drawer-actions-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

/* ── Mobile Sticky Bottom Bar ── */
.mobile-sticky-bottom-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 58px;
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    z-index: 90;
    padding: 8px 12px;
    gap: 8px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
    align-items: center;
    justify-content: space-around;
}

.btn-mobile-bar {
    flex: 1;
    height: 42px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    white-space: nowrap;
}

.btn-mobile-bar.active {
    background: #eff6ff;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-mobile-primary {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

/* ── Animations ── */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes dropIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* ── Responsive Media Queries ── */
@media (max-width: 900px) {
    .builder-header {
        height: 58px;
        padding: 0 16px;
    }

    .header-center {
        display: none;
    }

    .header-right > .dropdown-wrapper {
        display: none;
    }

    .header-right > .btn-hero-primary {
        display: none;
    }

    .header-right > .btn-cloud-pill,
    .header-right > .btn-setup-pill {
        display: none;
    }

    .btn-hamburger {
        display: inline-flex;
    }

    .mobile-sticky-bottom-bar {
        display: flex;
    }

    .split-layout {
        flex-direction: column;
        height: calc(100vh - 58px);
    }

    .builder-sidebar {
        width: 100%;
        max-width: none;
        min-width: 0;
        border-right: none;
        padding: 16px 14px 75px;
    }

    .builder-sidebar.mobile-hidden {
        display: none;
    }

    .preview-pane {
        padding: 12px 10px 75px;
        width: 100%;
    }

    .preview-pane.mobile-hidden {
        display: none;
    }

    .cv-paper {
        max-width: 100%;
        min-height: auto;
    }
}

@media (min-width: 901px) {
    .mobile-sticky-bottom-bar {
        display: none;
    }

    .btn-hamburger {
        display: none;
    }

    .builder-sidebar.mobile-hidden {
        display: flex !important;
    }

    .preview-pane.mobile-hidden {
        display: flex !important;
    }
}

/* ── Print Styles ── */
@media print {
    body {
        overflow: visible;
        height: auto;
        background: #ffffff !important;
    }

    .builder-sidebar,
    .builder-header,
    .canvas-floating-toolbar,
    .mobile-sticky-bottom-bar,
    .drawer-overlay,
    .mobile-drawer,
    .cv-empty-state {
        display: none !important;
    }

    .preview-pane {
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        background: #ffffff !important;
        display: block !important;
    }

    .preview-pane.mobile-hidden {
        display: block !important;
    }

    .split-layout {
        display: block !important;
        height: auto !important;
    }

    .canvas-viewport {
        width: 100% !important;
        transform: none !important;
    }

    .cv-paper {
        box-shadow: none !important;
        transform: none !important;
        max-width: 100% !important;
        width: 100% !important;
        min-height: auto !important;
    }

    .modal-overlay {
        display: none !important;
    }
}

/* ── Cloud & User Profile Styles ── */
.user-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    padding: 3px 10px 3px 6px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.user-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar-initial {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
}

.user-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

.btn-cloud {
    background: #eff6ff;
    color: var(--primary-color);
    border-color: #bfdbfe;
    font-weight: 600;
}

.btn-cloud:hover {
    background: #dbeafe;
}

.btn-setup-badge {
    background: #fefce8;
    color: #a16207;
    border-color: #fef08a;
    font-size: 13px;
    font-weight: 600;
}

.btn-setup-badge:hover {
    background: #fef9c3;
}

.btn-outline-danger {
    background: transparent;
    color: var(--danger-color);
    border-color: #fca5a5;
}

.btn-outline-danger:hover {
    background: #fee2e2;
}

.btn-block {
    width: 100%;
}

/* ── Modal Dialogs ── */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.modal-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    direction: ltr;
    text-align: left;
}

.modal-card.modal-wide {
    max-width: 580px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.15rem;
    color: var(--text-main);
}

.modal-close {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-main);
    background: #f1f5f9;
}

.modal-body {
    padding: 20px;
}

.modal-desc {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ── Google Auth Button ── */
.btn-google-auth {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 16px;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.btn-google-auth:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.btn-google-auth:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.modal-divider {
    display: flex;
    align-items: center;
    margin: 18px 0;
    color: var(--text-muted);
    font-size: 12px;
}

.modal-divider::before,
.modal-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.modal-divider span {
    padding: 0 10px;
}

/* ── Auth Tabs ── */
.auth-tabs {
    display: flex;
    margin-bottom: 16px;
    background: #f1f5f9;
    border-radius: 6px;
    padding: 3px;
}

.tab-btn {
    flex: 1;
    padding: 8px;
    border: none;
    background: transparent;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s;
}

.tab-btn.active {
    background: #fff;
    color: var(--primary-color);
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.auth-form .form-group {
    margin-bottom: 14px;
}

.auth-error-msg {
    color: var(--danger-color);
    font-size: 13px;
    margin-bottom: 12px;
}

/* ── Resumes Modal List ── */
.resumes-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.resumes-loading,
.empty-resumes {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
    font-size: 14px;
}

.resumes-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.resume-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.15s;
}

.resume-item:hover {
    border-color: #cbd5e1;
}

.resume-item.active-resume {
    border-color: var(--primary-color);
    background: #f8fafc;
}

.resume-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.resume-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

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

.badge-current {
    font-size: 11px;
    color: var(--primary-color);
    background: #dbeafe;
    padding: 2px 6px;
    border-radius: 4px;
    width: fit-content;
    font-weight: 600;
}

.resume-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.btn-danger-icon {
    background: #fef2f2;
    border-color: #fee2e2;
    color: var(--danger-color);
}

.btn-danger-icon:hover {
    background: #fee2e2;
}

/* ── Setup Steps ── */
.setup-steps {
    padding-left: 20px;
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-main);
}

.setup-steps code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
}

.setup-steps a {
    color: var(--primary-color);
    text-decoration: underline;
}

.setup-note {
    background: #f8fafc;
    border-left: 3px solid var(--primary-color);
    padding: 10px 14px;
    border-radius: 0 6px 6px 0;
    font-size: 13px;
    color: var(--text-muted);
    margin: 16px 0;
}

/* ── Admin Dashboard Styles ── */
.btn-admin {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    border: none;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(217, 119, 6, 0.25);
}

.btn-admin:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: #fff;
}

.modal-admin {
    max-width: 960px;
}

.admin-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-badge {
    background: #fef3c7;
    color: #92400e;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid #fde68a;
    text-transform: uppercase;
}

/* Stats Grid */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.stat-card {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.stat-num {
    font-size: 26px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.1;
}

.stat-lbl {
    font-size: 12.5px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Admin Toolbar */
.admin-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    align-items: center;
    flex-wrap: wrap;
}

.admin-toolbar .search-box {
    flex: 1;
    min-width: 240px;
}

.admin-toolbar .filter-box {
    width: 170px;
}

/* Admin Table */
.admin-table-container {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    text-align: left;
}

.admin-table th {
    background: #f1f5f9;
    color: var(--text-main);
    font-weight: 600;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.admin-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.admin-table tr:hover td {
    background: #f8fafc;
}

.admin-subtext {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 2px;
}

.admin-user-email {
    font-family: monospace;
    font-size: 12px;
    color: #475569;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
}

.badge-lang {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
}

.badge-lang.ar {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.badge-lang.en {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.admin-date-text {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

.admin-actions-cell {
    display: flex;
    gap: 6px;
    align-items: center;
}

.btn-action {
    background: #fff;
    border: 1px solid var(--border-color);
}

.btn-action:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

/* Admin Preview Modal */
.modal-preview-card {
    max-width: 900px;
    height: 90vh;
    display: flex;
    flex-direction: column;
}

.preview-header-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.preview-header-info h3 {
    margin: 0;
    font-size: 1.1rem;
}

.preview-header-btns {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-preview-body {
    flex: 1;
    overflow-y: auto;
    background: #e2e8f0;
    padding: 24px;
    display: flex;
    justify-content: center;
}

.cv-paper-preview {
    min-height: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ── ATS Toolbar & Badges ── */
.btn-ats-score {
    background: #f0fdf4;
    color: #166534;
    border: 1.5px solid #22c55e;
    font-weight: 600;
}

.btn-ats-score:hover {
    background: #dcfce7;
}

.btn-theme-btn {
    background: #f8fafc;
    border-color: #cbd5e1;
    font-weight: 500;
}

.btn-theme-btn:hover {
    background: #f1f5f9;
}

/* ── ATS Modal Styles ── */
.modal-ats {
    max-width: 780px;
}

.ats-modal-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ats-badge {
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid;
    text-transform: uppercase;
}

/* Score Hero */
.ats-score-hero {
    display: flex;
    align-items: center;
    gap: 24px;
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    border-left: 5px solid;
    margin-bottom: 24px;
}

.ats-score-circle {
    min-width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.ats-score-number {
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
}

.ats-score-denom {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}

.ats-score-desc h4 {
    margin: 0 0 6px;
    font-size: 1.1rem;
    color: var(--text-main);
}

.ats-score-desc p {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.ats-section-heading {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin: 0 0 12px;
}

/* Checks Grid */
.ats-checks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.ats-check-item {
    display: flex;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--border-color);
    align-items: flex-start;
}

.ats-check-item.check-pass {
    border-left: 3px solid #10b981;
}

.ats-check-item.check-fail {
    border-left: 3px solid #f59e0b;
    background: #fffbeb;
}

.check-status-icon {
    font-size: 18px;
    line-height: 1.2;
}

.check-content {
    flex: 1;
}

.check-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13.5px;
}

.check-score {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-muted);
}

.check-details {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Keyword Matcher */
.ats-job-matcher-box {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 18px;
}

.matcher-header h4 {
    margin: 0;
    font-size: 14px;
    color: var(--text-main);
}

.matcher-hint {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin: 3px 0 12px;
}

.matcher-results {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

.match-rate-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    font-size: 13.5px;
}

.progress-track {
    flex: 1;
    height: 10px;
    background: #e2e8f0;
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, #f59e0b, #10b981);
    transition: width 0.4s ease;
}

.keyword-group {
    margin-top: 10px;
}

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

.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chip {
    font-size: 11.5px;
    padding: 3px 9px;
    border-radius: 12px;
    font-weight: 500;
}

.chip-matched {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.chip-missing {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    font-weight: 600;
}

/* ── Theme Modal Styles ── */
.modal-theme {
    max-width: 680px;
}

.theme-form-section {
    margin-bottom: 22px;
}

.theme-label {
    display: block;
    font-weight: 600;
    font-size: 13.5px;
    color: var(--text-main);
    margin-bottom: 10px;
}

/* Template Cards Grid */
.template-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.template-card-choice {
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 14px;
    cursor: pointer;
    background: #fff;
    transition: all 0.15s;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.template-card-choice:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.template-card-choice.selected {
    border-color: var(--primary-color);
    background: #eff6ff;
    box-shadow: 0 0 0 1px var(--primary-color);
}

.template-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.template-card-choice strong {
    font-size: 13.5px;
    color: var(--text-main);
}

.template-card-choice span {
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.35;
}

/* Font choices */
.font-choices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
}

.font-btn {
    padding: 10px 12px;
    text-align: center;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    transition: all 0.15s;
}

.font-btn:hover {
    border-color: #94a3b8;
}

.font-btn.active {
    border-color: var(--primary-color);
    background: #eff6ff;
    color: var(--primary-color);
    font-weight: 700;
}

/* Swatches */
.color-swatches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
}

.swatch-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
    font-size: 12.5px;
    cursor: pointer;
    transition: all 0.15s;
}

.swatch-btn:hover {
    border-color: #94a3b8;
}

.swatch-btn.active {
    border-color: var(--primary-color);
    background: #eff6ff;
    font-weight: 600;
}

.swatch-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.1);
}

/* Size choices */
.size-choices-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ══════════════════════════════════════════════════════════════
   AUTH LOADING SCREEN & MANDATORY GATE SCREEN
   ══════════════════════════════════════════════════════════════ */
body:has(.auth-gate-screen),
body.has-auth-gate {
    height: auto !important;
    min-height: 100vh !important;
    overflow-y: auto !important;
}

.auth-loading-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    color: #f8fafc;
    padding: 24px;
    text-align: center;
}

.auth-loading-spinner {
    width: 44px;
    height: 44px;
    border: 3.5px solid rgba(255, 255, 255, 0.15);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

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

.auth-loading-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
}

.auth-loading-subtitle {
    color: #94a3b8;
    font-size: 13.5px;
}

/* Fullscreen Auth Gate (Default Dark Theme) */
.auth-gate-screen {
    min-height: 100vh;
    height: auto;
    background: radial-gradient(circle at 50% 10%, #1e293b 0%, #0f172a 60%, #020617 100%);
    display: flex;
    flex-direction: column;
    color: #f8fafc;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    transition: background 0.3s ease, color 0.3s ease;
}

.auth-gate-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(12px);
    flex-shrink: 0;
}

.auth-gate-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-gate-logo {
    font-size: 24px;
}

.auth-gate-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-gate-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-gate-actions .btn {
    background: rgba(255, 255, 255, 0.08);
    color: #f1f5f9;
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
    padding: 6px 12px;
    font-size: 12.5px;
    border-radius: 8px;
}

.auth-gate-actions .btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.28);
}

.btn-theme-toggle {
    width: 36px;
    height: 36px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s ease, background-color 0.2s ease;
}

.btn-theme-toggle:hover {
    transform: scale(1.08);
}

/* ── PWA Installation Elements ── */
.btn-pwa-install {
    width: 36px;
    height: 36px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.35) 0%, rgba(59, 130, 246, 0.5) 100%) !important;
    border: 1px solid rgba(147, 197, 253, 0.6) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.25);
    transition: transform 0.15s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-pwa-install:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.55) 0%, rgba(59, 130, 246, 0.7) 100%) !important;
    border-color: #93c5fd !important;
    transform: scale(1.08);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.auth-gate-screen.theme-light .btn-pwa-install {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%) !important;
    border: 1px solid #bfdbfe !important;
    color: #1d4ed8 !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}

.auth-gate-screen.theme-light .btn-pwa-install:hover {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%) !important;
    border-color: #60a5fa !important;
    color: #1e40af !important;
}

.btn-nav-install {
    width: 34px;
    height: 34px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    border-radius: 8px;
    background: #eff6ff !important;
    border-color: #bfdbfe !important;
    color: #2563eb !important;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s ease, background-color 0.2s ease;
}

.btn-nav-install:hover {
    background: #dbeafe !important;
    border-color: #93c5fd !important;
    color: #1d4ed8 !important;
    transform: scale(1.08);
}

.btn-pwa-install .install-svg-icon,
.btn-nav-install .install-svg-icon {
    display: block;
    stroke: currentColor;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-pwa-install:hover .install-svg-icon,
.btn-nav-install:hover .install-svg-icon {
    transform: translateY(1.5px);
}

.btn-drawer-install {
    background: #eff6ff !important;
    border-color: #bfdbfe !important;
    color: #1d4ed8 !important;
    font-weight: 600;
}

.auth-gate-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
}

.auth-gate-card {
    max-width: 620px;
    width: 100%;
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 22px 28px;
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    text-align: center;
    transition: all 0.3s ease;
}

.auth-badge-row {
    margin-bottom: 10px;
}

.auth-gate-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.35);
    color: #93c5fd;
    font-size: 12px;
    font-weight: 600;
}

.auth-gate-heading {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 6px;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.auth-gate-subtext {
    font-size: 13px;
    line-height: 1.55;
    color: #94a3b8;
    margin-bottom: 16px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

/* Feature grid */
.auth-gate-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    text-align: start;
    margin-bottom: 18px;
}

.auth-feat-item {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-feat-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.auth-feat-text strong {
    display: block;
    font-size: 12.5px;
    color: #f1f5f9;
    font-weight: 600;
    margin-bottom: 1px;
}

.auth-feat-text small {
    display: block;
    font-size: 11px;
    color: #94a3b8;
}

/* CTA Zone */
.auth-gate-cta-zone {
    margin-bottom: 16px;
}

.btn-google-gate {
    width: 100%;
    max-width: 400px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 11px 24px;
    background: #ffffff;
    color: #0f172a;
    border: none;
    border-radius: 10px;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3), 0 0 20px rgba(59, 130, 246, 0.2);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-google-gate:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 25px rgba(59, 130, 246, 0.3);
    background: #f8fafc;
}

.btn-google-gate:active:not(:disabled) {
    transform: translateY(0);
}

.btn-google-gate:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.auth-gate-hint {
    margin-top: 8px;
    font-size: 11.5px;
    color: #94a3b8;
}

/* SBS Footer box */
.auth-gate-footer-box {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: start;
}

.sbs-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.sbs-powered-tag {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #60a5fa;
    font-weight: 700;
    display: block;
}

.sbs-brand-title {
    font-size: 14.5px;
    font-weight: 700;
    color: #f8fafc;
    margin: 1px 0;
}

.sbs-founder-text {
    font-size: 12px;
    color: #94a3b8;
    margin: 0;
}

.sbs-founder-text strong {
    color: #e2e8f0;
}

.sbs-contacts-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sbs-contact-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 5px 10px;
    border-radius: 7px;
    color: #cbd5e1;
    font-size: 11.5px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
}

.sbs-contact-chip:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    color: #93c5fd;
}

.sbs-actions-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-sbs-projects {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
    transition: all 0.15s ease;
}

.btn-sbs-projects:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.45);
}

.chip-social-svg {
    display: block;
    flex-shrink: 0;
}

.sbs-contact-chip.chip-wa:hover {
    background: rgba(37, 211, 102, 0.15);
    border-color: rgba(37, 211, 102, 0.4);
    color: #86efac;
}

.sbs-contact-chip.chip-linkedin:hover {
    background: rgba(10, 102, 194, 0.25);
    border-color: rgba(10, 102, 194, 0.6);
    color: #60a5fa;
}

.sbs-contact-chip.chip-facebook:hover {
    background: rgba(24, 119, 242, 0.25);
    border-color: rgba(24, 119, 242, 0.6);
    color: #93c5fd;
}

/* ══════════════════════════════════════════════════════════════
   LIGHT MODE (الوضع النهاري)
   ══════════════════════════════════════════════════════════════ */
.auth-gate-screen.theme-light {
    background: radial-gradient(circle at 50% 0%, #f0fdf4 0%, #f8fafc 40%, #e2e8f0 100%);
    color: #0f172a;
}

.auth-gate-screen.theme-light .auth-gate-nav {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.auth-gate-screen.theme-light .auth-gate-title {
    background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-gate-screen.theme-light .auth-gate-actions .btn {
    background: #ffffff;
    color: #1e293b;
    border-color: #cbd5e1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.auth-gate-screen.theme-light .auth-gate-actions .btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.auth-gate-screen.theme-light .auth-gate-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.02);
}

.auth-gate-screen.theme-light .auth-gate-badge {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.auth-gate-screen.theme-light .auth-gate-heading {
    color: #0f172a;
}

.auth-gate-screen.theme-light .auth-gate-subtext {
    color: #475569;
}

.auth-gate-screen.theme-light .auth-feat-item {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.auth-gate-screen.theme-light .auth-feat-text strong {
    color: #0f172a;
}

.auth-gate-screen.theme-light .auth-feat-text small {
    color: #64748b;
}

.auth-gate-screen.theme-light .btn-google-gate {
    background: #ffffff;
    color: #0f172a;
    border: 1.5px solid #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.auth-gate-screen.theme-light .btn-google-gate:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #94a3b8;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.auth-gate-screen.theme-light .auth-gate-hint {
    color: #64748b;
}

.auth-gate-screen.theme-light .auth-gate-footer-box {
    border-top-color: #e2e8f0;
}

.auth-gate-screen.theme-light .sbs-brand-title {
    color: #0f172a;
}

.auth-gate-screen.theme-light .sbs-founder-text {
    color: #64748b;
}

.auth-gate-screen.theme-light .sbs-founder-text strong {
    color: #0f172a;
}

.auth-gate-screen.theme-light .sbs-contact-chip {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #1e293b;
}

.auth-gate-screen.theme-light .sbs-contact-chip:hover {
    background: #e0f2fe;
    border-color: #7dd3fc;
    color: #0369a1;
}

.auth-gate-screen.theme-light .sbs-contact-chip.chip-wa:hover {
    background: #dcfce7;
    border-color: #86efac;
    color: #15803d;
}

.auth-gate-screen.theme-light .sbs-contact-chip.chip-linkedin:hover {
    background: #e0f2fe;
    border-color: #7dd3fc;
    color: #0a66c2;
}

.auth-gate-screen.theme-light .sbs-contact-chip.chip-facebook:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1877f2;
}

/* ══════════════════════════════════════════════════════════════
   ABOUT MODAL & SBS STYLES
   ══════════════════════════════════════════════════════════════ */
.modal-about {
    max-width: 660px !important;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-about .modal-body {
    overflow-y: auto;
    padding: 20px 24px;
}

.about-section {
    margin-bottom: 20px;
}

.about-section:last-child {
    margin-bottom: 0;
}

.about-hero-card {
    display: flex;
    gap: 14px;
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
    border: 1px solid #dbeafe;
    border-radius: 12px;
    padding: 14px 18px;
    align-items: flex-start;
}

.about-hero-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.about-hero-details h4 {
    font-size: 15px;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 4px;
}

.about-hero-details p {
    font-size: 12.5px;
    line-height: 1.6;
    color: #475569;
    margin: 0;
}

.about-subheading {
    font-size: 14.5px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.about-subtext {
    font-size: 12.5px;
    color: #64748b;
    margin-bottom: 10px;
    line-height: 1.5;
}

.about-contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.about-contact-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.15s ease;
}

.about-contact-card:hover {
    border-color: #3b82f6;
    background: #f0f7ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.08);
}

.about-contact-card.wa-accent:hover {
    border-color: #22c55e;
    background: #f0fdf4;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.08);
}

.about-contact-card.linkedin-accent:hover {
    border-color: #0a66c2;
    background: #f0f7ff;
    box-shadow: 0 4px 12px rgba(10, 102, 194, 0.12);
}

.about-contact-card.facebook-accent:hover {
    border-color: #1877f2;
    background: #f0f4ff;
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.12);
}

.about-contact-grid-founder {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) !important;
}

.contact-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.contact-card-info label {
    display: block;
    font-size: 10.5px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 2px;
    cursor: pointer;
}

.contact-card-info strong {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    direction: ltr;
    text-align: start;
    white-space: nowrap;
}

.about-founder-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
}

.founder-profile-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.founder-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.founder-name {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 1px 0;
}

.founder-role {
    font-size: 12px;
    color: #64748b;
    display: block;
}

.modal-footnote {
    font-size: 11.5px;
    color: #94a3b8;
}

/* ══════════════════════════════════════════════════════════════
   SBS PROJECTS PORTFOLIO MODAL
   ══════════════════════════════════════════════════════════════ */
.modal-projects {
    max-width: 920px !important;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.projects-intro-text {
    font-size: 13.5px;
    color: #475569;
    margin-bottom: 18px;
    line-height: 1.6;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.project-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.project-card:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.08);
}

.project-card.project-card-current {
    border-color: #93c5fd;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.05);
}

.project-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.project-icon-badge {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.project-badges {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.project-cat-badge {
    font-size: 11px;
    font-weight: 600;
    color: #2563eb;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    padding: 2.5px 8px;
    border-radius: 6px;
}

.project-tag-badge {
    font-size: 10px;
    font-weight: 700;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 2.5px 7px;
    border-radius: 6px;
    text-transform: uppercase;
}

.project-name {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px 0;
}

.project-desc {
    font-size: 12.5px;
    color: #475569;
    line-height: 1.55;
    margin: 0 0 14px 0;
    flex-grow: 1;
}

.project-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    gap: 10px;
}

.project-url-pill {
    font-size: 11.5px;
    color: #64748b;
    font-family: monospace;
    background: #f8fafc;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    direction: ltr;
    text-align: start;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.btn-visit-project {
    background: #2563eb;
    color: #ffffff !important;
    border-radius: 7px;
    padding: 5px 12px;
    font-weight: 600;
    font-size: 12px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.btn-visit-project:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(37, 99, 235, 0.3);
}

.projects-connect-banner {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.connect-banner-text h5 {
    margin: 0 0 4px 0;
    font-size: 14.5px;
    font-weight: 700;
    color: #ffffff;
}

.connect-banner-text p {
    margin: 0;
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.5;
}

.connect-banner-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.btn-social-linkedin {
    background: #0a66c2 !important;
    color: #ffffff !important;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: 8px;
    font-size: 12px;
    text-decoration: none;
    border: none;
    transition: all 0.15s ease;
}

.btn-social-linkedin:hover {
    background: #004182 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(10, 102, 194, 0.4);
}

.btn-social-facebook {
    background: #1877f2 !important;
    color: #ffffff !important;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: 8px;
    font-size: 12px;
    text-decoration: none;
    border: none;
    transition: all 0.15s ease;
}

.btn-social-facebook:hover {
    background: #0d65d9 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(24, 119, 242, 0.4);
}

.btn-social-wa {
    background: #22c55e !important;
    color: #ffffff !important;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: 8px;
    font-size: 12px;
    text-decoration: none;
    border: none;
    transition: all 0.15s ease;
}

.btn-social-wa:hover {
    background: #16a34a !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(34, 197, 94, 0.4);
}

/* ── iOS / PWA Installation Modal ── */
.modal-install-guide {
    max-width: 480px !important;
}

.install-guide-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 20px;
}

.install-guide-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.install-guide-hero h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.install-guide-hero p {
    margin: 0;
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}

.install-steps-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.install-step-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
}

.install-step-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #2563eb;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.install-step-text strong {
    display: block;
    font-size: 13.5px;
    color: #0f172a;
    margin-bottom: 3px;
}

.install-step-text p {
    margin: 0;
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE AUTH GATE & MOBILE ENHANCEMENTS
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
    .auth-gate-nav {
        padding: 10px 14px;
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 8px;
    }
    .auth-gate-title {
        font-size: 15px;
    }
    .auth-gate-actions {
        flex-wrap: nowrap;
        gap: 5px;
    }
    .auth-gate-actions .btn {
        padding: 5px 8px;
        font-size: 11px;
    }
    .btn-theme-toggle,
    .btn-pwa-install {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    .auth-gate-main {
        padding: 12px 10px;
    }
    .auth-gate-card {
        padding: 18px 14px;
        border-radius: 16px;
    }
    .auth-gate-heading {
        font-size: 19px;
    }
    .auth-gate-subtext {
        font-size: 12px;
        margin-bottom: 14px;
        line-height: 1.5;
    }
    .auth-gate-features {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-bottom: 16px;
    }
    .auth-feat-item {
        padding: 8px 10px;
    }
    .btn-google-gate {
        width: 100%;
        max-width: 100%;
        padding: 11px 14px;
        font-size: 13.5px;
    }
    .sbs-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .sbs-contacts-strip {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        width: 100%;
    }
    .sbs-contacts-strip .chip-website {
        grid-column: span 2;
    }
    .sbs-contact-chip {
        justify-content: center;
        font-size: 11px;
        padding: 6px 8px;
    }
    .about-contact-grid {
        grid-template-columns: 1fr;
    }
    .modal-about,
    .modal-projects {
        max-width: 95vw !important;
        margin: 10px;
    }
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .projects-connect-banner {
        flex-direction: column;
        align-items: stretch;
        text-align: start;
        padding: 14px;
    }
    .connect-banner-actions {
        width: 100%;
        display: flex;
        flex-direction: column;
    }
    .connect-banner-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 440px) {
    .nav-btn-text {
        display: none;
    }
}

/* ── Floating Pre-Login Install Toast ── */
.pre-login-install-toast {
    position: fixed;
    bottom: 24px;
    inset-inline-end: 24px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(15, 23, 42, 0.94);
    border: 1px solid rgba(59, 130, 246, 0.4);
    box-shadow: 0 12px 36px -6px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
    border-radius: 14px;
    padding: 12px 16px;
    max-width: 440px;
    animation: toastSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.theme-light .pre-login-install-toast {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(37, 99, 235, 0.3);
    box-shadow: 0 12px 30px -6px rgba(37, 99, 235, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

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

.toast-slide-enter-active,
.toast-slide-leave-active {
    transition: all 0.3s ease;
}

.toast-slide-enter-from,
.toast-slide-leave-to {
    opacity: 0;
    transform: translateY(20px);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.toast-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.toast-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: start;
}

.toast-text strong {
    font-size: 13px;
    font-weight: 700;
    color: #f8fafc;
}

.theme-light .toast-text strong {
    color: #0f172a;
}

.toast-text small {
    font-size: 11px;
    line-height: 1.35;
    color: #94a3b8;
}

.theme-light .toast-text small {
    color: #64748b;
}

.toast-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-toast-install {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff !important;
    border: none;
    font-weight: 700;
    font-size: 11.5px;
    padding: 6px 14px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-toast-install:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.45);
}

.btn-toast-close {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 14px;
    padding: 4px;
    border-radius: 6px;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, background 0.15s ease;
}

.btn-toast-close:hover {
    color: #f1f5f9;
    background: rgba(255, 255, 255, 0.1);
}

.theme-light .btn-toast-close:hover {
    color: #0f172a;
    background: rgba(0, 0, 0, 0.06);
}

/* ── Website Chip Styling ── */
.chip-website {
    background: rgba(14, 165, 233, 0.14) !important;
    border-color: rgba(14, 165, 233, 0.35) !important;
    color: #38bdf8 !important;
}

.chip-website:hover {
    background: rgba(14, 165, 233, 0.26) !important;
    border-color: #0ea5e9 !important;
    transform: translateY(-1px);
}

.theme-light .chip-website {
    background: #f0f9ff !important;
    border-color: #bae6fd !important;
    color: #0284c7 !important;
}

/* ── Sidebar Quick PDF Resume Import Banner ── */
.sidebar-pdf-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(79, 70, 229, 0.08));
    border: 1px dashed rgba(37, 99, 235, 0.35);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.sidebar-pdf-banner:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(79, 70, 229, 0.14));
    border-color: #2563eb;
}

.pdf-banner-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.pdf-banner-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    text-align: start;
}

.pdf-banner-info strong {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-color, #1e293b);
}

.pdf-banner-info small {
    font-size: 10.5px;
    color: var(--text-muted, #64748b);
    line-height: 1.25;
}

.btn-primary-pdf {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff !important;
    border: none;
    font-size: 11.5px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary-pdf:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
}

.empty-state-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

/* ── PDF Import Modal ── */
.modal-pdf-import {
    max-width: 580px !important;
}

.pdf-loading-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 16px;
    text-align: center;
}

.pdf-file-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.25);
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 14px;
    font-size: 12px;
    font-weight: 600;
}

.pdf-file-stats {
    background: rgba(37, 99, 235, 0.18);
    color: #2563eb;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
}

.pdf-extract-intro {
    font-size: 13px;
    color: var(--text-muted, #64748b);
    line-height: 1.5;
    margin-bottom: 16px;
}

.pdf-extracted-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.pdf-summary-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: start;
    transition: border-color 0.2s ease;
}

.dark-mode .pdf-summary-item {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.pdf-summary-item.item-detected {
    border-color: rgba(34, 197, 94, 0.4);
    background: rgba(34, 197, 94, 0.05);
}

.summary-label {
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
}

.pdf-summary-item strong {
    font-size: 12.5px;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dark-mode .pdf-summary-item strong {
    color: #f8fafc;
}

.pdf-mode-selector {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

.mode-radio-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    text-align: start;
    transition: all 0.2s ease;
}

.dark-mode .mode-radio-label {
    border-color: rgba(255, 255, 255, 0.1);
}

.mode-radio-label:hover {
    border-color: #93c5fd;
    background: rgba(37, 99, 235, 0.03);
}

.mode-radio-label.active {
    border-color: #2563eb;
    background: rgba(37, 99, 235, 0.07);
}

.mode-radio-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mode-radio-content strong {
    font-size: 13px;
    color: #0f172a;
}

.dark-mode .mode-radio-content strong {
    color: #f8fafc;
}

.mode-radio-content small {
    font-size: 11.5px;
    color: #64748b;
    line-height: 1.4;
}

@media (max-width: 640px) {
    .pre-login-install-toast {
        bottom: 12px;
        inset-inline: 12px;
        max-width: none;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .toast-actions {
        justify-content: flex-end;
    }
    .pdf-extracted-summary-grid {
        grid-template-columns: 1fr;
    }
}

/* ── PDF Language Badge in File Header ── */
.pdf-lang-badge {
    margin-inline-start: auto;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    letter-spacing: 0.02em;
}

.pdf-lang-badge.lang-ar {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid rgba(34, 197, 94, 0.35);
}

.pdf-lang-badge.lang-en {
    background: #e0e7ff;
    color: #3730a3;
    border: 1px solid rgba(99, 102, 241, 0.35);
}

.dark-mode .pdf-lang-badge.lang-ar {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
    border-color: rgba(34, 197, 94, 0.3);
}

.dark-mode .pdf-lang-badge.lang-en {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border-color: rgba(99, 102, 241, 0.3);
}

/* ── PDF Incompatible Language Card ── */
.pdf-incompatible-card {
    background: #fff1f2;
    border: 1.5px solid #fca5a5;
    border-radius: 12px;
    padding: 16px;
    margin: 14px 0 18px;
    text-align: start;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.08);
}

.dark-mode .pdf-incompatible-card {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.incompatible-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.incompatible-icon {
    font-size: 24px;
    line-height: 1;
    flex-shrink: 0;
}

.incompatible-title {
    font-size: 14.5px;
    font-weight: 700;
    color: #b91c1c;
    margin: 0 0 6px 0;
}

.dark-mode .incompatible-title {
    color: #fca5a5;
}

.incompatible-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 11.5px;
}

.incomp-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11.5px;
}

.incomp-source {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.dark-mode .incomp-source {
    background: rgba(239, 68, 68, 0.2);
    color: #fecaca;
    border-color: rgba(239, 68, 68, 0.4);
}

.incomp-target {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.dark-mode .incomp-target {
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    border-color: rgba(255, 255, 255, 0.15);
}

.incomp-arrow {
    font-weight: bold;
    color: #94a3b8;
    user-select: none;
}

.incompatible-desc {
    font-size: 12.5px;
    line-height: 1.6;
    color: #7f1d1d;
    margin: 10px 0 14px;
}

.dark-mode .incompatible-desc {
    color: #fecdd3;
}

.incompatible-actions {
    display: flex;
    justify-content: flex-start;
}

.btn-incompatible-switch {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    color: #ffffff !important;
    font-weight: 700;
    padding: 10px 18px !important;
    border-radius: 9px !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-incompatible-switch:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4) !important;
}
