* {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f9fafb;
    color: #374151;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.header {
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
    padding: 0 1rem;
}

.logo-text h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
}

.logo-text p {
    font-size: 0.77rem;
    color: #6b7280;
}

.gridstar-logo {
    height: 50px;
    width: auto;
    display: block;
}

.main-content {
    padding: 2rem 0;
}

.card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.card-content {
    padding: 1.5rem;
}

.intro-card h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
}

.intro-card p {
    font-size: 0.875rem;
    color: #6b7280;
}

.summary-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 1024px) {
    .summary-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.control-card label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.select, .input, .button {
    width: 100%;
    height: 2.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-family: 'Poppins', sans-serif;
}

.select:focus, .input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.button {
    background: white;
    border: 1px solid #d1d5db;
    cursor: pointer;
    margin-top: 1rem;
    transition: background-color 0.2s;
}

.button:hover {
    background: #f3f4f6;
}

.total-card {
    background: linear-gradient(to right, #3b82f6, #1d4ed8);
    color: white;
}

.charges-card {
    background: linear-gradient(to right, #059669, #047857);
    color: white;
}

.total-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-info h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.total-value {
    font-size: 2rem;
    font-weight: 700;
}

.total-unit {
    font-size: 0.875rem;
    opacity: 0.8;
}

.zap-icon {
    width: 3rem;
    height: 3rem;
    opacity: 0.7;
}

.tabs {
    border-bottom: 1px solid #e5e7eb;
}

.tab-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.25rem;
    padding: 0.25rem;
}

@media (min-width: 1024px) {
    .tab-list {
        grid-template-columns: repeat(8, 1fr);
    }
}

.tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 0.5rem;
    font-size: 0.75rem;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 0.375rem;
    transition: all 0.2s;
    font-family: 'Poppins', sans-serif;
}

.tab:hover {
    background: #f3f4f6;
}

.tab.active {
    background: #3b82f6;
    color: white;
}

.tab-icon {
    width: 1rem;
    height: 1rem;
}

.tab-content {
    padding: 1.5rem;
}

.category-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
}

.appliance-form {
    background: #f9fafb;
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: repeat(9, 1fr);
    }
}

.form-field {
    grid-column: span 1;
}

.form-field.appliance-power {
    grid-column: span 3;
}

.form-field.quantity-field {
    grid-column: span 1;
}

.form-field.monthly-units {
    grid-column: span 3;
}

.form-field.hours-field {
    grid-column: span 1;
}

.form-field.minutes-field {
    grid-column: span 1;
}



.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
}

.form-input {
    width: 100%;
    height: 2.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-family: 'Poppins', sans-serif;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-hint {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
    white-space: nowrap;
}

.result-display {
    height: 2.5rem;
    padding: 0.5rem 0.75rem;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    text-align: right;
    font-weight: 500;
    color: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.separator {
    height: 1px;
    background: #e5e7eb;
    margin: 1.5rem 0;
}

.category-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.total-label {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

.total-badge {
    background: white;
    border: 1px solid #3b82f6;
    color: #3b82f6;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 1.125rem;
    font-weight: 700;
}

.footer {
    background: #f3f4f6;
    border-top: 1px solid #e5e7eb;
    margin-top: 4rem;
    padding: 1.5rem 0;

}

.footer-content {
    text-align: center;
}

.footer-content p {
    font-size: 0.875rem;
    color: #6b7280;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.footer-links span {
    font-size: 0.875rem;
    color: #6b7280;
}

.hidden {
    display: none;
}

/* === Wrapper to keep both cards side by side === */
.unit-section-wrapper {
    display: grid;
    grid-template-columns: 1fr; /* default for mobile */
    gap: 2rem;
    width: 100%;
}

@media (min-width: 1024px) {
    .unit-section-wrapper {
        grid-template-columns: 1fr 1fr; /* Equal columns */
        align-items: start;
    }
}

/* === Common card styles === */
.unit-charges-card,
.slab-breakdown-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    width: 100%;       /* Force full width inside the grid cell */
    height: 100%;      /* Make both cards stretch equally if needed */
    box-sizing: border-box;
}

/* === Shared title styles === */
.unit-charges-title,
.slab-breakdown-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
}

/* === Grid for slab inputs === */
.slab-config-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .slab-config-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.slab-input {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.slab-input label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.slab-input input {
    height: 2.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-family: 'Poppins', sans-serif;
}

.slab-input input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* === Slab Breakdown List === */
.slab-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .slab-details {
        grid-template-columns: repeat(2, 1fr);
    }
}

.slab-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 0.375rem;
    border: 1px solid #e5e7eb;
}

.slab-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
}

.slab-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}