/* ==========================================================================
   FastCraft PDF Studio - Advanced PDF Tools Suite Styles
   Brand Theme: Deep Violet (#7b00a0) & Ember Orange (#ff7f00)
   Features: Glassmorphism, Micro-animations, Dark/Light Mode Responsive
   ========================================================================== */

/* --- Page Clearance for Fixed Navbar --- */
body.pdf-tools-page {
    padding-top: 80px;
}

/* --- Tool Pill Badge in Nav --- */
.nav-pill-new {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, var(--color-accent), #ff5500);
    color: #ffffff;
    border-radius: 50px;
    margin-left: 0.4rem;
    vertical-align: middle;
    box-shadow: 0 2px 8px rgba(255, 127, 0, 0.35);
    animation: pulse-glow 2.5s infinite;
}

@keyframes pulse-glow {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.06); opacity: 0.9; }
}

.pdf-tools-page {
    padding-top: 74px;
}

/* --- Hero Banner for PDF Suite (deprecated/minimized) --- */
.pdf-hero {
    position: relative;
    padding-top: 15px;
    padding-bottom: 12px;
    background: radial-gradient(circle at 50% 15%, rgba(123, 0, 160, 0.08) 0%, transparent 60%);
    text-align: center;
    overflow: hidden;
}

body.dark-theme .pdf-hero {
    background: radial-gradient(circle at 50% 15%, rgba(167, 66, 255, 0.12) 0%, transparent 60%);
}

.pdf-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0.75rem;
    background: rgba(123, 0, 160, 0.08);
    border: 1px solid rgba(123, 0, 160, 0.2);
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.dark-theme .pdf-hero-badge {
    background: rgba(167, 66, 255, 0.12);
    border-color: rgba(167, 66, 255, 0.3);
    color: var(--color-primary-light);
}

.pdf-hero-title {
    font-size: clamp(1.45rem, 3vw, 2.1rem);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 0.3rem;
    letter-spacing: -0.5px;
}

.pdf-hero-subtitle {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    max-width: 580px;
    margin: 0 auto 0.6rem;
    line-height: 1.45;
}

.pdf-hero-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: center;
    margin-bottom: 0.65rem;
}

.pdf-pill-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.18rem 0.6rem;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(123, 0, 160, 0.15);
    color: var(--color-text-main);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

body.dark-theme .pdf-pill-chip {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--color-text-main);
}

.pdf-pill-chip .chip-icon {
    font-size: 0.85rem;
}

/* --- Filter & Category Tabs --- */
.pdf-filter-bar {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin: 0.35rem auto 0.75rem;
    max-width: 720px;
}

.pdf-tab-btn {
    padding: 0.28rem 0.8rem;
    border-radius: 50px;
    background: #ffffff;
    border: 1px solid rgba(123, 0, 160, 0.15);
    color: var(--color-text-muted);
    font-family: var(--font-primary);
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

body.dark-theme .pdf-tab-btn {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--color-text-muted);
}

.pdf-tab-btn:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
    transform: translateY(-1px);
}

.pdf-tab-btn.active {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(123, 0, 160, 0.22);
}

/* --- Tools Grid --- */
.pdf-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 0.85rem;
    margin-bottom: 2.2rem;
}

.pdf-tool-card {
    background: #ffffff;
    border: 1px solid #eae5f0;
    border-radius: 14px;
    padding: 0.95rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.02);
}

body.dark-theme .pdf-tool-card {
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(255, 255, 255, 0.09) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.pdf-tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pdf-tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(123, 0, 160, 0.1);
    border-color: rgba(123, 0, 160, 0.28);
}

body.dark-theme .pdf-tool-card:hover {
    box-shadow: 0 12px 28px rgba(167, 66, 255, 0.12);
    border-color: rgba(167, 66, 255, 0.35) !important;
}

.pdf-tool-card:hover::before {
    opacity: 1;
}

.tool-card-badge {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.12rem 0.45rem;
    border-radius: 50px;
    background: rgba(255, 127, 0, 0.12);
    color: var(--color-accent);
    border: 1px solid rgba(255, 127, 0, 0.25);
}

.tool-card-badge.popular {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: #ffffff;
    border: none;
}

.tool-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.6rem;
    background: linear-gradient(135deg, rgba(123, 0, 160, 0.08), rgba(255, 127, 0, 0.08));
    color: var(--color-primary);
    transition: transform 0.3s ease;
}

body.dark-theme .tool-card-icon {
    background: linear-gradient(135deg, rgba(167, 66, 255, 0.15), rgba(255, 154, 46, 0.15));
    color: var(--color-primary-light);
}

.pdf-tool-card:hover .tool-card-icon {
    transform: scale(1.08) rotate(3deg);
}

.tool-card-icon svg {
    width: 18px;
    height: 18px;
}

.tool-card-title {
    font-size: 0.98rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    color: var(--color-text-main);
}

.tool-card-desc {
    font-size: 0.76rem;
    color: var(--color-text-muted);
    line-height: 1.4;
    margin-bottom: 0.65rem;
}

.tool-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--color-primary);
}

