
:root {
    --sne-brand: #073863;
    --sne-brand-dark: #052848;
    --sne-brand-light: #f0f6fa;
    --sne-border: #d0e1f0;
    --sne-accent: #0284c7;
}

#sne-calculator-wrapper.sne-container {
    max-width: 820px;
    margin: 24px auto;
    padding: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-shadow: 0 10px 25px -5px rgba(7, 56, 99, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    color: #1e293b;
    overflow: hidden;
}

.sne-header-banner {
    background: var(--sne-brand);
    color: #ffffff;
    padding: 24px 28px;
    border-bottom: 3px solid #0284c7;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.sne-btn-reset {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sne-btn-reset:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.45);
}

.sne-brand-tag {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #38bdf8;
    margin-bottom: 6px;
}

.sne-title {
    font-size: 24px;
    color: #ffffff !important;
    margin: 0 0 6px 0 !important;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.sne-subtitle {
    font-size: 13px;
    color: #94a3b8;
    margin: 0;
    line-height: 1.5;
}

.sne-form-body {
    padding: 24px 28px;
}

.sne-highlight-box {
    background: var(--sne-brand-light);
    border: 1px solid var(--sne-border);
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.sne-label-bold {
    font-size: 14px;
    font-weight: 700;
    color: var(--sne-brand);
}

.sne-radio-group {
    display: flex;
    gap: 16px;
}

.sne-radio-label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sne-radio-label input[type="radio"] {
    accent-color: var(--sne-brand);
}

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

.sne-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 640px) {
    .sne-grid-2 {
        grid-template-columns: 1fr;
    }
}

.sne-input-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 12px 14px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sne-input-card label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.sne-input-symbol {
    display: inline-flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 4px 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.sne-sym {
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    margin-right: 4px;
}

.sne-input-symbol input {
    border: none !important;
    outline: none !important;
    width: 110px;
    text-align: right;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    background: transparent !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.sne-gross-banner {
    background: var(--sne-brand);
    color: #ffffff;
    padding: 14px 20px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    font-weight: 700;
    font-size: 15px;
}

.sne-gross-val {
    font-size: 18px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    color: #6ee7b7;
    font-weight: 800;
}

.sne-section-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--sne-brand);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 24px 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid var(--sne-border);
    padding-bottom: 8px;
}

.sne-grid-costs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.sne-col-span-2 {
    grid-column: span 2;
}

@media (max-width: 680px) {
    .sne-grid-costs {
        grid-template-columns: 1fr;
    }
    .sne-col-span-2 {
        grid-column: span 1;
    }
}

.sne-cost-row {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 10px 14px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sne-cost-row label {
    font-size: 12px;
    font-weight: 600;
    color: #334155;
}

.sne-label-with-sub {
    display: flex;
    flex-direction: column;
}

.sne-label-with-sub small {
    font-size: 10px;
    color: #64748b;
}

.sne-checkbox-label {
    font-size: 11px !important;
    color: var(--sne-brand) !important;
    margin-top: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.sne-checkbox-label input {
    accent-color: var(--sne-brand);
}

.sne-commission-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sne-num-sm {
    width: 55px;
    padding: 4px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    text-align: right;
    font-size: 13px;
    font-weight: 700;
}

.sne-misc-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sne-misc-txt {
    width: 160px;
    padding: 4px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 12px;
}

.sne-summary-box {
    background: var(--sne-brand);
    color: #ffffff;
    padding: 20px;
    border-radius: 12px;
    margin-top: 24px;
}

.sne-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    font-weight: 600;
}

.sne-grand-total {
    font-size: 18px;
    font-weight: 800;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 10px;
    padding-top: 12px;
}

.sne-cost-val {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    color: #fca5a5;
    font-weight: 700;
}

.sne-net-val {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 20px;
    font-weight: 800;
    color: #6ee7b7;
}

.sne-print-section {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 2px dashed #cbd5e1;
}

.sne-print-header h3 {
    font-size: 16px;
    font-weight: 800;
    color: var(--sne-brand);
    margin: 0 0 4px 0;
}

.sne-print-header p {
    font-size: 12px;
    color: #64748b;
    margin: 0 0 16px 0;
}

.sne-print-fields label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.sne-print-fields input, .sne-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
    color: #0f172a;
    background: #ffffff;
}

.sne-btn-wrapper {
    margin-top: 20px;
    text-align: center;
}

.sne-btn-primary {
    background: var(--sne-brand);
    color: #ffffff;
    border: none;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 800;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(7, 56, 99, 0.25);
}

.sne-btn-primary:hover {
    background: var(--sne-brand-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(7, 56, 99, 0.35);
}

/* Modal Overlay Styling (Matching React Preview) */
.sne-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

.sne-modal-container {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    max-width: 820px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    animation: sneModalFadeIn 0.2s ease-out;
}

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

.sne-modal-topbar {
    background: var(--sne-brand);
    color: #ffffff;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #052848;
}

.sne-modal-topbar-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 14px;
}

.sne-modal-topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sne-modal-btn-print {
    background: #38bdf8;
    color: #0f172a;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s;
}

.sne-modal-btn-print:hover {
    background: #7dd3fc;
}

.sne-modal-btn-close {
    background: transparent;
    border: none;
    color: #cbd5e1;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}

.sne-modal-btn-close:hover {
    color: #ffffff;
}

.sne-pdf-doc-body {
    padding: 32px 36px;
    overflow-y: auto;
    font-size: 12px;
    color: #1e293b;
}

/* Printable PDF Document Layout */
.sne-doc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 3px solid #073863;
    padding-bottom: 20px;
    margin-bottom: 24px;
}

.sne-doc-logo {
    background: #073863;
    color: #ffffff;
    padding: 6px 14px;
    font-weight: 900;
    font-size: 18px;
    border-radius: 4px;
    display: inline-block;
    letter-spacing: 1px;
}

.sne-doc-sub {
    font-size: 11px;
    color: #64748b;
    margin-top: 6px;
    line-height: 1.4;
}

.sne-doc-title-box {
    text-align: right;
}

.sne-doc-title-box h1 {
    margin: 0 0 6px 0;
    font-size: 20px;
    color: #073863;
    text-transform: uppercase;
    font-weight: 900;
}

.sne-doc-meta {
    font-size: 11px;
    color: #334155;
    line-height: 1.5;
}

.sne-doc-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    font-size: 12px;
}

