/**
 * Transcorp PPI Portal - Frontend Stylesheet
 * Location: public/assets/css/frontend.css
 */

:root {
    --tc-primary: #00518b;
    --tc-primary-dark: #003861;
    --tc-pink: #e11950;
    --tc-pink-hover: #c01443;
    --tc-pink-active: #a81039;
    --tc-bg: #f8fafc;
    --tc-card-bg: #ffffff;
    --tc-text: #1e293b;
    --tc-muted: #64748b;
    --tc-border: #e2e8f0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--tc-bg);
    color: var(--tc-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header-logo {
    height: 38px;
    max-width: 220px;
    object-fit: contain;
    display: block;
}

.nav-link {
    font-weight: 500;
    color: #334155;
    padding: 0.5rem 0.85rem !important;
    transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--tc-pink) !important;
}

/* Unified Form Submit Button */
.btn-tc-submit,
.cmn-btn-pink {
    background-color: var(--tc-pink) !important;
    border: none !important;
    color: #ffffff !important;
    border-radius: 50px !important;
    font-weight: 600 !important;
    padding: 12px 42px !important;
    font-size: 1rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.25s ease-in-out !important;
    box-shadow: 0 4px 14px rgba(225, 25, 80, 0.28) !important;
    cursor: pointer;
    text-decoration: none;
}

.btn-tc-submit:hover,
.cmn-btn-pink:hover {
    background-color: var(--tc-pink-hover) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(225, 25, 80, 0.42) !important;
}

.btn-tc-submit:active,
.cmn-btn-pink:active {
    transform: translateY(0);
    background-color: var(--tc-pink-active) !important;
    box-shadow: 0 2px 8px rgba(225, 25, 80, 0.3) !important;
}

.page-header-card {
    background: linear-gradient(135deg, #00518b 0%, #002d4f 100%);
    color: #ffffff;
    border-radius: 1rem;
    padding: 2.5rem 2rem;
    margin-bottom: 2rem;
}

.form-card {
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--tc-border);
    padding: 2.5rem;
}

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

.form-control,
.form-select {
    border: 1.5px solid #cbd5e1;
    border-radius: 0.5rem;
    padding: 0.65rem 0.9rem;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--tc-primary);
    box-shadow: 0 0 0 3px rgba(0, 81, 139, 0.15);
}

/* Modern Premium Flash Alerts */
.flash-alert {
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    position: relative;
    animation: alertSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    border: 1px solid transparent;
}

@keyframes alertSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.99);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.flash-alert-success {
    background: linear-gradient(135deg, rgba(240, 253, 244, 0.95) 0%, #ffffff 50%, rgba(236, 253, 245, 0.95) 100%);
    border-color: #bbf7d0;
    border-left: 5px solid #10b981;
    box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.12), 0 8px 16px -6px rgba(0, 0, 0, 0.04);
}

.flash-alert-danger {
    background: linear-gradient(135deg, rgba(254, 242, 242, 0.95) 0%, #ffffff 50%, rgba(255, 241, 242, 0.95) 100%);
    border-color: #fecaca;
    border-left: 5px solid #ef4444;
    box-shadow: 0 10px 25px -5px rgba(239, 68, 68, 0.12), 0 8px 16px -6px rgba(0, 0, 0, 0.04);
}

.flash-alert-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.flash-alert-success .flash-alert-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.flash-alert-danger .flash-alert-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.flash-alert-body {
    color: #334155;
    font-size: 0.93rem;
    line-height: 1.55;
}

.flash-alert .btn-close {
    transition: all 0.2s ease-in-out;
    padding: 0.75rem;
    opacity: 0.5;
}

.flash-alert .btn-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.flash-ref-chip {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 50rem;
    padding: 0.25rem 0.85rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.flash-ref-chip .copy-btn {
    background: none;
    border: none;
    color: #64748b;
    padding: 0 0.25rem;
    cursor: pointer;
    transition: color 0.15s;
}

.flash-ref-chip .copy-btn:hover {
    color: #0f172a;
}

/* Light Form Placeholders */
::placeholder,
.form-control::placeholder,
.form-select::placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
    font-weight: 400;
}
::-webkit-input-placeholder {
    color: #94a3b8 !important;
}
::-moz-placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
}
:-ms-input-placeholder {
    color: #94a3b8 !important;
}

