@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

:root {
    --plum-deep: #2D0B1E;
    --plum-medium: #4A1230;
    --berry-accent: #c797eb;
    --rose-bright: #1fd1f9;
    --accent-purple: #b621fe;
    --bg-premium: #FFFFFF;
    --surface-card: #FFFFFF;
    --text-dark: #353535;
    --text-muted: #676767;
    --border-light: rgba(0, 0, 0, 0.08);
    --border-strong: rgba(0, 0, 0, 0.15);
    --shadow-premium: 0 4px 20px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02);
    --radius: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
html, body { min-height: 100vh; margin: 0; padding: 0; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-dark); 
    background: #fdfdfd;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
button, input, select, textarea { font: inherit; }

body.workspace-mode {
    height: 100vh;
    overflow: hidden;
}
body.workspace-mode .dashboard {
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}
body.workspace-mode .site-header,
body.workspace-mode .site-footer {
    display: none !important;
}

.dashboard { 
    min-height: 100vh;
    display: flex; 
    flex-direction: column; 
}

/* Top Header */
.brand-header {
    display: none !important;
}

.btn-open-workspace {
    display: none !important;
}

.app-grid { 
    display: grid; 
    grid-template-columns: 258px minmax(0, 1fr); 
    grid-template-rows: minmax(0, 1fr) 140px;
    grid-template-areas: 
        "controls preview"
        "controls gallery"; 
    gap: 12px; 
    padding: 12px; 
    flex: 1;
    height: calc(100vh - 58px);
    max-height: calc(100vh - 58px);
    min-height: 0; 
    overflow: hidden;
    background-color: #e0e5ec;
    box-sizing: border-box;
}

.control-panel { 
    grid-area: controls; 
    overflow-y: auto !important; 
    overflow-x: hidden !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(182, 33, 254, 0.35) transparent;
    display: flex; 
    flex-direction: column; 
    gap: 12px; 
    padding-right: 4px; 
    padding-bottom: 24px;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    z-index: 10;
    position: relative;
    box-sizing: border-box;
    background: transparent;
    border: none;
    box-shadow: none;
}
.control-panel::-webkit-scrollbar { width: 5px; }
.control-panel::-webkit-scrollbar-thumb { background: rgba(182, 33, 254, 0.3); border-radius: 4px; }
.control-panel::-webkit-scrollbar-thumb:hover { background: rgba(182, 33, 254, 0.6); }
.control-panel::-webkit-scrollbar-track { background: transparent; }

.control-panel .panel-section {
    flex: none;
    background: #FFFFFF !important;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    max-height: none;
    overflow-x: hidden;
    overflow-y: visible;
}
.control-panel .panel-section select,
.control-panel .panel-section input {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.preview-column { 
    grid-area: preview; 
    min-width: 0; 
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 16px; 
    height: 100%;
    max-height: 100%;
    overflow: hidden;
}
.gallery-panel { 
    grid-area: gallery; 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
    height: 100%;
    max-height: 100%;
    min-height: 0;
}

.gallery-panel, .screen, .bucket-section, .panel-section { 
    background: #FFFFFF !important; 
    border: 1px solid var(--border-light); 
    border-radius: var(--radius); 
    box-shadow: var(--shadow-premium); 
    overflow: hidden; 
}
.panel-heading { 
    display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 9px; 
    border-bottom: 1px solid rgba(0,0,0,0.05); background: rgba(0, 0, 0, 0.02); 
    flex-shrink: 0;
}
.panel-heading h2, .panel-heading h3, .screen h2, .bucket-section h3, .panel-section h3 { 
    margin: 0; color: var(--text-dark); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; 
}
.count-chip { min-width: 32px; padding: 4px 10px; border-radius: 20px; background: #b621fe; color: #FFFFFF; font-size: 11px; font-weight: 700; text-align: center; }
.db-sync-chip {
    padding: 3px 8px;
    border-radius: 12px;
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}
.db-sync-chip.saving {
    background: #fffbeb;
    color: #b45309;
    border-color: #fde68a;
}
.btn-import-db {
    width: 100%;
    padding: 8px 12px;
    background: linear-gradient(135deg, #906bff 0%, #3d93fc 100%);
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 6px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(129, 140, 248, 0.25);
}
.btn-import-db:hover {
    opacity: 0.92;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(129, 140, 248, 0.25);
}

.gallery-container { 
    flex: 1; 
    min-height: 0; 
    display: flex; 
    flex-direction: row; 
    gap: 12px; 
    overflow-x: auto; 
    overflow-y: hidden;
    padding: 10px 16px; 
    background: rgba(0,0,0,0.005); 
    align-items: center;
    scrollbar-width: thin;
    scrollbar-color: rgba(182, 33, 254, 0.3) transparent;
}
.gallery-container::-webkit-scrollbar { height: 6px; }
.gallery-container::-webkit-scrollbar-thumb { background: rgba(182, 33, 254, 0.3); border-radius: 4px; }
.thumb-box { 
    position: relative; 
    width: 72px; 
    height: 90px; 
    aspect-ratio: 4 / 5; 
    border: 1px solid var(--border-strong); 
    border-radius: 8px; 
    cursor: pointer; 
    overflow: hidden; 
    background: #FFFFFF; 
    flex-shrink: 0;
    transition: all 0.2s ease; 
}
.thumb-box:hover { transform: translateY(-2px); border-color: #b621fe; box-shadow: 0 6px 16px rgba(0,0,0,0.08); }
.thumb-box.active { border: 3px solid #b621fe; box-shadow: 0 0 0 4px rgba(182,33,254, 0.15); }
.thumb-box img { width: 100%; height: 100%; object-fit: contain; }
.thumb-delete { 
    position: absolute; top: 6px; right: 6px; background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); color: white; border: none; 
    border-radius: 50%; width: 24px; height: 24px; font-size: 14px; cursor: pointer; 
    display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 8px rgba(220,38,38,0.28); 
    z-index: 5;
}

.workspace { 
    flex: 1; 
    min-height: 0; 
    max-height: 100%;
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    grid-template-rows: minmax(0, 1fr);
    gap: 16px; 
    overflow: hidden;
}
.screen { 
    display: flex; 
    flex-direction: column; 
    height: 100%; 
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
}
.screen-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 14px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    background: rgba(0,0,0,0.01);
    flex-shrink: 0;
    gap: 8px;
    min-width: 0;
}
.screen h2 { 
    margin: 0; 
    color: var(--text-dark); 
    font-size: 12.5px; 
    font-weight: 800; 
    text-transform: uppercase; 
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dimension-badge {
    font-size: 11px;
    font-weight: 700;
    color: #b621fe;
    background: rgba(182, 33, 254, 0.1);
    border: 1px solid rgba(182, 33, 254, 0.25);
    padding: 2px 8px;
    border-radius: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.canvas-viewport { 
    flex: 1; 
    width: 100%; 
    height: 100%;
    min-height: 0;
    position: relative; 
    background: #1e1e24; /* Professional studio neutral gray workstation background */
    overflow: hidden; 
    display: grid; 
    place-items: center; 
    cursor: grab;
}
.canvas-viewport.panning {
    cursor: grabbing;
}

/* Document Studio Viewport Centering */
#viewport-src, #viewport-dst {
    display: grid;
    place-items: center;
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#viewport-src > #container-src,
#viewport-src > #src-empty-msg {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    justify-self: center;
}

#src-empty-msg {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    color: #64748b;
    user-select: none;
    pointer-events: none;
    margin: auto;
    z-index: 5;
    max-width: 90%;
    box-sizing: border-box;
}

#viewport-dst > .canvas-container {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    justify-self: center;
}

.canvas-container { 
    position: relative; 
    display: inline-block; 
    margin: auto; 
}

canvas { 
    display: block; 
    background: #FFFFFF; 
    border-radius: 6px; 
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25), 0 1px 3px rgba(0, 0, 0, 0.1); 
}

.corner-handle { 
    position: absolute; 
    width: 26px; 
    height: 26px; 
    background: transparent; 
    box-sizing: border-box;
    z-index: 15; 
    cursor: move;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 1px #000000);
    transition: filter 0.15s ease;
}

/* Extended transparent hit area for easy mouse and touch grabbing */
.corner-handle::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: transparent;
    cursor: pointer;
}

/* Visual pivot point indicator at the corner vertex */
.corner-handle::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: #ffffff;
    border: 1.5px solid #1fd1f9;
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(31, 209, 249, 0.9);
}