.sne-doc-table th, .sne-doc-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.sne-doc-table td.num {
    text-align: right;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 700;
}

.sne-doc-gross-row {
    background: #f0f6fa;
    font-weight: bold;
    border-top: 2px solid #073863 !important;
    border-bottom: 2px solid #073863 !important;
}

.sne-doc-section-head {
    background: #073863;
    color: #ffffff;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.sne-doc-summary-card {
    background: #f8fafc;
    border: 2px solid #073863;
    padding: 16px;
    border-radius: 8px;
    margin-top: 24px;
}

.sne-doc-summary-line {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 13px;
}

.sne-doc-net-line {
    font-size: 16px;
    color: #073863;
    border-top: 1px solid #cbd5e1;
    padding-top: 10px;
    margin-bottom: 0;
}

.sne-doc-disclaimer {
    margin-top: 28px;
    font-size: 9px;
    color: #64748b;
    border-top: 1px solid #e2e8f0;
    padding-top: 12px;
    line-height: 1.4;
}

@media print {
    body * {
        visibility: hidden !important;
    }
    #sne-pdf-modal-overlay, #sne-pdf-modal-overlay * {
        visibility: visible !important;
    }
    #sne-pdf-modal-overlay {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        height: auto !important;
        background: #ffffff !important;
        padding: 0 !important;
        display: block !important;
    }
    .sne-modal-topbar {
        display: none !important;
    }
    .sne-modal-container {
        box-shadow: none !important;
        border: none !important;
        max-width: 100% !important;
        margin: 0 !important;
    }
    .sne-pdf-doc-body {
        padding: 0 !important;
    }
}
