/* public/assets/css/nextgen-home.css
   Modern Enterprise SaaS Additions: Interactive Sandbox, ROI Calculator, Competitor Matrix & Template Gallery
*/

:root {
    --ng-primary: #2563EB;
    --ng-primary-dark: #1D4ED8;
    --ng-primary-glow: rgba(37, 99, 235, 0.25);
    --ng-emerald: #10B981;
    --ng-emerald-glow: rgba(16, 185, 129, 0.25);
    --ng-amber: #F59E0B;
    --ng-crimson: #D02C2F;
    --ng-navy-950: #0B0F19;
    --ng-navy-900: #0F172A;
    --ng-navy-800: #1E293B;
    --ng-slate-700: #334155;
    --ng-slate-600: #475569;
    --ng-slate-400: #94A3B8;
    --ng-slate-200: #E2E8F0;
    --ng-slate-100: #F1F5F9;
    --ng-slate-50: #F8FAFC;
    --ng-radius: 16px;
    --ng-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.08);
    --ng-shadow-lg: 0 30px 60px -12px rgba(15, 23, 42, 0.16);
}

/* ==========================================================================
   1. COMMON SECTION HEADERS & WRAPPERS
   ========================================================================== */
.ez-nextgen-section {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}
.ez-nextgen-section.light-bg {
    background: #FFFFFF;
}
.ez-nextgen-section.tint-bg {
    background: #F8FAFC;
    border-top: 1px solid #E2E8F0;
    border-bottom: 1px solid #E2E8F0;
}
.ez-nextgen-section.dark-bg {
    background: #0B0F19;
    color: #FFFFFF;
}

.ez-ng-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 700;
    color: var(--ng-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}
.ez-ng-badge.dark {
    background: rgba(37, 99, 235, 0.2);
    border-color: rgba(96, 165, 250, 0.3);
    color: #93C5FD;
}
.ez-ng-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ng-primary);
    box-shadow: 0 0 10px var(--ng-primary);
}

/* ==========================================================================
   2. INTERACTIVE LIVE SIGNATURE SANDBOX
   ========================================================================== */
.ez-sandbox-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    box-shadow: var(--ng-shadow-lg);
    overflow: hidden;
    margin-top: 40px;
}
.ez-sandbox-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    min-height: 560px;
}
@media (max-width: 991px) {
    .ez-sandbox-grid {
        grid-template-columns: 1fr;
    }
}

/* Document Sheet Left Side */
.ez-sandbox-doc {
    background: #F1F5F9;
    padding: 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #E2E8F0;
}
.ez-sandbox-sheet {
    background: #FFFFFF;
    width: 100%;
    max-width: 580px;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    padding: 32px 36px;
    border: 1px solid #CBD5E1;
    position: relative;
}
.ez-sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #0F172A;
    padding-bottom: 14px;
    margin-bottom: 20px;
}
.ez-sheet-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 15px;
    color: #0F172A;
}
.ez-sheet-badge {
    font-size: 11px;
    font-weight: 700;
    background: #EFF6FF;
    color: var(--ng-primary);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #BFDBFE;
}
.ez-sheet-title {
    font-size: 17px;
    font-weight: 800;
    color: #0F172A;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.ez-sheet-sub {
    font-size: 12px;
    color: #64748B;
    margin-bottom: 16px;
}
.ez-sheet-body p {
    font-size: 12px;
    line-height: 1.6;
    color: #334155;
    margin-bottom: 12px;
}
.ez-sheet-clause {
    background: #F8FAFC;
    border-left: 3px solid var(--ng-primary);
    padding: 8px 12px;
    font-size: 11px;
    color: #475569;
    margin-bottom: 18px;
    font-style: italic;
}

/* Document Target Signing Zone */
.ez-sheet-sign-area {
    margin-top: 20px;
    border-top: 1px dashed #CBD5E1;
    padding-top: 18px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.ez-sign-box-target {
    border: 2px dashed #93C5FD;
    background: #EFF6FF;
    border-radius: 10px;
    padding: 14px;
    text-align: center;
    cursor: pointer;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.2s ease;
}
.ez-sign-box-target:hover {
    border-color: var(--ng-primary);
    background: #DBEAFE;
    transform: translateY(-2px);
}
.ez-sign-box-target.signed {
    border: 2px solid var(--ng-emerald);
    background: #F0FDF4;
    cursor: default;
}
.ez-target-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--ng-primary);
    font-size: 12px;
    font-weight: 700;
}
.ez-target-signed-content {
    display: none;
    width: 100%;
}
.ez-sign-box-target.signed .ez-target-prompt {
    display: none;
}
.ez-sign-box-target.signed .ez-target-signed-content {
    display: block;
}

/* Tool Palette Right Side */
.ez-sandbox-tools {
    padding: 32px 28px;
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
}
.ez-tools-title {
    font-size: 17px;
    font-weight: 800;
    color: #0F172A;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ez-tools-desc {
    font-size: 13px;
    color: #64748B;
    margin-bottom: 20px;
}