.corner-handle:hover,
.corner-handle.active {
    filter: drop-shadow(0 3px 8px rgba(31, 209, 249, 0.95)) drop-shadow(0 0 2px #000000);
}

/* Top-Left Bracket: ┌ */
.corner-handle.handle-tl {
    border-top: 4px solid #1fd1f9;
    border-left: 4px solid #1fd1f9;
    border-bottom: none;
    border-right: none;
    border-top-left-radius: 3px;
    transform: translate(0, 0);
    cursor: nwse-resize;
}
.corner-handle.handle-tl::after {
    top: -3px;
    left: -3px;
}

/* Top-Right Bracket: ┐ */
.corner-handle.handle-tr {
    border-top: 4px solid #1fd1f9;
    border-right: 4px solid #1fd1f9;
    border-bottom: none;
    border-left: none;
    border-top-right-radius: 3px;
    transform: translate(-100%, 0);
    cursor: nesw-resize;
}
.corner-handle.handle-tr::after {
    top: -3px;
    right: -3px;
}

/* Bottom-Right Bracket: _| */
.corner-handle.handle-br {
    border-bottom: 4px solid #1fd1f9;
    border-right: 4px solid #1fd1f9;
    border-top: none;
    border-left: none;
    border-bottom-right-radius: 3px;
    transform: translate(-100%, -100%);
    cursor: nwse-resize;
}
.corner-handle.handle-br::after {
    bottom: -3px;
    right: -3px;
}

/* Bottom-Left Bracket: |_ */
.corner-handle.handle-bl {
    border-bottom: 4px solid #1fd1f9;
    border-left: 4px solid #1fd1f9;
    border-top: none;
    border-right: none;
    border-bottom-left-radius: 3px;
    transform: translate(0, -100%);
    cursor: nesw-resize;
}
.corner-handle.handle-bl::after {
    bottom: -3px;
    left: -3px;
}

.panel-section { padding: 16px; flex-shrink: 0; }
.panel-section h3 { margin-top: 0; margin-bottom: 14px; border-left: 3px solid #b621fe; padding-left: 8px; }

.upload-btn { 
    display: flex; align-items: center; justify-content: center; min-height: 38px; padding: 10px 22px; 
    text-align: center; border-radius: 10px; border: none; 
    background: linear-gradient(135deg, #906bff 0%, #3d93fc 100%); color: #ffffff; cursor: pointer; font-weight: 600; font-size: 14px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(129, 140, 248, 0.25);
    transition: all 0.2s ease; 
}
.upload-btn:hover { opacity: 0.92; transform: translateY(-1px); }

.control-group { margin-bottom: 6px; }
.control-group:last-child { margin-bottom: 0; }
.control-label { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--text-dark); margin-bottom: 2px; }
.control-label span:last-child { color: #b621fe; font-variant-numeric: tabular-nums; }

input[type="range"] { -webkit-appearance: none; width: 100%; height: 6px; background: #933AFF; border-radius: 10px; outline: none; accent-color: #b621fe; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #b621fe; cursor: pointer; transition: transform 0.1s; }
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.2); }

select, input[type="text"] { 
    width: 100%; min-height: 40px; padding: 8px 14px; background: #FFFFFF; 
    border: 1px solid var(--border-strong); color: var(--text-dark); border-radius: 8px; 
    outline: none; font-weight: 600; font-size: 13px;
}
select:focus, input[type="text"]:focus { border-color: #b621fe; box-shadow: 0 0 0 3px rgba(182,33,254, 0.12); }

.button-grid { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); margin-top: 10px; width: 100%; }
.button-grid .btn { width: 100%; min-width: 0; box-sizing: border-box; }
.effect-toggle-row { display: grid; gap: 6px; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; align-items: stretch; }
.effect-toggle-row .btn { width: 100%; min-width: 0; min-height: 38px; padding: 5px 4px; font-size: 10.5px; line-height: 1.18; white-space: normal; overflow: visible; text-overflow: clip; text-align: center; word-break: normal; overflow-wrap: break-word; box-sizing: border-box; }
.side-select-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 12px; width: 100%; }
.side-select-row .btn-assign { width: 100%; min-width: 0; min-height: 36px; padding: 7px 6px; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-sizing: border-box; }

.button-group {
    display: flex;
    gap: 12px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.btn-primary-soft {
    background: linear-gradient(135deg, #906bff 0%, #3d93fc 100%);
    color: #ffffff;
    border: none;
    padding: 10px 22px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(129, 140, 248, 0.25);
}

.btn-primary-soft:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.btn-secondary-soft {
    background-color: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
    padding: 10px 22px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.btn-secondary-soft:hover {
    background-color: #e5e7eb;
    color: #1f2937;
}

.btn, .btn-assign { 
    border: none; border-radius: 10px; cursor: pointer; font-weight: 600; 
    font-size: 12.5px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; 
    min-height: 36px; padding: 8px 16px; transition: all 0.2s ease; 
    color: #ffffff; position: relative;
    background: linear-gradient(135deg, #906bff 0%, #3d93fc 100%);
    box-shadow: 0 4px 12px rgba(129, 140, 248, 0.25);
    z-index: 1;
}
.btn-main, .btn-success, .btn-purple, .btn-accent, .btn-shadow-removal { background: linear-gradient(135deg, #906bff 0%, #3d93fc 100%); color: #ffffff; border: none; }
.btn-main:hover:not(:disabled), .btn-assign:hover:not(:disabled), .btn-success:hover:not(:disabled), .btn-purple:hover:not(:disabled), .btn-accent:hover:not(:disabled), .btn-shadow-removal:hover:not(:disabled) { opacity: 0.92; transform: translateY(-1px); }
.btn-accent.active, .btn-shadow-removal.active { background: linear-gradient(135deg, #906bff 0%, #3d93fc 100%); color: #ffffff; box-shadow: 0 4px 12px rgba(129, 140, 248, 0.35), inset 0 2px 6px rgba(0,0,0,0.18); }

/* Grayscale vs Color Mutual Toggle & Shadow Toggle: Inactive button switches to grayscale */
#btn-effect-grayscale:not(.active):not(:disabled),
#btn-effect-color:not(.active):not(:disabled),
#btn-shadow-removal:not(.active):not(:disabled) {
    background: linear-gradient(135deg, #906bff 0%, #3d93fc 100%);
    filter: grayscale(100%);
    opacity: 0.78;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.16);
}
#btn-effect-grayscale:not(.active):not(:disabled):hover,
#btn-effect-color:not(.active):not(:disabled):hover,
#btn-shadow-removal:not(.active):not(:disabled):hover {
    filter: grayscale(70%);
    opacity: 0.9;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.22);
}
#btn-effect-grayscale.active:not(:disabled),
#btn-effect-color.active:not(:disabled),
#btn-shadow-removal.active:not(:disabled) {
    background: linear-gradient(135deg, #906bff 0%, #3d93fc 100%);
    filter: none;
    opacity: 1;
    box-shadow: 0 4px 12px rgba(129, 140, 248, 0.34);
}

/* Dedicated Download (Gradient Green), Delete (Gradient Red), Send To (Gradient Blue) */
.btn-download, .modal-btn.btn-download { background: linear-gradient(135deg, #22c55e 0%, #059669 100%); color: #ffffff; box-shadow: 0 4px 14px rgba(16,185,129,0.28); }
.btn-download:hover:not(:disabled), .modal-btn.btn-download:hover:not(:disabled) { background: linear-gradient(135deg, #16a34a 0%, #047857 100%); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(5,150,105,0.38); }
.btn-danger { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); color: #ffffff; box-shadow: 0 4px 14px rgba(220,38,38,0.28); }
.btn-danger:hover:not(:disabled) { background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(220,38,38,0.38); }
.btn-sendto { background: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%); color: #ffffff; box-shadow: 0 4px 14px rgba(37,99,235,0.28); }
.btn-sendto:hover:not(:disabled) { background: linear-gradient(135deg, #0ea5e9 0%, #1d4ed8 100%); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(37,99,235,0.38); }

.btn:disabled,
.btn-assign:disabled,
.btn-download:disabled,
.btn-danger:disabled,
.btn-sendto:disabled,
.btn-primary-soft:disabled,
.btn-secondary-soft:disabled,
.btn-primary-hero:disabled,
.btn-secondary-hero:disabled,
.doc-tool-tab:disabled,
.editor-tool-tab:disabled,
.passport-tool-tab:disabled,
.modal-btn:disabled,
.btn-modal-primary:disabled,
.btn-modal-cancel:disabled {
    background: #f3f4f6;
    background-color: #f3f4f6;
    color: #4b5563;
    border: 1px solid #cbd5e1;
    padding: 10px 22px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: not-allowed;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: none;
    transform: none;
    filter: none;
    opacity: 1;
}
.editor-header-actions .btn:disabled,
.doc-tool-tab:disabled,
.editor-tool-tab:disabled,
.passport-tool-tab:disabled {
    padding: 6px 12px;
    font-size: 12px;
    min-height: 32px;
}
.effect-toggle-row .btn:disabled {
    padding: 5px 4px;
    font-size: 10.5px;
    white-space: normal;
}
.side-select-row .btn-assign:disabled {
    padding: 7px 6px;
    font-size: 11px;
}

.bucket-section { display: flex; flex-direction: column; height: 100%; min-height: 0; overflow: hidden; }
.bucket-grid { display: flex; gap: 12px; overflow-x: auto; padding: 10px 16px; background: rgba(0,0,0,0.005); align-items: center; flex: 1; min-height: 0; }
.bucket-pair-card { 
    position: relative; display: flex; gap: 10px; background: #FFFFFF; padding: 10px; 
    border: 1px solid var(--border-strong); border-radius: 10px; flex-shrink: 0; 
    cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,0.02); margin-bottom: 4px; 
}
.bucket-pair-card.selected { border: 2px solid #b621fe; background: rgba(182,33,254,0.03); }
.bucket-mini-slot { width: 90px; height: 58px; background: #FFF; border: 1px dashed var(--border-strong); border-radius: 6px; overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 10px; color: var(--text-muted); }
.bucket-mini-slot img { width: 100%; height: 100%; object-fit: contain; }
.bucket-label { position: absolute; bottom: -18px; left: 0; width: 100%; text-align: center; font-size: 10px; font-weight: 700; color: var(--text-dark); }
.bucket-pair-delete { position: absolute; top: -6px; right: -6px; background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); color: white; border: none; width: 20px; height: 20px; border-radius: 50%; font-size: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 5; }

html.print-modal-open,
body.print-modal-open { overflow: hidden !important; overscroll-behavior: none !important; }
.doc-print-modal { position: fixed; inset: 0; width: 100%; height: 100vh; height: 100dvh; max-height: 100dvh; z-index: 20000; display: none; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; overscroll-behavior: contain; background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(4px); }
.doc-print-modal.active { display: grid; }
.doc-print-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 14px 20px; background: #FFFFFF; border-bottom: 2px solid var(--accent-purple); }
.doc-print-toolbar h3 { margin: 0; font-size: 15px; font-weight: 800; color: var(--plum-deep); }
.doc-print-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.doc-print-stage { min-height: 0; width: 100%; height: 100%; overflow-y: auto; overflow-x: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 14px; box-sizing: border-box; }
.a4-page-preview { position: relative; width: min(78vw, 794px); aspect-ratio: 210 / 297; flex-shrink: 0; background: #e7e7e7; box-shadow: 0 30px 70px rgba(0,0,0,0.5); overflow: hidden; }
.a4-page-preview img { position: absolute; left: 0; top: 0; width: 100%; height: auto; cursor: move; touch-action: none; }
.modal-btn { border: none; border-radius: 10px; padding: 10px 20px; font-weight: 600; font-size: 13.5px; cursor: pointer; background: linear-gradient(135deg, #906bff 0%, #3d93fc 100%); color: #FFFFFF; white-space: nowrap; box-shadow: 0 4px 12px rgba(129, 140, 248, 0.25); transition: all 0.2s ease; }
.modal-btn:hover { opacity: 0.92; transform: translateY(-1px); }
.modal-btn.secondary { background: #f3f4f6; background-color: #f3f4f6; color: #4b5563; border: 1px solid #e5e7eb; box-shadow: none; }
.modal-btn.secondary:hover { opacity: 1; background: #e5e7eb; background-color: #e5e7eb; color: #1f2937; transform: none; }
.modal-btn.success { background: linear-gradient(135deg, #22c55e 0%, #059669 100%); color: #ffffff; }
.modal-btn.success:hover { background: linear-gradient(135deg, #16a34a 0%, #047857 100%); box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3); }
.passport-paper-preview {
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(0,0,0,0.45);
    border-radius: 2px;
    box-sizing: border-box;
    position: relative;
    flex-shrink: 0;
}
.passport-modal-control {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 700;
    color: #334155;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 4px 8px;
    border-radius: 6px;
}
.passport-modal-control input[type="checkbox"] {
    width: 15px;
    height: 15px;
    margin: 0;
    padding: 0;
    accent-color: #b621fe;
    cursor: pointer;
    flex-shrink: 0;
}
.passport-modal-control select,
.passport-modal-control input:not([type="checkbox"]):not([type="range"]) {
    width: auto;
    min-height: 28px;
    padding: 4px 6px;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    background: #ffffff;
    box-sizing: border-box;
    font-variant-numeric: tabular-nums;
}
.passport-modal-control input:disabled,
.passport-modal-control select:disabled {
    opacity: 0.45;
    background: #e2e8f0;
    cursor: not-allowed;
}
.passport-scale-slider-wrap {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    min-width: 112px;
}
.passport-modal-control input[type="range"] {
    width: 112px;
    height: 5px;
    margin: 2px 0 0;
    padding: 0;
    border: none;
    background: #933AFF;
    border-radius: 8px;
    accent-color: #b621fe;
    cursor: pointer;
}
.passport-scale-ticks {
    display: flex;
    justify-content: space-between;
    font-size: 9.5px;
    font-weight: 700;
    color: #64748b;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

/* Passport Background Presets (Larger Swatches) & Custom Color Picker */
.bg-preset-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 8px;
}
.bg-color-btn {
    position: relative;
    height: 60px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 6px 9px;
    transition: transform 0.16s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.16s ease;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.16), inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}
.bg-color-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(131, 0, 201, 0.26);
}
.bg-color-btn.active {
    box-shadow: 0 6px 18px rgba(131, 0, 201, 0.36), 0 0 0 2px rgba(131, 0, 201, 0.45);
}
.bg-color-name {
    font-size: 11px;
    font-weight: 700;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.82);
    padding: 2px 7px;
    border-radius: 5px;
    line-height: 1.25;
    letter-spacing: 0.1px;
    pointer-events: none;
}

.bg-custom-picker-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-top: 6px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}
.bg-custom-picker-card:hover,
.bg-custom-picker-card:focus-within {
    background: #ffffff;
    border-color: #b621fe;
    box-shadow: 0 4px 14px rgba(182, 33, 254, 0.12);
}
.bg-custom-swatch-shell {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    overflow: hidden;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 1px #cbd5e1, 0 2px 6px rgba(15, 23, 42, 0.12);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bg-custom-color-input {
    width: 52px;
    height: 52px;
    padding: 0;
    margin: -6px;
    border: none;
    background: transparent;
    cursor: pointer;
}
.bg-custom-color-input::-webkit-color-swatch-wrapper {
    padding: 0;
}
.bg-custom-color-input::-webkit-color-swatch {
    border: none;
}
.bg-custom-color-input::-moz-color-swatch {
    border: none;
}
.bg-custom-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}
.bg-custom-title {
    font-size: 12.5px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}
.bg-custom-hex {
    font-size: 11.5px;
    font-weight: 600;
    color: #64748b;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-variant-numeric: tabular-nums;
    text-transform: uppercase;
}
.bg-custom-action {
    font-size: 11.5px;
    font-weight: 700;
    color: #7c3aed;
    white-space: nowrap;
}

/* Categorized Passport Adjustments */
.adj-category-section + .adj-category-section {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
}
.adj-category-header {
    font-size: 12px;
    font-weight: 800;
    color: #1e293b;
    letter-spacing: 0.15px;
    margin-bottom: 10px;
}

/* Color Balance Gradient Sliders (Cyan-Red, Magenta-Green, Yellow-Blue) */
.color-balance-group {
    margin-bottom: 10px;
}
.color-balance-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.2;
}
.cb-label-cyan { color: #0891b2; }
.cb-label-red { color: #dc2626; }
.cb-label-magenta { color: #c026d3; }
.cb-label-green { color: #16a34a; }
.cb-label-yellow { color: #ca8a04; }
.cb-label-blue { color: #2563eb; }
.cb-val {
    font-size: 11px;
    font-weight: 800;
    color: #475569;
    font-variant-numeric: tabular-nums;
}

input[type="range"].color-balance-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 999px;
    outline: none;
    cursor: pointer;
    border: 1px solid rgba(15, 23, 42, 0.14);
    box-sizing: border-box;
}
input[type="range"].color-balance-range.cyan-red {
    background: linear-gradient(90deg, #00f0ff 0%, #7d8989 50%, #ff1e1e 100%) !important;
}
input[type="range"].color-balance-range.magenta-green {
    background: linear-gradient(90deg, #ff00ff 0%, #7d8989 50%, #00e626 100%) !important;
}
input[type="range"].color-balance-range.yellow-blue {
    background: linear-gradient(90deg, #ffe600 0%, #7d8989 50%, #0038ff 100%) !important;
}
input[type="range"].color-balance-range::-webkit-slider-runnable-track {
    height: 5px;
    border-radius: 999px;
    background: transparent;
}
input[type="range"].color-balance-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    margin-top: -5px;
    border-radius: 50% 50% 3px 3px;
    background: linear-gradient(180deg, #cbd5e1 0%, #94a3b8 100%);
    border: 1.5px solid #334155;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.32);
    cursor: pointer;
    transition: transform 0.1s ease;
}
input[type="range"].color-balance-range::-webkit-slider-thumb:hover {
    transform: scale(1.14);
}
input[type="range"].color-balance-range::-moz-range-track {
    height: 5px;
    border-radius: 999px;
    background: transparent;
}
input[type="range"].color-balance-range::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50% 50% 3px 3px;
    background: linear-gradient(180deg, #cbd5e1 0%, #94a3b8 100%);
    border: 1.5px solid #334155;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.32);
    cursor: pointer;
}

#print-area { display: none; }


@media (max-width: 980px) {
    body { overflow: auto; height: auto; }
    .dashboard { height: auto; }
    .brand-header { grid-template-columns: 1fr; gap: 14px; padding: 16px; } .top-actions { justify-content: stretch; } .mode-container { width: 100%; }
    .thumb-box { width: 100px; height: 120px; }
    .editor-tool-pane { height: auto !important; max-height: none !important; overflow: visible !important; }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 0;
    }
    html, body { 
        margin: 0 !important; 
        padding: 0 !important; 
        background: transparent !important; 
        overflow: visible !important; 
        height: auto !important; 
    }
    .dashboard, .brand-header, .app-grid, .doc-print-modal, #passport-print-modal { display: none !important; }
    #print-area { 
        display: block !important; 
        position: relative !important; 
        left: 0; 
        top: 0; 
        width: 210mm;
        min-height: 297mm;
        margin: 0 !important;
        padding: 0 !important;
        background: white !important; 
        box-sizing: border-box;
    }
    
    /* Side-by-side double card slot (Horizontal layout) */
    .print-container { 
        display: grid; 
        grid-template-columns: repeat(2, 85.6mm); 
        gap: 6mm; 
        padding-top: 15mm; 
        padding-bottom: 10mm;
        padding-left: 0;
        padding-right: 0;
        justify-content: center; 
        align-items: start;
        width: 100%;
        box-sizing: border-box;
    }

    /* Side-by-side double card slot (Vertical layout) - centrally aligned with exact column widths */
    .print-container.vertical { 
        display: grid; 
        grid-template-columns: repeat(2, 53.98mm); 
        gap: 8mm; 
        padding-top: 15mm; 
        padding-bottom: 10mm;
        padding-left: 0;
        padding-right: 0;
        justify-content: center; 
        align-items: start;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* ISO CR80 standard print cards with solid continuous border and rounded trim */
    .print-card { 
        width: 85.6mm !important; 
        height: 53.98mm !important; 
        object-fit: fill; 
        display: block; 
        margin: 0 auto;
        position: relative;
        border: 1px solid #111111 !important; /* Solid, continuous line */
        border-radius: 3.18mm !important; /* ISO CR80 corner radius specification */
        box-sizing: border-box !important;
    }
    .print-card.vertical { 
        width: 53.98mm !important; 
        height: 85.6mm !important; 
        margin: 0 auto;
    }
    .print-card-trimmed {
        border-radius: 3.18mm !important;
        border: 1px solid #111111 !important; /* Solid, continuous line */
        box-sizing: border-box !important;
    }

    /* Single card slot - printed on the upper side and centered horizontally */
    .print-center { 
        display: flex; 
        justify-content: center; 
        align-items: flex-start; 
        width: 100%; 
        padding-top: 15mm; 
        padding-bottom: 10mm;
        box-sizing: border-box;
    }
    .print-doc-stage { position: relative; width: 210mm; height: 297mm; background: white; }
    .print-doc-draggable { position: absolute; height: auto; }
}

#canvas-dst, #canvas-id-dst {
    background-color: #ffffff;
}

#container-id-dst {
    position: relative;
    display: inline-block;
    margin: auto;
}

/* ══════════════════════════════════════════════════════════════════
   INTEGRATED IMAGE EDITOR SUITE (UNIFIED DESIGN SYSTEM)
   ══════════════════════════════════════════════════════════════════ */
.editor-workspace {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: calc(100vh - 58px);
    max-height: calc(100vh - 58px);
    min-height: 0;
    overflow: hidden;
    background-color: #e0e5ec;
    box-sizing: border-box;
}

/* Subnav Tools Toolbar */
.editor-subnav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 18px;
    background: #ffffff;
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    flex-shrink: 0;
}
.editor-subnav-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
    padding: 3px 2px 5px;
}
.editor-subnav-tools::-webkit-scrollbar { height: 4px; }
.editor-subnav-tools::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.15); border-radius: 4px; }

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

.editor-tool-tab,
.passport-tool-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: #f4f6fa;
    border: 1px solid #cbd5e1;
    outline: none;
    border-radius: 8px;
    color: var(--text-dark);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.09);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    flex-shrink: 0;
    white-space: nowrap;
}
.editor-tool-tab:hover,
.passport-tool-tab:hover {
    background: #e5e7eb;
    color: #1f2937;
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(129, 140, 248, 0.18);
}
.editor-tool-tab.active,
.passport-tool-tab.active {
    background: linear-gradient(135deg, #906bff 0%, #3d93fc 100%);
    color: #ffffff;
    border: 1px solid transparent;
    box-shadow: 0 4px 12px rgba(129, 140, 248, 0.25);
}

/* Gradient text header styling matching home page */
.tool-hero .section-title, .legal-page-header h1, .tool-intro-h1 {
    background: linear-gradient(135deg, #7c3aed 0%, #b621fe 50%, #06b6d4 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

/* Document & ID Card Studio shadow toggle button (grayscale when OFF, colored gradient when ON) */
.btn-shadow-removal:not(.active):not(:disabled) {
    background: linear-gradient(135deg, #906bff 0%, #3d93fc 100%);
    color: #ffffff;
    border: none;
    filter: grayscale(100%);
    opacity: 0.78;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.16);
}
.btn-shadow-removal:not(.active):hover:not(:disabled) {
    background: linear-gradient(135deg, #906bff 0%, #3d93fc 100%);
    color: #ffffff;
    filter: grayscale(70%);
    opacity: 0.9;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.22);
}
.btn-shadow-removal.active:not(:disabled) {
    background: linear-gradient(135deg, #906bff 0%, #3d93fc 100%);
    color: #ffffff;
    filter: none;
    opacity: 1;
    box-shadow: 0 4px 12px rgba(129, 140, 248, 0.34);
}

/* Center tool intro container */
.tool-intro-container, .tool-hero-content {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
.tool-hero-actions {
    justify-content: center !important;
}

/* Editor Main Body Grid - Left Tool Panel width matched to Document Studio (258px) */
.editor-body-grid {
    display: grid;
    grid-template-columns: 258px minmax(0, 1fr);
    grid-template-areas: "toolpane preview";
    gap: 14px;
    padding: 12px 16px;
    flex: 1 1 0;
    min-height: 0;
    height: calc(100vh - 105px);
    max-height: calc(100vh - 105px);
    overflow: hidden;
    box-sizing: border-box;
}
#passportWorkspace .editor-body-grid {
    grid-template-columns: 258px minmax(0, 1fr);
}

/* Preview Stage Container with maximum visual workspace */
.editor-preview-pane {
    grid-area: preview;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow-premium);
    overflow: hidden !important;
    min-height: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    position: relative;
    padding: 8px;
    box-sizing: border-box;
}

/* Single Central Visual Preview Stage */
.editor-single-preview {
    flex: 1;
    min-height: 0;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: auto;
    padding: 6px;
    background-color: #f1f3f8;
    background-image: repeating-conic-gradient(rgba(0, 0, 0, 0.03) 0 25%, #ffffff 0 50%) 0 0/16px 16px;
    border-radius: 6px;
}

.editor-single-preview img#livePreviewImg {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: filter 0.1s ease, transform 0.1s ease;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: high-quality;
    backface-visibility: hidden;
}

/* Status Info Cluster inside bottom status-bar-wrap */
.status-info-cluster {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dark);
    user-select: none;
}
.status-info-divider {
    color: var(--border-strong);
    opacity: 0.6;
}

/* Universal Page Items & Sequence Card styling for PDF Optimizer and Image to PDF */
.thumb-grid-container {
    scrollbar-width: thin;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    align-content: flex-start !important;
    gap: 12px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    flex: 1 1 auto !important;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    padding-right: 6px;
    padding-bottom: 12px;
    box-sizing: border-box;
}
.page-item-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 6px;
    width: 140px !important;
    min-width: 140px !important;
    max-width: 140px !important;
    height: 220px !important;
    min-height: 220px !important;
    max-height: 220px !important;
    box-sizing: border-box;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    overflow: hidden;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
}
.page-item-card:hover {
    border-color: var(--accent-purple);
    box-shadow: 0 4px 12px rgba(182,33,254,0.15);
    transform: translateY(-2px);
}
.page-item-card.active-page-card {
    border: 2px solid #b621fe !important;
    background: #f0f7ff !important;
}
.page-item-card.dragging {
    opacity: 0.4;
    border-style: dashed;
}
.page-item-thumb-wrap {
    position: relative;
    width: 128px !important;
    height: 181px !important;
    min-height: 181px !important;
    max-height: 181px !important;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid rgba(0,0,0,0.06);
    flex-shrink: 0 !important;
}
.page-item-thumb {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    background: #f8fafc;
    border-radius: 4px;
    display: block;
}
.page-item-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(45,11,30,0.85);
    color: #ffffff;
    font-size: 9px;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 3px;
    z-index: 2;
    pointer-events: none;
}
.page-item-source-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--accent-purple);
    color: #ffffff;
    font-size: 8px;
    font-weight: 800;
    padding: 1px 4px;
    border-radius: 3px;
    z-index: 2;
    text-transform: uppercase;
}
.page-item-details {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 4px;
    overflow: hidden;
}
.page-item-name {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.2;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    margin-top: 2px;
    box-sizing: border-box;
}
.page-item-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 4px;
    width: 100%;
}
.page-item-btn {
    background: #f1f3f8;
    border: none;
    border-radius: 4px;
    padding: 3px 7px;
    font-size: 10px;
    cursor: pointer;
    color: var(--text-dark);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
    transition: background 0.15s, box-shadow 0.15s;
    line-height: 1;
}
.page-item-btn:hover {
    background: linear-gradient(135deg, #906bff 0%, #3d93fc 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(129, 140, 248, 0.25);
}
.page-item-btn.del:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.32);
}

/* Upload Zone inside Preview Stage when empty */
.editor-upload-zone {
    border: 2px dashed #c797eb;
    border-radius: var(--radius);
    padding: 22px 20px;
    text-align: center;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.25s ease;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 4px 16px rgba(182,33,254,0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: auto;
}
.editor-upload-zone .btn {
    margin: 0 auto !important;
    align-self: center !important;
}
.editor-upload-zone:hover, .editor-upload-zone.dragover {
    border-color: var(--accent-purple);
    background: #faf7ff;
    transform: translateY(-2px);
}
.editor-upload-zone h3 {
    margin: 12px 0 6px;
    font-size: 16px;
    font-weight: 800;
    color: var(--plum-deep);
}
.editor-upload-zone p {
    margin: 0 0 16px;
    font-size: 12px;
    color: var(--text-muted);
}

/* Preview Compare / Side-by-Side Boxes */
.editor-preview-boxes {
    display: flex;
    gap: 16px;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}
.editor-preview-box {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-premium);
    position: relative;
}
.editor-preview-box-label {
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 800;
    background: #fafbfe;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}
.editor-preview-box-inner {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 10px;
    background: repeating-conic-gradient(rgba(0,0,0,0.02) 0 25%, #ffffff 0 50%) 0 0/14px 14px;
}
.editor-preview-box-inner img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

/* Crop Canvas Workspace */
.crop-container {
    position: relative;
    display: block;
    user-select: none;
    line-height: 0;
    margin: auto;
    max-width: 100%;
    max-height: 100%;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
    border-radius: 4px;
}
.crop-img-el {
    display: block;
    user-select: none;
    pointer-events: none;
    border-radius: 4px;
}
.crop-rect {
    position: absolute;
    border: 2px solid #b621fe;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45);
    cursor: move;
    display: none;
    box-sizing: border-box;
}
.crop-handle {
    position: absolute;
    width: 11px;
    height: 11px;
    background: #1fd1f9;
    border: 2px solid #ffffff;
    border-radius: 2px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.crop-handle[data-h="tl"] { top: -6px; left: -6px; cursor: nwse-resize; }
.crop-handle[data-h="tm"] { top: -6px; left: calc(50% - 5px); cursor: ns-resize; }
.crop-handle[data-h="tr"] { top: -6px; right: -6px; cursor: nesw-resize; }
.crop-handle[data-h="rm"] { top: calc(50% - 5px); right: -6px; cursor: ew-resize; }
.crop-handle[data-h="br"] { bottom: -6px; right: -6px; cursor: nwse-resize; }
.crop-handle[data-h="bm"] { bottom: -6px; left: calc(50% - 5px); cursor: ns-resize; }
.crop-handle[data-h="bl"] { bottom: -6px; left: -6px; cursor: nesw-resize; }
.crop-handle[data-h="lm"] { top: calc(50% - 5px); left: -6px; cursor: ew-resize; }

.crop-info-bar {
    position: absolute;
    bottom: 6px;
    left: 6px;
    background: rgba(45, 11, 30, 0.85);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    pointer-events: none;
}

/* Tool Settings Panel (Left Menu) */
.editor-tool-pane {
    grid-area: toolpane;
    display: flex !important;
    flex-direction: column !important;
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow-premium);
    overflow: hidden !important;
    min-height: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
}

.editor-pane-header {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-light);
    background: #fafbfe;
    flex-shrink: 0;
}
.editor-pane-header h2 {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
    color: var(--text-dark);
}
.editor-pane-header p {
    display: none;
}

.editor-pane-body {
    flex: 1 1 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(182, 33, 254, 0.35) transparent;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0 !important;
    max-height: 100% !important;
    box-sizing: border-box;
}
.editor-pane-body select,
.editor-pane-body input[type="number"],
.editor-pane-body input[type="text"] {
    min-width: 0;
    min-height: 34px;
    padding: 6px 8px;
    font-size: 12px;
    box-sizing: border-box;
}
.editor-pane-body .sm-tab {
    padding: 6px 5px;
    font-size: 11px;
}
.editor-pane-body::-webkit-scrollbar { width: 7px; }
.editor-pane-body::-webkit-scrollbar-thumb { background: rgba(182, 33, 254, 0.3); border-radius: 4px; }
.editor-pane-body::-webkit-scrollbar-thumb:hover { background: rgba(182, 33, 254, 0.6); }
.editor-pane-body::-webkit-scrollbar-track { background: transparent; }

/* Submode Switcher Tabs */
.sm-tabs {
    display: flex;
    gap: 6px;
    padding: 4px;
    background: #f4f6fa;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    margin-bottom: 4px;
}
.sm-tab {
    flex: 1;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
}
.sm-tab:hover { color: var(--text-dark); }
.sm-tab.active {
    background: #ffffff;
    color: var(--accent-purple);
    font-weight: 800;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

/* Aspect Ratio Buttons Grid */
.aspect-presets-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 6px;
}
.ap-btn {
    padding: 6px 4px;
    font-size: 11px;
    font-weight: 700;
    background: #f4f6fa;
    border: none;
    border-radius: 6px;
    color: var(--text-dark);
    cursor: pointer;
    box-shadow: 0 2px 7px rgba(15, 23, 42, 0.1);
    transition: all 0.15s;
    text-align: center;
}
.ap-btn:hover { background: #e5e7eb; box-shadow: 0 4px 12px rgba(129, 140, 248, 0.18); }
.ap-btn.active {
    background: linear-gradient(135deg, #906bff 0%, #3d93fc 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 12px rgba(129, 140, 248, 0.25);
}

/* Watermark 9-position pad */
.wm-pos-grid {
    display: grid;
    grid-template-columns: repeat(3, 38px);
    grid-template-rows: repeat(3, 38px);
    gap: 6px;
    justify-content: center;
    margin: 8px 0;
}
.wm-pos-btn {
    width: 38px;
    height: 38px;
    padding: 0;
    border: none;
    background: #f4f6fa;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--text-muted);
    box-shadow: 0 2px 7px rgba(15, 23, 42, 0.1);
    transition: all 0.15s;
}
.wm-pos-btn:hover { background: #e5e7eb; box-shadow: 0 4px 12px rgba(129, 140, 248, 0.18); }
.wm-pos-btn.active {
    background: linear-gradient(135deg, #906bff 0%, #3d93fc 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 12px rgba(129, 140, 248, 0.25);
}

/* Status Bar & Progress Indicator */
.status-bar-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px;
    background: #ffffff;
    border-top: 1px solid var(--border-light);
    flex-shrink: 0;
    font-size: 12px;
}
.status-bar {
    font-weight: 700;
    color: var(--text-dark);
}
.status-bar.ok { color: #10b981; }
.status-bar.err { color: #E02424; }
.status-bar.info { color: #3b82f6; }

.editor-progress-wrap {
    height: 4px;
    background: #f0f3f8;
    overflow: hidden;
    position: relative;
    display: none;
}
.editor-progress-wrap.show { display: block; }
.editor-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #1fd1f9, #b621fe);
    transition: width 0.2s ease;
}

/* Metadata & EXIF Tables */
.meta-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.meta-table td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--border-light);
}
.meta-table .exif-key {
    font-weight: 700;
    color: var(--text-dark);
    width: 45%;
}
.meta-table .exif-val {
    color: var(--text-muted);
    word-break: break-all;
}

/* Action button strip at bottom of settings pane */
.editor-actions-strip,
.passport-actions-strip {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px;
    margin-top: auto;
    padding: 10px 12px !important;
    background: #fafbfe;
    border-top: 1px solid var(--border-light);
    width: 100%;
    box-sizing: border-box;
}
#btnEditorDownload,
#btnEditorSendTo,
#btnPassportDownload,
#btnPassportSendTo,
#btnPassportPrintSheet {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: 8px 6px;
    font-size: 11.5px;
    white-space: nowrap;
    justify-content: center;
    box-sizing: border-box;
}

/* Universal Image Download Filename Modal */
.dl-filename-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.dl-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
}
.dl-modal-card {
    position: relative;
    z-index: 1;
    background: #ffffff;
    border-radius: 14px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25), 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.08);
    overflow: hidden;
    animation: dlModalSlideUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes dlModalSlideUp {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.dl-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #fafbfe;
    border-bottom: 1px solid var(--border-light);
}
.dl-modal-close {
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.15s ease;
}
.dl-modal-close:hover {
    color: var(--text-dark);
}
.dl-modal-body {
    padding: 20px;
}
.dl-input-wrapper {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 2px solid #b621fe;
    border-radius: 8px;
    padding: 2px 10px;
    box-shadow: 0 0 0 3px rgba(182, 33, 254, 0.12);
}
.dl-input-wrapper input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    padding: 8px 4px;
    background: transparent;
}
.dl-input-ext {
    font-size: 13px;
    font-weight: 800;
    color: #b621fe;
    padding-left: 6px;
    user-select: none;
}
.dl-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    background: #fafbfe;
    border-top: 1px solid var(--border-light);
}

/* ==========================================================================
   MONU COMPUTERS - MODERN WEBSITE, TUTORIALS & ADSENSE READY STYLES
   ========================================================================== */

/* Universal Site Header */
.site-header {
    background-color: #1fd1f9;
    background-image: linear-gradient(315deg, #1fd1f9 0%, #b621fe 74%);
    border-bottom: 2px solid #b621fe;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-nav-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #ffffff;
}

.site-logo-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    background: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    flex-shrink: 0;
}

.site-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.site-brand-text h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.5px;
    line-height: 1.1;
    color: #ffffff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.site-brand-text span {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.3px;
    display: block;
}

.site-nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.site-nav-link:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.site-nav-link.active {
    background: #ffffff;
    color: #b621fe;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.site-nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-open-workspace {
    background: #ffffff;
    color: #b621fe;
    font-weight: 800;
    font-size: 13px;
    padding: 8px 18px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-open-workspace:hover {
    background: #fdf2f8;
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.2);
}

.mobile-menu-btn {
    display: none;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.mobile-nav-drawer {
    display: none;
    background: #2D0B1E;
    border-bottom: 2px solid #b621fe;
    padding: 14px 20px;
}

.mobile-nav-drawer.open {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-nav-drawer .site-nav-link {
    width: 100%;
    padding: 10px 14px;
}

/* Studio Workspace Top Bar (When inside Live Studio) */
.workspace-top-bar {
    background: #2D0B1E;
    color: #ffffff;
    padding: 6px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.workspace-top-bar a {
    color: #1fd1f9;
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.workspace-top-bar a:hover {
    text-decoration: underline;
}

/* Page Views Container */
.page-view {
    display: block;
    width: 100%;
}

.page-view.hidden {
    display: none !important;
}

.container-wide {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-narrow {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(180deg, #f5f3ff 0%, #ffffff 100%);
    padding: 60px 20px 48px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #ede9fe;
}

.hero-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #ddd6fe;
    border-radius: 50px;
    padding: 6px 16px;
    font-size: 12.5px;
    font-weight: 700;
    color: #7c3aed;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.08);
    margin-bottom: 18px;
}

.hero-badge-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.hero-title {
    font-size: 68px;
    font-weight: 900;
    line-height: 1.15;
    color: #1e1b4b;
    margin: 0 0 18px;
    letter-spacing: -0.5px;
}

.hero-title .gradient-text {
    background: linear-gradient(135deg, #7c3aed 0%, #b621fe 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 17px;
    line-height: 1.6;
    color: #4b5563;
    margin: 0 0 28px;
    max-width: 1000px;
}

.hero-cta-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
}

.btn-primary-hero {
    background: linear-gradient(135deg, #906bff 0%, #3d93fc 100%);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 10px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(129, 140, 248, 0.25);
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-primary-hero:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    color: #ffffff;
}

.btn-secondary-hero {
    background-color: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 10px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-secondary-hero:hover {
    background-color: #e5e7eb;
    color: #1f2937;
}

.hero-cta-group .btn-secondary-hero {
    background: linear-gradient(135deg, #906bff 0%, #3d93fc 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 12px rgba(129, 140, 248, 0.25);
}

.hero-cta-group .btn-secondary-hero:hover {
    background: linear-gradient(135deg, #906bff 0%, #3d93fc 100%);
    opacity: 0.92;
    transform: translateY(-1px);
    color: #ffffff;
}

.hero-feature-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    font-size: 12.5px;
    color: #6b7280;
    font-weight: 600;
}

.hero-feature-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hero-feature-tag svg {
    color: #10b981;
}

/* Hero Visual Card */
.hero-visual-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(139, 92, 246, 0.05);
    position: relative;
}

.visual-preview-mockup {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.mockup-header {
    background: #f1f5f9;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e2e8f0;
}

.mockup-dots {
    display: flex;
    gap: 6px;
}

.mockup-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.mockup-dot.red { background: #ef4444; }
.mockup-dot.yellow { background: #f59e0b; }
.mockup-dot.green { background: #10b981; }

.mockup-body {
    padding: 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.mockup-side {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px;
    text-align: center;
}

.mockup-side-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    margin-bottom: 10px;
}

.mockup-doc-box {
    height: 120px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.mockup-doc-box.skewed {
    transform: perspective(300px) rotateY(-8deg) rotateX(4deg);
    background: #fef2f2;
    border-color: #fca5a5;
}

.mockup-doc-box.corrected {
    background: #f0fdf4;
    border-color: #86efac;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
}

.mockup-footer-badge {
    margin-top: 16px;
    background: #faf5ff;
    border: 1px solid #e9d5ff;
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
}

/* Tool Cards Section */
.section-wrapper {
    padding: 64px 0;
}

.section-wrapper.bg-light {
    background: #f9fafb;
    border-top: 1px solid #f3f4f6;
    border-bottom: 1px solid #f3f4f6;
}

.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 48px;
}

.section-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #b621fe;
    background: rgba(182, 33, 254, 0.08);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.section-title {
    font-size: 32px;
    font-weight: 900;
    color: #1e1b4b;
    margin: 0 0 14px;
    letter-spacing: -0.3px;
}

.tool-hero .section-title {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 14px;
    background: linear-gradient(135deg, #7c3aed 0%, #b621fe 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.section-subtitle {
    font-size: 16px;
    line-height: 1.6;
    color: #6b7280;
    margin: 0;
}

/* Tools 3-Card Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.tool-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 30px 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    transition: all 0.25s ease;
    position: relative;
    height: 100%;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    border-color: #c084fc;
}

.tool-card-icon-wrap {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin-bottom: 20px;
}

.tool-card.doc .tool-card-icon-wrap {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
    color: #2563eb;
}

.tool-card.id-card .tool-card-icon-wrap {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border: 1px solid #ddd6fe;
    color: #7c3aed;
}

.tool-card.editor .tool-card-icon-wrap {
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
    border: 1px solid #fbcfe8;
    color: #db2777;
}

.tool-card-title {
    font-size: 22px;
    font-weight: 800;
    color: #1f2937;
    margin: 0 0 10px;
}

.tool-card-desc {
    font-size: 14px;
    line-height: 1.6;
    color: #4b5563;
    margin: 0 0 20px;
    flex-grow: 1;
}

.tool-features-list {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tool-feature-item {
    font-size: 13px;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.tool-feature-item svg {
    color: #10b981;
    flex-shrink: 0;
}

.tool-card-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-top: auto;
}

.btn-tool-open {
    background: linear-gradient(135deg, #906bff 0%, #3d93fc 100%);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(129, 140, 248, 0.25);
}

.btn-tool-open:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    color: #ffffff;
}

.btn-tool-guide {
    background-color: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 10px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-tool-guide:hover {
    background-color: #e5e7eb;
    color: #1f2937;
}

/* Privacy Callout Banner */
.privacy-banner {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    border-radius: 20px;
    padding: 40px 48px;
    color: #ffffff;
    margin: 48px auto;
    width: 100%;
    max-width: 1280px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 36px;
    align-items: center;
    box-sizing: border-box;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.25);
}

.privacy-banner-content h3 {
    margin: 0 0 10px;
    font-size: 26px;
    font-weight: 900;
    color: #ffffff;
}

.privacy-banner-content p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #cbd5e1;
    max-width: 780px;
}

.privacy-pill-group {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.privacy-pill {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
    color: #1fd1f9;
}

/* Content Article & Info Blocks */
.info-article-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 36px;
    margin-bottom: 30px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.info-article-card h3 {
    font-size: 24px;
    font-weight: 800;
    color: #111827;
    margin: 0 0 14px;
}

.info-article-card p {
    font-size: 15.5px;
    line-height: 1.7;
    color: #374151;
    margin: 0 0 18px;
}

.info-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.info-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.info-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
}

.info-box-icon {
    font-size: 24px;
    margin-bottom: 10px;
}

.info-box h4 {
    font-size: 16px;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 8px;
}

.info-box p {
    font-size: 13.5px;
    line-height: 1.6;
    color: #475569;
    margin: 0;
}

/* Tutorial Stepper & Step Cards */
.tutorial-container {
    max-width: 1000px;
    margin: 0 auto;
}

.step-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 24px 28px;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 20px;
    align-items: flex-start;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.step-number-badge {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #1fd1f9 0%, #b621fe 100%);
    color: #ffffff;
    font-size: 20px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(182, 33, 254, 0.25);
}

.step-content h4 {
    font-size: 18px;
    font-weight: 800;
    color: #111827;
    margin: 0 0 8px;
}

.step-content p {
    font-size: 14.5px;
    line-height: 1.65;
    color: #4b5563;
    margin: 0 0 10px;
}

.step-tip {
    background: #f5f3ff;
    border-left: 3px solid #8b5cf6;
    padding: 8px 14px;
    border-radius: 0 6px 6px 0;
    font-size: 13px;
    color: #5b21b6;
    font-weight: 600;
    margin-top: 8px;
}

/* FAQ Accordion Component */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.faq-item.active {
    border-color: #c084fc;
    box-shadow: 0 4px 16px rgba(182, 33, 254, 0.08);
}

.faq-question-btn {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 18px 24px;
    font-size: 16px;
    font-weight: 800;
    color: #1f2937;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    gap: 14px;
}

.faq-question-btn:hover {
    color: #b621fe;
}

.faq-toggle-icon {
    font-size: 18px;
    color: #8b5cf6;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.faq-item.active .faq-toggle-icon {
    transform: rotate(180deg);
}

.faq-answer-pane {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 24px;
}

.faq-item.active .faq-answer-pane {
    max-height: 400px;
    padding: 0 24px 20px;
}

.faq-answer-pane p {
    font-size: 14.5px;
    line-height: 1.65;
    color: #4b5563;
    margin: 0;
}

/* Google AdSense Advertising Placeholders (Strictly Compliant with Policies) */
.adsense-wrapper {
    margin: 36px auto;
    text-align: center;
    width: 100%;
    max-width: 1280px;
    padding: 0 20px;
}

.adsense-card {
    background: rgba(168, 85, 247, 0.05);
    border: 2px dashed rgba(168, 85, 247, 0.2);
    border-radius: 12px;
    padding: 0;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    position: relative;
    user-select: none;
    transition: all 0.25s ease;
}

.adsense-card:hover {
    border-color: rgba(124, 58, 237, 0.4);
    background: rgba(124, 58, 237, 0.1);
}

.adsense-card.leaderboard {
    display: block;
    width: 100%;
    max-width: 728px;
    min-height: 90px;
    padding: 4px 0;
    background: transparent;
    border: none;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
}

.adsense-card.leaderboard:hover {
    background: transparent;
    border-color: transparent;
}

.adsense-card.leaderboard::before {
    display: block;
    text-align: center;
    margin-bottom: 6px;
}

.adsense-card.leaderboard ins.adsbygoogle {
    width: 100%;
}

.adsense-card.rectangle {
    max-width: 336px;
    min-height: 280px;
}

.adsense-card.banner {
    max-width: 970px;
    min-height: 90px;
}

.adsense-card::before {
    content: "ADVERTISEMENT";
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #94a3b8;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.adsense-card.skyscraper {
    display: block;
    width: 160px;
    min-height: 600px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    box-sizing: border-box;
}

.adsense-card.skyscraper:hover {
    background: transparent;
    border-color: transparent;
}

.adsense-card.skyscraper::before {
    display: block;
    text-align: center;
    margin-bottom: 6px;
}

.adsense-card.skyscraper ins.adsbygoogle {
    width: 160px;
}

.adsense-card.skyscraper::after {
    content: none;
    display: none;
}

.adsense-card.leaderboard::after {
    content: none;
    display: none;
}

.tool-page-layout-wrapper {
    display: flex;
    justify-content: center;
    gap: 24px;
    width: 100%;
    max-width: 1680px;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}

.central-tool-content {
    flex: 1;
    min-width: 0;
    width: 100%;
    max-width: 1280px;
    box-sizing: border-box;
}

.side-ad-space {
    width: 160px;
    flex-shrink: 0;
    display: none;
}

@media (min-width: 1200px) {
    .side-ad-space {
        display: block;
        position: sticky;
        top: 84px;
        height: fit-content;
        padding-top: 16px;
    }
}

.adsense-disclaimer-label {
    display: none;
}

.adsense-placeholder-body {
    display: none;
}

/* Sample Ad Visual Preview Box inside Skyscrapers & Leaderboards */
.sample-ad-preview-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    padding: 12px 6px;
    background: #ffffff;
    border: 1px solid #ddd6fe;
    border-radius: 8px;
    box-shadow: inset 0 0 8px rgba(139, 92, 246, 0.05);
}

.sample-ad-badge {
    background: #7c3aed;
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 12px;
    margin-bottom: 8px;
    white-space: nowrap;
}

.sample-ad-title {
    font-size: 12px;
    font-weight: 800;
    color: #1e1b4b;
    margin-bottom: 4px;
}

.sample-ad-desc {
    font-size: 10.5px;
    color: #6b7280;
    line-height: 1.3;
    margin-bottom: 12px;
}

.sample-ad-btn {
    background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tool Dedicated Page Hero */
.tool-hero {
    background: linear-gradient(180deg, #faf5ff 0%, #ffffff 100%);
    padding: 48px 20px 40px;
    border-bottom: 1px solid #ede9fe;
}

.tool-hero-content {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.tool-hero-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 24px;
    flex-wrap: wrap;
}

/* Contact Us Form */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    max-width: 1080px;
    margin: 0 auto;
}

.contact-info-card {
    background: linear-gradient(135deg, #1e1b4b 0%, #2D0B1E 100%);
    border-radius: 16px;
    padding: 36px;
    color: #ffffff;
}

.contact-info-card h3 {
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 800;
}

.contact-info-card p {
    font-size: 14.5px;
    line-height: 1.6;
    color: #cbd5e1;
    margin: 0 0 24px;
}

.contact-details-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    color: #e2e8f0;
}

.contact-form-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 36px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    transition: border-color 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: #b621fe;
    box-shadow: 0 0 0 3px rgba(182, 33, 254, 0.12);
}

/* Legal Documents Layout */
.legal-page-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 48px 20px 36px;
    text-align: center;
}

.legal-page-header h1 {
    display: block;
    width: fit-content;
    max-width: 100%;
    font-size: 36px;
    font-weight: 900;
    margin: 0 auto 10px;
    background: linear-gradient(135deg, #7c3aed 0%, #b621fe 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.legal-page-header p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

.legal-document-body {
    max-width: 860px;
    margin: 40px auto 60px;
    padding: 0 20px;
    background: #ffffff;
}

.legal-section {
    margin-bottom: 36px;
}

.legal-section h2 {
    font-size: 20px;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
}

.legal-section p, .legal-section li {
    font-size: 15px;
    line-height: 1.7;
    color: #475569;
}

.legal-section ul {
    padding-left: 20px;
    margin: 10px 0;
}

.legal-section li {
    margin-bottom: 6px;
}

/* Global Footer */
.site-footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 60px 20px 30px;
    border-top: 1px solid #1e293b;
    margin-top: auto;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 48px;
}

.footer-brand h2 {
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
    margin: 0 0 10px;
    letter-spacing: 0.5px;
}

.footer-brand p {
    font-size: 14px;
    line-height: 1.6;
    color: #94a3b8;
    margin: 0 0 20px;
    max-width: 320px;
}

.footer-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #34d399;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.footer-col h3 {
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0 0 18px;
}

.footer-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-nav-list a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 13.5px;
    transition: color 0.2s ease;
    display: inline-block;
}

.footer-nav-list a:hover {
    color: #1fd1f9;
}

.footer-bottom {
    padding-top: 28px;
    border-top: 1px solid #1e293b;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #64748b;
    flex-wrap: wrap;
    gap: 14px;
}

.footer-bottom a {
    color: #94a3b8;
    text-decoration: none;
}

.footer-bottom a:hover {
    color: #ffffff;
}

/* Breadcrumbs */
.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: #6b7280;
    margin-bottom: 16px;
}

.breadcrumb-nav a {
    color: #6b7280;
    text-decoration: none;
    font-weight: 600;
}

.breadcrumb-nav a:hover {
    color: #b621fe;
}

.breadcrumb-separator {
    color: #9ca3af;
}

.breadcrumb-current {
    color: #111827;
    font-weight: 700;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .tools-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .info-grid-3 {
        grid-template-columns: 1fr;
    }
    .info-grid-2 {
        grid-template-columns: 1fr;
    }
    .privacy-banner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .site-nav-links, .btn-open-workspace {
        display: none;
    }
    .mobile-menu-btn {
        display: block;
    }
    .hero-title {
        font-size: 32px;
    }
    .privacy-banner {
        padding: 24px 20px;
        border-radius: 14px;
        gap: 20px;
    }
    .privacy-banner-content h3 {
        font-size: 20px;
    }
    .privacy-banner-content p {
        font-size: 14px;
        line-height: 1.55;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .step-card {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .step-number-badge {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

/* ==========================================================================
   PRIVACY & LOCAL DATA CONTROL PANEL
   ========================================================================== */
.data-control-panel {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    padding: 28px;
    margin: 32px 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.data-control-panel h3 {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 800;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.data-control-desc {
    font-size: 14px;
    line-height: 1.6;
    color: #475569;
    margin: 0 0 20px;
}

.data-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.data-stat-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px;
    text-align: center;
}

.data-stat-number {
    font-size: 26px;
    font-weight: 900;
    color: #b621fe;
    margin-bottom: 4px;
}

.data-stat-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-action-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 18px;
    border-top: 1px solid #f1f5f9;
}

.btn-danger-outline {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 13.5px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.28);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-danger-outline:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(220, 38, 38, 0.38);
}

.btn-secondary-outline {
    background-color: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
    padding: 10px 22px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.btn-secondary-outline:hover {
    background-color: #e5e7eb;
    color: #1f2937;
}

/* Deletion Confirmation Modal */
.confirm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.confirm-modal-box {
    background: #ffffff;
    border-radius: 16px;
    padding: 28px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    border: 1px solid #e2e8f0;
}

.confirm-modal-title {
    font-size: 20px;
    font-weight: 800;
    color: #dc2626;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.confirm-modal-body {
    font-size: 14.5px;
    line-height: 1.6;
    color: #475569;
    margin-bottom: 24px;
}

.confirm-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-confirm-delete {
    background: #dc2626;
    color: #ffffff;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-confirm-delete:hover {
    background: #b91c1c;
}

/* Contact Form Feedback Status Box */
.contact-feedback-card {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 10px;
    padding: 18px 20px;
    margin-top: 16px;
}

.contact-feedback-title {
    font-weight: 800;
    color: #166534;
    font-size: 15px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-feedback-desc {
    font-size: 13.5px;
    line-height: 1.5;
    color: #15803d;
    margin-bottom: 14px;
}

.contact-feedback-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-action-mail {
    background: linear-gradient(135deg, #906bff 0%, #3d93fc 100%);
    color: #ffffff;
    border: none;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(129, 140, 248, 0.25);
    transition: all 0.2s ease;
}

.btn-action-mail:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    color: #ffffff;
}

.btn-action-copy {
    background-color: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.btn-action-copy:hover {
    background-color: #e5e7eb;
    color: #1f2937;
}

/* External Library Alert */
.cdn-alert-banner {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 10px 16px;
    font-size: 12.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

/* ==========================================================================
   DIRECT TOOL FIRST EXPERIENCE & SMART ADSENSE ENHANCEMENTS
   ========================================================================== */

/* Compact Tool Introduction Header */
.tool-intro-hero {
    background: linear-gradient(180deg, #f5f3ff 0%, #ffffff 100%);
    padding: 32px 20px 22px;
    border-bottom: 1px solid #ede9fe;
}

.tool-intro-container {
    max-width: 1280px;
    margin: 0 auto;
    text-align: center;
}

.tool-intro-container .breadcrumb-nav,
.tool-hero .breadcrumb-nav {
    justify-content: center;
}

.tool-intro-h1 {
    display: block;
    width: fit-content;
    max-width: 100%;
    font-size: 30px;
    font-weight: 900;
    line-height: 1.2;
    margin: 0 auto 10px;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #7c3aed 0%, #b621fe 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.tool-intro-desc {
    font-size: 15px;
    line-height: 1.6;
    color: #4b5563;
    max-width: 880px;
    margin: 0 auto 14px;
}

.tool-benefits-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 6px;
}

.tool-benefit-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Tool Live Embed Stage */
.tool-live-section {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
}

.tool-embed-wrapper {
    background: #e0e5ec;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    margin: 14px 0 28px;
}

.tool-embed-wrapper .brand-header {
    border-radius: 0;
}

.tool-embed-wrapper .app-grid {
    height: min(750px, 200vh);
    max-height: 750px;
    min-height: 460px;
}

.tool-embed-wrapper .app-grid.id-mode,
.app-grid.id-mode {
    height: min(750px, 200vh) !important;
    max-height: 750px !important;
    min-height: 460px !important;
}

.tool-embed-wrapper .editor-workspace {
    height: 780px;
    max-height: 88vh;
    min-height: 600px;
}

.tool-embed-wrapper .editor-body-grid {
    height: calc(780px - 105px);
    max-height: calc(88vh - 105px);
}

/* Collapsible Tutorial Component */
.tutorial-collapse-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    margin: 20px 0;
}

.tutorial-collapse-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    cursor: pointer;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
    user-select: none;
    list-style: none;
}

.tutorial-collapse-header::-webkit-details-marker {
    display: none;
}

.tutorial-collapse-card[open] .tutorial-collapse-header {
    border-bottom-color: #e2e8f0;
    background: #ffffff;
}

.tutorial-collapse-title-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.tutorial-badge-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, #1fd1f9 0%, #b621fe 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 3px 10px rgba(182, 33, 254, 0.25);
    flex-shrink: 0;
}

.tutorial-collapse-heading {
    margin: 0;
    font-size: 19px;
    font-weight: 800;
    color: #1e1b4b;
}

.tutorial-collapse-sub {
    margin: 3px 0 0;
    font-size: 13px;
    color: #64748b;
}

.tutorial-chevron {
    font-size: 16px;
    color: #b621fe;
    transition: transform 0.25s ease;
}

.tutorial-collapse-card[open] .tutorial-chevron {
    transform: rotate(180deg);
}

.tutorial-collapse-content {
    padding: 28px 24px 32px;
}

/* Tool Information Grid */
.tool-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 24px;
}

.tool-info-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.tool-info-card.full-width {
    grid-column: 1 / -1;
}

.tool-info-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.tool-info-card-icon {
    font-size: 22px;
}

.tool-info-card h4 {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: #1e1b4b;
}

.tool-info-card p, .tool-info-card li {
    font-size: 14px;
    line-height: 1.65;
    color: #475569;
}

.tool-info-card ul {
    margin: 8px 0 0;
    padding-left: 20px;
}

.tool-info-card li {
    margin-bottom: 6px;
}

/* Smart AdSense Placement Spacing */
.adsense-card.tool-top-ad {
    margin: 18px auto 22px;
}

.adsense-card.tool-bottom-ad {
    margin: 32px auto 40px;
}

/* ===================================================================
   RESPONSIVE LAYOUT ENGINE FOR TABLET & MOBILE (ID CARD STUDIO & IMAGE-PDF EDITOR)
   Ensures all workspaces, toolbars, control panels, canvases, and action buttons
   are 100% visible, fully accessible, and never hidden or clipped.
   =================================================================== */

@media (max-width: 1180px) {
    .tool-info-grid {
        grid-template-columns: 1fr;
    }

    /* ─── 1. ID CARD STUDIO & DOCUMENT STUDIO WORKSPACE ─── */
    .tool-embed-wrapper .app-grid:not([style*="display: none"]),
    .app-grid:not([style*="display: none"]) {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        overflow-y: visible !important;
        padding: 10px !important;
        gap: 16px !important;
    }

    /* Control Panel - Natural Expansion, No Trapped Scrolling */
    .control-panel {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        width: 100% !important;
        padding: 0 !important;
        gap: 12px !important;
        order: 1 !important;
    }

    .control-panel .panel-section {
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: visible !important;
        padding: 14px !important;
        background: #ffffff !important;
    }

    /* Side selector buttons in ID Card Studio (Slot 1 / Slot 2) */
    .side-select-row {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
        width: 100% !important;
        margin-top: 10px !important;
    }

    .btn-assign {
        min-height: 40px !important;
        font-size: 12.5px !important;
        padding: 8px 8px !important;
        white-space: nowrap !important;
        min-width: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Enhancement row buttons (Grayscale / Color / Shadows) */
    .effect-toggle-row {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 6px !important;
        width: 100% !important;
    }

    .effect-toggle-row .btn {
        min-height: 38px !important;
        font-size: 10.5px !important;
        line-height: 1.18 !important;
        padding: 5px 4px !important;
        min-width: 0 !important;
        width: 100% !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        text-align: center !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
    }

    /* Action buttons in ID Card Studio & Document Studio */
    .button-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
    }

    .button-grid .btn {
        width: 100% !important;
        min-height: 42px !important;
        font-size: 13px !important;
        font-weight: 700 !important;
        box-sizing: border-box !important;
    }

    /* Print ID Card Section (#export-id-section) */
    #export-id-section {
        width: 100% !important;
        box-sizing: border-box !important;
    }

    #export-id-section .button-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
    }

    #btn-print-single,
    #btn-print-double,
    #btn-id-send-to {
        width: 100% !important;
        min-height: 44px !important;
        font-size: 13.5px !important;
    }

    /* Preview Column - Canvases & Screens */
    .preview-column {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        gap: 14px !important;
        order: 2 !important;
    }

    .workspace {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        gap: 14px !important;
    }

    .screen {
        width: 100% !important;
        height: 340px !important;
        min-height: 280px !important;
        max-height: 420px !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    .canvas-viewport {
        flex: 1 1 0 !important;
        min-height: 220px !important;
        height: auto !important;
        overflow: hidden !important;
        position: relative !important;
    }

    /* Bottom Panels Row - Gallery & Saved ID Sets */
    .bottom-panels-wrapper {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        gap: 14px !important;
        order: 3 !important;
    }

    .gallery-panel,
    .bucket-section,
    #id-bucket-container {
        width: 100% !important;
        height: auto !important;
        min-height: 180px !important;
        max-height: none !important;
        overflow: visible !important;
        box-sizing: border-box !important;
    }

    .gallery-container,
    .bucket-grid {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        min-height: 120px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 10px 14px !important;
    }

    /* ─── 2. IMAGE & PDF EDITOR WORKSPACE ─── */
    .tool-embed-wrapper .editor-workspace:not([style*="display: none"]),
    .editor-workspace:not([style*="display: none"]) {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        overflow-y: visible !important;
    }

    /* Subnav toolbar */
    .editor-subnav {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        padding: 8px 12px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        background: #ffffff !important;
        border-bottom: 1px solid var(--border-light) !important;
    }

    .editor-subnav-tools {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        width: 100% !important;
        gap: 6px !important;
        padding-bottom: 6px !important;
        scrollbar-width: thin !important;
    }

    .editor-tool-tab,
    .passport-tool-tab {
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        padding: 7px 12px !important;
        font-size: 12px !important;
        min-height: 34px !important;
        border: 1px solid #cbd5e1 !important;
        outline: none !important;
    }

    .editor-header-actions {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 6px !important;
        width: 100% !important;
    }

    .editor-header-actions .btn,
    .editor-header-actions button {
        flex: 0 1 auto !important;
        min-height: 32px !important;
        font-size: 11.5px !important;
        padding: 6px 10px !important;
        white-space: nowrap !important;
    }

    /* Body Grid - Stacked Layout */
    .tool-embed-wrapper .editor-body-grid,
    .editor-body-grid {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: visible !important;
        padding: 10px !important;
        gap: 14px !important;
    }

    /* Preview Stage */
    .editor-preview-pane {
        width: 100% !important;
        max-width: 100% !important;
        height: 340px !important;
        min-height: 280px !important;
        max-height: 420px !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
        order: 1 !important;
    }

    /* Crop Interactive Viewport */
    .editor-preview-boxes {
        width: 100% !important;
        height: 100% !important;
        min-height: 260px !important;
    }

    .crop-container {
        max-width: 100% !important;
        max-height: 100% !important;
    }

    /* PDF Optimizer 60/40 Split Container on Tablet/Mobile */
    #pdfOptContentContainer {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        height: auto !important;
        min-height: auto !important;
        gap: 12px !important;
    }

    #pdfOptContentContainer > div {
        width: 100% !important;
        flex: none !important;
        min-height: 220px !important;
        height: auto !important;
    }

    /* Tool Settings Pane - Completely Visible, NO CLIPPING */
    .editor-tool-pane {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        box-sizing: border-box !important;
        order: 2 !important;
    }

    .editor-pane-header {
        padding: 12px 16px !important;
        flex-shrink: 0 !important;
    }

    .editor-pane-body {
        flex: none !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        overflow-y: visible !important;
        overflow-x: hidden !important;
        padding: 14px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        gap: 14px !important;
    }

    /* Tool internal controls & action buttons */
    .editor-pane-body .btn-main,
    .editor-pane-body .btn-purple,
    .editor-pane-body .btn-success,
    .editor-pane-body #pdfRunBtn,
    .editor-pane-body #pdfDownloadBtn {
        width: 100% !important;
        min-height: 42px !important;
        font-size: 13px !important;
        margin-top: 8px !important;
    }

    /* Bottom Action Strip */
    .editor-actions-strip,
    .passport-actions-strip {
        position: static !important;
        width: 100% !important;
        box-sizing: border-box !important;
        margin-top: 10px !important;
        border-top: 1px solid var(--border-light) !important;
        background: #fafbfe !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
        gap: 10px !important;
        padding: 12px 16px !important;
    }

    #btnEditorDownload,
    #btnSyncToScanner,
    #btnEditorSendTo,
    #btnPassportDownload,
    #btnPassportSendTo,
    #btnPassportPrintSheet {
        width: 100% !important;
        min-height: 42px !important;
        font-size: 12.5px !important;
        padding: 8px 12px !important;
    }
}

/* ─── 3. EXTRA TUNING FOR MOBILE SCREENS (<= 768px) ─── */
@media (max-width: 768px) {
    .editor-actions-strip,
    .passport-actions-strip {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        padding: 12px 14px !important;
    }

    #btnEditorDownload,
    #btnSyncToScanner,
    #btnEditorSendTo,
    #btnPassportDownload,
    #btnPassportSendTo,
    #btnPassportPrintSheet {
        width: 100% !important;
        min-height: 44px !important;
        font-size: 13px !important;
        white-space: normal !important;
        text-align: center !important;
        justify-content: center !important;
        padding: 10px 14px !important;
    }

    .effect-toggle-row {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 4px !important;
    }

    .effect-toggle-row .btn {
        font-size: 10px !important;
        line-height: 1.15 !important;
        padding: 5px 3px !important;
        min-height: 36px !important;
        min-width: 0 !important;
        width: 100% !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        text-align: center !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
    }

    .side-select-row {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 6px !important;
    }

    .btn-assign {
        font-size: 11px !important;
        padding: 8px 4px !important;
        min-height: 38px !important;
        min-width: 0 !important;
        width: 100% !important;
    }
}

/* Eliminate default browser black outline on button click / focus while keeping shadow effects */
button:focus,
button:focus-visible,
button:active,
.btn:focus,
.btn:focus-visible,
.btn:active,
.editor-tool-tab:focus,
.editor-tool-tab:focus-visible,
.editor-tool-tab:active,
.passport-tool-tab:focus,
.passport-tool-tab:focus-visible,
.passport-tool-tab:active,
.btn-tool-open:focus,
.btn-tool-open:focus-visible,
.btn-session-delete:focus,
.btn-session-delete:focus-visible {
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

input:focus,
select:focus {
    outline: none !important;
    box-shadow: none;
    -webkit-tap-highlight-color: transparent !important;
}

.editor-tool-tab:not(:disabled):focus,
.editor-tool-tab:not(:disabled):focus-visible,
.passport-tool-tab:not(:disabled):focus,
.passport-tool-tab:not(:disabled):focus-visible,
.doc-tool-tab:not(:disabled):focus,
.doc-tool-tab:not(:disabled):focus-visible {
    outline: none !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.09) !important;
}

.editor-tool-tab.active,
.editor-tool-tab.active:focus,
.editor-tool-tab.active:focus-visible,
.passport-tool-tab.active,
.passport-tool-tab.active:focus,
.passport-tool-tab.active:focus-visible,
.doc-tool-tab.active,
.doc-tool-tab.active:focus,
.doc-tool-tab.active:focus-visible {
    outline: none !important;
    border: 1px solid transparent !important;
    box-shadow: 0 4px 12px rgba(129, 140, 248, 0.25) !important;
}

/* ===================================================================
   Visual Feature Showcase Section & Lightbox Modal
   =================================================================== */
.feature-showcase-section {
    background: linear-gradient(180deg, #ffffff 0%, #f8faff 50%, #ffffff 100%);
    position: relative;
    padding-top: 50px;
    padding-bottom: 60px;
    border-bottom: 1px solid #ede9fe;
}

.features-showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 28px;
}

.feature-showcase-card {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.feature-showcase-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -10px rgba(124, 58, 237, 0.18);
    border-color: #c084fc;
}

.feature-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10.5;
    background: #0f172a;
    overflow: hidden;
    cursor: pointer;
}

.feature-showcase-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.4s ease;
}

.feature-showcase-card:hover .feature-showcase-img {
    transform: scale(1.04);
}

.feature-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.1) 0%, rgba(15, 23, 42, 0.75) 100%);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.25s ease;
}

.feature-showcase-card:hover .feature-img-overlay {
    opacity: 1;
}

.feature-zoom-btn {
    background: rgba(255, 255, 255, 0.95);
    color: #1e1b4b;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transform: translateY(8px);
    transition: transform 0.25s ease;
}

.feature-showcase-card:hover .feature-zoom-btn {
    transform: translateY(0);
}

.feature-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.feature-card-badge {
    align-self: flex-start;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.feature-card-badge.doc {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.feature-card-badge.id {
    background: #f5f3ff;
    color: #7c3aed;
    border: 1px solid #ddd6fe;
}

.feature-card-badge.editor {
    background: #fdf2f8;
    color: #db2777;
    border: 1px solid #fbcfe8;
}

.feature-card-heading {
    font-size: 19px;
    font-weight: 800;
    color: #1e1b4b;
    margin: 0 0 8px;
    line-height: 1.3;
}

.feature-card-summary {
    font-size: 13.5px;
    color: #64748b;
    line-height: 1.55;
    margin: 0 0 16px;
}

.feature-pills-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 22px;
    margin-top: auto;
}

.feature-pill {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 11.5px;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.feature-card-footer {
    margin-top: auto;
}

.btn-feature-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff !important;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-feature-cta.doc,
.btn-feature-cta.id,
.btn-feature-cta.editor {
    background: linear-gradient(135deg, #906bff 0%, #3d93fc 100%);
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(129, 140, 248, 0.25);
}
.btn-feature-cta.doc:hover,
.btn-feature-cta.id:hover,
.btn-feature-cta.editor:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(129, 140, 248, 0.25);
}

/* Lightbox Modal */
.feature-lightbox-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.feature-lightbox-container {
    background: #ffffff;
    border-radius: 16px;
    max-width: 1080px;
    width: 100%;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.5);
    animation: lightboxPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lightboxPop {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.feature-lightbox-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.feature-lightbox-close {
    background: linear-gradient(135deg, #906bff 0%, #3d93fc 100%);
    border: none;
    font-size: 22px;
    line-height: 1;
    color: #ffffff;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(129, 140, 248, 0.25);
    transition: all 0.2s ease;
}

.feature-lightbox-close:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    color: #ffffff;
}

.feature-lightbox-body {
    padding: 12px;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
}

.feature-lightbox-body img {
    max-width: 100%;
    max-height: calc(92vh - 80px);
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    display: block;
}

/* Tool card thumbnail banner */
.tool-card-preview-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 18px;
    cursor: pointer;
    background: #0f172a;
    border: 1px solid #e2e8f0;
}

.tool-card-preview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.tool-card-preview-thumb:hover img {
    transform: scale(1.05);
}

.tool-card-preview-thumb .preview-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(15, 23, 42, 0.85);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    gap: 4px;
}

@media (max-width: 1024px) {
    .features-showcase-grid {
        grid-template-columns: 1fr;
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ==========================================================================
   PWA & OFFLINE STYLING (SMART VLE TOOL)
   ========================================================================== */

/* Top Offline Alert Banner */
.pwa-offline-banner {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    padding: 10px 16px;
    font-size: 13.5px;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.25);
    z-index: 10001;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.pwa-offline-inner {
    max-width: 1320px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pwa-pulse-dot {
    width: 10px;
    height: 10px;
    background: #ffffff;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    animation: pwaPulse 1.8s infinite;
}

@keyframes pwaPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.pwa-offline-text {
    flex-grow: 1;
    line-height: 1.4;
}

.pwa-dismiss-btn {
    background: rgba(0, 0, 0, 0.18);
    border: none;
    color: #ffffff;
    font-size: 16px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: background 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}

.pwa-dismiss-btn:hover {
    background: rgba(0, 0, 0, 0.34);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
}

/* Header PWA Group */
.pwa-header-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pwa-status-badge {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.pwa-status-badge:hover {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
}

.pwa-status-badge .status-indicator-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}

.pwa-status-badge.online .status-indicator-dot {
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.pwa-status-badge.offline {
    background: rgba(245, 158, 11, 0.25);
    border-color: #f59e0b;
    color: #fef3c7;
}

.pwa-status-badge.offline .status-indicator-dot {
    background: #f59e0b;
    box-shadow: 0 0 8px #f59e0b;
}

/* Install Button */
.pwa-install-btn {
    background: #ffffff;
    color: #4338ca;
    border: none;
    font-size: 12.5px;
    font-weight: 800;
    padding: 7px 14px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: all 0.2s ease;
}

.pwa-install-btn:hover {
    background: #eef2ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(67, 56, 202, 0.25);
}

.pwa-mobile-install {
    background: rgba(255, 255, 255, 0.1);
    color: #1fd1f9 !important;
    font-weight: 800;
    margin-top: 6px;
    border-radius: 8px;
}

/* PWA Modals */
.pwa-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
}

.pwa-modal-box {
    background: #ffffff;
    border-radius: 16px;
    width: 90%;
    max-width: 520px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    animation: pwaModalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pwaModalPop {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.pwa-modal-header {
    background: #f8fafc;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e2e8f0;
}

.pwa-modal-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: #1e1b4b;
}

.pwa-modal-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
}

.pwa-modal-close:hover {
    color: #0f172a;
}

.pwa-modal-body {
    padding: 24px 20px;
}

.pwa-modal-footer {
    padding: 14px 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.offline-status-banner-box {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.offline-features-check h4 {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 800;
    color: #1e293b;
}

.offline-check-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.offline-check-list li {
    font-size: 13px;
    color: #475569;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
}

.offline-check-list .check-icon {
    color: #10b981;
    font-weight: 900;
}

.pwa-steps-list {
    padding-left: 20px;
    margin: 12px 0;
    color: #334155;
    font-size: 14.5px;
    line-height: 1.8;
}

/* ===================================================================
   UNIFIED STUDIO WORKSPACE HEADER & TEMPORARY SESSION SYSTEM
   =================================================================== */
.workspace-header-bar {
    display: none !important;
}

/* Active Session Indicator Container */
.monu-session-indicator {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    margin-left: auto !important;
    width: auto !important;
    max-width: 100% !important;
    gap: 4px;
}

.session-indicator-pill {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    width: auto !important;
    max-width: fit-content !important;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 30px;
    padding: 4px 12px 4px 10px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
    transition: all 0.25s ease;
    margin-left: auto !important;
    flex-shrink: 0 !important;
}

.session-indicator-pill.browser {
    background: #f0fdf4;
    border-color: #86efac;
}

.session-indicator-pill.active {
    background: #ecfeff;
    border-color: #67e8f9;
}

.session-indicator-pill.mixed {
    background: #f5f3ff;
    border-color: #c4b5fd;
}

.session-indicator-pill.uploading {
    background: #eff6ff;
    border-color: #93c5fd;
}

.session-indicator-pill.warning {
    background: #fffbeb;
    border-color: #fde68a;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
}

.session-indicator-pill.expired {
    background: #fef2f2;
    border-color: #fecaca;
}

.session-indicator-pill.offline {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.session-indicator-pill.deleting {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.session-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
}

.session-location-icon {
    display: none !important;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
    transition: all 0.2s ease;
}

.status-dot.browser-dot {
    background: #10b981;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.status-dot.active {
    background: #06b6d4;
    box-shadow: 0 0 6px rgba(6, 182, 212, 0.6);
    animation: pulseDotCyan 2s infinite ease-in-out;
}

.status-dot.mixed-dot {
    background: #8b5cf6;
    box-shadow: 0 0 6px rgba(139, 92, 246, 0.6);
}

.status-dot.uploading-dot {
    background: #3b82f6;
    animation: pulseDotCyan 1s infinite ease-in-out;
}

.status-dot.warning {
    background: #f59e0b;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.8);
    animation: pulseDotAmber 1s infinite ease-in-out;
}

.status-dot.expired {
    background: #ef4444;
}

.status-dot.offline {
    background: #94a3b8;
}

.status-dot.deleting {
    background: #3b82f6;
    animation: pulseDotAmber 0.8s infinite ease-in-out;
}

@keyframes pulseDotCyan {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.25); opacity: 0.75; }
}

@keyframes pulseDotGreen {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

@keyframes pulseDotAmber {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

.session-timer-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 2px 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
    font-weight: 800;
    color: #0f172a;
}

.session-indicator-pill.warning .session-timer-badge {
    background: #fff7ed;
    border-color: #fdba74;
    color: #c2410c;
}

.btn-session-delete {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    border: none;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.24);
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.btn-session-delete:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.34);
}

.session-indicator-note {
    font-size: 11px;
    color: #64748b;
    text-align: right;
    max-width: 440px;
    line-height: 1.3;
}

.session-policy-link {
    color: #6366f1;
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
}

.session-policy-link:hover {
    text-decoration: underline;
}

/* In-UI Notification Toast (Constraint compliant: No window.alert) */
.session-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999999;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #0f172a;
    color: #ffffff;
    padding: 12px 18px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    font-size: 13.5px;
    font-weight: 600;
    animation: toastSlideUp 0.3s ease-out;
}

.session-toast.success {
    background: #065f46;
    border: 1px solid #059669;
}

.session-toast.error {
    background: #991b1b;
    border: 1px solid #dc2626;
}

.session-toast-icon {
    font-size: 16px;
    font-weight: 900;
}

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

/* Modals */
.session-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 16px;
}

.session-modal-box {
    background: #ffffff;
    border-radius: 16px;
    padding: 28px 24px;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    text-align: center;
    animation: sessionModalFadeIn 0.2s ease-out;
}

.session-modal-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.session-modal-box h3 {
    margin: 0 0 10px;
    font-size: 19px;
    font-weight: 800;
    color: #0f172a;
}

.session-modal-box p {
    margin: 0 0 16px;
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
}

.session-modal-subnote {
    font-size: 12px !important;
    color: #64748b !important;
    background: #f8fafc;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 20px !important;
}

.session-error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 13px;
    font-weight: 600;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.session-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-modal-cancel {
    background-color: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.btn-modal-cancel:hover {
    background-color: #e5e7eb;
    color: #1f2937;
}

.btn-modal-delete {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    border: none;
    font-size: 13px;
    font-weight: 700;
    padding: 9px 18px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
    transition: all 0.15s ease;
}

.btn-modal-delete:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.35);
}

.btn-modal-primary {
    background: linear-gradient(135deg, #906bff 0%, #3d93fc 100%);
    color: #ffffff;
    border: none;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(129, 140, 248, 0.25);
    transition: all 0.2s ease;
}

.btn-modal-primary:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

@keyframes sessionModalFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

/* Session Verification Test Dropdown */
.session-test-controls-menu {
    position: relative;
    display: inline-block;
}

.btn-session-test-toggle {
    background: #f8fafc;
    border: none;
    color: #475569;
    font-size: 11.5px;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
    transition: all 0.15s ease;
}

.btn-session-test-toggle:hover {
    background: #f1f5f9;
    color: #0f172a;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.16);
}

.session-test-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 6px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    width: 250px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.test-dropdown-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: #94a3b8;
    padding: 4px 8px;
    letter-spacing: 0.04em;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 4px;
}

.session-test-dropdown button {
    text-align: left;
    background: none;
    border: none;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.session-test-dropdown button:hover {
    background: #f8fafc;
    color: #4f46e5;
}

@media (max-width: 768px) {
    .workspace-header-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px 14px;
    }

    .ws-header-left, .ws-header-right {
        width: 100%;
        justify-content: space-between;
    }

    .monu-session-indicator {
        align-items: flex-start;
        width: 100%;
    }

    .session-indicator-note {
        text-align: left;
    }

    .session-indicator-pill {
        width: 100%;
        justify-content: space-between;
    }
}

/* ============================================================================
   TUTORIAL VIDEOS SECTION (HOMEPAGE)
   ============================================================================ */
.tutorial-videos-section {
    padding-top: 40px;
    padding-bottom: 48px;
}

.tutorial-videos-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-top: 28px;
    align-items: stretch;
    width: 100%;
}

.tutorial-video-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 28px -10px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    height: 100%;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.tutorial-video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 36px -12px rgba(124, 58, 237, 0.16);
    border-color: #c084fc;
}

.tutorial-video-frame {
    position: relative;
    width: 100%;
    min-width: 0;
    aspect-ratio: 16 / 9;
    background: #0f172a;
    overflow: hidden;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.tutorial-video-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    display: block;
    object-fit: cover;
    background: #0f172a;
}

.tutorial-play-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.16) 0%, rgba(15, 23, 42, 0.64) 100%);
    cursor: pointer;
    padding: 16px;
    text-align: center;
    transition: background 0.2s ease;
}

