/* ???????????????????????????????????????????????????????
   NEEDLYsign — site.css  (LIGHT THEME)
   Matches screenshot: white body, #1e2d4a navy sidebar,
   #1565C0 blue accents, gray cards, clean typography
??????????????????????????????????????????????????????? */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ?? CSS VARIABLES ?? */
:root {
    --sidebar-bg: #1e2d4a;
    --sidebar-hover: #253660;
    --sidebar-active: #2c4275;
    --accent: #1565C0;
    --accent-light: #1976D2;
    --accent-hover: #0d47a1;
    --accent-green: #2e7d32;
    --accent-red: #c62828;
    --accent-amber: #e65100;
    --body-bg: #f0f2f5;
    --surface: #ffffff;
    --surface-2: #f8f9fb;
    --border: #e0e4ea;
    --border-light: #edf0f4;
    --text-primary: #1a2332;
    --text-secondary: #4a5568;
    --text-muted: #8a95a3;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.05);
    --shadow-lg: 0 8px 24px rgba(0,0,0,.10), 0 4px 12px rgba(0,0,0,.06);
    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 14px;
    --font: 'Plus Jakarta Sans', sans-serif;
    --sidebar-w: 220px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font);
    background: var(--body-bg);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ???????????????????????????????????????????????????
   SIDEBAR
??????????????????????????????????????????????????? */
.ns-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    z-index: 200;
    overflow-y: auto;
}

.sidebar-brand {
    padding: 20px 18px 16px;
    border-bottom: 1px solid rgba(255,255,255,.07);
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-icon {
    width: 34px;
    height: 34px;
    background: var(--accent);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    font-family: var(--font);
    flex-shrink: 0;
}

.brand-name {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.01em;
}

    .brand-name span {
        color: #90caf9;
    }

.sidebar-nav {
    padding: 12px 10px;
    flex: 1;
}

.nav-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255,255,255,.35);
    padding: 10px 10px 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,.65);
    text-decoration: none;
    cursor: pointer;
    transition: all .18s;
    margin-bottom: 2px;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

    .nav-link svg, .nav-link .nav-icon {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
        opacity: .7;
    }

    .nav-link:hover {
        background: var(--sidebar-hover);
        color: #fff;
    }

        .nav-link:hover svg, .nav-link:hover .nav-icon {
            opacity: 1;
        }

    .nav-link.active {
        background: var(--sidebar-active);
        color: #fff;
        font-weight: 600;
    }

        .nav-link.active svg, .nav-link.active .nav-icon {
            opacity: 1;
        }

.nav-badge {
    margin-left: auto;
    background: rgba(245,158,11,.25);
    color: #fbbf24;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
}

.nav-divider {
    height: 1px;
    background: rgba(255,255,255,.07);
    margin: 8px 0;
}

.sidebar-footer {
    padding: 12px 10px;
    border-top: 1px solid rgba(255,255,255,.07);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background .18s;
}

    .sidebar-user:hover {
        background: var(--sidebar-hover);
    }

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

.user-role {
    font-size: 11px;
    color: rgba(255,255,255,.4);
    margin-top: 1px;
}

/* ???????????????????????????????????????????????????
   MAIN CONTENT WRAPPER
??????????????????????????????????????????????????? */
.ns-main {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ?? TOPBAR ?? */
.ns-topbar {
    height: 56px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.topbar-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.bridge-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #2e7d32;
}

    .bridge-pill.offline {
        background: #ffebee;
        border-color: #ef9a9a;
        color: #c62828;
    }

.dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

    .dot.pulse {
        animation: pulse 1.8s infinite;
    }

@keyframes pulse {
    0%,100% {
        opacity: 1
    }

    50% {
        opacity: .3
    }
}

.topbar-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
}

/* ?? PAGE CONTENT ?? */
.ns-content {
    flex: 1;
    padding: 24px;
}

/* ???????????????????????????????????????????????????
   CARDS & SURFACES
??????????????????????????????????????????????????? */
.ns-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.ns-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.ns-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.ns-card-body {
    padding: 20px;
}

