
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: Arial, sans-serif; background: #f0f2f5; color: #333; min-height: 100vh; }
header { background: #1a5276; color: white; padding: 12px 24px;
         display: flex; justify-content: space-between; align-items: center; }
header h1 { font-size: 1.3rem; }
header .user-info { font-size: 0.85rem; opacity: 0.85; }
header a { color: #aed6f1; text-decoration: none; margin-left: 16px; }
.container { max-width: 1200px; margin: 24px auto; padding: 0 16px; }
.breadcrumb { font-size: 0.8rem; color: #888; margin-bottom: 16px; }
.breadcrumb a { color: #1a5276; text-decoration: none; }
.card { background: white; border-radius: 8px; padding: 20px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.1); margin-bottom: 16px; }
.card h2 { font-size: 1rem; color: #555; margin-bottom: 16px;
           padding-bottom: 8px; border-bottom: 1px solid #eee; }
table { width: 100%; border-collapse: collapse; }
th { background: #1a5276; color: white; padding: 10px 12px;
     text-align: left; font-size: 0.85rem; }
td { padding: 10px 12px; border-bottom: 1px solid #f0f0f0; font-size: 0.85rem; }
tr:hover td { background: #f8f9fa; }
.btn { padding: 8px 16px; border-radius: 4px; border: none;
       cursor: pointer; font-size: 0.85rem; text-decoration: none; display: inline-block; }
.btn-primary { background: #1a5276; color: white; }
.btn-danger  { background: #c0392b; color: white; }
.btn-sm { padding: 4px 10px; font-size: 0.78rem; }
.status-ok      { color: #27ae60; font-weight: bold; }
.status-fault   { color: #e74c3c; font-weight: bold; }
.status-offline { color: #95a5a6; }
.status-off     { color: #f39c12; }
.status-unknown { color: #bdc3c7; }
.dot { display: inline-block; width: 10px; height: 10px;
       border-radius: 50%; margin-right: 6px; }
.dot-ok      { background: #27ae60; }
.dot-fault   { background: #e74c3c; }
.dot-offline { background: #95a5a6; }
.dot-off     { background: #f39c12; }
.dot-unknown { background: #bdc3c7; }
.flash { padding: 10px 16px; border-radius: 4px; margin-bottom: 16px; }
.flash-error   { background: #fadbd8; color: #c0392b; }
.flash-success { background: #d5f5e3; color: #1e8449; }
.badge { padding: 2px 8px; border-radius: 10px; font-size: 0.72rem; font-weight: bold; }
.badge-admin     { background: #d6eaf8; color: #1a5276; }
.badge-installer { background: #fdebd0; color: #d35400; }
.badge-user      { background: #e8f8f5; color: #1e8449; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.metric { background: white; border-radius: 8px; padding: 16px;
          box-shadow: 0 1px 4px rgba(0,0,0,0.1); text-align: center; }
.metric label { font-size: 0.72rem; color: #888; display: block; margin-bottom: 4px; }
.metric value { font-size: 1.4rem; font-weight: bold; color: #1a5276; display: block; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.85rem; margin-bottom: 4px; color: #555; }
.form-group input, .form-group select {
    width: 100%; padding: 8px 12px; border: 1px solid #ddd;
    border-radius: 4px; font-size: 0.9rem; }
.form-group input:focus, .form-group select:focus {
    outline: none; border-color: #1a5276; }
.info-table2 { width: 100%; border-collapse: collapse; }
.info-table2 td { padding: 7px 4px; font-size: 0.85rem; border-bottom: 1px solid #f5f5f5; }
.info-table2 td:first-child { color: #555; }
.info-table2 td:last-child  { text-align: right; font-weight: 600; color: #1a5276; }
.stat-tabs { display: flex; gap: 4px; border-bottom: 2px solid #eee; margin-bottom: 16px; }
.stat-tab { padding: 8px 18px; cursor: pointer; font-size: 0.88rem; color: #666;
            border-bottom: 2px solid transparent; margin-bottom: -2px; }
.stat-tab.active { color: #1a5276; border-bottom-color: #1a5276; font-weight: bold; }
.date-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.date-nav input[type=date], .date-nav input[type=number], .date-nav select {
  padding: 6px 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 0.85rem; }
.date-nav button { background: none; border: 1px solid #ddd; border-radius: 4px; width: 32px; height: 32px;
                    cursor: pointer; font-size: 1rem; color: #1a5276; }
.date-nav button:hover { background: #f5f5f5; }
.fault-icon { display: inline-flex; align-items: center; justify-content: center;
              width: 20px; height: 20px; border-radius: 3px; color: white;
              font-weight: bold; font-size: 0.85rem; }
.fault-critical { background: #c0392b; }
.fault-warning  { background: #e67e22; }
.error-code-link { color: #1a5276; text-decoration: underline; cursor: pointer; }
.error-code-link:hover { color: #0d3a56; }
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5);
                  align-items: center; justify-content: center; z-index: 1000; padding: 16px; }
.modal-box { background: white; border-radius: 8px; padding: 20px; width: 100%;
             max-width: 480px; max-height: 80vh; overflow-y: auto;
             box-shadow: 0 4px 20px rgba(0,0,0,0.25); }
.modal-header { display: flex; justify-content: space-between; align-items: center;
                margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid #eee; }
.modal-header h3 { color: #1a5276; font-size: 1.05rem; }
.modal-close { cursor: pointer; font-size: 1.4rem; color: #999; line-height: 1; }
.modal-close:hover { color: #333; }
.modal-field { margin-bottom: 14px; }
.modal-field label { display: block; font-size: 0.72rem; color: #888;
                      text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 3px; }
.modal-field div.modal-value { font-size: 0.9rem; color: #333; white-space: pre-line; }
/* ── Πλάγια στήλη διαχείρισης/σύνοψης εγκατάστασης (Γύρος 5ζ, 19/9/2026) ── */
.plant-layout { display: flex; gap: 16px; align-items: flex-start; }
.plant-sidebar { width: 220px; flex-shrink: 0; display: flex; flex-direction: column; gap: 16px; }
.plant-sidebar .card { padding: 14px; margin-bottom: 0; }
.plant-sidebar .card h2 { font-size: 0.82rem; margin-bottom: 10px; padding-bottom: 6px; }
.side-menu { display: flex; flex-direction: column; gap: 2px; }
.side-menu a { display: block; padding: 7px 8px; border-radius: 4px; font-size: 0.82rem;
               color: #333; text-decoration: none; }
.side-menu a:hover { background: #f0f4f8; }
.side-menu a.danger-link { color: #c0392b; }
.side-menu a.danger-link:hover { background: #fadbd8; }
.tree-toggle { float: right; cursor: pointer; font-weight: bold; color: #1a5276;
               width: 16px; text-align: center; user-select: none; }
.tree-plant { font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; }
.tree-inverters { list-style: none; margin-left: 14px; display: flex; flex-direction: column; gap: 4px; }
.tree-inverters li a { font-size: 0.8rem; color: #333; text-decoration: none;
                        display: flex; align-items: center; }
.tree-inverters li a:hover { color: #1a5276; text-decoration: underline; }
.tree-body.collapsed .tree-inverters { display: none; }
@media (max-width: 800px) {
  .plant-layout { flex-direction: column; }
  .plant-sidebar { width: 100%; flex-direction: row; flex-wrap: wrap; }
  .plant-sidebar .card { flex: 1; min-width: 220px; }
}