body.dark-theme .tool-card-footer {
    border-top-color: rgba(255, 255, 255, 0.07);
    color: var(--color-primary-light);
}

.tool-card-footer span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: transform 0.2s ease;
}

.pdf-tool-card:hover .tool-card-footer span {
    transform: translateX(3px);
}

/* ==========================================================================
   ACTIVE TOOL WORKSPACE
   ========================================================================== */
.workspace-section {
    display: none;
    padding: 1.2rem 0 2.5rem;
    position: relative;
}

.workspace-section.active {
    display: block;
    animation: fadeInWorkspace 0.3s ease forwards;
}

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

/* Compact section overrides for PDF Studio */
.pdf-tools-page .section {
    padding: 1.6rem 0 2.2rem;
}

.pdf-tools-page .section-header {
    margin-bottom: 1.2rem;
}

.pdf-tools-page .section-header .section-tag {
    font-size: 0.7rem;
    padding: 0.16rem 0.6rem;
    margin-bottom: 0.3rem;
}

.pdf-tools-page .section-header .section-title {
    font-size: clamp(1.25rem, 2.2vw, 1.65rem);
    margin-bottom: 0.25rem;
    letter-spacing: -0.3px;
}

.pdf-tools-page .section-header .section-desc {
    font-size: 0.82rem;
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.4;
}

.workspace-header-card {
    background: #ffffff;
    border: 1px solid rgba(123, 0, 160, 0.12);
    border-radius: 14px;
    padding: 0.75rem 1.15rem;
    margin-bottom: 1.1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    box-shadow: 0 4px 18px rgba(123, 0, 160, 0.04);
}

body.dark-theme .workspace-header-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.workspace-title-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.workspace-tool-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 12px rgba(123, 0, 160, 0.25);
    flex-shrink: 0;
}

.workspace-tool-icon svg {
    width: 20px;
    height: 20px;
}

.workspace-title-box h2 {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 0.1rem;
    line-height: 1.2;
}

.workspace-title-box p {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    margin: 0;
}

.workspace-actions-nav {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.tool-switcher-select {
    padding: 0.38rem 0.85rem;
    border-radius: 50px;
    border: 1px solid rgba(123, 0, 160, 0.2);
    background: #ffffff;
    color: var(--color-text-main);
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 0.78rem;
    cursor: pointer;
    outline: none;
    transition: var(--transition-fast);
}

body.dark-theme .tool-switcher-select {
    background: #1a0840;
    border-color: rgba(255, 255, 255, 0.15);
    color: #f8f5fc;
}

.tool-switcher-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(123, 0, 160, 0.12);
}

/* --- Compact Dropzone Container --- */
.dropzone-box {
    border: 2px dashed rgba(123, 0, 160, 0.25);
    background: linear-gradient(135deg, rgba(123, 0, 160, 0.03) 0%, rgba(255, 127, 0, 0.03) 100%);
    border-radius: 14px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
    margin-bottom: 0.85rem;
}

body.dark-theme .dropzone-box {
    border-color: rgba(167, 66, 255, 0.35);
    background: rgba(255, 255, 255, 0.02);
}

.dropzone-box:hover,
.dropzone-box.drag-over {
    border-color: var(--color-accent);
    background: rgba(255, 127, 0, 0.04);
    transform: scale(1.004);
}

body.dark-theme .dropzone-box:hover,
body.dark-theme .dropzone-box.drag-over {
    background: rgba(255, 154, 46, 0.05);
    border-color: var(--color-accent-light);
}

.dropzone-content-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.dropzone-icon-ring {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    margin: 0;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(123, 0, 160, 0.1), rgba(255, 127, 0, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    transition: transform 0.25s ease;
}

.dropzone-box:hover .dropzone-icon-ring {
    transform: translateY(-2px) scale(1.08);
    color: var(--color-accent);
}

.dropzone-icon-ring svg {
    width: 20px;
    height: 20px;
}

.dropzone-text-col {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.dropzone-title {
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropzone-sub {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropzone-select-btn {
    flex-shrink: 0;
    padding: 0.35rem 0.85rem;
    font-size: 0.76rem;
    font-weight: 700;
}

.dropzone-footer-mini {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.4rem;
    padding-top: 0.4rem;
    border-top: 1px dashed rgba(123, 0, 160, 0.12);
    font-size: 0.68rem;
    color: var(--color-text-muted);
}

body.dark-theme .dropzone-footer-mini {
    border-top-color: rgba(255, 255, 255, 0.08);
}

.dropzone-security-badge {
    color: #10b981;
    font-weight: 600;
    margin: 0;
    padding: 0;
    background: transparent;
}

.dropzone-accept-text {
    font-size: 0.68rem;
    color: var(--color-text-muted);
}

/* Tool Intelligence Card for Non-Preview Tools */
.tool-info-card {
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid rgba(123, 0, 160, 0.15);
    padding: 1.1rem;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.03);
    margin-bottom: 1.1rem;
}

body.dark-theme .tool-info-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}

.tool-info-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(123, 0, 160, 0.08);
}

body.dark-theme .tool-info-header {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.tool-info-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.tool-info-header h3 {
    font-size: 0.95rem;
    font-weight: 800;
    margin-bottom: 0.1rem;
}

.tool-info-tag {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--color-accent);
    text-transform: uppercase;
}

.tool-info-body {
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--color-text-muted);
}

