/* public/assets/style.css - Neo-Fintech Premium Theme */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --brand-primary: #00427B;
    --brand-secondary: #00549D;
    --brand-gradient: linear-gradient(135deg, #00427B 0%, #0072CE 100%);
    --bg-main: #f0f4f8;
    --text-heading: #101828;
    --text-body: #475467;
    --white: #ffffff;
    --border: #eaecf0;
    --glass-bg: rgba(255, 255, 255, 0.85);
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-main);
    color: var(--text-body);
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

.neo-container {
    max-width: 1400px;
    /* Even wider as requested */
    margin: 0 auto;
    padding: 0 2rem;
}

/* Glass Card */
.payment-card-master {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--white);
    border-radius: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    min-height: 640px;
}

@media (max-width: 991px) {
    .payment-card-master {
        flex-direction: column;
    }
}

/* Left Side: Detail Area */
.side-details {
    flex: 1.1;
    padding: 5.5rem;
    display: flex;
    flex-direction: column;
}

.brand-section {
    margin-bottom: 2.5rem;
}

.neo-h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.neo-sub {
    font-size: 1rem;
    color: var(--text-body);
    margin-bottom: 2.5rem;
}

/* Form Styling */
.neo-field {
    margin-bottom: 1.5rem;
}

.neo-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 0.5rem;
}

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

.neo-input {
    width: 100%;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 14px 18px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-heading);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

.neo-input:focus {
    border-color: var(--brand-secondary);
    box-shadow: 0 0 0 4px rgba(0, 84, 157, 0.1);
    transform: translateY(-2px);
}

.neo-input-icon {
    position: absolute;
    right: 18px;
    color: #98a2b3;
}

/* Side Payment Section */
.side-payment {
    flex: 1;
    background: #fff;
    padding: 5.5rem;
    border-left: 1px solid var(--border);
}

/* The Live Card - Apple Style with 3D Flip */
.card-scene {
    width: 100%;
    aspect-ratio: 1.6/1;
    perspective: 1000px;
    margin-bottom: 3rem;
}

.live-card-v2 {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.live-card-v2.flipped {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 1.5rem;
    padding: 2.5rem;
    color: white;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 45, 91, 0.25);
}

.card-front {
    background: var(--brand-gradient);
}

.card-back {
    background: var(--brand-gradient);
    transform: rotateY(180deg);
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-front::before,
.card-back::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.card-magnetic-strip {
    width: 100%;
    height: 45px;
    background: #000;
    margin-top: -20px;
}

.card-signature-area {
    width: 80%;
    height: 35px;
    background: rgba(255, 255, 255, 0.9);
    margin: 20px auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 15px;
    color: #333;
    font-weight: 700;
    font-family: 'Courier New', Courier, monospace;
    border-radius: 4px;
}

.card-v2-number {
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: 0.2rem;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    height: 1.6rem;
}

.card-v2-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.v2-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    opacity: 0.6;
    letter-spacing: 0.1rem;
    margin-bottom: 0.2rem;
}

.v2-val {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.05rem;
}

/* Button & Security */
.btn-neo-pay {
    width: 100%;
    background: var(--brand-primary);
    color: white;
    border: none;
    border-radius: 1rem;
    padding: 1.2rem;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.btn-neo-pay:hover {
    background: #001a35;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

.neo-security {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    opacity: 0.5;
}

.neo-security img {
    height: 24px;
    filter: grayscale(1);
}

/* Layout Utilities */
.neo-row {
    display: flex;
    gap: 1.2rem;
}

.neo-row>* {
    flex: 1;
}

@media (max-width: 768px) {
    .neo-h1 {
        font-size: 1.8rem;
    }

    .side-details,
    .side-payment {
        padding: 2rem;
    }

    .neo-row {
        flex-direction: column;
        gap: 0;
    }
}

/* Receipt / Dekont Styles */
.receipt-wrapper {
    max-width: 1000px;
    width: 100%;
    margin: 0rem auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.receipt-success-badge {
    text-align: center;
    margin-bottom: 1rem;
}

.success-circle {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
}

.receipt-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-heading);
    margin-bottom: 0.5rem;
}

.receipt-subtitle {
    color: var(--text-body);
    font-size: 1.1rem;
}

.receipt-card-container {
    width: 100%;
}

.receipt-card {
    width: 100%;
    background: var(--white);
    border-radius: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
    overflow: hidden;
}

.receipt-card-header {
    background: #fcfcfd;
    padding: 1.2rem 2rem;
    border-bottom: 1px dashed var(--border);
}

.receipt-logo {
    height: 32px;
}

.receipt-badge-success {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #e6fcf5;
    color: #087f5b;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05rem;
}

.receipt-body {
    padding: 1.5rem 2.5rem;
}

.receipt-txn-box {
    text-align: center;
    margin-bottom: 1.5rem;
}

.receipt-txn-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #98a2b3;
    letter-spacing: 0.1rem;
    margin-bottom: 0.4rem;
}

