/* =========================================================
   Banking Mitra - EMI Calculator
   The sidebar/topbar use the existing dashboard CSS.
   ========================================================= */

.emi-main {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px;
    box-sizing: border-box;
}

.emi-page-heading {
    margin-bottom: 24px;
}

.emi-page-heading h1 {
    margin: 0;
    font-family: "Hanken Grotesk", sans-serif;
    font-size: 32px;
    line-height: 40px;
    font-weight: 600;
    color: #0b1c30;
}

.emi-page-heading p {
    margin: 6px 0 0;
    font-family: "Inter", sans-serif;
    font-size: 16px;
    line-height: 24px;
    color: #444650;
}

.emi-card,
.emi-result-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 32, 96, 0.05);
    overflow: hidden;
}

.emi-card-header {
    min-height: 68px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #f8f9ff;
    border-bottom: 1px solid #e2e8f0;
    box-sizing: border-box;
}

.emi-card-header h2 {
    margin: 0;
    font-family: "Hanken Grotesk", sans-serif;
    font-size: 24px;
    line-height: 32px;
    font-weight: 600;
    color: #0b1c30;
}

.emi-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    border: 1px solid #000d33;
    border-radius: 6px;
    background: #ffffff;
    color: #000d33;
    font-family: "Inter", sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: .2s ease;
}

.emi-download-btn:hover {
    background: #eff4ff;
}

.emi-download-btn .material-symbols-outlined {
    font-size: 18px;
}

.emi-card-body {
    padding: 24px;
}

.emi-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.emi-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.emi-field-wide {
    grid-column: span 1;
}

.emi-field label {
    font-family: "Inter", sans-serif;
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    color: #0b1c30;
}

.emi-field input,
.emi-field select {
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
    padding: 10px 14px;
    border: 1px solid #c5c6d2;
    border-radius: 6px;
    background: #ffffff;
    color: #0b1c30;
    font-family: "Inter", sans-serif;
    font-size: 16px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.emi-field input::placeholder {
    color: #757681;
}

.emi-field input:focus,
.emi-field select:focus {
    border-color: #000d33;
    box-shadow: 0 0 0 2px rgba(0, 13, 51, .08);
}

.emi-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.emi-input-wrap input {
    padding-left: 38px;
    padding-right: 48px;
}

.emi-prefix,
.emi-suffix {
    position: absolute;
    z-index: 2;
    color: #444650;
    font-family: "Inter", sans-serif;
    font-size: 16px;
    pointer-events: none;
}

.emi-prefix {
    left: 14px;
}

.emi-suffix {
    right: 14px;
}

.emi-field-icon {
    position: absolute;
    left: 13px;
    z-index: 2;
    color: #444650;
    font-size: 20px;
    pointer-events: none;
}

.emi-input-wrap input[type="date"] {
    padding-left: 44px;
}

.emi-submit-row {
    grid-column: 1 / -1;
    padding-top: 4px;
}

.emi-calculate-btn {
    min-height: 44px;
    padding: 10px 24px;
    border: 0;
    border-radius: 8px;
    background: #000d33;
    color: #ffffff;
    font-family: "Inter", sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s ease, transform .15s ease;
}

.emi-calculate-btn:hover {
    background: #002060;
}

.emi-calculate-btn:active {
    transform: scale(.98);
}

.emi-result-card {
    margin-top: 24px;
}

.emi-result-header {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.emi-result-header h2 {
    margin: 0;
    font-family: "Hanken Grotesk", sans-serif;
    font-size: 24px;
    line-height: 32px;
    color: #0b1c30;
}

.emi-result-header p {
    margin: 4px 0 0;
    font-family: "Inter", sans-serif;
    font-size: 14px;
    color: #444650;
}

.emi-result-header > .material-symbols-outlined {
    color: #115cb9;
    font-size: 28px;
}

.emi-result-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.emi-result-item {
    padding: 22px 24px;
    border-right: 1px solid #e2e8f0;
}

.emi-result-item:last-child {
    border-right: 0;
}

.emi-result-item span {
    display: block;
    margin-bottom: 7px;
    font-family: "Inter", sans-serif;
    font-size: 13px;
    color: #444650;
}

.emi-result-item strong {
    display: block;
    font-family: "Hanken Grotesk", sans-serif;
    font-size: 24px;
    line-height: 32px;
    color: #000d33;
}

@media (max-width: 900px) {
    .emi-main {
        padding: 28px 24px;
    }

    .emi-result-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .emi-result-item:nth-child(2) {
        border-right: 0;
    }

    .emi-result-item:nth-child(-n + 2) {
        border-bottom: 1px solid #e2e8f0;
    }
}

@media (max-width: 767px) {
    .emi-main {
        padding: 20px 16px;
    }

    .emi-page-heading h1 {
        font-size: 28px;
        line-height: 36px;
    }

    .emi-page-heading p {
        font-size: 14px;
        line-height: 20px;
    }

    .emi-card-header {
        padding: 14px 16px;
    }

    .emi-card-header h2 {
        font-size: 20px;
        line-height: 28px;
    }

    .emi-card-body {
        padding: 16px;
    }

    .emi-form {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .emi-field-wide {
        grid-column: auto;
    }

    .emi-submit-row {
        grid-column: auto;
    }

    .emi-calculate-btn {
        width: 100%;
    }

    .emi-result-grid {
        grid-template-columns: 1fr;
    }

    .emi-result-item,
    .emi-result-item:nth-child(2) {
        border-right: 0;
        border-bottom: 1px solid #e2e8f0;
    }

    .emi-result-item:last-child {
        border-bottom: 0;
    }
}