.tool-info-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tool-info-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
}

.tool-info-list li strong {
    color: var(--color-text-main);
}

.tool-info-list li span.bullet {
    color: #10b981;
    font-weight: bold;
}

/* Hidden file inputs */
.file-hidden-input {
    display: none;
}

/* ==========================================================================
   FILE CARDS & REORDERING CONTAINER (FOR MERGE, ETC.)
   ========================================================================== */
.file-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.65rem;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.file-list-header h3 {
    font-size: 0.96rem;
    font-weight: 700;
}

.file-list-meta {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.file-list-actions {
    display: flex;
    gap: 0.5rem;
}

.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.1rem;
}

.file-card {
    background: #ffffff;
    border: 1px solid #eae5f0;
    border-radius: 12px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    transition: var(--transition-fast);
    user-select: none;
}

body.dark-theme .file-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}

.file-card:hover {
    box-shadow: 0 6px 18px rgba(123, 0, 160, 0.08);
    border-color: rgba(123, 0, 160, 0.28);
}

.file-card-order-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18);
}

.file-card-delete-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: var(--transition-fast);
    z-index: 2;
}

.file-card-delete-btn:hover {
    background: #ef4444;
    color: #ffffff;
    transform: scale(1.08);
}

.file-card-thumb {
    width: 100%;
    height: 95px;
    background: #f8f5fc;
    border: 1px solid #e5def0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0.35rem 0 0.5rem;
    position: relative;
}

body.dark-theme .file-card-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.08);
}

.file-card-thumb canvas,
.file-card-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}

.file-card-thumb .fallback-pdf-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    color: var(--color-primary);
    font-size: 0.74rem;
    font-weight: 600;
}

.file-card-info {
    margin-bottom: 0.45rem;
}

.file-card-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--color-text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.15rem;
}

.file-card-details {
    font-size: 0.7rem;
    color: var(--color-text-muted);
}

.file-card-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.3rem;
    padding-top: 0.45rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

body.dark-theme .file-card-controls {
    border-top-color: rgba(255, 255, 255, 0.08);
}

.file-order-btn {
    flex: 1;
    padding: 0.24rem 0.4rem;
    font-size: 0.68rem;
    font-weight: 600;
    background: rgba(123, 0, 160, 0.06);
    color: var(--color-primary);
    border: 1px solid rgba(123, 0, 160, 0.12);
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
}

body.dark-theme .file-order-btn {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--color-text-main);
}

.file-order-btn:hover:not(:disabled) {
    background: var(--color-primary);
    color: #ffffff;
}

.file-order-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* ==========================================================================
   PAGE GRID (FOR ORGANIZE, ROTATE, SPLIT)
   ========================================================================== */
.page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(125px, 1fr));
    gap: 0.65rem;
    margin-bottom: 1.1rem;
}

.page-card {
    background: #ffffff;
    border: 2px solid #eae5f0;
    border-radius: 10px;
    padding: 0.55rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transition: var(--transition-fast);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

body.dark-theme .page-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}

.page-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.page-card.deleted {
    opacity: 0.35;
    filter: grayscale(1);
    border-style: dashed;
    border-color: #ef4444;
}

.page-card-num {
    position: absolute;
    top: 0.4rem;
    left: 0.4rem;
    font-size: 0.65rem;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    padding: 0.1rem 0.38rem;
    border-radius: 4px;
    z-index: 2;
}

/* Direct Position Editor in Page Cards */
.page-card-header-bar {
    position: absolute;
    top: 0.32rem;
    left: 0.32rem;
    right: 0.32rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 4;
}

.page-pos-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(123, 0, 160, 0.92);
    backdrop-filter: blur(4px);
    color: #ffffff;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.page-orig-tag {
    font-size: 0.62rem;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.65);
    color: #e2e8f0;
    padding: 2px 5px;
    border-radius: 4px;
}

/* Page Expand / Pagination Bar */
.page-expand-bar {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    padding: 0.75rem 0;
    margin-top: 0.3rem;
    width: 100%;
}

.page-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.2rem;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 50px;
    border: 1.5px dashed var(--color-primary);
    background: rgba(123, 0, 160, 0.05);
    color: var(--color-primary);
    cursor: pointer;
    transition: all 0.22s ease;
}

body.dark-theme .page-expand-btn {
    background: rgba(167, 66, 255, 0.1);
    border-color: var(--color-primary-light);
    color: var(--color-primary-light);
}

.page-expand-btn:hover {
    background: var(--color-primary);
    color: #ffffff;
    border-style: solid;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(123, 0, 160, 0.25);
}

.page-card-canvas-wrap {
    width: 100%;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f5fc;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.45rem;
    transition: transform 0.25s ease;
}

body.dark-theme .page-card-canvas-wrap {
    background: rgba(0, 0, 0, 0.2);
}