/* ???????????????????????????????????????????????????
   BUTTONS
??????????????????????????????????????????????????? */
.btn-primary {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 9px 20px;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .18s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

    .btn-primary:hover {
        background: var(--accent-hover);
        color: #fff;
        box-shadow: 0 4px 12px rgba(21,101,192,.3);
    }

.btn-proceed {
    background: #1a237e;
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 11px 28px;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all .18s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

    .btn-proceed:hover {
        background: #0d47a1;
        box-shadow: 0 4px 16px rgba(26,35,126,.4);
    }

.btn-secondary {
    background: #fff;
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all .18s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

    .btn-secondary:hover {
        background: var(--surface-2);
        border-color: #c0c8d8;
        color: var(--text-primary);
    }

.btn-icon {
    width: 32px;
    height: 32px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .15s;
    font-size: 14px;
    color: var(--text-secondary);
}

    .btn-icon:hover {
        background: #fff;
        border-color: var(--accent);
        color: var(--accent);
    }

.btn-success {
    background: var(--accent-green);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 20px;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .18s;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

    .btn-success:hover {
        background: #1b5e20;
        box-shadow: 0 4px 12px rgba(46,125,50,.35);
    }

/* ???????????????????????????????????????????????????
   FORM ELEMENTS
??????????????????????????????????????????????????? */
.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    letter-spacing: .02em;
}

.form-input {
    width: 100%;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 13px;
    padding: 9px 12px;
    transition: border-color .18s, box-shadow .18s;
    outline: none;
}

    .form-input:focus {
        border-color: var(--accent);
        box-shadow: 0 0 0 3px rgba(21,101,192,.12);
    }

    .form-input::placeholder {
        color: #b0bac8;
    }

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

select.form-input {
    cursor: pointer;
}

/* OTP Boxes */
.otp-box {
    width: 46px;
    height: 52px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    outline: none;
    transition: border-color .18s;
}

    .otp-box:focus {
        border-color: var(--accent);
        box-shadow: 0 0 0 3px rgba(21,101,192,.12);
    }

/* ???????????????????????????????????????????????????
   BADGES & STATUS
??????????????????????????????????????????????????? */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 20px;
}

.badge-green {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.badge-blue {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
}

.badge-amber {
    background: #fff8e1;
    color: #e65100;
    border: 1px solid #ffe082;
}

.badge-red {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.badge-gray {
    background: #f1f3f5;
    color: #4a5568;
    border: 1px solid #e0e4ea;
}

/* ???????????????????????????????????????????????????
   STAT CARDS
??????????????????????????????????????????????????? */
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

    .stat-card::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        border-radius: var(--radius) var(--radius) 0 0;
    }

.stat-blue::after {
    background: var(--accent);
}

.stat-green::after {
    background: var(--accent-green);
}

.stat-amber::after {
    background: #f59e0b;
}

.stat-purple::after {
    background: #7c3aed;
}

.stat-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 12px;
}

.stat-icon-blue {
    background: #e3f2fd;
}

.stat-icon-green {
    background: #e8f5e9;
}

.stat-icon-amber {
    background: #fff8e1;
}

.stat-icon-purple {
    background: #ede7f6;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.stat-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* ???????????????????????????????????????????????????
   DROP ZONE
??????????????????????????????????????????????????? */
.drop-zone {
    border: 2px dashed #c0cfe0;
    border-radius: var(--radius);
    padding: 40px 24px;
    text-align: center;
    cursor: pointer;
    background: #f8fafd;
    transition: all .2s;
}

    .drop-zone:hover, .drop-zone.over {
        border-color: var(--accent);
        background: #e8f0fe;
    }

.drop-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.drop-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.drop-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ???????????????????????????????????????????????????
   ALERTS
??????????????????????????????????????????????????? */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    border-left: 4px solid;
}

.alert-success {
    background: #f1f8e9;
    border-color: #7cb342;
    color: #33691e;
}

.alert-warning {
    background: #fffde7;
    border-color: #f9a825;
    color: #e65100;
}

.alert-danger {
    background: #ffebee;
    border-color: #ef5350;
    color: #b71c1c;
}

.alert-info {
    background: #e3f2fd;
    border-color: #42a5f5;
    color: #0d47a1;
}

/* ???????????????????????????????????????????????????
   TABLE
??????????????????????????????????????????????????? */
.ns-table {
    width: 100%;
    border-collapse: collapse;
}

    .ns-table th {
        font-size: 11px;
        font-weight: 700;
        letter-spacing: .05em;
        text-transform: uppercase;
        color: var(--text-muted);
        padding: 10px 16px;
        background: var(--surface-2);
        border-bottom: 1px solid var(--border);
        text-align: left;
    }

    .ns-table td {
        padding: 13px 16px;
        font-size: 13px;
        border-bottom: 1px solid var(--border-light);
        color: var(--text-primary);
    }

    .ns-table tr:last-child td {
        border-bottom: none;
    }

    .ns-table tr:hover td {
        background: #fafbfe;
    }

/* ???????????????????????????????????????????????????
   PROGRESS BAR
??????????????????????????????????????????????????? */
.progress {
    height: 6px;
    background: #e8ecf0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width .4s;
    background: var(--accent);
}

    .progress-fill.green {
        background: var(--accent-green);
    }

    .progress-fill.amber {
        background: #f59e0b;
    }

/* ???????????????????????????????????????????????????
   LANDING PAGE (light version)
??????????????????????????????????????????????????? */
.landing-page {
    background: #f0f4ff;
}

.landing-hero {
    background: linear-gradient(135deg, #1e2d4a 0%, #1565c0 100%);
    color: #fff;
    padding: 80px 40px;
    text-align: center;
}

    .landing-hero h1 {
        font-size: clamp(36px,5vw,60px);
        font-weight: 800;
        line-height: 1.1;
        margin-bottom: 20px;
    }

    .landing-hero p {
        font-size: 18px;
        opacity: .8;
        max-width: 580px;
        margin: 0 auto 36px;
    }

.hero-badge-light {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 13px;
    color: #fff;
    margin-bottom: 28px;
}

.step-card-light {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    box-shadow: var(--shadow-md);
    height: 100%;
}

.step-num-light {
    font-size: 42px;
    font-weight: 800;
    color: #dbeafe;
    line-height: 1;
    margin-bottom: 14px;
}

.plan-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    height: 100%;
    position: relative;
    transition: transform .2s, box-shadow .2s;
    box-shadow: var(--shadow-sm);
}

    .plan-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-lg);
    }

    .plan-card.featured {
        border-color: var(--accent);
    }