/* Tool Tabs (Draw, Type, Seal) */
.ez-tool-nav {
    display: flex;
    gap: 6px;
    background: #F1F5F9;
    padding: 4px;
    border-radius: 10px;
    margin-bottom: 20px;
}
.ez-tool-tab-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px 12px;
    font-size: 12.5px;
    font-weight: 700;
    color: #64748B;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.ez-tool-tab-btn.active {
    background: #FFFFFF;
    color: var(--ng-primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Canvas Box */
.ez-canvas-wrapper {
    position: relative;
    background: #F8FAFC;
    border: 1px solid #CBD5E1;
    border-radius: 10px;
    margin-bottom: 14px;
    overflow: hidden;
}
#liveSandboxCanvas {
    display: block;
    width: 100%;
    height: 140px;
    background: #FFFFFF;
    cursor: crosshair;
}
.ez-canvas-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #F8FAFC;
    border-top: 1px solid #E2E8F0;
}
.ez-color-picker-group {
    display: flex;
    gap: 6px;
}
.ez-color-swatch {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.15s ease;
}
.ez-color-swatch.active {
    transform: scale(1.15);
    border-color: #FFFFFF;
    box-shadow: 0 0 0 2px #0F172A;
}
.ez-canvas-clear-btn {
    background: transparent;
    border: none;
    color: #64748B;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}
.ez-canvas-clear-btn:hover {
    color: var(--ng-crimson);
}

/* Type Mode Panel */
.ez-type-panel {
    display: none;
}
.ez-type-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 12px;
    font-family: inherit;
    outline: none;
}
.ez-type-input:focus {
    border-color: var(--ng-primary);
    box-shadow: 0 0 0 3px var(--ng-primary-glow);
}
.ez-font-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
}
.ez-font-card {
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
    text-align: center;
    font-size: 16px;
    color: #0F172A;
    background: #F8FAFC;
    transition: all 0.15s ease;
}
.ez-font-card.active {
    border-color: var(--ng-primary);
    background: #EFF6FF;
    color: var(--ng-primary);
}

/* Apply & Action Buttons */
.ez-btn-apply-sig {
    width: 100%;
    background: var(--ng-primary);
    color: #FFFFFF;
    border: none;
    padding: 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px var(--ng-primary-glow);
    margin-bottom: 10px;
}
.ez-btn-apply-sig:hover {
    background: var(--ng-primary-dark);
    transform: translateY(-1px);
}
.ez-sandbox-status-note {
    font-size: 11.5px;
    color: #64748B;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: auto;
}

/* Success Modal / Certificate Overlay */
.ez-cert-modal {
    position: fixed;
    inset: 0;
    background: rgba(11, 15, 25, 0.75);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.ez-cert-modal.open {
    display: flex;
}
.ez-cert-dialog {
    background: #FFFFFF;
    border-radius: 20px;
    width: 100%;
    max-width: 540px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: ezZoomIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes ezZoomIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}
.ez-cert-dialog-header {
    background: #0F172A;
    color: #FFFFFF;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ez-cert-dialog-body {
    padding: 28px 24px;
}
.ez-cert-hash-box {
    background: #F1F5F9;
    border-radius: 8px;
    padding: 12px;
    font-family: monospace;
    font-size: 11.5px;
    color: #0F172A;
    word-break: break-all;
    margin: 14px 0;
    border-left: 3px solid var(--ng-emerald);
}

/* ==========================================================================
   3. ENTERPRISE ROI & SAVINGS CALCULATOR
   ========================================================================== */
.ez-calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    margin-top: 40px;
}
@media (max-width: 991px) {
    .ez-calc-grid {
        grid-template-columns: 1fr;
    }
}

.ez-calc-controls-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    padding: 36px 32px;
    box-shadow: var(--ng-shadow);
}
.ez-slider-group {
    margin-bottom: 28px;
}
.ez-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.ez-slider-label {
    font-size: 14px;
    font-weight: 700;
    color: #0F172A;
}
.ez-slider-val-badge {
    background: #EFF6FF;
    color: var(--ng-primary);
    font-size: 15px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 8px;
    border: 1px solid #BFDBFE;
}
.ez-calc-range {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #E2E8F0;
    outline: none;
    -webkit-appearance: none;
}
.ez-calc-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--ng-primary);
    cursor: pointer;
    box-shadow: 0 0 10px var(--ng-primary-glow);
    border: 2px solid #FFFFFF;
}

/* ROI Output Dashboard Card */
.ez-calc-results-card {
    background: linear-gradient(145deg, #0B0F19 0%, #1E293B 100%);
    border-radius: 24px;
    padding: 38px 34px;
    color: #FFFFFF;
    box-shadow: var(--ng-shadow-lg);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.ez-calc-results-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.35) 0%, transparent 70%);
    pointer-events: none;
}
.ez-calc-hero-stat {
    margin-bottom: 30px;
}
.ez-calc-hero-stat-label {
    font-size: 13px;
    text-transform: uppercase;
    font-weight: 700;
    color: #94A3B8;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.ez-calc-hero-stat-number {
    font-size: 46px;
    font-weight: 900;
    color: #34D399;
    line-height: 1;
    font-family: 'Plus Jakarta Sans', sans-serif;
}
.ez-calc-hero-stat-sub {
    font-size: 13px;
    color: #CBD5E1;
    margin-top: 6px;
}