.page-card-canvas-wrap canvas,
.page-card-canvas-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.page-card-actions {
    display: flex;
    gap: 0.3rem;
    width: 100%;
    justify-content: center;
}

.page-mini-btn {
    width: 26px;
    height: 26px;
    border-radius: 5px;
    background: rgba(123, 0, 160, 0.08);
    color: var(--color-primary);
    border: 1px solid rgba(123, 0, 160, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 0.75rem;
}

body.dark-theme .page-mini-btn {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--color-text-main);
}

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

.page-mini-btn.trash:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: #ffffff;
}

/* ==========================================================================
   TOOL OPTIONS PANEL (SIDEBAR / BOTTOM DRAWER)
   ========================================================================== */
.tool-options-box {
    background: #ffffff;
    border: 1px solid rgba(123, 0, 160, 0.12);
    border-radius: 14px;
    padding: 0.95rem 1.15rem;
    margin-bottom: 1.1rem;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.02);
}

body.dark-theme .tool-options-box {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}

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

.option-group {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
}

.option-group label {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.option-group input[type="text"],
.option-group input[type="password"],
.option-group input[type="number"],
.option-group select {
    padding: 0.42rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #eae5f0;
    background: #fbf9fd;
    font-family: var(--font-primary);
    font-size: 0.8rem;
    color: var(--color-text-main);
    outline: none;
    transition: var(--transition-fast);
}

body.dark-theme .option-group input[type="text"],
body.dark-theme .option-group input[type="password"],
body.dark-theme .option-group input[type="number"],
body.dark-theme .option-group select {
    background: rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.option-group input:focus,
.option-group select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(123, 0, 160, 0.15);
}

.option-radio-group {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.option-radio-chip {
    padding: 0.32rem 0.7rem;
    border-radius: 50px;
    border: 1px solid rgba(123, 0, 160, 0.18);
    background: #ffffff;
    color: var(--color-text-muted);
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

body.dark-theme .option-radio-chip {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
}

.option-radio-chip.selected {
    background: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
}

/* ==========================================================================
   EXECUTE BUTTON & PROGRESS BAR
   ========================================================================== */
.execute-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.btn-execute {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 0.62rem 1.6rem;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(123, 0, 160, 0.3);
    transition: var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.btn-execute:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 24px rgba(123, 0, 160, 0.4);
}

.btn-execute:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* --- Progress & Status Modal/Overlay --- */
.processing-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.processing-overlay.active {
    display: flex;
    animation: fadeInModal 0.3s ease;
}

.processing-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 1.8rem;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.3);
}

body.dark-theme .processing-card {
    background: #1a0840;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.processing-spinner {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid rgba(123, 0, 160, 0.15);
    border-top-color: var(--color-accent);
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

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

.processing-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.35rem;
}

.processing-card p {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    margin-bottom: 0.9rem;
}

.processing-progress-bar {
    width: 100%;
    height: 6px;
    background: #eae5f0;
    border-radius: 50px;
    overflow: hidden;
    margin-bottom: 0.4rem;
}

body.dark-theme .processing-progress-bar {
    background: rgba(255, 255, 255, 0.1);
}

.processing-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    border-radius: 50px;
    transition: width 0.2s ease;
}

/* ==========================================================================
   RESULT SUCCESS CARD
   ========================================================================== */
.result-card {
    display: none;
    background: #ffffff;
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 16px;
    padding: 1.8rem 1.5rem;
    text-align: center;
    margin-bottom: 1.4rem;
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.08);
    animation: fadeInResult 0.35s ease;
}

body.dark-theme .result-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(16, 185, 129, 0.4);
}

.result-card.active {
    display: block;
}

@keyframes fadeInResult {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}

.result-success-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

.result-success-icon svg {
    width: 26px;
    height: 26px;
}

.result-card h2 {
    font-size: 1.35rem;
    margin-bottom: 0.35rem;
}

.result-card p {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    max-width: 460px;
    margin: 0 auto 1.1rem;
}

.result-stats-row {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.2rem;
}

.stat-item {
    background: #f8f5fc;
    border-radius: 10px;
    padding: 0.55rem 1.1rem;
    text-align: center;
}

body.dark-theme .stat-item {
    background: rgba(255, 255, 255, 0.04);
}

.stat-item-val {
    font-size: 1rem;
    font-weight: 800;
    color: var(--color-primary);
    font-family: var(--font-mono);
}

body.dark-theme .stat-item-val {
    color: var(--color-primary-light);
}

.stat-item-label {
    font-size: 0.68rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.result-btn-row {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ==========================================================================
   WHY FASTCRAFT PDF SECTION & FAQ
   ========================================================================== */
.pdf-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.pdf-feature-card {
    background: #ffffff;
    border: 1px solid #eae5f0;
    border-radius: 14px;
    padding: 1.3rem;
    transition: var(--transition-base);
}

body.dark-theme .pdf-feature-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.09);
}

.pdf-feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(123, 0, 160, 0.08);
}

.pdf-feature-icon {
    font-size: 1.6rem;
    margin-bottom: 0.65rem;
}

.pdf-feature-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.35rem;
}