.plan-badge {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
}

.plan-price {
    font-size: 42px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.feature-check {
    color: var(--accent-green);
}

.feature-cross {
    color: #c0ccd8;
}

/* ???????????????????????????????????????????????????
   AUTH PAGE
??????????????????????????????????????????????????? */
.auth-outer {
    min-height: 100vh;
    display: flex;
    background: #f0f4ff;
}

.auth-sidebar {
    width: 380px;
    background: linear-gradient(160deg, #1e2d4a 0%, #1565c0 100%);
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.auth-form-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-md);
}

.auth-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-light);
    margin-bottom: 28px;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all .18s;
}

    .auth-tab.active {
        color: var(--accent);
        border-bottom-color: var(--accent);
    }

/* ???????????????????????????????????????????????????
   WIZARD
??????????????????????????????????????????????????? */
.wizard-outer {
    background: var(--body-bg);
    min-height: 100vh;
    padding: 32px;
}

.wizard-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    max-width: 740px;
    margin: 0 auto;
    overflow: hidden;
}

.wizard-header-bar {
    padding: 24px 32px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wz-step-bar {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 24px 32px;
}

.wz-step {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

    .wz-step:last-child {
        flex: 0;
    }

.wz-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    transition: all .25s;
}

    .wz-dot.done {
        background: #e8f5e9;
        color: #2e7d32;
        border: 2px solid #a5d6a7;
    }

    .wz-dot.active {
        background: var(--accent);
        color: #fff;
        box-shadow: 0 0 0 4px rgba(21,101,192,.2);
    }

    .wz-dot.pending {
        background: var(--surface-2);
        color: var(--text-muted);
        border: 2px solid var(--border);
    }

.wz-line {
    flex: 1;
    height: 2px;
    background: var(--border-light);
    margin: 0 8px;
}

    .wz-line.done {
        background: #a5d6a7;
    }

.wz-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

    .wz-label.active {
        color: var(--accent);
    }

.check-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    background: var(--surface-2);
    margin-bottom: 10px;
}

