/* =============================
   Reset
============================= */

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f4f6f9;
    display: flex;
    flex-direction: column;
}

/* =============================
   Header (Full Width)
============================= */

.header {
    width: 100%;
    background: #1f1f1f;
    padding: 18px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
}

.header-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
}

.nav-link:hover {
    opacity: 0.8;
}

.logout-btn {
    background: #dc3545;
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 15px;
    text-decoration: none;
    font-weight: 600;
}

.logout-btn:hover {
    background: #b02a37;
}

/* =============================
   Container
============================= */

.container {
    width: 100%;
    max-width: 600px;
    margin: 40px auto;
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

/* =============================
   Headings
============================= */

h1 {
    text-align: center;
    font-size: 26px;
    margin-bottom: 25px;
}

h2 {
    margin-top: 30px;
    font-size: 20px;
}

/* =============================
   Form
============================= */

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 16px;
}

input,
select {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

input:focus,
select:focus {
    outline: none;
    border-color: #007bff;
}

input[readonly] {
    background: #f1f1f1;
}

/* =============================
   Button
============================= */

.btn {
    width: 100%;
    padding: 14px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    background: #007bff;
    border: none;
    color: white;
    cursor: pointer;
}

.btn:hover {
    background: #0056b3;
}

/* =============================
   Error
============================= */

.error {
    color: red;
    font-size: 14px;
    margin-top: 6px;
    display: block;
}

/* =============================
   EMI Result
============================= */

#emiResult {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

#emiResult p {
    font-size: 16px;
    margin: 8px 0;
}

#emiResult small {
    font-size: 14px;
    color: #555;
    display: block;
    margin-bottom: 10px;
}

/* =============================
   Tablet
============================= */

@media (max-width: 768px) {

    .container {
        margin: 25px auto;
        padding: 25px;
    }

    .logo-text {
        font-size: 20px;
    }

    .nav-link {
        font-size: 14px;
    }

    .logout-btn {
        padding: 8px 14px;
        font-size: 14px;
    }

    h1 {
        font-size: 22px;
    }
}

/* =============================
   Mobile
============================= */

@media (max-width: 480px) {

    .header {
        padding: 15px;
    }

    .logo-text {
        font-size: 18px;
    }

    .header-right {
        gap: 12px;
    }

    .container {
        width: 95%;
        margin: 20px auto;
        padding: 20px;
    }

    h1 {
        font-size: 20px;
    }

    label {
        font-size: 15px;
    }

    input,
    select {
        padding: 12px;
        font-size: 15px;
    }

    .btn {
        font-size: 16px;
        padding: 12px;
    }
}

/* =============================
   Print Styling
============================= */

@media print {

    body * {
        visibility: hidden;
    }

    #emiResult, #emiResult * {
        visibility: visible;
    }

    #emiResult {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background: white;
        padding: 20px;
    }

    #printBtn {
        display: none !important;
    }

}

.highlight-green {
    color: #0a8f3c;
    font-weight: 600;
    background: #e8f8ee;
    padding: 4px 6px;
    border-radius: 4px;
}