.pdf-feature-card p {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* --- Comparison Table --- */
.compare-table-wrap {
    overflow-x: auto;
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #eae5f0;
    margin-bottom: 2.2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

body.dark-theme .compare-table-wrap {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.09);
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.82rem;
}

.compare-table th,
.compare-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #eae5f0;
}

body.dark-theme .compare-table th,
body.dark-theme .compare-table td {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.compare-table th {
    background: #f8f5fc;
    font-weight: 700;
    color: var(--color-text-main);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.dark-theme .compare-table th {
    background: rgba(255, 255, 255, 0.05);
}

.compare-table tr:last-child td {
    border-bottom: none;
}

.badge-winner {
    color: #10b981;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.badge-loser {
    color: #ef4444;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Responsive queries */
@media (max-width: 768px) {
    .pdf-hero { padding-top: 75px; }
    .pdf-hero-title { font-size: 1.6rem; }
    .workspace-header-card { flex-direction: column; align-items: flex-start; }
    .workspace-actions-nav { width: 100%; justify-content: space-between; }
    .files-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .file-card-thumb { height: 80px; }
    .execute-bar { justify-content: center; }
    .btn-execute { width: 100%; justify-content: center; }
}

/* ==========================================================================
   WATERMARK & COMPRESSION ENHANCEMENTS
   ========================================================================== */
.watermark-color-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    margin-top: 0.3rem;
}

.color-swatch-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.2s ease, outline 0.2s ease;
    outline: 2px solid transparent;
}

.color-swatch-btn:hover {
    transform: scale(1.12);
}

.color-swatch-btn.active {
    outline: 2px solid var(--color-primary);
    transform: scale(1.15);
}

.color-native-picker-wrap {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: 0.3rem;
}

.color-native-picker {
    width: 26px;
    height: 26px;
    padding: 0;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: transparent;
}

.slider-val-badge {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--color-primary);
    background: rgba(123, 0, 160, 0.08);
    padding: 0.1rem 0.42rem;
    border-radius: 50px;
    margin-left: 0.4rem;
}

.watermark-img-preview-box {
    margin-top: 0.45rem;
    padding: 0.55rem 0.75rem;
    background: #f8f5fc;
    border: 1px dashed rgba(123, 0, 160, 0.25);
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

body.dark-theme .watermark-img-preview-box {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.15);
}

.watermark-img-thumb {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 6px;
    background: #ffffff;
    border: 1px solid #eae5f0;
}

/* Compression Levels */
.compression-level-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.85rem;
    margin-top: 0.5rem;
}

.compression-card {
    background: #ffffff;
    border: 2px solid #eae5f0;
    border-radius: 12px;
    padding: 0.95rem 1rem;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    user-select: none;
    box-sizing: border-box;
    position: relative;
}

body.dark-theme .compression-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}

.compression-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(123, 0, 160, 0.08);
}

.compression-card.selected {
    border-color: var(--color-primary);
    background: rgba(123, 0, 160, 0.04);
    box-shadow: 0 4px 16px rgba(123, 0, 160, 0.12);
}

body.dark-theme .compression-card.selected {
    background: rgba(167, 66, 255, 0.1);
    border-color: var(--color-primary-light);
}

.compression-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.compression-card-title,
.compression-card h4 {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--color-text-main);
    margin: 0;
    line-height: 1.25;
}

.compression-card-badge {
    position: static;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 0.2rem 0.55rem;
    border-radius: 50px;
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    white-space: nowrap;
    align-self: flex-start;
}

.compression-card-badge.recommended {
    background: rgba(123, 0, 160, 0.12);
    color: var(--color-primary);
}

body.dark-theme .compression-card-badge.recommended {
    background: rgba(167, 66, 255, 0.2);
    color: var(--color-primary-light);
}

.compression-card-badge.light {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
}

.compression-card-desc,
.compression-card p {
    font-size: 0.74rem;
    color: var(--color-text-muted);
    line-height: 1.4;
    margin: 0;
}

.compression-card-estimate {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-top: auto;
    padding-top: 0.2rem;
}

body.dark-theme .compression-card-estimate {
    color: var(--color-primary-light);
}

/* ==========================================================================
   HTML5 DRAG AND DROP REORDERING STYLES
   ========================================================================== */
.file-card[draggable="true"],
.page-card[draggable="true"] {
    cursor: grab;
}

.file-card[draggable="true"]:active,
.page-card[draggable="true"]:active {
    cursor: grabbing;
}

.file-card.is-dragging,
.page-card.is-dragging {
    opacity: 0.45;
    transform: scale(0.97);
    border: 2px dashed var(--color-primary) !important;
    box-shadow: 0 6px 20px rgba(123, 0, 160, 0.2) !important;
}

.file-card.drag-over,
.page-card.drag-over {
    border-color: var(--color-accent) !important;
    box-shadow: 0 0 0 3px rgba(255, 127, 0, 0.35) !important;
    transform: translateY(-2px) scale(1.02);
}

.card-drag-handle {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--color-text-muted);
    background: rgba(0, 0, 0, 0.04);
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    cursor: grab;
    user-select: none;
    margin-bottom: 0.35rem;
}