.check-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.check-ok {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.check-warn {
    background: #fff8e1;
    color: #e65100;
    border: 1px solid #ffe082;
}

/* ???????????????????????????????????????????????????
   SIGNING PAGE (full-screen)
??????????????????????????????????????????????????? */
body.signing-body {
    overflow: hidden;
    background: var(--body-bg);
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.sign-topbar {
    height: 52px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 10px;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.sign-layout {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* LEFT: sidebar nav (slim) */
.sign-sidebar {
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow-y: auto;
}

/* CENTER: PDF Canvas */
.sign-canvas-area {
    flex: 1;
    background: #e8ecf2;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.canvas-toolbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.canvas-toolbar-btn {
    width: 30px;
    height: 30px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all .15s;
}

    .canvas-toolbar-btn:hover {
        background: #fff;
        border-color: var(--accent);
        color: var(--accent);
    }

.canvas-divider {
    width: 1px;
    height: 20px;
    background: var(--border);
    margin: 0 4px;
}

.pdf-scroll {
    flex: 1;
    overflow: auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px;
}

.pdf-page-wrap {
    position: relative;
    background: #fff;
    box-shadow: 0 4px 24px rgba(0,0,0,.15);
    border-radius: 4px;
    overflow: hidden;
}

#pdfCanvas {
    display: block;
}

/* Drag Overlays */
.sig-overlay {
    position: absolute;
    cursor: move;
    border: 2px dashed;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    user-select: none;
    transition: box-shadow .15s;
}

    .sig-overlay:hover {
        box-shadow: 0 0 0 3px rgba(0,0,0,.08);
    }

    .sig-overlay.sig-type {
        border-color: #1565c0;
        background: rgba(21,101,192,.08);
        color: #1565c0;
    }

    .sig-overlay.qr-type {
        border-color: #2e7d32;
        background: rgba(46,125,50,.08);
        color: #2e7d32;
    }

/* RIGHT: Configuration Panel */
.sign-panel {
    width: 300px;
    background: var(--surface);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow-y: auto;
}

.sign-panel-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--surface-2);
}

/* Drag element chips (right panel top) */
.drag-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: grab;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    transition: all .15s;
    margin-bottom: 8px;
}

    .drag-chip:hover {
        background: #fff;
        border-color: var(--accent);
        color: var(--accent);
    }

.drag-chip-icon {
    font-size: 18px;
}

.panel-section {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-light);
}

    .panel-section:last-child {
        border-bottom: none;
    }

.panel-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* Footer bar */
.sign-footer-bar {
    padding: 14px 18px;
    border-top: 1px solid var(--border);
    background: var(--surface-2);
    flex-shrink: 0;
}

.footer-input {
    width: 100%;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    font-family: var(--font);
    font-size: 13px;
    color: var(--text-primary);
    outline: none;
    transition: border-color .18s;
}

    .footer-input:focus {
        border-color: var(--accent);
        box-shadow: 0 0 0 3px rgba(21,101,192,.1);
    }

/* Bridge status bar (bottom) */
.bridge-bottom-bar {
    height: 36px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 10px;
    font-size: 12px;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* ???????????????????????????????????????????????????
   BULK SIGN
??????????????????????????????????????????????????? */
.bulk-layout {
    display: flex;
    gap: 20px;
    height: calc(100vh - 56px - 48px);
    overflow: hidden;
}

.bulk-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow: hidden;
}

.bulk-right {
    width: 300px;
    flex-shrink: 0;
    overflow-y: auto;
}

.file-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    box-shadow: var(--shadow-sm);
}

.file-status.pending {
    color: var(--text-muted);
}

.file-status.signing {
    color: var(--accent-amber);
    font-weight: 600;
}

.file-status.done {
    color: var(--accent-green);
    font-weight: 600;
}

/* ???????????????????????????????????????????????????
   VERIFY PAGE
??????????????????????????????????????????????????? */
.verify-page {
    background: var(--body-bg);
    min-height: 100vh;
    padding-top: 56px;
}

.verify-hero {
    text-align: center;
    padding: 60px 24px 40px;
}

.result-card {
    border-radius: var(--radius-lg);
    padding: 36px;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.result-authentic {
    background: #f1f8e9;
    border: 2px solid #a5d6a7;
}

.result-tampered {
    background: #ffebee;
    border: 2px solid #ef9a9a;
}

.result-title {
    font-size: 24px;
    font-weight: 800;
}

.result-authentic .result-title {
    color: #2e7d32;
}

.result-tampered .result-title {
    color: #c62828;
}

.detail-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
}

.detail-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.detail-value {
    font-size: 13px;
    font-weight: 600;
    margin-top: 3px;
}

/* ???????????????????????????????????????????????????
   RESPONSIVE
??????????????????????????????????????????????????? */
@media (max-width: 991px) {
    .ns-sidebar {
        transform: translateX(-100%);
        transition: transform .3s;
    }

        .ns-sidebar.open {
            transform: translateX(0);
        }

    .ns-main {
        margin-left: 0;
    }

    .auth-sidebar {
        display: none;
    }

    .bulk-layout {
        flex-direction: column;
        height: auto;
    }

    .bulk-right {
        width: 100%;
    }
}