.receipt-txn-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--brand-primary);
}

.receipt-divider {
    height: 1px;
    background: var(--border);
    margin: 2rem 0;
}

.receipt-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.receipt-row {
    display: flex;
    gap: 2rem;
}

.receipt-item {
    flex: 1;
    display: flex;
    gap: 12px;
}

.receipt-icon {
    color: #98a2b3;
    font-size: 1.4rem;
}

.receipt-item-label {
    font-size: 0.8rem;
    color: #667085;
    margin-bottom: 2px;
}

.receipt-item-value {
    font-weight: 600;
    color: var(--text-heading);
}

.receipt-total-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 1rem;
}

.receipt-total-label {
    font-weight: 600;
    color: #667085;
}

.receipt-total-amount {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--brand-primary);
}

.receipt-actions {
    padding: 2rem;
    background: #fcfcfd;
    display: flex;
    gap: 1rem;
}

.btn-receipt-action {
    flex: 1;
    padding: 12px;
    border-radius: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-receipt-print {
    background: var(--brand-primary);
    color: white;
    border: none;
}

.btn-receipt-back {
    background: white;
    color: var(--text-heading);
    border: 1px solid var(--border);
}

/* Modern Actions UI */
.receipt-actions-modern {
    width: 100%;
    margin-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.print-options {
    display: flex;
    align-items: center;
    gap: 12px;
}

.print-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-body);
}

.print-btn-group {
    display: flex;
    background: #eaecf0;
    padding: 4px;
    border-radius: 12px;
}

.btn-print-choice {
    border: none;
    background: transparent;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-heading);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-print-choice:hover {
    background: rgba(255, 255, 255, 0.5);
}

.btn-receipt-back-modern {
    background: var(--brand-primary);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 66, 123, 0.15);
}

.btn-receipt-back-modern:hover {
    background: var(--brand-secondary);
    transform: translateY(-2px);
    color: white;
}

.print-only-dekont {
    display: none;
}


