/* ==========================================================================
   Design Tokens & CSS Variables
   ========================================================================== */
:root {
    --bg-main: #0B0F17;
    --bg-card: rgba(18, 24, 38, 0.85);
    --bg-card-border: rgba(255, 255, 255, 0.08);
    --bg-subtle: #161F30;
    --bg-input: #0F1624;
    --bg-input-focus: #141D2E;
    
    --primary: #2563EB;
    --primary-hover: #1D4ED8;
    --primary-glow: rgba(37, 99, 235, 0.35);
    --primary-light: #60A5FA;
    
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    
    --border-color: rgba(255, 255, 255, 0.1);
    --border-focus: #3B82F6;
    
    --success: #10B981;
    --success-bg: rgba(16, 185, 129, 0.12);
    --error: #EF4444;
    --error-bg: rgba(239, 68, 68, 0.12);
    --warning: #F59E0B;
    --warning-bg: rgba(245, 158, 11, 0.15);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-full: 9999px;

    --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    --shadow-card: 0 20px 40px -15px rgba(0, 0, 0, 0.6), 0 0 1px 1px rgba(255, 255, 255, 0.05);
    --shadow-btn: 0 4px 14px 0 rgba(37, 99, 235, 0.39);
    --transition-fast: 150ms ease;
    --transition-normal: 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Background Ambient Glows */
.page-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(120px);
    opacity: 0.15;
}

