/* Global Reset & Typography */
:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --bg-gradient: linear-gradient(135deg, #f0f4ff 0%, #e5e9f7 100%);
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #cbd5e1;
    --radius: 12px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
}

/* Top Navigation Bar */
.navbar-custom {
    background-color: #1e1b4b;
    padding: 14px 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

    .navbar-custom .nav-container {
        max-width: 1000px;
        margin: 0 auto;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 10px;
    }

.navbar-brand-custom {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

    .nav-links a {
        color: #c7d2fe;
        text-decoration: none;
        font-size: 0.9rem;
        font-weight: 500;
        transition: color 0.2s;
    }

        .nav-links a:hover {
            color: #ffffff;
        }

/* Main Page Container */
.main-wrapper {
    max-width: 900px;
    width: 100%;
    margin: 35px auto;
    padding: 0 20px;
    flex: 1;
}

/* Home Menu Grid */
.menu-header {
    text-align: center;
    margin-bottom: 30px;
}

    .menu-header h1 {
        font-size: 2rem;
        font-weight: 700;
        color: #1e1b4b;
        margin-bottom: 6px;
    }

    .menu-header p {
        color: var(--text-muted);
        font-size: 1rem;
    }

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.menu-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 22px;
    text-decoration: none;
    color: var(--text-main);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

    .menu-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 25px rgba(79, 70, 229, 0.15);
        border-color: var(--primary);
        color: var(--text-main);
    }

.menu-badge {
    display: inline-block;
    background: #eef2ff;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.78rem;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
    width: fit-content;
}

.menu-card h4 {
    margin: 0 0 6px 0;
    font-size: 1.15rem;
    font-weight: 600;
}

.menu-card p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* White Card Container for All 6 Tasks */
.lab-card {
    background: var(--card-bg);
    max-width: 600px;
    margin: 0 auto;
    padding: 30px 35px;
    border-radius: var(--radius);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);
    border: 1px solid #e2e8f0;
}

    .lab-card h2, .lab-card h3 {
        margin-top: 0;
        margin-bottom: 20px;
        color: #1e1b4b;
        font-weight: 700;
        border-bottom: 2px solid #eef2ff;
        padding-bottom: 10px;
    }

    /* Form Inputs & Labels */
    .lab-card form p {
        margin-bottom: 16px;
    }

    .lab-card label {
        display: block;
        font-weight: 600;
        margin-bottom: 6px;
        font-size: 0.92rem;
        color: #334155;
    }

    .lab-card input[type="text"],
    .lab-card input[type="number"],
    .lab-card select {
        width: 100%;
        padding: 10px 12px;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        font-size: 0.95rem;
        box-sizing: border-box;
        transition: border-color 0.2s, box-shadow 0.2s;
        background-color: #f8fafc;
    }

        .lab-card input[type="text"]:focus,
        .lab-card input[type="number"]:focus,
        .lab-card select:focus {
            outline: none;
            border-color: var(--primary);
            background-color: #ffffff;
            box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
        }

/* Radio Buttons (MCQ) */
.radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    margin-bottom: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

    .radio-option:hover {
        background: #eef2ff;
        border-color: #a5b4fc;
    }

/* Submit Buttons */
.lab-card input[type="submit"] {
    background-color: var(--primary);
    color: #ffffff;
    border: none;
    padding: 11px 22px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s, transform 0.1s;
    margin-top: 6px;
}

    .lab-card input[type="submit"]:hover {
        background-color: var(--primary-hover);
    }

    .lab-card input[type="submit"]:active {
        transform: scale(0.99);
    }

/* Result Highlight Box */
.result-box {
    margin-top: 22px;
    padding: 16px 20px;
    background-color: #f8fafc;
    border-left: 4px solid var(--primary);
    border-radius: 8px;
}

    .result-box p {
        margin: 6px 0;
        font-size: 0.98rem;
    }

/* Styled Electricity Bill Table */
.bill-table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
    font-size: 0.92rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

    .bill-table th {
        background-color: #1e1b4b;
        color: #ffffff;
        padding: 10px 12px;
        text-align: center;
    }

        .bill-table th:first-child {
            text-align: left;
        }

    .bill-table td {
        padding: 10px 12px;
        border-bottom: 1px solid #e2e8f0;
    }

    .bill-table tr:nth-child(even) {
        background-color: #f8fafc;
    }

    .bill-table tr.total-row {
        background-color: #eef2ff;
        font-weight: 700;
        color: #1e1b4b;
    }

/* Pet Image Preview Frame */
.pet-preview {
    text-align: center;
    padding: 20px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px dashed #cbd5e1;
    margin-top: 20px;
}

/* Back Link */
.back-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

    .back-link:hover {
        color: var(--primary);
    }