body.dark-theme .card-drag-handle {
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-text-muted);
}

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

/* ==========================================================================
   INTERACTIVE LIVE PREVIEW SECTION
   ========================================================================== */
.live-preview-section {
    margin-bottom: 1.1rem;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid rgba(123, 0, 160, 0.15);
    padding: 0.95rem 1.15rem;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.03);
    transition: var(--transition-base);
}

body.dark-theme .live-preview-section {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}

.live-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.live-preview-title-box h3 {
    font-size: 0.98rem;
    font-weight: 800;
    margin-top: 0.15rem;
    line-height: 1.2;
}

.live-preview-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.14rem 0.5rem;
    border-radius: 50px;
    font-size: 0.68rem;
    font-weight: 700;
    background: rgba(255, 127, 0, 0.12);
    color: var(--color-accent);
    text-transform: uppercase;
}

.live-preview-nav {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.preview-page-counter {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.22rem 0.55rem;
    border-radius: 5px;
    background: rgba(123, 0, 160, 0.06);
    color: var(--color-primary);
}

body.dark-theme .preview-page-counter {
    background: rgba(255, 255, 255, 0.08);
    color: #f8f5fc;
}

.live-preview-viewport {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 240px;
    max-height: 480px;
    background: #f7f4fa;
    border-radius: 12px;
    padding: 0.9rem;
    overflow: auto;
    position: relative;
    border: 1px dashed rgba(123, 0, 160, 0.2);
}

body.dark-theme .live-preview-viewport {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
}

.live-preview-canvas-card {
    background: #ffffff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-radius: 6px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    max-width: 100%;
    transform-origin: center center;
    transition: transform 0.15s ease-out;
}

.live-preview-canvas-card canvas {
    display: block;
    max-width: 100%;
    max-height: 440px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.live-preview-loading {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-primary);
    z-index: 5;
}

body.dark-theme .live-preview-loading {
    background: rgba(15, 5, 29, 0.88);
}

.mini-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(123, 0, 160, 0.2);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ==========================================================================
   SIGNATURE DRAWING PAD STYLES
   ========================================================================== */
.signature-pad-wrap {
    background: #ffffff;
    border: 2px dashed rgba(123, 0, 160, 0.25);
    border-radius: 10px;
    padding: 0.75rem;
    position: relative;
    margin-top: 0.45rem;
}

body.dark-theme .signature-pad-wrap {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.15);
}

.signature-canvas {
    width: 100%;
    height: 120px;
    background: #ffffff;
    border-radius: 6px;
    touch-action: none;
    cursor: crosshair;
    display: block;
    border: 1px solid #eae5f0;
}

body.dark-theme .signature-canvas {
    background: #1e1333;
    border-color: rgba(255, 255, 255, 0.1);
}

.signature-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.ink-color-group {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.ink-swatch {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: var(--transition-fast);
}

.ink-swatch.active {
    transform: scale(1.2);
    box-shadow: 0 0 0 2px var(--color-primary);
}

/* ==========================================================================
   VISUAL SPLIT SELECTION STYLES
   ========================================================================== */
.page-card.split-selected {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 2px rgba(123, 0, 160, 0.28) !important;
    background: rgba(123, 0, 160, 0.03);
}

body.dark-theme .page-card.split-selected {
    background: rgba(167, 66, 255, 0.1);
}

.page-card-check-box {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    width: 20px;
    height: 20px;
    border-radius: 5px;
    background: #ffffff;
    border: 2px solid rgba(123, 0, 160, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    font-size: 0.72rem;
    transition: var(--transition-fast);
}

.page-card.split-selected .page-card-check-box {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff;
}

/* ==========================================================================
   FULLSCREEN INSPECT / PREVIEW MODAL
   ========================================================================== */
.modal-large-inspect {
    max-width: 900px;
    width: 94vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.inspect-modal-body {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.2rem;
    overflow: auto;
    background: #181126;
    border-radius: 0 0 16px 16px;
}

.inspect-canvas-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.inspect-canvas-wrapper canvas {
    max-width: 100%;
    max-height: 72vh;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.5);
    border-radius: 6px;
    background: #ffffff;
}

/* ==========================================================================
   2-COLUMN WORKSPACE INTERACTIVE LAYOUT (LEFT: SETTINGS, RIGHT: LIVE PREVIEW)
   ========================================================================== */
.workspace-interactive-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
    align-items: start;
    width: 100%;
}

.workspace-interactive-layout.has-preview {
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
}

@media (max-width: 1080px) {
    .workspace-interactive-layout.has-preview {
        grid-template-columns: 1fr;
    }
}

.workspace-left-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
    width: 100%;
}

.workspace-right-panel {
    min-width: 0;
    position: sticky;
    top: 85px;
    z-index: 15;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    max-height: calc(100vh - 95px);
    overflow-y: auto;
    padding-right: 2px;
}

.workspace-left-panel .tool-options-box {
    margin-bottom: 0;
}

.workspace-left-panel .execute-bar {
    margin-top: 0.5rem;
    width: 100%;
}