.ez-calc-metrics-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.ez-calc-metric-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px;
}
.ez-metric-num {
    font-size: 20px;
    font-weight: 800;
    color: #FFFFFF;
    margin-bottom: 2px;
}
.ez-metric-label {
    font-size: 11.5px;
    color: #94A3B8;
}

/* Competitor Savings Strip */
.ez-competitor-diff-box {
    background: rgba(37, 99, 235, 0.12);
    border: 1px solid rgba(37, 99, 235, 0.3);
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.ez-diff-text strong {
    color: #60A5FA;
    font-size: 13.5px;
    display: block;
}
.ez-diff-text span {
    font-size: 12px;
    color: #CBD5E1;
}

/* ==========================================================================
   4. HEAD-TO-HEAD COMPETITOR COMPARISON TABLE
   ========================================================================== */
.ez-comp-table-wrap {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    box-shadow: var(--ng-shadow);
    overflow: hidden;
    margin-top: 40px;
}
.ez-comp-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
.ez-comp-table th,
.ez-comp-table td {
    padding: 16px 20px;
    font-size: 14px;
    border-bottom: 1px solid #F1F5F9;
}
.ez-comp-table th {
    background: #F8FAFC;
    color: #0F172A;
    font-weight: 800;
    font-size: 14px;
    border-bottom: 2px solid #E2E8F0;
}
.ez-comp-table th.ez-col-featured {
    background: #EFF6FF;
    color: var(--ng-primary);
    border-left: 2px solid var(--ng-primary);
    border-right: 2px solid var(--ng-primary);
    border-top: 4px solid var(--ng-primary);
}
.ez-comp-table td.ez-col-featured {
    background: #FAFCFF;
    border-left: 2px solid var(--ng-primary);
    border-right: 2px solid var(--ng-primary);
    font-weight: 600;
}
.ez-comp-table tr:last-child td {
    border-bottom: none;
}
.ez-comp-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}
.ez-comp-badge.green { background: #DCFCE7; color: #15803D; }
.ez-comp-badge.blue { background: #DBEAFE; color: #1D4ED8; }
.ez-comp-badge.amber { background: #FEF3C7; color: #B45309; }
.ez-comp-badge.red { background: #FEE2E2; color: #B91C1C; }

/* ==========================================================================
   5. INTERACTIVE INDUSTRY TEMPLATE GALLERY
   ========================================================================== */
.ez-template-filters {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 32px 0 40px;
}
.ez-tpl-filter-btn {
    background: #FFFFFF;
    border: 1px solid #CBD5E1;
    color: #475569;
    font-size: 13.5px;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.ez-tpl-filter-btn:hover,
.ez-tpl-filter-btn.active {
    background: var(--ng-primary);
    border-color: var(--ng-primary);
    color: #FFFFFF;
    box-shadow: 0 4px 12px var(--ng-primary-glow);
}

.ez-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}
.ez-template-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--ng-shadow);
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
}
.ez-template-card:hover {
    transform: translateY(-4px);
    border-color: var(--ng-primary);
    box-shadow: var(--ng-shadow-lg);
}
.ez-tpl-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.ez-tpl-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}
.ez-tpl-icon.blue { background: #EFF6FF; color: var(--ng-primary); }
.ez-tpl-icon.emerald { background: #ECFDF5; color: var(--ng-emerald); }
.ez-tpl-icon.purple { background: #FAF5FF; color: #9333EA; }
.ez-tpl-icon.amber { background: #FFFBEB; color: #D97706; }

.ez-tpl-cat {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748B;
}
.ez-tpl-title {
    font-size: 16px;
    font-weight: 800;
    color: #0F172A;
    margin-bottom: 8px;
}
.ez-tpl-desc {
    font-size: 13px;
    color: #64748B;
    line-height: 1.5;
    margin-bottom: 16px;
    flex-grow: 1;
}
.ez-tpl-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid #F1F5F9;
    margin-bottom: 16px;
    font-size: 12px;
    color: #475569;
}
.ez-tpl-actions {
    display: flex;
    gap: 8px;
}
.ez-btn-tpl-preview {
    flex: 1;
    background: #F1F5F9;
    color: #1E293B;
    border: none;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.ez-btn-tpl-preview:hover {
    background: #E2E8F0;
}
.ez-btn-tpl-use {
    flex: 1;
    background: var(--ng-primary);
    color: #FFFFFF;
    text-decoration: none;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    text-align: center;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.ez-btn-tpl-use:hover {
    background: var(--ng-primary-dark);
}