.glow-top-left {
    top: -200px;
    left: -150px;
    background: radial-gradient(circle, #2563EB 0%, rgba(37, 99, 235, 0) 70%);
}

.glow-bottom-right {
    bottom: -150px;
    right: -100px;
    background: radial-gradient(circle, #0284C7 0%, rgba(2, 132, 199, 0) 70%);
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
    position: relative;
    z-index: 10;
    width: 100%;
    border-bottom: 1px solid var(--border-color);
    background: rgba(11, 15, 23, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.header-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.brand-logo-img {
    height: 34px;
    width: auto;
    object-fit: contain;
    display: block;
}

.brand-divider {
    height: 18px;
    width: 1px;
    background: rgba(255, 255, 255, 0.18);
    display: inline-block;
}

.brand-tagline {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.01em;
}

.header-badges {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mode-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.mode-badge.test-mode {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: currentColor;
    display: inline-block;
    animation: pulse 2s infinite;
}

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

.security-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.security-badge svg {
    color: var(--success);
}

/* ==========================================================================
   Setup Alert Banner
   ========================================================================== */
.setup-banner {
    position: relative;
    z-index: 10;
    max-width: 1120px;
    margin: 1.25rem auto 0;
    padding: 0.85rem 1.25rem;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: var(--radius-md);
    color: #FDE68A;
    font-size: 0.875rem;
}

.setup-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.setup-banner-info code {
    background: rgba(0, 0, 0, 0.4);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
    color: #FFF;
}

.btn-setup-toggle {
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #FEF3C7;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.btn-setup-toggle:hover {
    background: rgba(245, 158, 11, 0.35);
}

.setup-details {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(245, 158, 11, 0.2);
    line-height: 1.6;
}

.setup-details pre {
    background: #06090E;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    margin: 0.5rem 0;
    overflow-x: auto;
    font-family: monospace;
    font-size: 0.8rem;
    color: #A5B4FC;
}

.setup-details a {
    color: #60A5FA;
    text-decoration: underline;
}

/* ==========================================================================
   Main Content & Split Portal Card
   ========================================================================== */
.main-content {
    position: relative;
    z-index: 5;
    flex: 1;
    max-width: 1120px;
    width: 100%;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.portal-card {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
}

.portal-section {
    padding: 2.25rem;
}

.invoice-section {
    border-right: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0) 100%);
}

.payment-section {
    background: rgba(15, 22, 36, 0.5);
    display: flex;
    flex-direction: column;
}

/* Section Header */
.section-header {
    margin-bottom: 1.75rem;
}

.step-indicator {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--primary-light);
    background: rgba(37, 99, 235, 0.15);
    border: 1px solid rgba(37, 99, 235, 0.3);
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-full);
    margin-bottom: 0.5rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #FFFFFF;
    line-height: 1.25;
}

.section-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* ==========================================================================
   Form Controls & Modern Inputs
   ========================================================================== */
.details-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.flex-1 {
    flex: 1;
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.4rem;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #E2E8F0;
    margin-bottom: 0.35rem;
}

.label-optional {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.required-star {
    color: var(--error);
}

.input-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    pointer-events: none;
}

.form-input {
    width: 100%;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
    transition: border-color var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
    outline: none;
}

.input-wrapper .form-input {
    padding-left: 2.75rem;
}

.form-input:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.form-input:focus {
    background-color: var(--bg-input-focus);
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* User Valid / Invalid feedback using modern CSS */
.form-input:user-invalid {
    border-color: var(--error);
    background-color: rgba(239, 68, 68, 0.05);
}

.form-input:user-valid {
    border-color: rgba(16, 185, 129, 0.4);
}

.error-text {
    display: none;
    font-size: 0.75rem;
    color: var(--error);
    margin-top: 0.35rem;
}

.has-error .error-text {
    display: block;
}

.has-error .form-input {
    border-color: var(--error);
}

/* Currency Selector Toggle */
.currency-toggle {
    display: flex;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 2px;
}

.currency-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.currency-btn.active {
    background: var(--primary);
    color: #FFFFFF;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

/* Big Amount Input Box */
.amount-input-container {
    position: relative;
    display: flex;
    align-items: center;
    background-color: var(--bg-input);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.35rem 1rem;
    transition: all var(--transition-fast);
}

.amount-input-container:focus-within {
    border-color: var(--border-focus);
    background-color: var(--bg-input-focus);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.currency-symbol {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-right: 0.4rem;
    user-select: none;
}

.amount-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: -0.02em;
}

.amount-input::-webkit-outer-spin-button,
.amount-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.amount-input[type=number] {
    -moz-appearance: textfield;
}

.currency-code-badge {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    letter-spacing: 0.04em;
}

/* Quick Amount Pills */
.quick-amounts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.65rem;
}

.amount-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem 0.85rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.amount-pill:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.2);
}

.amount-pill.selected {
    background: rgba(37, 99, 235, 0.2);
    border-color: var(--primary);
    color: var(--primary-light);
}

/* Order Summary Box */
.order-summary-box {
    margin-top: 1.75rem;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
}

.summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.summary-val {
    font-weight: 500;
    color: var(--text-primary);
}

.text-success {
    color: var(--success);
    font-weight: 600;
}

.summary-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.75rem 0;
}

.total-line {
    margin-bottom: 0;
}

.total-line .summary-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #FFFFFF;
}

.total-amount {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: #FFFFFF;
}

/* ==========================================================================
   Stripe Payment Element & UI
   ========================================================================== */
.stripe-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#payment-element-wrapper {
    min-height: 250px;
    position: relative;
}