.workspace-left-panel .btn-execute {
    width: 100%;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(123, 0, 160, 0.28);
}

/* Interactive Draggable & Resizable Stamp / Signature Overlay */
.preview-stamp-overlay {
    position: absolute;
    z-index: 15;
    border: 2px dashed #7b00a0;
    background: rgba(123, 0, 160, 0.04);
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(123, 0, 160, 0.18);
    cursor: move;
    cursor: grab;
    user-select: none;
    touch-action: none;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.preview-stamp-overlay:hover {
    border-color: #ff7f00;
    box-shadow: 0 4px 20px rgba(255, 127, 0, 0.28);
    background: rgba(255, 127, 0, 0.05);
}

.preview-stamp-overlay.is-dragging {
    cursor: grabbing;
    border-color: #ff7f00;
    border-style: solid;
    box-shadow: 0 8px 26px rgba(255, 127, 0, 0.38);
    background: rgba(255, 127, 0, 0.08);
}

.stamp-overlay-img-box {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    pointer-events: none;
}

.stamp-overlay-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    display: block;
}

/* Scaling handles on corners and sides */
.stamp-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #ffffff;
    border: 2px solid #7b00a0;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    z-index: 25;
    touch-action: none;
    transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.stamp-handle:hover,
.preview-stamp-overlay.is-dragging .stamp-handle {
    transform: scale(1.35);
    border-color: #ff7f00;
    background: #ff7f00;
}

.stamp-handle-nw { top: -6px; left: -6px; cursor: nwse-resize; }
.stamp-handle-ne { top: -6px; right: -6px; cursor: nesw-resize; }
.stamp-handle-se { bottom: -6px; right: -6px; cursor: nwse-resize; }
.stamp-handle-sw { bottom: -6px; left: -6px; cursor: nesw-resize; }
.stamp-handle-w  { top: calc(50% - 6px); left: -6px; cursor: ew-resize; border-radius: 3px; }
.stamp-handle-e  { top: calc(50% - 6px); right: -6px; cursor: ew-resize; border-radius: 3px; }
.stamp-handle-n  { left: calc(50% - 6px); top: -6px; cursor: ns-resize; border-radius: 3px; }
.stamp-handle-s  { left: calc(50% - 6px); bottom: -6px; cursor: ns-resize; border-radius: 3px; }

@media (max-width: 1080px) {
    .workspace-right-panel {
        position: static;
        order: 2;
    }
}

.live-preview-footer-hint {
    margin-top: 0.6rem;
    text-align: center;
    font-size: 0.72rem;
    color: var(--color-text-muted);
}

/* ==========================================================================
   IN-DEPTH SEO FEATURE GUIDES & TUTORIALS
   ========================================================================== */
.seo-guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.2rem;
    margin-top: 1.4rem;
}

.seo-guide-card {
    background: #ffffff;
    border: 1px solid rgba(123, 0, 160, 0.12);
    border-radius: 14px;
    padding: 1.4rem;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.02);
    transition: var(--transition-base);
    display: flex;
    flex-direction: column;
}

body.dark-theme .seo-guide-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.09);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.seo-guide-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(123, 0, 160, 0.08);
    border-color: rgba(123, 0, 160, 0.25);
}

body.dark-theme .seo-guide-card:hover {
    box-shadow: 0 10px 25px rgba(167, 66, 255, 0.12);
    border-color: rgba(167, 66, 255, 0.3);
}

.seo-guide-icon {
    font-size: 1.6rem;
    margin-bottom: 0.75rem;
}

.seo-guide-card h3 {
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--color-text-main);
    line-height: 1.3;
}

.seo-guide-card p {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin-bottom: 0.8rem;
}

.seo-guide-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    font-size: 0.78rem;
    color: var(--color-text-muted);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 0.8rem;
    margin-top: auto;
}

body.dark-theme .seo-guide-list {
    border-top-color: rgba(255, 255, 255, 0.07);
}

.seo-guide-list li strong {
    color: var(--color-text-main);
}

/* ==========================================================================
   ARCHITECTURE GRID: CLOUD DANGER VS FASTCRAFT SANDBOX
   ========================================================================== */
.architecture-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.2rem;
    margin-top: 1.4rem;
}

.architecture-card {
    border-radius: 14px;
    padding: 1.4rem;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.03);
    position: relative;
    border: 1px solid;
}

.architecture-card.cloud-danger {
    background: rgba(239, 68, 68, 0.03);
    border-color: rgba(239, 68, 68, 0.2);
}

body.dark-theme .architecture-card.cloud-danger {
    background: rgba(239, 68, 68, 0.06);
    border-color: rgba(239, 68, 68, 0.3);
}

.architecture-card.fastcraft-secure {
    background: rgba(16, 185, 129, 0.03);
    border-color: rgba(16, 185, 129, 0.25);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.06);
}

body.dark-theme .architecture-card.fastcraft-secure {
    background: rgba(16, 185, 129, 0.06);
    border-color: rgba(16, 185, 129, 0.35);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.1);
}

.arch-badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}