/* Field-level Error Feedback & Invalid Controls (Without Info/Exclamation Icons) */
.invalid-feedback {
    font-size: 0.84rem;
    color: #ef4444;
    font-weight: 500;
    margin-top: 0.35rem;
    line-height: 1.4;
}

.invalid-feedback::before,
.invalid-feedback:not(:empty)::before,
.invalid-feedback:empty::before {
    display: none !important;
    content: none !important;
}

.form-control.is-invalid,
.form-select.is-invalid,
.was-validated .form-control:invalid,
.was-validated .form-select:invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
    background-color: #fffbfa;
    background-image: none !important;
    padding-right: 0.75rem !important;
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus,
.was-validated .form-control:invalid:focus,
.was-validated .form-select:invalid:focus {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2) !important;
    background-image: none !important;
}

.form-check-input.is-invalid {
    border-color: #ef4444 !important;
}

footer {
    margin-top: auto;
    background: #ffffff;
    border-top: 1px solid var(--tc-border);
    padding: 1.25rem 0;
}

.footer-social-links {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
}

.social-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--tc-pink, #e11950);
    color: var(--tc-pink, #e11950);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.25s ease-in-out;
    background-color: transparent;
}

.social-icon-btn:hover {
    background-color: var(--tc-pink, #e11950);
    color: #ffffff !important;
    border-color: var(--tc-pink, #e11950);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(225, 25, 80, 0.25);
}

/* Transcorp Flatpickr Custom Styling */
.flatpickr-calendar {
    font-family: 'Inter', sans-serif !important;
    border-radius: 12px !important;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16) !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    padding: 8px !important;
}

.flatpickr-months .flatpickr-month {
    color: #0f172a !important;
    font-weight: 700 !important;
    height: 36px;
}

.flatpickr-current-month {
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    padding-top: 4px !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month .flatpickr-yearDropdown-years {
    font-weight: 700 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 4px !important;
    color: inherit !important;
    cursor: pointer !important;
    font-size: inherit !important;
    font-family: inherit !important;
    line-height: inherit !important;
    margin: 0 !important;
    outline: none !important;
    padding: 2px 4px !important;
    -webkit-appearance: menulist !important;
    -moz-appearance: menulist !important;
    appearance: menulist !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months:hover,
.flatpickr-current-month .flatpickr-yearDropdown-years:hover,
.flatpickr-current-month .flatpickr-monthDropdown-months:focus,
.flatpickr-current-month .flatpickr-yearDropdown-years:focus {
    background: rgba(0, 0, 0, 0.05) !important;
}

.flatpickr-weekdays {
    margin-bottom: 4px;
}

span.flatpickr-weekday {
    color: #64748b !important;
    font-weight: 600 !important;
    font-size: 0.78rem !important;
}

.flatpickr-day {
    font-weight: 500;
    border-radius: 6px !important;
    color: #1e293b;
    height: 34px;
    line-height: 34px;
}

.flatpickr-day.selected {
    background-color: var(--tc-pink, #e11950) !important;
    border-color: var(--tc-pink, #e11950) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(225, 25, 80, 0.35) !important;
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
    color: #cbd5e1 !important;
    background: transparent !important;
    cursor: not-allowed !important;
    border-color: transparent !important;
    text-decoration: line-through;
    opacity: 0.45;
}

.flatpickr-day:hover:not(.flatpickr-disabled):not(.selected) {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
}

.flatpickr-day.today {
    border-color: var(--tc-pink, #e11950) !important;
    font-weight: 700 !important;
}

.flatpickr-day.today:not(.selected) {
    color: var(--tc-pink, #e11950) !important;
    background: rgba(225, 25, 80, 0.08) !important;
}

/* ========================================================
   Card Balance Refund Portal - Premium Redesign Styles
   ======================================================== */

.refund-hero {
    text-align: center;
    margin-bottom: 2rem;
}

.tc-theme-badge,
.refund-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(225, 25, 80, 0.08) !important;
    color: var(--tc-pink) !important;
    border: 1px solid rgba(225, 25, 80, 0.22) !important;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    margin-bottom: 0.85rem;
}

.refund-hero-title {
    font-size: 2.1rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
    margin-bottom: 0.6rem;
}

.refund-hero-subtitle {
    color: #64748b;
    font-size: 1.02rem;
    max-width: 620px;
    margin: 0 auto 1.25rem;
    line-height: 1.55;
}

.trust-pills-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 16px;
}

.trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

/* Stepper Component */
.refund-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.refund-step-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.refund-step-circle {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.refund-step-circle.active {
    background: linear-gradient(135deg, var(--tc-pink) 0%, #be123c 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 18px rgba(225, 25, 80, 0.38) !important;
}

.refund-step-circle.completed {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35);
}

.refund-step-circle.inactive {
    background: #f1f5f9;
    color: #94a3b8;
    border: 2px dashed #cbd5e1;
}

.refund-step-meta {
    line-height: 1.25;
}

.refund-step-num {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
}

.refund-step-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
}

.refund-step-line {
    flex-grow: 1;
    max-width: 80px;
    height: 3px;
    margin: 0 16px;
    border-radius: 999px;
    background: #e2e8f0;
    transition: background 0.3s ease;
}

.refund-step-line.active {
    background: linear-gradient(90deg, var(--tc-pink) 0%, #10b981 100%) !important;
}

@media (max-width: 576px) {
    .refund-hero-title {
        font-size: 1.6rem;
    }
    .refund-stepper {
        justify-content: space-between;
    }
    .refund-step-line {
        max-width: 32px;
        margin: 0 8px;
    }
    .refund-step-circle {
        width: 38px;
        height: 38px;
        min-width: 38px;
        font-size: 0.9rem;
    }
    .refund-step-title {
        font-size: 0.85rem;
    }
}

/* Refund Main Card */
.refund-card {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 15px 35px -10px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.03);
    padding: 2.25rem;
    position: relative;
    overflow: hidden;
}

.refund-card.refund-step1-card {
    max-width: 520px;
    margin: 0 auto;
    padding: 1.75rem 2rem;
}

.refund-header-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(225, 25, 80, 0.1) 0%, rgba(0, 81, 139, 0.08) 100%);
    color: var(--tc-pink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.refund-card-header {
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 1.1rem;
    margin-bottom: 1.35rem;
}

/* Custom Input Field Wrapper - Compact and Modern */
.refund-input-group {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    transition: all 0.2s ease;
    overflow: hidden;
}

.refund-input-group:focus-within {
    border-color: var(--tc-pink);
    box-shadow: 0 0 0 3.5px rgba(225, 25, 80, 0.14);
}

.refund-input-group.is-invalid-group {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

.refund-input-group .input-group-text {
    background: #f8fafc;
    border: none;
    font-weight: 600;
    color: #475569;
    padding: 0.6rem 0.95rem;
    font-size: 0.95rem;
    border-right: 1.5px solid #e2e8f0;
}

.refund-input-group .form-control {
    border: none;
    box-shadow: none !important;
    padding: 0.6rem 0.95rem;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #0f172a;
    height: auto;
}

.refund-input-group .form-control::placeholder {
    color: #94a3b8;
    font-weight: 400;
    letter-spacing: normal;
    font-size: 0.92rem;
}

.refund-trust-bar {
    font-size: 0.78rem;
}

/* Feature Mini Cards */
.refund-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 1.75rem;
}

@media (max-width: 768px) {
    .refund-features-grid {
        grid-template-columns: 1fr;
    }
    .refund-card {
        padding: 1.5rem;
    }
}

.refund-feature-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px;
    text-align: center;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.refund-feature-card:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1;
}

.refund-feature-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.refund-feature-card h6 {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 3px;
}

.refund-feature-card p {
    font-size: 0.76rem;
    color: #64748b;
    margin-bottom: 0;
    line-height: 1.35;
}

/* Step 2 Identity & Balance Card */
.refund-identity-card {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.75rem;
}

.refund-balance-pill {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1.5px solid #a7f3d0;
    border-radius: 14px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.08);
}

.refund-balance-amount {
    font-size: 1.85rem;
    font-weight: 800;
    color: #065f46;
    letter-spacing: -0.5px;
}

/* Modern PAN Upload Dropzone */
.refund-dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: 14px;
    padding: 24px 16px;
    text-align: center;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.refund-dropzone:hover,
.refund-dropzone.dragover {
    border-color: var(--tc-pink);
    background: rgba(225, 25, 80, 0.03);
}

.refund-dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

