* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #f5f5f5;
    min-height: 100vh;
}

#app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    padding: 30px 0;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    letter-spacing: 2px;
}

.header .subtitle {
    font-size: 18px;
    color: #666;
    margin-top: 10px;
}

.header .address {
    font-size: 14px;
    color: #888;
    margin-top: 5px;
}

/* Store Cards Grid */
.stores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* Store Card */
.store-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.store-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.store-card h3 {
    font-size: 18px;
    font-weight: 500;
    color: #333;
    margin-bottom: 20px;
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: inline-block;
}

/* Status Indicator */
.status-indicator {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 15px;
    transition: all 0.3s ease;
}

.status-indicator.healthy {
    background-color: #90D26D;
}

.status-indicator.alerts {
    background-color: #F5C747;
}

.status-indicator.critical {
    background-color: #C62828;
}

.status-label {
    font-size: 16px;
    color: #555;
    font-weight: 500;
}

/* Systems Grid */
.systems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

/* Store Page - Systems Layout */
.systems-grid-top {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    max-width: 900px;
    margin: 0 auto 30px auto;
}

.systems-grid-bottom {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.systems-grid-bottom .system-card {
    width: calc(33.333% - 17px);
    max-width: 283px;
    min-width: 250px;
}

.system-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.system-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.system-card h3 {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 15px;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: inline-block;
}

.system-card .status-indicator {
    width: 100px;
    height: 100px;
}

/* Environment Card (centered below) */
.environment-section {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.environment-section .system-card {
    min-width: 250px;
}

/* Units Section */
.units-section {
    margin-bottom: 30px;
}

.units-section h2 {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.units-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

/* Unit Card */
.unit-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.unit-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.unit-card.clickable:hover {
    border: 2px solid #C62828;
}

.unit-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.unit-header h4 {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    flex: 1;
    text-align: center;
}

.unit-status {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    flex-shrink: 0;
}

.unit-status.healthy {
    background-color: #90D26D;
}

.unit-status.alerts {
    background-color: #F5C747;
}

.unit-status.critical {
    background-color: #C62828;
}

.unit-data {
    font-size: 14px;
    color: #555;
    line-height: 1.8;
}

.unit-data p {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #f0f0f0;
    padding: 4px 0;
}

.unit-data p:last-child {
    border-bottom: none;
}

.unit-data .label {
    color: #888;
}

.unit-data .value {
    font-weight: 500;
    color: #333;
}

/* Alert Badge */
.alert-badge {
    background-color: #FFF3E0;
    color: #E65100;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    margin-top: 10px;
}

/* Fault Page */
.fault-page {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.fault-header {
    text-align: center;
    margin-bottom: 30px;
}

.fault-header h2 {
    color: #C62828;
    font-size: 20px;
    margin-bottom: 10px;
}

.fault-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.fault-unit .unit-status {
    width: 100px;
    height: 100px;
    margin-bottom: 20px;
}

.fault-unit h3 {
    font-size: 18px;
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 20px;
}

.fault-data {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    max-width: 400px;
    width: 100%;
}

.diagnosis-section {
    margin-bottom: 30px;
}

.diagnosis-section h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
}

.diagnosis-item {
    background: #fff;
    border-left: 4px solid #C62828;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.diagnosis-item h4 {
    color: #C62828;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
}

.diagnosis-item ul {
    margin-left: 20px;
    color: #555;
}

.diagnosis-item li {
    margin-bottom: 5px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    text-decoration: none;
}

.btn:hover {
    background: #f5f5f5;
}

.btn-primary {
    background: #1976D2;
    color: white;
    border-color: #1976D2;
}

.btn-primary:hover {
    background: #1565C0;
}

.btn-danger {
    background: #C62828;
    color: white;
    border-color: #C62828;
}

.btn-danger:hover {
    background: #B71C1C;
}

.btn-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* Reports Section */
.reports-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.reports-section h2 {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: inline-block;
    width: 100%;
}

.reports-table {
    width: 100%;
    border-collapse: collapse;
}

.reports-table th,
.reports-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.reports-table th {
    background: #f9f9f9;
    font-weight: 600;
    color: #333;
}

.reports-table tr:hover {
    background: #f9f9f9;
}

/* Navigation */
.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s;
}

.back-link:hover {
    background: #f5f5f5;
    color: #333;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.modal h3 {
    margin-bottom: 15px;
    color: #333;
}

.modal p {
    color: #666;
    margin-bottom: 25px;
}

.modal .btn-group {
    margin-top: 0;
}

/* Success Message */
.success-message {
    background: #E8F5E9;
    color: #2E7D32;
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: center;
}

/* Legend */
.legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #666;
}

.legend-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.legend-dot.healthy {
    background-color: #90D26D;
}

.legend-dot.alerts {
    background-color: #F5C747;
}

.legend-dot.critical {
    background-color: #C62828;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1976D2 0%, #0D47A1 100%);
}

.login-box {
    background: white;
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.login-form {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #1976D2;
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: #888;
    font-size: 13px;
}

.error-message {
    background: #FFEBEE;
    color: #C62828;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.btn-full {
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* User Menu */
.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    justify-content: center;
}

.user-menu span {
    color: #666;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .stores-grid,
    .systems-grid,
    .units-grid {
        grid-template-columns: 1fr;
    }

    .header h1 {
        font-size: 22px;
    }

    .reports-table {
        font-size: 13px;
    }

    .reports-table th,
    .reports-table td {
        padding: 8px 10px;
    }

    .login-box {
        margin: 20px;
        padding: 30px 20px;
    }
}

/* Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2196F3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Store address on cards */
.store-address {
    font-size: 12px;
    color: #666;
    margin: 5px 0 15px 0;
    line-height: 1.4;
}

/* Placeholder/Coming Soon Pages */
.placeholder-section {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.coming-soon-card {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 2px dashed #ddd;
}

.coming-soon-card h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 15px;
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: inline-block;
}

.coming-soon-card p {
    color: #666;
    margin-bottom: 10px;
}

.coming-soon-card ul {
    list-style: none;
    padding: 0;
}

.coming-soon-card li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.coming-soon-card li:last-child {
    border-bottom: none;
}

/* HVAC Page Layout - Professional Template Style */
.hvac-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    max-width: 1000px;
    margin: 0 auto;
}

.hvac-unit-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.hvac-unit-card.clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.hvac-unit-card.clickable:hover {
    border-color: #C62828;
    box-shadow: 0 4px 12px rgba(198,40,40,0.15);
}

.hvac-unit-name {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    margin-bottom: 20px;
    width: 100%;
    text-align: center;
}

.hvac-status-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.hvac-status-circle.healthy {
    background-color: #90D26D;
}

.hvac-status-circle.alerts {
    background-color: #F5C747;
}

.hvac-status-circle.critical {
    background-color: #C62828;
}

.hvac-data-list {
    font-size: 14px;
    color: #333;
    line-height: 1.7;
    text-align: left;
    width: 100%;
}

.hvac-data-list p {
    margin: 0;
    padding: 3px 0;
}

.hvac-issues {
    margin-top: 15px;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 13px;
    text-align: center;
    width: 100%;
}

.hvac-issues.critical {
    background: #FFEBEE;
    color: #C62828;
}

.hvac-issues.warning {
    background: #FFF3E0;
    color: #E65100;
}

/* Responsive for HVAC layout */
@media (max-width: 900px) {
    .hvac-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* Lighting Page Layout */
.lighting-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    max-width: 1100px;
    margin: 0 auto;
}

.lighting-zone-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.lighting-zone-card.has-fault {
    border-color: #C62828;
    box-shadow: 0 2px 8px rgba(198,40,40,0.15);
}

.zone-name-box {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    margin-bottom: 15px;
    width: 100%;
    text-align: center;
}

.zone-status-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.zone-status-circle.healthy {
    background-color: #90D26D;
}

.zone-status-circle.alerts {
    background-color: #F5C747;
}

.zone-status-circle.critical {
    background-color: #C62828;
}

.zone-data-section {
    width: 100%;
}

.zone-data-group {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.zone-data-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.zone-data-group h5 {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.zone-data-group p {
    font-size: 14px;
    color: #333;
    margin: 4px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.on {
    background: #E8F5E9;
    color: #2E7D32;
}

.status-badge.off {
    background: #ECEFF1;
    color: #546E7A;
}

.status-badge.active {
    background: #FFF3E0;
    color: #E65100;
}

.sensor-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.sensor-indicator.active {
    background-color: #90D26D;
}

.sensor-indicator.inactive {
    background-color: #BDBDBD;
}

.zone-faults {
    width: 100%;
    background: #FFEBEE;
    border-radius: 6px;
    padding: 12px 15px;
    margin-top: 15px;
}

.zone-faults h5 {
    font-size: 13px;
    font-weight: 600;
    color: #C62828;
    margin-bottom: 8px;
}

.fault-item {
    font-size: 13px;
    color: #C62828;
    margin: 4px 0;
    padding-left: 15px;
    position: relative;
}

.fault-item::before {
    content: '•';
    position: absolute;
    left: 0;
}

/* Responsive for Lighting layout */
@media (max-width: 900px) {
    .lighting-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* Energy Page Layout */
.energy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.energy-meter-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.energy-meter-card.has-fault {
    border-color: #C62828;
    box-shadow: 0 2px 8px rgba(198,40,40,0.15);
}

.energy-meter-card.solar {
    border-color: #4CAF50;
    background: linear-gradient(180deg, #E8F5E9 0%, #fff 15%);
}

.meter-name-box {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    margin-bottom: 15px;
    width: 100%;
    text-align: center;
}

.meter-status-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin-bottom: 15px;
    flex-shrink: 0;
}

.meter-status-circle.healthy {
    background-color: #90D26D;
}

.meter-status-circle.alerts {
    background-color: #F5C747;
}

.meter-status-circle.critical {
    background-color: #C62828;
}

.meter-power-display {
    text-align: center;
    padding: 15px 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    width: 100%;
}

.meter-power-display.consuming {
    background: #FFF3E0;
}

.meter-power-display.generating {
    background: #E8F5E9;
}

.meter-power-display .power-value {
    font-size: 36px;
    font-weight: 700;
    color: #333;
}

.meter-power-display .power-unit {
    font-size: 18px;
    font-weight: 500;
    color: #666;
    margin-left: 4px;
}

.meter-power-display .power-direction {
    display: block;
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
}

.meter-power-display.generating .power-value {
    color: #2E7D32;
}

.meter-power-display.consuming .power-value {
    color: #E65100;
}

.meter-data-section {
    width: 100%;
}

.meter-data-group {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.meter-data-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.meter-data-group h5 {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.meter-data-group p {
    font-size: 14px;
    color: #333;
    margin: 4px 0;
    display: flex;
    justify-content: space-between;
}

.phase-values {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #333;
    background: #f9f9f9;
    padding: 8px 12px;
    border-radius: 4px;
}

.phase-values span {
    flex: 1;
    text-align: center;
}

.meter-faults {
    width: 100%;
    background: #FFEBEE;
    border-radius: 6px;
    padding: 12px 15px;
    margin-top: 15px;
}

.meter-faults h5 {
    font-size: 12px;
    font-weight: 600;
    color: #C62828;
    margin-bottom: 8px;
    text-transform: uppercase;
}

/* Responsive for Energy layout */
@media (max-width: 700px) {
    .energy-grid {
        grid-template-columns: 1fr;
    }
}

/* ======================= */
/* Environment Page Styles */
/* ======================= */

.environment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.environment-sensor-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.environment-sensor-card.has-fault {
    border: 2px solid #C62828;
}

.sensor-name-box {
    background: #1a237e;
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    margin-bottom: 20px;
    width: 100%;
}

.sensor-status-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 15px;
}

.sensor-status-circle.healthy {
    background-color: #90D26D;
}

.sensor-status-circle.warning {
    background-color: #F5C747;
}

.sensor-status-circle.critical {
    background-color: #C62828;
}

.sensor-comfort-display {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
    width: 100%;
}

.sensor-comfort-display .comfort-label {
    display: block;
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.sensor-comfort-display .comfort-value {
    font-size: 24px;
    font-weight: 700;
}

.sensor-data-section {
    width: 100%;
}

.sensor-data-group {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.sensor-data-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sensor-data-group h5 {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.sensor-data-group p {
    font-size: 14px;
    color: #333;
    margin: 4px 0;
    display: flex;
    justify-content: space-between;
}

.sensor-faults {
    width: 100%;
    background: #FFEBEE;
    border-radius: 6px;
    padding: 12px 15px;
    margin-top: 15px;
}

.sensor-faults h5 {
    font-size: 12px;
    font-weight: 600;
    color: #C62828;
    margin-bottom: 8px;
    text-transform: uppercase;
}

/* Weather Station Card */
.weather-section {
    max-width: 500px;
    margin: 0 auto;
}

.weather-station-card {
    background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(26, 35, 126, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
}

.weather-name-box {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    margin-bottom: 15px;
}

.weather-status-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-bottom: 15px;
    border: 3px solid white;
}

.weather-status-circle.healthy {
    background-color: #90D26D;
}

.weather-main-display {
    text-align: center;
    margin-bottom: 20px;
}

.weather-temp {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.weather-temp .temp-value {
    font-size: 56px;
    font-weight: 300;
    line-height: 1;
}

.weather-temp .temp-unit {
    font-size: 24px;
    font-weight: 300;
    margin-top: 8px;
}

.weather-condition {
    font-size: 18px;
    margin-top: 10px;
}

.weather-data-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 15px;
}

.weather-data-group h5 {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.weather-data-group p {
    font-size: 13px;
    color: white;
    margin: 4px 0;
}

/* Responsive for Environment layout */
@media (max-width: 700px) {
    .environment-grid {
        grid-template-columns: 1fr;
    }

    .weather-data-section {
        grid-template-columns: 1fr;
    }
}

/* ======================== */
/* AI Suggestions Styles    */
/* ======================== */

/* Store page - bottom row with 2 cards */
.systems-grid-bottom-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 700px;
    margin: 30px auto;
}

.ai-suggestions-card {
    background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%);
    color: white;
}

.ai-suggestions-card h3 {
    color: white;
    border-color: rgba(255,255,255,0.3);
}

.ai-suggestions-card .status-label {
    color: rgba(255,255,255,0.9);
}

/* Suggestions Summary */
.suggestions-summary {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.summary-stat {
    background: white;
    border-radius: 8px;
    padding: 15px 25px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-width: 100px;
}

.summary-stat .stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
}

.summary-stat .stat-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
}

.summary-stat.pending .stat-value {
    color: #F5C747;
}

.summary-stat.approved .stat-value {
    color: #4CAF50;
}

.summary-stat.acknowledged .stat-value {
    color: #2196F3;
}

.summary-stat.denied .stat-value {
    color: #9E9E9E;
}

/* Suggestions Grid */
.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

/* No Suggestions State */
.no-suggestions {
    background: white;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    grid-column: 1 / -1;
}

.no-suggestions-icon {
    width: 80px;
    height: 80px;
    background: #E8F5E9;
    color: #4CAF50;
    border-radius: 50%;
    font-size: 40px;
    line-height: 80px;
    margin: 0 auto 20px;
}

.no-suggestions h3 {
    color: #333;
    margin-bottom: 10px;
}

.no-suggestions p {
    color: #666;
}

/* Suggestion Card */
.suggestion-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 4px solid #ccc;
}

.suggestion-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.suggestion-card.priority-high {
    border-left-color: #C62828;
}

.suggestion-card.priority-medium {
    border-left-color: #F5C747;
}

.suggestion-card.priority-low {
    border-left-color: #4CAF50;
}

.suggestion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.suggestion-type-icon {
    font-size: 24px;
}

.suggestion-priority {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    background: #f5f5f5;
}

.priority-high .suggestion-priority {
    background: #FFEBEE;
    color: #C62828;
}

.priority-medium .suggestion-priority {
    background: #FFF8E1;
    color: #F57F17;
}

.priority-low .suggestion-priority {
    background: #E8F5E9;
    color: #2E7D32;
}

.suggestion-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.suggestion-description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
}

.suggestion-change {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
}

.change-current {
    font-weight: 500;
    color: #666;
}

.change-arrow {
    color: #1a237e;
    font-size: 18px;
}

.change-suggested {
    font-weight: 600;
    color: #1a237e;
}

.suggestion-footer {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.suggestion-savings {
    color: #2E7D32;
    font-weight: 500;
}

.suggestion-confidence {
    color: #666;
}

/* Suggestion Detail Page */
.suggestion-detail {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 700px;
    margin: 0 auto 30px;
}

.suggestion-detail-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.suggestion-detail-header.priority-high {
    border-bottom-color: #C62828;
}

.suggestion-detail-header.priority-medium {
    border-bottom-color: #F5C747;
}

.suggestion-detail-header.priority-low {
    border-bottom-color: #4CAF50;
}

.detail-type-icon {
    font-size: 36px;
}

.detail-priority {
    font-size: 14px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 6px;
}

.priority-high .detail-priority {
    background: #FFEBEE;
    color: #C62828;
}

.priority-medium .detail-priority {
    background: #FFF8E1;
    color: #F57F17;
}

.priority-low .detail-priority {
    background: #E8F5E9;
    color: #2E7D32;
}

.detail-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 25px;
}

.detail-section {
    margin-bottom: 25px;
}

.detail-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.detail-section p {
    font-size: 15px;
    color: #333;
    line-height: 1.6;
}

.detail-change-box {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.change-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.change-item:last-child {
    border-bottom: none;
}

.change-label {
    font-weight: 500;
    color: #666;
}

.change-value {
    font-weight: 600;
    color: #333;
}

.change-value.current {
    color: #666;
}

.change-value.suggested {
    color: #1a237e;
}

.detail-impact {
    background: #E3F2FD;
    border-radius: 8px;
    padding: 15px 20px;
}

.detail-impact p {
    margin: 8px 0;
}

.detail-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.btn-approve {
    background: #4CAF50 !important;
    color: white !important;
    flex: 1;
    min-width: 150px;
}

.btn-approve:hover {
    background: #388E3C !important;
}

.btn-acknowledge {
    background: #2196F3 !important;
    color: white !important;
    flex: 1;
    min-width: 150px;
}

.btn-acknowledge:hover {
    background: #1976D2 !important;
}

.btn-deny {
    background: #9E9E9E !important;
    color: white !important;
    flex: 1;
    min-width: 150px;
}

.btn-deny:hover {
    background: #757575 !important;
}

.detail-note {
    margin-top: 25px;
    padding: 15px;
    background: #FFF3E0;
    border-radius: 8px;
    font-size: 14px;
    color: #E65100;
}

/* Responsive for AI Suggestions */
@media (max-width: 700px) {
    .systems-grid-bottom-2 {
        grid-template-columns: 1fr;
    }

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

    .suggestions-summary {
        gap: 10px;
    }

    .summary-stat {
        min-width: 70px;
        padding: 10px 15px;
    }

    .detail-actions {
        flex-direction: column;
    }
}