.tutorial-play-overlay:hover {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.26) 0%, rgba(15, 23, 42, 0.74) 100%);
}

.tutorial-play-btn {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #906bff 0%, #3d93fc 100%);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 4px 12px rgba(129, 140, 248, 0.35);
    transition: all 0.2s ease;
}

.tutorial-play-overlay:hover .tutorial-play-btn {
    opacity: 0.92;
    transform: translateY(-1px) scale(1.04);
}

.tutorial-play-btn svg {
    width: 24px;
    height: 24px;
    margin-left: 3px;
    fill: currentColor;
    display: block;
}

.tutorial-overlay-label {
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.78);
    padding: 4px 12px;
    border-radius: 999px;
    letter-spacing: 0.2px;
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tutorial-video-fallback {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
    color: #1e1b4b;
}

.tutorial-video-fallback[hidden] {
    display: none;
}

.tutorial-fallback-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(182, 33, 254, 0.1);
    color: #7c3aed;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 10px;
}

.tutorial-fallback-title {
    font-size: 14px;
    font-weight: 800;
    color: #1e1b4b;
    margin: 0 0 4px;
}

.tutorial-fallback-msg {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    margin: 0;
    max-width: 280px;
    line-height: 1.45;
}

.tutorial-retry-btn {
    margin-top: 12px;
    background: linear-gradient(135deg, #906bff 0%, #3d93fc 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(129, 140, 248, 0.25);
    transition: all 0.2s ease;
    display: none;
    align-items: center;
    gap: 6px;
}

.tutorial-retry-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.tutorial-card-body {
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.tutorial-card-badge {
    display: inline-block;
    align-self: flex-start;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 3px 10px;
    border-radius: 6px;
    margin-bottom: 10px;
}

.tutorial-card-badge.doc {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.tutorial-card-badge.id {
    background: #f5f3ff;
    color: #7c3aed;
    border: 1px solid #ddd6fe;
}

.tutorial-card-badge.editor {
    background: #fdf2f8;
    color: #db2777;
    border: 1px solid #fbcfe8;
}

.tutorial-card-title {
    font-size: 19px;
    font-weight: 800;
    color: #1e1b4b;
    margin: 0 0 8px;
    line-height: 1.3;
}

.tutorial-card-desc {
    font-size: 14px;
    line-height: 1.6;
    color: #4b5563;
    margin: 0 0 16px;
    flex-grow: 1;
}

.tutorial-card-footer {
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    margin-top: auto;
}

.tutorial-card-link {
    font-size: 13.5px;
    font-weight: 800;
    color: #4f46e5;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.tutorial-card-link:hover {
    color: #b621fe;
}

@media (max-width: 1024px) {
    .tutorial-videos-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .tutorial-videos-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }
    .tutorial-card-body {
        padding: 18px;
    }
    .tutorial-card-title {
        font-size: 17.5px;
    }
}

/* ═══ CROSS-STUDIO "SEND TO" FLOATING POPOVER MENU ═══ */
.send-to-popover {
    position: fixed;
    z-index: 10500;
    width: 280px;
    max-width: calc(100vw - 24px);
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.22), 0 4px 12px rgba(79, 70, 229, 0.12);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    animation: sendToPopIn 0.16s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

@keyframes sendToPopIn {
    from { opacity: 0; transform: translateY(6px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.send-to-popover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px 8px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #475569;
}

.send-to-close-btn {
    border: none;
    background: linear-gradient(135deg, #906bff 0%, #3d93fc 100%);
    color: #ffffff;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(129, 140, 248, 0.25);
    transition: all 0.2s ease;
}

.send-to-close-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    color: #ffffff;
}

.send-to-option {
    width: 100%;
    border: none;
    background: #ffffff;
    border-radius: 10px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    text-align: left;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.send-to-option:hover,
.send-to-option:focus-visible {
    background: #f5f3ff;
    box-shadow: 0 5px 14px rgba(131, 0, 201, 0.18);
    outline: none;
    transform: translateX(1px);
}

.send-to-option-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: linear-gradient(135deg, #eef2ff 0%, #f3e8ff 100%);
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.send-to-option-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.send-to-option-title {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.send-to-option-sub {
    font-size: 11px;
    color: #64748b;
    line-height: 1.25;
}

.send-to-option-arrow {
    font-size: 13px;
    font-weight: 800;
    color: #6366f1;
    flex-shrink: 0;
}

/* ===================================================================
   EXPLORE OUR TOOLS — 3x3 HOMEPAGE GRID SECTION
   =================================================================== */
.explore-our-tools-section {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    padding: 48px 0 56px;
    border-top: 1px solid #eef2f7;
    border-bottom: 1px solid #eef2f7;
}

.explore-our-tools-section .section-header {
    margin-bottom: 34px;
}

.explore-tools-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.explore-tool-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 16px -4px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.2s ease;
    cursor: pointer;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.explore-tool-card:hover {
    transform: translateY(-3px);
    border-color: #c084fc;
    box-shadow: 0 14px 28px -8px rgba(124, 58, 237, 0.16), 0 4px 10px -2px rgba(6, 182, 212, 0.08);
}

.explore-tool-card:active {
    transform: scale(0.985);
    border-color: #9333ea;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
}

.explore-tool-card:focus-visible {
    outline: 2px solid #7c3aed;
    outline-offset: 2px;
}

.explore-tool-thumb-box {
    width: 100%;
    aspect-ratio: 800 / 447;
    flex-shrink: 0;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.explore-tool-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.explore-tool-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    box-sizing: border-box;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 55%, #f5f3ff 100%);
    color: #64748b;
    text-align: center;
}

.explore-placeholder-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7c3aed;
}

.explore-placeholder-label {
    font-size: 11.5px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.2px;
}

.explore-tool-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    background: #ffffff;
}

.explore-tool-title {
    margin: 0;
    font-size: 15.5px;
    font-weight: 800;
    color: #1e1b4b;
    line-height: 1.3;
    letter-spacing: -0.1px;
    transition: color 0.18s ease;
}

.explore-tool-card:hover .explore-tool-title {
    color: #6d28d9;
}

.explore-tool-arrow {
    font-size: 15px;
    font-weight: 800;
    color: #7c3aed;
    flex-shrink: 0;
    transition: transform 0.18s ease;
}

.explore-tool-card:hover .explore-tool-arrow {
    transform: translateX(3px);
}

@media (max-width: 1024px) {
    .explore-tools-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }
}

@media (max-width: 640px) {
    .explore-our-tools-section {
        padding: 36px 0 42px;
    }

    .explore-our-tools-section .section-header {
        margin-bottom: 24px;
    }

    .explore-tools-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .explore-tool-card {
        border-radius: 12px;
    }

    .explore-tool-card-footer {
        padding: 10px 12px;
        gap: 6px;
    }

    .explore-tool-title {
        font-size: 13px;
    }

    .explore-tool-arrow {
        font-size: 13px;
    }
}

@media (max-width: 420px) {
    .explore-tools-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .explore-tool-card-footer {
        padding: 12px 14px;
    }

    .explore-tool-title {
        font-size: 14.5px;
    }
}

/* ===================================================================
   DOCUMENT STUDIO INTEGRATED PDF SUB-TOOL SWITCHER
   =================================================================== */
.doc-studio-tool-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 16px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    flex-wrap: wrap;
}
.doc-studio-switch-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.doc-tool-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: #f4f6fa;
    border: 1px solid #cbd5e1;
    outline: none;
    border-radius: 8px;
    color: #1e293b;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}
.doc-tool-tab:hover {
    background: #e5e7eb;
    color: #1f2937;
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(129, 140, 248, 0.18);
}
.doc-tool-tab.active {
    background: linear-gradient(135deg, #906bff 0%, #3d93fc 100%);
    color: #ffffff;
    border: 1px solid transparent;
    box-shadow: 0 4px 12px rgba(129, 140, 248, 0.25);
}
.editor-workspace.doc-subtool-hosted {
    height: calc(100vh - 108px);
    max-height: calc(100vh - 108px);
}
.editor-workspace.doc-subtool-hosted .editor-subnav {
    display: none;
}
.editor-workspace.doc-subtool-hosted .editor-body-grid {
    height: calc(100vh - 118px);
    max-height: calc(100vh - 118px);
}
@media (max-width: 980px) {
    .editor-workspace.doc-subtool-hosted,
    .editor-workspace.doc-subtool-hosted .editor-body-grid {
        height: auto;
        max-height: none;
    }
}

/* ===================================================================
   SMART VLE TOOL — PDF WATERMARK WORKBENCH
   =================================================================== */
.svt-wm-stage {
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
    height: 100%;
    min-height: 0;
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 10px 12px;
    gap: 10px;
    box-sizing: border-box;
    overflow: hidden;
}
.svt-wm-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}
.svt-wm-doc-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
}
.svt-wm-doc-name {
    font-size: 12.5px;
    font-weight: 800;
    color: var(--text-dark);
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.svt-wm-doc-specs {
    font-size: 11px;
    font-weight: 700;
    color: #4b5563;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    padding: 3px 9px;
    border-radius: 999px;
    white-space: nowrap;
}
.svt-wm-nav-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.svt-wm-nav-btn {
    padding: 5px 10px;
    font-size: 11.5px;
    font-weight: 700;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: #f3f4f6;
    color: #374151;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.16s ease;
}
.svt-wm-nav-btn:hover:not(:disabled) {
    background: #e5e7eb;
    color: #111827;
}
.svt-wm-nav-btn:disabled {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #cbd5e1;
    cursor: not-allowed;
    opacity: 0.85;
}
.svt-wm-page-readout {
    font-size: 11.5px;
    font-weight: 800;
    color: var(--text-dark);
    padding: 0 4px;
    white-space: nowrap;
}
.svt-wm-viewport {
    flex: 1;
    min-height: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: auto;
    padding: 14px;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    background: repeating-conic-gradient(rgba(15, 23, 42, 0.025) 0 25%, #f8fafc 0 50%) 0 0/16px 16px;
    box-sizing: border-box;
}
.svt-wm-viewport canvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.14);
    background: #ffffff;
}
.svt-wm-corner-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(15, 23, 42, 0.84);
    color: #f8fafc;
    font-size: 10.5px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    pointer-events: none;
}
.svt-wm-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: auto;
    padding: 28px 20px;
    text-align: center;
    gap: 8px;
}
.svt-wm-spinner {
    width: 38px;
    height: 38px;
    border: 4px solid #e5e7eb;
    border-top-color: #906bff;
    border-radius: 50%;
    animation: svtWmSpin 0.8s linear infinite;
}
@keyframes svtWmSpin {
    to { transform: rotate(360deg); }
}
.svt-wm-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 6px;
}
.svt-wm-chip {
    flex: 1;
    min-width: 44px;
    padding: 5px 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 7px;
    border: 1px solid #d1d5db;
    background: #f3f4f6;
    color: #374151;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
}
.svt-wm-chip:hover {
    background: #e5e7eb;
    color: #111827;
}
.svt-wm-chip.active {
    background: linear-gradient(135deg, #906bff 0%, #3d93fc 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 3px 10px rgba(129, 140, 248, 0.25);
}
.svt-wm-anchor-row {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
}
.svt-wm-anchor-btn {
    grid-column: span 2;
    padding: 7px 6px;
    font-size: 11.5px;
    font-weight: 700;
    border-radius: 7px;
    border: 1px solid #d1d5db;
    background: #f3f4f6;
    color: #374151;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
    transition: all 0.15s ease;
}
.svt-wm-anchor-btn:nth-child(4),
.svt-wm-anchor-btn:nth-child(5) {
    grid-column: span 3;
}
.svt-wm-anchor-btn:hover {
    background: #e5e7eb;
}
.svt-wm-anchor-btn.active {
    background: linear-gradient(135deg, #906bff 0%, #3d93fc 100%);
    color: #ffffff;
    border-color: transparent;
}
.svt-wm-swatch-row {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}
.svt-wm-swatch {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 2px solid #e2e8f0;
    cursor: pointer;
    padding: 0;
    transition: transform 0.12s ease, border-color 0.12s ease;
}
.svt-wm-swatch:hover {
    transform: scale(1.1);
}
.svt-wm-swatch.active {
    border-color: #111827;
    transform: scale(1.1);
}
.svt-wm-logo-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 7px 9px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
}
.svt-wm-logo-bar img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    border-radius: 5px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}
.svt-wm-logo-meta {
    flex: 1;
    min-width: 0;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dark);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.svt-wm-inline-check {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 8px 0;
    cursor: pointer;
}
.svt-wm-status {
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 700;
    text-align: center;
}
.svt-wm-status.ok {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}
.svt-wm-status.err {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}
.svt-wm-status.info {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}
@media (max-width: 640px) {
    .svt-wm-doc-specs {
        display: none;
    }
}