.arch-badge.danger {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

.arch-badge.success {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}

.architecture-header h3 {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 0.9rem;
}

.architecture-points {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--color-text-muted);
}

.architecture-points li strong {
    color: var(--color-text-main);
}

/* ==========================================================================
   3-STEP WORKFLOW GRID
   ========================================================================== */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.2rem;
    margin-top: 1.4rem;
}

.step-card {
    background: #ffffff;
    border: 1px solid rgba(123, 0, 160, 0.12);
    border-radius: 14px;
    padding: 1.4rem;
    position: relative;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.02);
    transition: var(--transition-base);
}

body.dark-theme .step-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.09);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.step-card:hover {
    transform: translateY(-3px);
    border-color: var(--color-primary);
}

.step-num {
    font-family: var(--font-mono);
    font-size: 1.9rem;
    font-weight: 900;
    color: rgba(123, 0, 160, 0.18);
    line-height: 1;
    margin-bottom: 0.65rem;
}

body.dark-theme .step-num {
    color: rgba(167, 66, 255, 0.25);
}

.step-card h3 {
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 0.45rem;
}

.step-card p {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* ==========================================================================
   INTERACTIVE FAQ ACCORDION
   ========================================================================== */
.faq-accordion-box {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 1.4rem;
}

.faq-item {
    background: #ffffff;
    border: 1px solid rgba(123, 0, 160, 0.12);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition-fast);
}

body.dark-theme .faq-item {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.09);
}

.faq-item.active {
    border-color: var(--color-primary);
    box-shadow: 0 4px 16px rgba(123, 0, 160, 0.06);
}

body.dark-theme .faq-item.active {
    box-shadow: 0 4px 16px rgba(167, 66, 255, 0.1);
}

.faq-question {
    width: 100%;
    padding: 0.85rem 1.15rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    background: transparent;
    border: none;
    font-family: var(--font-primary);
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--color-text-main);
    text-align: left;
    cursor: pointer;
    transition: var(--transition-fast);
}

.faq-question:hover {
    color: var(--color-primary);
}

body.dark-theme .faq-question:hover {
    color: var(--color-primary-light);
}

.faq-icon {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--color-primary);
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

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

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 1.15rem;
    color: var(--color-text-muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

.faq-item.active .faq-answer {
    max-height: 600px;
    padding: 0 1.15rem 0.95rem;
}

/* ==========================================================================
   USER FEEDBACK & FEATURE REQUEST FORM
   ========================================================================== */
.feedback-card-wrapper {
    background: #ffffff;
    border: 1px solid rgba(123, 0, 160, 0.15);
    border-radius: 16px;
    padding: 1.8rem 1.6rem;
    max-width: 780px;
    width: 100%;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(123, 0, 160, 0.04);
    overflow: hidden;
    box-sizing: border-box;
}

body.dark-theme .feedback-card-wrapper {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.feedback-header {
    text-align: center;
    max-width: 580px;
    margin: 0 auto 1.4rem;
}

.feedback-badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(255, 127, 0, 0.12);
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}

.feedback-header h2 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
}

.feedback-header p {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    line-height: 1.45;
}

.feedback-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.9rem;
    margin-bottom: 1.2rem;
}

.feedback-field-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.feedback-field-group label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--color-text-main);
}

.feedback-input,
.feedback-select,
.feedback-textarea {
    width: 100%;
    padding: 0.55rem 0.85rem;
    border-radius: 8px;
    border: 1px solid rgba(123, 0, 160, 0.18);
    background: #ffffff;
    color: var(--color-text-main);
    font-family: var(--font-primary);
    font-size: 0.82rem;
    outline: none;
    transition: var(--transition-fast);
    box-sizing: border-box;
}

.feedback-textarea {
    resize: vertical;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    min-height: 90px;
    max-height: 260px;
    box-sizing: border-box;
}

body.dark-theme .feedback-input,
body.dark-theme .feedback-select,
body.dark-theme .feedback-textarea {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    color: #f8f5fc;
}

.feedback-input:focus,
.feedback-select:focus,
.feedback-textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(123, 0, 160, 0.15);
}

.star-rating-box {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.2rem;
}

.star-btn {
    background: transparent;
    border: none;
    font-size: 1.8rem;
    color: rgba(123, 0, 160, 0.2);
    cursor: pointer;
    transition: transform 0.2s ease, color 0.2s ease;
    line-height: 1;
    padding: 0 0.1rem;
}

body.dark-theme .star-btn {
    color: rgba(255, 255, 255, 0.15);
}

.star-btn:hover,
.star-btn.hover-active,
.star-btn.active {
    color: #f59e0b;
    transform: scale(1.15);
}

.feedback-submit-row {
    text-align: center;
}

.feedback-success-banner {
    margin-top: 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 10px;
    padding: 0.9rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    animation: fadeInWorkspace 0.3s ease;
}

.success-banner-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #10b981;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feedback-success-banner h4 {
    font-size: 0.95rem;
    font-weight: 800;
    color: #10b981;
    margin-bottom: 0.15rem;
}

.feedback-success-banner p {
    font-size: 0.78rem;
    color: var(--color-text-main);
    margin: 0;
}