/* Print Logic */
@media print {

    .receipt-actions-modern,
    footer,
    header,
    .receipt-success-badge,
    .receipt-security-info {
        display: none !important;
    }

    body {
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
    }

    .neo-container {
        padding: 0 !important;
        margin: 0 !important;
        max-width: none !important;
    }

    .receipt-wrapper {
        margin: 0 !important;
        padding: 0 !important;
        max-width: none !important;
    }

    .receipt-card-container {
        display: none !important;
    }

    .print-only-dekont {
        display: block !important;
        width: 100%;
        color: #333 !important;
        font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    }

    .dekont-body-wrapper {
        padding: 20px;
        background: #fff;
    }

    .p-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 2px solid #00427B;
        padding-bottom: 20px;
        margin-bottom: 30px;
    }

    .p-logo {
        height: 60px;
    }

    .p-header-right {
        text-align: right;
    }

    .p-header-right h1 {
        font-size: 24px;
        color: #00427B;
        margin: 0 0 10px 0;
        letter-spacing: 1px;
    }

    .p-header-right p {
        margin: 3px 0;
        font-size: 13px;
        color: #555;
    }

    .p-info-grid {
        display: flex;
        gap: 30px;
        margin-bottom: 30px;
    }

    .p-info-box {
        flex: 1;
        background: #f8f9fa;
        padding: 20px;
        border-radius: 8px;
        border: 1px solid #e9ecef;
    }

    .p-info-box h3 {
        margin: 0 0 12px 0;
        font-size: 12px;
        color: #868e96;
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    .p-info-box p {
        margin: 5px 0;
        font-size: 14px;
    }

    .p-bold {
        font-weight: bold;
        color: #212529;
    }

    .p-items {
        border: 1px solid #dee2e6;
        border-radius: 8px;
        overflow: hidden;
        margin-bottom: 30px;
    }

    .p-item-header {
        display: flex;
        background: #00427B !important;
        -webkit-print-color-adjust: exact;
        color: #fff !important;
        padding: 12px 20px;
        font-weight: bold;
        font-size: 13px;
    }

    .p-item-row {
        display: flex;
        padding: 20px;
        border-top: 1px solid #dee2e6;
        font-size: 15px;
        color: #212529;
    }

    .p-col.wide {
        flex: 1;
    }

    .p-col.text-right {
        text-align: right;
        min-width: 150px;
    }

    .p-total-wrap {
        display: flex;
        justify-content: flex-end;
        margin-bottom: 50px;
    }

    .p-total {
        text-align: right;
        background: #f8f9fa;
        padding: 20px 30px;
        border-radius: 8px;
        border: 1px solid #e9ecef;
    }

    .p-total span {
        font-size: 13px;
        color: #868e96;
        display: block;
        margin-bottom: 5px;
    }

    .p-total h2 {
        margin: 0;
        font-size: 28px;
        color: #00427B;
    }

    .p-signatures {
        display: flex;
        justify-content: space-between;
        margin-bottom: 40px;
    }

    .p-sig {
        width: 40%;
    }

    .p-sig span {
        display: block;
        font-size: 13px;
        color: #868e96;
        margin-bottom: 60px;
    }

    .p-line {
        border-top: 1px solid #dee2e6;
        padding-top: 5px;
        font-size: 12px;
        color: #495057;
        text-align: center;
    }

    .p-footer {
        text-align: center;
        font-size: 11px;
        color: #adb5bd;
        border-top: 1px solid #e9ecef;
        padding-top: 20px;
        line-height: 1.5;
    }

    .print-only-dekont * {
        box-sizing: border-box;
    }

    /* A5 Landscape ultra-compact fixes */
    .print-only-dekont.is-a5 .dekont-body-wrapper { padding: 0px 5px !important; height: auto !important; overflow: hidden !important; }
    .print-only-dekont.is-a5 .p-header { padding-bottom: 5px !important; margin-bottom: 5px !important; }
    .print-only-dekont.is-a5 .p-logo { height: 35px !important; }
    .print-only-dekont.is-a5 .p-header-right h1 { font-size: 14px !important; margin-bottom: 2px !important; }
    .print-only-dekont.is-a5 .p-header-right p { font-size: 9px !important; margin: 0 !important; }
    .print-only-dekont.is-a5 .p-info-grid { gap: 10px !important; margin-bottom: 5px !important; }
    .print-only-dekont.is-a5 .p-info-box { padding: 5px 10px !important; }
    .print-only-dekont.is-a5 .p-info-box h3 { margin-bottom: 3px !important; font-size: 9px !important; }
    .print-only-dekont.is-a5 .p-info-box p { font-size: 10px !important; margin: 2px 0 !important; }
    .print-only-dekont.is-a5 .p-items { margin-bottom: 5px !important; }
    .print-only-dekont.is-a5 .p-item-header { padding: 5px 10px !important; font-size: 9px !important; }
    .print-only-dekont.is-a5 .p-item-row { padding: 5px 10px !important; font-size: 10px !important; }
    .print-only-dekont.is-a5 .p-total-wrap { margin-bottom: 5px !important; }
    .print-only-dekont.is-a5 .p-total { padding: 5px 10px !important; }
    .print-only-dekont.is-a5 .p-total span { font-size: 8px !important; margin-bottom: 0 !important; }
    .print-only-dekont.is-a5 .p-total h2 { font-size: 15px !important; }
    .print-only-dekont.is-a5 .p-signatures { margin-bottom: 5px !important; }
    .print-only-dekont.is-a5 .p-sig span { margin-bottom: 15px !important; font-size: 9px !important;}
    .print-only-dekont.is-a5 .p-line { font-size: 9px !important; }
    .print-only-dekont.is-a5 .p-footer { 
        padding-top: 5px !important; 
        font-size: 7.5px !important; 
        line-height: 1.1 !important; 
        width: 100%; 
        display: block !important; 
        clear: both !important;
        margin-top: 0 !important;
    }
}

@media (max-width: 576px) {
    .receipt-row {
        flex-direction: column;
        gap: 1.5rem;
    }

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

    .receipt-body {
        padding: 1.5rem;
    }
}