/* ===================================================================
   SMARTVLETOOL CUSTOM RIGHT-CLICK CONTEXT MENU & SAFETY DIALOGS
   =================================================================== */
#svt-context-menu {
    position: fixed;
    z-index: 2147483000;
    min-width: 244px;
    max-width: min(310px, calc(100vw - 16px));
    max-height: calc(100vh - 16px);
    overflow-y: auto;
    padding: 6px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 20px 50px rgba(2, 6, 23, 0.55), 0 0 0 1px rgba(131, 0, 201, 0.22);
    color: #f8fafc;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    user-select: none;
    display: none;
    scrollbar-width: thin;
}
#svt-context-menu.open {
    display: block;
    animation: svtCtxFadeIn 0.12s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes svtCtxFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}
.svt-ctx-header {
    padding: 5px 10px 6px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: linear-gradient(90deg, #c084fc 0%, #38bdf8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.svt-ctx-section-label {
    padding: 4px 10px 3px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #94a3b8;
}
.svt-ctx-sep {
    height: 1px;
    margin: 5px 6px;
    background: rgba(148, 163, 184, 0.18);
}
.svt-ctx-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7.5px 10px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #e2e8f0;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.25;
    text-align: left;
    cursor: pointer;
    box-shadow: none;
    transition: background-color 0.12s ease, color 0.12s ease;
}
.svt-ctx-item:hover:not(:disabled),
.svt-ctx-item:focus-visible:not(:disabled) {
    background: linear-gradient(135deg, rgba(158, 126, 252, 0.3) 0%, rgba(76, 155, 252, 0.3) 100%);
    color: #ffffff;
    outline: none;
}
.svt-ctx-item.danger:hover:not(:disabled),
.svt-ctx-item.danger:focus-visible:not(:disabled) {
    background: rgba(239, 68, 68, 0.22);
    color: #fecaca;
}
.svt-ctx-item:disabled {
    opacity: 0.42;
    cursor: not-allowed;
    color: #64748b;
    background: transparent;
}
.svt-ctx-icon {
    width: 18px;
    text-align: center;
    font-size: 13.5px;
    flex-shrink: 0;
}
.svt-ctx-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#svt-dialog-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2147483100;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
#svt-dialog-backdrop.open {
    display: flex;
}
.svt-dialog-card {
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.36);
    overflow: hidden;
    color: #0f172a;
}
.svt-dialog-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #1e1b4b 0%, #3b0764 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.svt-dialog-header h3 {
    margin: 0;
    font-size: 15.5px;
    font-weight: 800;
    color: #ffffff;
}
.svt-dialog-close {
    background: rgba(255, 255, 255, 0.14);
    border: none;
    color: #ffffff;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    box-shadow: none;
}
.svt-dialog-close:hover {
    background: rgba(255, 255, 255, 0.25);
}
.svt-dialog-body {
    padding: 18px 20px;
    font-size: 13.5px;
    line-height: 1.55;
    color: #334155;
}
.svt-dialog-warning {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fff7ed;
    border-left: 3px solid #f59e0b;
    color: #9a3412;
    font-size: 12.5px;
    font-weight: 600;
}
.svt-dialog-checks {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}
.svt-dialog-check-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 11px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
}
.svt-dialog-check-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    accent-color: #7c6cf0;
    flex-shrink: 0;
}
.svt-dialog-check-title {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}
.svt-dialog-check-meta {
    display: block;
    font-size: 11.5px;
    color: #64748b;
    margin-top: 1px;
}
.svt-dialog-footer {
    padding: 12px 20px 16px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}
.svt-dialog-btn {
    border: none;
    border-radius: 10px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.svt-dialog-btn-cancel {
    background-color: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
}
.svt-dialog-btn-cancel:hover {
    background-color: #e5e7eb;
    color: #1f2937;
}
.svt-dialog-btn-confirm {
    background: linear-gradient(135deg, #906bff 0%, #3d93fc 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 12px rgba(129, 140, 248, 0.25);
}
.svt-dialog-btn-confirm:hover:not(:disabled) {
    opacity: 0.92;
    transform: translateY(-1px);
}
.svt-dialog-btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
}
.svt-dialog-btn:disabled {
    background: #f3f4f6;
    background-color: #f3f4f6;
    color: #4b5563;
    border: 1px solid #cbd5e1;
    padding: 10px 22px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: not-allowed;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: none;
    opacity: 1;
}
.svt-toast {
    position: fixed;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2147483200;
    padding: 10px 18px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.94);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.4);
    pointer-events: none;
}


