/* Utilities Page Styles */

/* Utilities Hub Section */
.utilities-hub {
    padding: 80px 0;
}

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

@media (max-width: 1024px) {
    .utilities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .utilities-grid {
        grid-template-columns: 1fr;
    }
}

.utility-card {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
    border: 1px solid #f1f5f9;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.utility-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

.utility-card.featured {
    border: 1px solid #e2e8f0;
    position: relative;
    background: linear-gradient(to bottom, #ffffff, #f8faff);
}

.utility-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.utility-icon {
    width: 70px;
    height: 70px;
    background: #f0f9ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.utility-icon span {
    font-size: 2rem;
}

.utility-badge {
    background: #10b981;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.upcoming-badge {
    background: #64748b;
}

.utility-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.utility-card p {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.utility-disclaimer {
    font-size: 0.875rem;
    color: #64748b;
    font-style: italic;
    margin-bottom: 1.5rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 3px solid #0066cc;
}

.utility-features ul {
    list-style: none;
    margin-bottom: 2rem;
}

.utility-features li {
    padding: 0.5rem 0;
    color: #64748b;
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.95rem;
}

.utility-features li::before {
    content: "✓";
    color: #2563eb;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.utility-button {
    background: #2563eb;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.utility-button:hover:not(.disabled) {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.utility-button.disabled {
    background: #64748b;
    color: white;
    cursor: not-allowed;
    opacity: 0.7;
    border: 1px solid #475569;
}

.utility-button.coming-soon {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
    opacity: 0.8;
    font-weight: 400;
    transform: none;
    box-shadow: none;
}

.utility-button.coming-soon:hover {
    background: #e2e8f0;
    color: #475569;
    opacity: 0.9;
    transform: none;
    box-shadow: none;
}

/* Upcoming Utilities Section */
.upcoming-utilities {
    padding: 80px 0;
    background: #f8fafc;
}

.upcoming-utilities h2 {
    font-size: 2.5rem;
    font-weight: 600;
    color: #1a1a1a;
    text-align: center;
    margin-bottom: 3rem;
}

/* Invoice Generator Section */
.invoice-generator-section {
    padding: 60px 0;
    background: white;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    overflow-y: auto;
    display: none;
}

.tool-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e5e5;
}

.tool-header h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.close-button {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #64748b;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-button:hover {
    background: #f1f5f9;
    color: #1a1a1a;
}

.invoice-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-section {
    margin-bottom: 2rem;
}

.form-section h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.form-group input {
    padding: 0.75rem;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    border-color: #2563eb;
}

.line-items {
    margin-bottom: 1rem;
}

.line-item-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    align-items: center;
}

.line-item-row input {
    padding: 0.5rem;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.line-item-row input:focus {
    border-color: #2563eb;
}

.add-item-button {
    background: #f0f9ff;
    color: #2563eb;
    border: 1px solid #2563eb;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.add-item-button:hover {
    background: #2563eb;
    color: white;
}

.remove-button {
    background: #fef2f2;
    color: #ef4444;
    border: 1px solid #ef4444;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.remove-button:hover {
    background: #ef4444;
    color: white;
}

.invoice-totals {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.grand-total {
    font-weight: 600;
    font-size: 1.1rem;
    color: #1a1a1a;
    padding-top: 0.5rem;
    border-top: 1px solid #e5e5e5;
}

.form-actions {
    text-align: center;
}

.invoice-preview {
    margin-top: 3rem;
    padding: 2rem;
    background: #f8fafc;
    border-radius: 12px;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.preview-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
}

.preview-actions {
    display: flex;
    gap: 1rem;
}

.print-button,
.download-button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.print-button {
    background: #f0f9ff;
    color: #2563eb;
    border: 1px solid #2563eb;
}

.print-button:hover {
    background: #2563eb;
    color: white;
}

.download-button {
    background: #10b981;
    color: white;
}

.download-button:hover {
    background: #059669;
}

/* Invoice Document Styles */
.invoice-document {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #2563eb;
}

.invoice-header h2 {
    font-size: 2rem;
    color: #1a1a1a;
    margin: 0;
}

.invoice-details p {
    margin: 0.25rem 0;
    color: #4a4a4a;
}

.invoice-items table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

.invoice-items th,
.invoice-items td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e5e5;
}

.invoice-items th {
    background: #f8fafc;
    font-weight: 600;
    color: #1a1a1a;
}

.invoice-totals {
    text-align: right;
    margin-top: 2rem;
}

.invoice-totals p {
    margin: 0.5rem 0;
    color: #4a4a4a;
}

.invoice-totals p:last-child {
    font-weight: 600;
    font-size: 1.2rem;
    color: #1a1a1a;
}


/* Responsive Design for Utilities Page */
@media (max-width: 768px) {
    .utilities-grid {
        grid-template-columns: 1fr;
    }

    .line-item-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .preview-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .invoice-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .invoice-items {
        overflow-x: auto;
    }

    .current-utilities h2,
    .upcoming-utilities h2 {
        font-size: 2rem;
    }
}