/* Loading Skeleton */
.stripe-skeleton {
    background: var(--bg-input);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 3rem 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.skeleton-shimmer {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(37, 99, 235, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.skeleton-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

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

.payment-message {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin: 1rem 0;
    background: var(--error-bg);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #FCA5A5;
    line-height: 1.4;
}

.payment-message.hidden {
    display: none;
}

/* Submit Pay Button */
.btn-pay {
    width: 100%;
    margin-top: 1.5rem;
    background: linear-gradient(180deg, #2563EB 0%, #1D4ED8 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: var(--shadow-btn);
    transition: all var(--transition-normal);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-pay:hover:not(:disabled) {
    background: linear-gradient(180deg, #3B82F6 0%, #2563EB 100%);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px -2px rgba(37, 99, 235, 0.5);
}

.btn-pay:active:not(:disabled) {
    transform: translateY(0);
}

.btn-pay:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-pay .btn-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.lock-icon {
    opacity: 0.85;
}

.btn-spinner {
    width: 22px;
    height: 22px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #FFFFFF;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.btn-spinner.hidden {
    display: none;
}

/* Trust Badges & Disclaimer */
.payment-trust-footer {
    margin-top: auto;
    padding-top: 1.75rem;
}

.trust-icons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.trust-tag {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.trust-disclaimer {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.4;
}

/* ==========================================================================
   Success Screen & Printable Receipt
   ========================================================================== */
.success-screen {
    max-width: 620px;
    margin: 0 auto;
    animation: fadeIn 0.4s ease-out;
}

.success-screen.hidden {
    display: none;
}

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

.success-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 2.5rem 2rem;
    text-align: center;
    backdrop-filter: blur(20px);
}

.success-icon-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.success-checkmark {
    width: 72px;
    height: 72px;
    background: var(--success-bg);
    border: 2px solid var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    color: #FFFFFF;
    letter-spacing: -0.02em;
}

.success-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-top: 0.35rem;
}

.highlight-text {
    color: var(--primary-light);
    font-weight: 600;
}

/* Receipt Card Box */
.receipt-box {
    margin: 2rem 0;
    background: #090D14;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    text-align: left;
}

.receipt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.receipt-brand-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.receipt-logo-img {
    height: 24px;
    width: auto;
    object-fit: contain;
    display: block;
}

.receipt-logo-white {
    display: block;
}

.receipt-logo-dark {
    display: none;
}

.receipt-brand-text {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: #FFFFFF;
}

.receipt-status-badge {
    background: var(--success-bg);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
}

.receipt-amount-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 1.25rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.receipt-amount-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.receipt-amount-val {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    color: #FFFFFF;
}

.receipt-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding-top: 1.25rem;
}

.receipt-field {
    display: flex;
    flex-direction: column;
}

.receipt-field.full-width {
    grid-column: span 2;
}

.field-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.2rem;
}

.field-value {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 600;
}

.field-value.mono {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Success Actions */
.success-actions {
    display: flex;
    gap: 1rem;
}

.btn-primary, .btn-secondary {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary {
    background: var(--primary);
    border: 1px solid var(--primary);
    color: #FFFFFF;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    position: relative;
    z-index: 10;
    width: 100%;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    background: rgba(11, 15, 23, 0.75);
    padding: 1.25rem 1.5rem;
}

.footer-container {
    max-width: 1120px;
    margin: 0 auto;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-container a {
    color: var(--text-secondary);
    text-decoration: none;
}

.footer-container a:hover {
    color: #FFFFFF;
    text-decoration: underline;
}

/* ==========================================================================
   Print Stylesheet
   ========================================================================== */
@media print {
    body {
        background: #FFFFFF !important;
        color: #000000 !important;
    }

    .site-header, .site-footer, .page-glow, .setup-banner, .success-actions, .success-subtitle, .success-checkmark {
        display: none !important;
    }

    .main-content {
        margin: 0 !important;
        padding: 0 !important;
        max-width: 100% !important;
    }

    .success-card {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        background: transparent !important;
    }

    .receipt-box {
        background: #FFFFFF !important;
        border: 1px solid #000000 !important;
        color: #000000 !important;
    }

    .receipt-logo-white {
        display: none !important;
    }

    .receipt-logo-dark {
        display: block !important;
    }

    .receipt-brand-text, .receipt-amount-val, .field-value {
        color: #000000 !important;
    }

    .receipt-status-badge {
        border: 1px solid #000000 !important;
        color: #000000 !important;
    }
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 900px) {
    .portal-card {
        grid-template-columns: 1fr;
    }

    .invoice-section {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .portal-section {
        padding: 1.75rem 1.25rem;
    }
}

@media (max-width: 600px) {
    .header-container {
        padding: 0.85rem 1rem;
    }

    .security-badge span {
        display: none;
    }

    .security-badge {
        padding: 0.35rem 0.5rem;
    }

    .main-content {
        margin: 1rem auto;
        padding: 0 1rem;
    }

    .success-actions {
        flex-direction: column;
    }
}
