/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; font-feature-settings: normal; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ===== Page Layout ===== */
.page-wrapper {
    min-height: 100vh;
    padding: 3rem 1rem;
    position: relative;
    overflow: hidden;
}

/* ===== Background Decorations ===== */
.bg-gradient-hero {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 24rem;
    background: linear-gradient(to bottom, #1e3a5f, #f8fafc);
    z-index: 0;
    opacity: 0.9;
}
.blob {
    position: absolute;
    border-radius: 50%;
    mix-blend-mode: multiply;
    filter: blur(128px);
    opacity: 0.2;
    animation: blobFloat 8s ease-in-out infinite alternate;
}
.blob-1 {
    top: -10%; right: -5%;
    width: 500px; height: 500px;
    background: #3b82f6;
}
.blob-2 {
    top: 20%; left: -10%;
    width: 400px; height: 400px;
    background: #22d3ee;
    animation-delay: 2s;
}
@keyframes blobFloat {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, -20px) scale(1.05); }
}

/* ===== Container ===== */
.container {
    max-width: 72rem;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

/* ===== Header ===== */
.header {
    text-align: center;
    margin-bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeInUp 0.6s ease-out;
}
.header-logo {
    height: 6rem;
    width: auto;
    object-fit: contain;
    margin-bottom: 1rem;
    transition: transform 0.3s;
}
.header-logo:hover { transform: scale(1.05); }
.header h1 {
    font-size: 2.25rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.025em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* ===== Grid Layout ===== */
.main-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

/* ===== Calculator Widget ===== */
.calc-card {
    background: #ffffff;
    border-radius: 1.5rem;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
    padding: 1.5rem;
    border: 1px solid #eff6ff;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s;
    animation: fadeInUp 0.7s ease-out;
}
.calc-card:hover { transform: translateY(-5px); }
.calc-card-decoration {
    position: absolute;
    top: 0; right: 0;
    width: 8rem; height: 8rem;
    background: #eff6ff;
    border-bottom-left-radius: 100%;
    margin-right: -4rem;
    margin-top: -4rem;
    transition: transform 0.3s;
}
.calc-card:hover .calc-card-decoration { transform: scale(1.1); }

.calc-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}
.calc-icon {
    padding: 0.75rem;
    background: #dbeafe;
    color: #2563eb;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.calc-icon svg { width: 24px; height: 24px; }
.calc-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
}

.calc-body { position: relative; z-index: 1; }
.calc-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 0.25rem;
}
.calc-value-lg {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2563eb;
    word-break: break-word;
}
.calc-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.25rem;
}
.calc-value-md {
    font-size: 1.125rem;
    font-weight: 600;
    color: #334155;
}
.calc-divider {
    padding-top: 1rem;
    margin-top: 1.25rem;
    border-top: 1px solid #f1f5f9;
}
.calc-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}
.calc-line-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
}
.calc-line-value.green {
    font-size: 1rem;
    font-weight: 700;
    color: #10b981;
}

/* Total Box */
.calc-total {
    margin-top: 1rem;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    padding: 1.25rem;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(37,99,235,0.3);
    color: #ffffff;
}
.calc-total .calc-label { color: #bfdbfe; }
.calc-total-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    word-break: break-word;
}

/* ===== Form Card ===== */
.form-card {
    background: #ffffff;
    border-radius: 1.5rem;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
    border: 1px solid #f1f5f9;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out;
}
.form-inner { padding: 2rem 2.5rem; }
.form-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

/* ===== Form Grid ===== */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }
.form-group.full-width { grid-column: 1 / -1; }

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
}
.form-label .optional {
    color: #94a3b8;
    font-weight: 400;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 1rem;
    font-family: inherit;
    color: #1e293b;
    outline: none;
    transition: all 0.2s;
}
.form-input:hover, .form-textarea:hover, .form-select:hover { background: #f1f5f9; }
.form-input:focus, .form-textarea:focus, .form-select:focus {
    background: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
.form-textarea { resize: none; }
.form-select { appearance: none; cursor: pointer; }

/* ===== Separator ===== */
.separator {
    margin: 2rem 0 1.5rem;
    position: relative;
    text-align: center;
}
.separator::before {
    content: '';
    position: absolute;
    top: 50%; left: 0; right: 0;
    height: 1px;
    background: #e2e8f0;
}
.separator span {
    position: relative;
    padding: 0 1rem;
    background: #ffffff;
    font-size: 0.875rem;
    font-weight: 700;
    color: #2563eb;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===== Deposit Detail Section ===== */
.deposit-section {
    background: rgba(239,246,255,0.5);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid rgba(191,219,254,0.5);
}
.deposit-section .form-label { color: #334155; }
.deposit-section .form-input,
.deposit-section .form-select {
    background: #ffffff;
    border-color: #bfdbfe;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Nominal Input with Rp prefix */
.input-with-prefix {
    position: relative;
}
.input-prefix {
    position: absolute;
    top: 0; bottom: 0; left: 0;
    padding-left: 1rem;
    display: flex;
    align-items: center;
    pointer-events: none;
    color: #2563eb;
    font-weight: 700;
}
.input-with-prefix .form-input {
    padding-left: 3rem;
    font-weight: 700;
    font-size: 1.125rem;
    color: #1e293b;
}

/* ===== Submit Button ===== */
.submit-section { padding-top: 2rem; }
.btn-submit {
    width: 100%;
    background: linear-gradient(to right, #2563eb, #1e40af);
    color: #ffffff;
    font-weight: 700;
    font-size: 1.125rem;
    padding: 1rem 2rem;
    border-radius: 1rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(37,99,235,0.3);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
}
.btn-submit:hover {
    background: linear-gradient(to right, #1d4ed8, #1e3a8a);
    transform: scale(1.02);
}
.btn-submit:active { transform: scale(0.98); }
.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}
.btn-submit svg { width: 20px; height: 20px; }

.spinner {
    width: 24px; height: 24px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.form-disclaimer {
    text-align: center;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 1rem;
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    padding: 2rem 0 3rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(30,58,95,0.4);
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Responsive ===== */
@media (min-width: 768px) {
    .form-grid { grid-template-columns: 1fr 1fr; }
    .header h1 { font-size: 3rem; }
    .form-inner { padding: 2.5rem; }
}

@media (min-width: 1024px) {
    .main-grid {
        grid-template-columns: 1fr 2fr;
    }
    .page-wrapper { padding: 3rem 2rem; }
}

