/* AVDENA Global UI System v7.1.1
   Scope: global visual foundation for forms, cards, modals, dropdowns, alerts, buttons and mobile layout.
   This file intentionally avoids business logic and does not remove existing project classes. */
:root{
  --av7-bg-0:#030b14;
  --av7-bg-1:#071421;
  --av7-bg-2:#0d1f35;
  --av7-surface:rgba(13,31,53,.86);
  --av7-surface-2:rgba(18,41,67,.82);
  --av7-surface-3:rgba(5,16,30,.84);
  --av7-line:rgba(125,176,230,.20);
  --av7-line-soft:rgba(125,176,230,.12);
  --av7-line-strong:rgba(84,240,210,.46);
  --av7-cyan:#54f0d2;
  --av7-cyan-soft:rgba(84,240,210,.12);
  --av7-blue:#67bdff;
  --av7-blue-soft:rgba(103,189,255,.12);
  --av7-text:#eef8ff;
  --av7-text-strong:#ffffff;
  --av7-muted:#9fb8cf;
  --av7-muted-2:#7f97b2;
  --av7-danger:#ff7690;
  --av7-warn:#ffc16e;
  --av7-ok:#65f2d3;
  --av7-radius-xs:12px;
  --av7-radius-sm:14px;
  --av7-radius-md:16px;
  --av7-radius-lg:22px;
  --av7-radius-xl:28px;
  --av7-control-h:54px;
  --av7-control-pad:16px;
  --av7-shadow-sm:0 12px 32px rgba(0,0,0,.18);
  --av7-shadow-md:0 22px 62px rgba(0,0,0,.28);
  --av7-shadow-lg:0 32px 110px rgba(0,0,0,.52);
  --av7-focus:0 0 0 3px rgba(84,240,210,.13),0 16px 44px rgba(0,0,0,.24);
  --av7-font:Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
html[data-avdena-ui="7.0.0"], body.avdena-v7{color-scheme:dark;}
body.avdena-v7{font-family:var(--av7-font);background:var(--av7-bg-0);color:var(--av7-text);}
body.avdena-v7 *{box-sizing:border-box;}
body.avdena-v7 ::selection{background:rgba(84,240,210,.28);color:#fff;}
body.avdena-v7 :focus-visible{outline:0;box-shadow:var(--av7-focus)!important;border-color:var(--av7-line-strong)!important;}

/* Core controls */
body.avdena-v7 input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
body.avdena-v7 select,
body.avdena-v7 textarea,
body.avdena-v7 .av-ui-control-v7{
  width:100%;
  min-width:0;
  min-height:var(--av7-control-h);
  border:1px solid var(--av7-line)!important;
  border-radius:var(--av7-radius-md)!important;
  background:linear-gradient(180deg,rgba(5,16,30,.88),rgba(3,12,23,.88))!important;
  color:var(--av7-text)!important;
  padding:0 var(--av7-control-pad)!important;
  font-size:15px;
  font-weight:650;
  line-height:1.2;
  outline:0;
  box-shadow:none!important;
  transition:border-color .18s ease, box-shadow .18s ease, background .18s ease, transform .18s ease;
}
body.avdena-v7 textarea,
body.avdena-v7 .av-ui-textarea-v7{min-height:118px;padding:14px var(--av7-control-pad)!important;resize:vertical;line-height:1.45;}
body.avdena-v7 input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):hover,
body.avdena-v7 select:hover,
body.avdena-v7 textarea:hover{border-color:rgba(125,176,230,.34)!important;background:linear-gradient(180deg,rgba(7,19,35,.94),rgba(3,12,23,.92))!important;}
body.avdena-v7 input::placeholder,
body.avdena-v7 textarea::placeholder{color:rgba(222,236,250,.44)!important;font-weight:600;}
body.avdena-v7 select,
body.avdena-v7 .av-ui-select-v7{
  -webkit-appearance:none!important;
  -moz-appearance:none!important;
  appearance:none!important;
  padding-right:48px!important;
  background-repeat:no-repeat!important;
  background-position:right 17px center!important;
  background-size:16px 16px!important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23eef8ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")!important;
}
body.avdena-v7 select::-ms-expand{display:none!important;}
body.avdena-v7 select option,
body.avdena-v7 select optgroup{background:#0d1f35!important;color:#eef8ff!important;font-weight:650;}
body.avdena-v7 select option:checked{background:#164063!important;color:#fff!important;}

/* Labels and field groups */
body.avdena-v7 label{min-width:0;}
body.avdena-v7 label small,
body.avdena-v7 .field label,
body.avdena-v7 .v49-field small,
body.avdena-v7 .v50-field small,
body.avdena-v7 .v51-field small,
body.avdena-v7 .energy-step-grid small,
body.avdena-v7 .energy-dynamic-grid small{
  color:#dbeaff!important;
  font-size:12px!important;
  font-weight:950!important;
  letter-spacing:.01em!important;
  line-height:1.25!important;
}
body.avdena-v7 .field,
body.avdena-v7 .v49-field,
body.avdena-v7 .v50-field,
body.avdena-v7 .v51-field,
body.avdena-v7 .license-control-field,
body.avdena-v7 .energy-step-grid label,
body.avdena-v7 .energy-dynamic-grid label{display:grid!important;gap:8px!important;min-width:0!important;}

/* Buttons */
body.avdena-v7 .btn,
body.avdena-v7 .btn-small,
body.avdena-v7 button.av-ui-button-v7,
body.avdena-v7 .energy-mode-actions-v689 button,
body.avdena-v7 .module-edit-button,
body.avdena-v7 .v30-dns-rows button,
body.avdena-v7 .energy-row-actions button{
  min-height:42px;
  border-radius:var(--av7-radius-md)!important;
  border:1px solid rgba(125,176,230,.22)!important;
  background:linear-gradient(135deg,rgba(103,189,255,.13),rgba(84,240,210,.08))!important;
  color:var(--av7-text)!important;
  font-weight:950!important;
  letter-spacing:-.01em;
  box-shadow:0 10px 26px rgba(0,0,0,.14);
  transition:transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
body.avdena-v7 .btn:hover,
body.avdena-v7 .btn-small:hover,
body.avdena-v7 button.av-ui-button-v7:hover,
body.avdena-v7 .energy-mode-actions-v689 button:hover,
body.avdena-v7 .module-edit-button:hover{transform:translateY(-1px);border-color:rgba(84,240,210,.45)!important;box-shadow:0 16px 36px rgba(0,0,0,.22);}
body.avdena-v7 .btn.primary,
body.avdena-v7 .energy-mode-actions-v689 button.active,
body.avdena-v7 .nav button.active{background:linear-gradient(135deg,rgba(84,240,210,.24),rgba(103,189,255,.20))!important;border-color:rgba(84,240,210,.48)!important;color:#f7ffff!important;}
body.avdena-v7 .btn.ghost{background:rgba(103,189,255,.10)!important;}
body.avdena-v7 button.danger,
body.avdena-v7 .danger{border-color:rgba(255,118,144,.36)!important;background:rgba(255,118,144,.12)!important;color:#ffe1e7!important;}

/* Cards, panels, surfaces */
body.avdena-v7 .panel,
body.avdena-v7 .ops-panel,
body.avdena-v7 .modal-card,
body.avdena-v7 .v30-card,
body.avdena-v7 .v30-settings-hero,
body.avdena-v7 .v49-license-shell,
body.avdena-v7 .v50-license-shell,
body.avdena-v7 .license-settings-shell,
body.avdena-v7 .energy-builder-card,
body.avdena-v7 .energy-list-card,
body.avdena-v7 .energy-form-section-v685,
body.avdena-v7 .energy-dynamic-section-v685,
body.avdena-v7 .av-energy-shell,
body.avdena-v7 .av-ui-card-v7{
  border:1px solid var(--av7-line)!important;
  border-radius:var(--av7-radius-xl)!important;
  background:linear-gradient(180deg,rgba(16,34,57,.86),rgba(8,20,36,.86))!important;
  box-shadow:var(--av7-shadow-sm);
}
body.avdena-v7 .energy-form-section-v685,
body.avdena-v7 .energy-dynamic-section-v685{padding:24px!important;border-radius:24px!important;}
body.avdena-v7 .energy-section-head-v685,
body.avdena-v7 .v30-card-head,
body.avdena-v7 .license-settings-head,
body.avdena-v7 .v49-license-head,
body.avdena-v7 .v50-license-head{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:18px!important;margin-bottom:18px!important;}
body.avdena-v7 .energy-section-head-v685 b,
body.avdena-v7 .panel h3,
body.avdena-v7 .v30-card h4{color:#f6fbff!important;letter-spacing:-.02em;}
body.avdena-v7 .energy-section-head-v685 span,
body.avdena-v7 .panel p,
body.avdena-v7 .v30-card p{color:var(--av7-muted)!important;line-height:1.45!important;}

/* Dropdown / combobox standard */
body.avdena-v7 .energy-location-combobox,
body.avdena-v7 .av-combobox-v7{
  position:relative!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 64px!important;
  align-items:stretch!important;
  min-height:var(--av7-control-h)!important;
  border:1px solid rgba(84,240,210,.40)!important;
  border-radius:var(--av7-radius-md)!important;
  background:linear-gradient(180deg,rgba(5,16,30,.90),rgba(3,12,23,.90))!important;
  box-shadow:0 0 0 1px rgba(84,240,210,.05),var(--av7-shadow-sm)!important;
  overflow:visible!important;
}
body.avdena-v7 .energy-location-combobox:focus-within{border-color:rgba(84,240,210,.70)!important;box-shadow:var(--av7-focus)!important;}
body.avdena-v7 .energy-location-combobox>input{border:0!important;background:transparent!important;box-shadow:none!important;min-height:var(--av7-control-h)!important;border-radius:0!important;position:relative;z-index:1;}
body.avdena-v7 .energy-location-combobox>button,
body.avdena-v7 .energy-combobox-toggle-v6820{
  z-index:3!important;
  pointer-events:auto!important;
  width:64px!important;
  min-width:64px!important;
  border:0!important;
  border-left:1px solid rgba(103,189,255,.18)!important;
  border-radius:0 var(--av7-radius-md) var(--av7-radius-md) 0!important;
  background:linear-gradient(135deg,rgba(84,240,210,.14),rgba(103,189,255,.10))!important;
  display:grid!important;
  place-items:center!important;
  padding:0!important;
  color:transparent!important;
}
body.avdena-v7 .energy-location-combobox>button:hover{background:linear-gradient(135deg,rgba(84,240,210,.22),rgba(103,189,255,.16))!important;}
body.avdena-v7 .energy-caret-v6820,
body.avdena-v7 .av-caret-v7{width:16px!important;height:16px!important;display:block!important;background-repeat:no-repeat!important;background-position:center!important;background-size:16px 16px!important;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23eef8ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")!important;}
body.avdena-v7 .energy-location-menu,
body.avdena-v7 .av-menu-v7{
  position:absolute!important;
  z-index:120!important;
  left:0!important;
  right:0!important;
  top:calc(100% + 10px)!important;
  max-height:260px!important;
  overflow:auto!important;
  padding:10px!important;
  border:1px solid rgba(84,240,210,.26)!important;
  border-radius:18px!important;
  background:linear-gradient(180deg,rgba(14,32,54,.99),rgba(6,18,32,.99))!important;
  box-shadow:0 28px 76px rgba(0,0,0,.46)!important;
  backdrop-filter:blur(16px)!important;
}
body.avdena-v7 .energy-location-item-v6820,
body.avdena-v7 .energy-location-menu button,
body.avdena-v7 .av-menu-item-v7{width:100%!important;display:flex!important;align-items:center!important;gap:12px!important;text-align:left!important;margin:0 0 8px!important;padding:12px 14px!important;border:1px solid rgba(105,189,255,.14)!important;border-radius:14px!important;background:rgba(103,189,255,.07)!important;color:#eef8ff!important;font-weight:850!important;cursor:pointer!important;}
body.avdena-v7 .energy-location-item-v6820:hover,
body.avdena-v7 .energy-location-menu button:hover,
body.avdena-v7 .av-menu-item-v7:hover{border-color:rgba(84,240,210,.40)!important;background:linear-gradient(135deg,rgba(84,240,210,.15),rgba(103,189,255,.11))!important;transform:translateY(-1px);}
body.avdena-v7 .energy-location-icon-v6820,
body.avdena-v7 .energy-location-icon{width:32px!important;height:32px!important;border-radius:12px!important;display:grid!important;place-items:center!important;background:rgba(84,240,210,.10)!important;border:1px solid rgba(84,240,210,.20)!important;color:#71f4d3!important;}
body.avdena-v7 .energy-location-empty,
body.avdena-v7 .av-menu-empty-v7{padding:12px 14px!important;border-radius:14px!important;border:1px dashed rgba(151,188,230,.16)!important;background:rgba(255,255,255,.035)!important;color:var(--av7-muted)!important;font-size:13px!important;line-height:1.45!important;}

/* Alerts, messages and confirmation modals */
body.avdena-v7 .av-energy-alert,
body.avdena-v7 .energy-test-modal-details,
body.avdena-v7 .av-ui-message-v7,
body.avdena-v7 .license-status span,
body.avdena-v7 .badge{border-radius:14px!important;border:1px solid rgba(103,189,255,.20)!important;background:rgba(103,189,255,.08)!important;color:#d9efff!important;line-height:1.45;}
body.avdena-v7 .av-energy-alert.err,
body.avdena-v7 .energy-test-modal-card.err,
body.avdena-v7 .av-ui-message-v7.is-error{border-color:rgba(255,118,144,.36)!important;background:rgba(255,118,144,.10)!important;color:#ffe1e7!important;}
body.avdena-v7 .av-energy-alert.info,
body.avdena-v7 .av-ui-message-v7.is-info{border-color:rgba(103,189,255,.28)!important;background:rgba(103,189,255,.08)!important;color:#d8efff!important;}
body.avdena-v7 .av-confirm-card,
body.avdena-v7 .energy-test-modal-card,
body.avdena-v7 .modal-card{border-radius:26px!important;background:linear-gradient(180deg,rgba(13,30,52,.98),rgba(6,18,34,.98))!important;border:1px solid rgba(151,188,230,.22)!important;box-shadow:var(--av7-shadow-lg)!important;}
body.avdena-v7 .av-confirm-icon{border-radius:18px!important;background:rgba(103,189,255,.10)!important;border:1px solid rgba(103,189,255,.22)!important;}

/* Lists, rows, badges */
body.avdena-v7 .energy-device-row,
body.avdena-v7 .energy-area-row,
body.avdena-v7 .v49-license-card,
body.avdena-v7 .v50-license-card,
body.avdena-v7 .v51-license-card,
body.avdena-v7 .module-card,
body.avdena-v7 .ops-service-card,
body.avdena-v7 .ops-metric-card{border-radius:22px!important;border:1px solid var(--av7-line-soft)!important;background:rgba(7,18,33,.58)!important;}
body.avdena-v7 .badge{display:inline-flex!important;align-items:center!important;gap:6px!important;padding:7px 10px!important;font-weight:900!important;font-size:12px!important;}

/* Checkboxes and switches - preserve native behavior */
body.avdena-v7 input[type="checkbox"],
body.avdena-v7 input[type="radio"]{accent-color:var(--av7-cyan);}
body.avdena-v7 .v49-check span,
body.avdena-v7 .v50-switch span{border-radius:9px!important;border:1px solid rgba(190,210,240,.45)!important;background:rgba(255,255,255,.06)!important;}
body.avdena-v7 .v49-check input:checked+span,
body.avdena-v7 .v50-switch input:checked+span{background:var(--av7-cyan)!important;border-color:var(--av7-cyan)!important;color:#062330!important;}

/* Tables and scrollbars */
body.avdena-v7 table{border-collapse:separate;border-spacing:0;width:100%;}
body.avdena-v7 th{color:#cfe5ff;text-align:left;font-size:12px;letter-spacing:.06em;text-transform:uppercase;}
body.avdena-v7 td{border-top:1px solid var(--av7-line-soft);}
body.avdena-v7 ::-webkit-scrollbar{width:10px;height:10px;}
body.avdena-v7 ::-webkit-scrollbar-track{background:rgba(255,255,255,.03);border-radius:999px;}
body.avdena-v7 ::-webkit-scrollbar-thumb{background:rgba(125,176,230,.35);border-radius:999px;border:2px solid rgba(3,11,20,.8);}
body.avdena-v7 ::-webkit-scrollbar-thumb:hover{background:rgba(84,240,210,.46);}

/* Energy module v7 stabilization */
body.avdena-v7 .av-energy-shell{width:min(1240px,calc(100vw - 28px))!important;max-height:min(94vh,940px)!important;}
body.avdena-v7 .energy-builder-full-v689{width:min(100%,1040px)!important;}
body.avdena-v7 .energy-step-grid,
body.avdena-v7 .energy-dynamic-grid{gap:20px 28px!important;}
body.avdena-v7 .energy-inline-test-v6814{border-radius:18px!important;border:1px solid rgba(84,240,210,.24)!important;background:linear-gradient(135deg,rgba(84,240,210,.10),rgba(103,189,255,.08))!important;padding:18px!important;gap:18px!important;}

/* Mobile */
@media(max-width:980px){
  body.avdena-v7 .energy-step-grid,
  body.avdena-v7 .energy-dynamic-grid,
  body.avdena-v7 .v49-license-editor,
  body.avdena-v7 .v50-license-editor,
  body.avdena-v7 .v51-editor-row{grid-template-columns:1fr!important;}
  body.avdena-v7 .energy-section-head-v685,
  body.avdena-v7 .v30-card-head,
  body.avdena-v7 .license-settings-head,
  body.avdena-v7 .v49-license-head,
  body.avdena-v7 .v50-license-head{display:grid!important;grid-template-columns:1fr!important;gap:6px!important;}
  body.avdena-v7 .energy-section-head-v685 span{text-align:left!important;max-width:none!important;}
}
@media(max-width:720px){
  :root{--av7-control-h:50px;--av7-control-pad:14px;}
  body.avdena-v7 .main{padding-left:12px!important;padding-right:12px!important;}
  body.avdena-v7 .av-energy-modal{padding:8px!important;align-items:start!important;}
  body.avdena-v7 .av-energy-shell{width:calc(100vw - 16px)!important;max-height:calc(100vh - 16px)!important;padding:16px!important;border-radius:22px!important;}
  body.avdena-v7 .energy-form-section-v685,
  body.avdena-v7 .energy-dynamic-section-v685,
  body.avdena-v7 .panel,
  body.avdena-v7 .modal-card,
  body.avdena-v7 .v30-card{padding:16px!important;border-radius:20px!important;}
  body.avdena-v7 .energy-location-combobox{grid-template-columns:minmax(0,1fr) 56px!important;}
  body.avdena-v7 .energy-location-combobox>button{width:56px!important;min-width:56px!important;}
  body.avdena-v7 .energy-location-menu{position:relative!important;top:auto!important;margin-top:8px!important;max-height:220px!important;}
  body.avdena-v7 .energy-actions,
  body.avdena-v7 .energy-actions-v685,
  body.avdena-v7 .v49-license-actions,
  body.avdena-v7 .v50-license-actions{display:grid!important;grid-template-columns:1fr!important;}
  body.avdena-v7 .energy-actions .btn,
  body.avdena-v7 .btn{width:100%;}
}

/* v7.0.1 UI stability patch */
html[data-avdena-ui="7.0.1"] body.avdena-v7,
html[data-avdena-ui="7.1.0"] body.avdena-v7,
html[data-avdena-ui="7.1.1"] body.avdena-v7{min-width:320px;}
body.avdena-v7 .modal-backdrop,
body.avdena-v7 .av-confirm-backdrop,
body.avdena-v7 .av-energy-modal{overflow-y:auto!important;overscroll-behavior:contain!important;}
body.avdena-v7 .modal-card,
body.avdena-v7 .av-confirm-card,
body.avdena-v7 .energy-test-modal-card{max-height:calc(100vh - 32px)!important;overflow:auto!important;}
body.avdena-v7 .modal-actions,
body.avdena-v7 .av-confirm-actions,
body.avdena-v7 .av-profile-actions{min-width:0!important;}
body.avdena-v7 .av-toast{max-width:min(420px,calc(100vw - 24px))!important;overflow-wrap:anywhere!important;}
body.avdena-v7 .result.show,
body.avdena-v7 .alert.show{overflow-wrap:anywhere!important;}
body.avdena-v7 .empty,
body.avdena-v7 .license-empty,
body.avdena-v7 .ops2-empty{border-color:rgba(125,176,230,.18)!important;background:rgba(255,255,255,.035)!important;color:var(--av7-muted)!important;}
body.avdena-v7 .v30-modal-location,
body.avdena-v7 .v44-location-user-pick,
body.avdena-v7 .v43-modal-user,
body.avdena-v7 .location-tile,
body.avdena-v7 .license,
body.avdena-v7 .v36-license-card,
body.avdena-v7 .v51-license-card,
body.avdena-v7 .energy-device-row{min-width:0!important;overflow:hidden!important;}
body.avdena-v7 .v30-modal-location>span,
body.avdena-v7 .v44-location-user-pick>span,
body.avdena-v7 .v43-modal-user>span,
body.avdena-v7 .energy-device-main,
body.avdena-v7 .v36-license-copy,
body.avdena-v7 .v51-module-copy{min-width:0!important;}
body.avdena-v7 .v30-modal-location b,
body.avdena-v7 .v30-modal-location small,
body.avdena-v7 .location-tile-name,
body.avdena-v7 .location-tile-domain,
body.avdena-v7 .energy-device-main b,
body.avdena-v7 .energy-device-main span,
body.avdena-v7 .energy-device-main small,
body.avdena-v7 .v36-license-copy b,
body.avdena-v7 .v36-license-copy p,
body.avdena-v7 .v51-module-copy b,
body.avdena-v7 .v51-module-copy p{overflow-wrap:anywhere!important;}
body.avdena-v7 .license-control,
body.avdena-v7 .v36-license-control,
body.avdena-v7 .v51-editor-row{min-width:0!important;}
body.avdena-v7 .license-control-field,
body.avdena-v7 .v51-field,
body.avdena-v7 .reminder-days-field{min-width:0!important;}
body.avdena-v7 .energy-location-menu{overscroll-behavior:contain!important;scrollbar-gutter:stable!important;}
body.avdena-v7 .energy-device-metrics{min-width:0!important;}
body.avdena-v7 .energy-row-actions{min-width:0!important;}

@media(max-width:720px){
  body.avdena-v7 .modal-backdrop,
  body.avdena-v7 .av-confirm-backdrop{align-items:flex-start!important;padding:10px!important;}
  body.avdena-v7 .modal-card,
  body.avdena-v7 .av-confirm-card,
  body.avdena-v7 .energy-test-modal-card{width:min(100%,calc(100vw - 20px))!important;max-height:calc(100vh - 20px)!important;}
  body.avdena-v7 .modal-actions,
  body.avdena-v7 .av-confirm-actions,
  body.avdena-v7 .av-profile-actions{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;}
  body.avdena-v7 .modal-actions .btn,
  body.avdena-v7 .modal-actions .btn-primary,
  body.avdena-v7 .modal-actions .btn-ghost,
  body.avdena-v7 .av-confirm-actions .btn-small,
  body.avdena-v7 .av-profile-actions .btn{width:100%!important;margin:0!important;}
  body.avdena-v7 .v30-modal-location,
  body.avdena-v7 .v44-location-user-pick,
  body.avdena-v7 .v43-modal-user{grid-template-columns:48px minmax(0,1fr)!important;align-items:center!important;}
  body.avdena-v7 .v30-modal-location .badge,
  body.avdena-v7 .v44-location-user-pick .badge,
  body.avdena-v7 .v43-modal-user .badge{grid-column:2!important;justify-self:start!important;}
  body.avdena-v7 .energy-device-row{display:grid!important;grid-template-columns:1fr!important;gap:14px!important;}
  body.avdena-v7 .energy-device-metrics{grid-template-columns:repeat(3,minmax(0,1fr))!important;width:100%!important;}
  body.avdena-v7 .energy-row-actions{display:grid!important;grid-template-columns:1fr 1fr!important;width:100%!important;}
}

/* v7.1.0 global UI polish */
body.avdena-v7.av-modal-visible-v7{overflow:hidden!important;}
body.avdena-v7 .content,
body.avdena-v7 .main,
body.avdena-v7 .auth-main{min-width:0!important;}
body.avdena-v7 .auth-shell{background:
  radial-gradient(circle at 82% 8%,rgba(84,240,210,.12),transparent 30%),
  radial-gradient(circle at 10% 18%,rgba(103,189,255,.10),transparent 34%),
  linear-gradient(145deg,#030913 0%,#071525 62%,#04111e 100%)!important;}
body.avdena-v7 .auth-card{border-radius:28px!important;border-color:rgba(125,176,230,.22)!important;background:linear-gradient(180deg,rgba(15,33,56,.92),rgba(5,15,29,.94))!important;}
body.avdena-v7 .auth-card h2{letter-spacing:-.035em!important;text-wrap:balance!important;}
body.avdena-v7 .login-logo{border-radius:20px!important;box-shadow:0 18px 48px rgba(0,0,0,.28),0 0 0 1px rgba(84,240,210,.06)!important;}
body.avdena-v7 .policy{color:var(--av7-muted)!important;}
body.avdena-v7 .policy li{margin:2px 0!important;}
body.avdena-v7 .manual-key{max-width:100%!important;white-space:normal!important;overflow-wrap:anywhere!important;}

body.avdena-v7 .sidebar{background:linear-gradient(180deg,rgba(4,12,24,.88),rgba(3,10,19,.82))!important;border-right-color:rgba(125,176,230,.14)!important;}
body.avdena-v7 .side-logo{border-radius:20px!important;background:rgba(103,189,255,.045)!important;border:1px solid rgba(125,176,230,.10)!important;}
body.avdena-v7 .side-logo b,
body.avdena-v7 .page-title h1,
body.avdena-v7 .loc-hero-main h1,
body.avdena-v7 .ops2-hero h2{overflow-wrap:anywhere!important;text-wrap:balance!important;}
body.avdena-v7 .nav{align-content:start!important;}
body.avdena-v7 .nav button{min-height:48px!important;display:flex!important;align-items:center!important;gap:10px!important;border-radius:14px!important;}
body.avdena-v7 .nav button.active{box-shadow:inset 0 0 0 1px rgba(84,240,210,.10),0 14px 32px rgba(0,0,0,.18)!important;}
body.avdena-v7 .topbar{min-width:0!important;}
body.avdena-v7 .toolbar{min-width:0!important;}
body.avdena-v7 .toolbar>*{min-width:0!important;}

body.avdena-v7 .cards,
body.avdena-v7 .loc-kpi-grid,
body.avdena-v7 .ops2-summary{gap:14px!important;}
body.avdena-v7 .stat,
body.avdena-v7 .metric-card,
body.avdena-v7 .dash-card,
body.avdena-v7 .ops2-summary article{position:relative!important;overflow:hidden!important;}
body.avdena-v7 .stat:after,
body.avdena-v7 .metric-card:after,
body.avdena-v7 .dash-card:after,
body.avdena-v7 .ops2-summary article:after{content:"";position:absolute;inset:0 0 auto 0;height:1px;background:linear-gradient(90deg,transparent,rgba(84,240,210,.34),transparent);pointer-events:none;}
body.avdena-v7 .stat b,
body.avdena-v7 .metric-card b,
body.avdena-v7 .dash-card b{overflow-wrap:anywhere!important;}
body.avdena-v7 .mini-stats,
body.avdena-v7 .donut-wrap,
body.avdena-v7 .active-module-grid{min-width:0!important;}
body.avdena-v7 .line-chart svg,
body.avdena-v7 .mini-spark{max-width:100%!important;}

body.avdena-v7 .av-ui-field-v7{min-width:0!important;}
body.avdena-v7 .av-ui-field-v7>label,
body.avdena-v7 label.av-ui-field-v7{min-width:0!important;}
body.avdena-v7 .av-ui-control-muted-v7{opacity:.78!important;cursor:not-allowed!important;}
body.avdena-v7 input[type="date"].av-ui-control-v7{color-scheme:dark!important;}
body.avdena-v7 input[type="number"].av-ui-control-v7{font-variant-numeric:tabular-nums!important;}
body.avdena-v7 .password-wrap{min-width:0!important;}
body.avdena-v7 .password-wrap .show-pass{z-index:2!important;}

body.avdena-v7 .av-ui-button-primary-v7{background:linear-gradient(135deg,rgba(84,240,210,.30),rgba(103,189,255,.22))!important;border-color:rgba(84,240,210,.50)!important;color:#f7ffff!important;}
body.avdena-v7 .av-ui-button-danger-v7{background:linear-gradient(135deg,rgba(255,118,144,.16),rgba(255,118,144,.08))!important;border-color:rgba(255,118,144,.42)!important;color:#ffe0e7!important;}
body.avdena-v7 .av-ui-button-ghost-v7{background:rgba(103,189,255,.075)!important;border-color:rgba(125,176,230,.18)!important;color:#dcecff!important;}
body.avdena-v7 button:disabled,
body.avdena-v7 .btn:disabled,
body.avdena-v7 .btn-small:disabled{opacity:.48!important;cursor:not-allowed!important;transform:none!important;}

body.avdena-v7 .av-badge-success-v7{border-color:rgba(84,240,210,.30)!important;background:rgba(84,240,210,.11)!important;color:#bffff1!important;}
body.avdena-v7 .av-badge-danger-v7{border-color:rgba(255,118,144,.30)!important;background:rgba(255,118,144,.11)!important;color:#ffdce4!important;}
body.avdena-v7 .av-badge-warning-v7{border-color:rgba(255,193,110,.32)!important;background:rgba(255,193,110,.12)!important;color:#ffe1aa!important;}
body.avdena-v7 .av-badge-info-v7{border-color:rgba(103,189,255,.32)!important;background:rgba(103,189,255,.11)!important;color:#d8efff!important;}

body.avdena-v7 .av-ui-modal-v7{backdrop-filter:blur(16px)!important;background:rgba(1,8,16,.72)!important;}
body.avdena-v7 .av-ui-modal-card-v7{scrollbar-gutter:stable!important;}
body.avdena-v7 .modal-head,
body.avdena-v7 .av-energy-head{min-width:0!important;}
body.avdena-v7 .modal-head h3,
body.avdena-v7 .av-energy-head h2{overflow-wrap:anywhere!important;text-wrap:balance!important;}
body.avdena-v7 .modal-close,
body.avdena-v7 .av-energy-close{flex:0 0 auto!important;}
body.avdena-v7 .v30-select-modal-card,
body.avdena-v7 .av-profile-card{width:min(760px,calc(100vw - 28px))!important;}
body.avdena-v7 .v30-modal-list,
body.avdena-v7 .av-ui-scroll-region-v7{overscroll-behavior:contain!important;scrollbar-gutter:stable!important;}

body.avdena-v7 .license-settings-shell,
body.avdena-v7 .v51-license-card,
body.avdena-v7 .v36-license-card,
body.avdena-v7 .license{box-shadow:0 14px 40px rgba(0,0,0,.14)!important;}
body.avdena-v7 .license-grid,
body.avdena-v7 .v54-create-license-grid{grid-template-columns:repeat(auto-fit,minmax(280px,1fr))!important;gap:14px!important;}
body.avdena-v7 .license-control,
body.avdena-v7 .v36-license-control,
body.avdena-v7 .v51-editor-row{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(180px,1fr))!important;gap:12px!important;}
body.avdena-v7 .license-status{align-items:center!important;}
body.avdena-v7 .license-status .badge{min-height:30px!important;}

body.avdena-v7 .v30-modal-location,
body.avdena-v7 .v44-location-user-pick,
body.avdena-v7 .v43-modal-user{border-radius:18px!important;border:1px solid rgba(125,176,230,.16)!important;background:rgba(7,18,33,.58)!important;}
body.avdena-v7 .v30-modal-location:hover,
body.avdena-v7 .v44-location-user-pick:hover,
body.avdena-v7 .v43-modal-user:hover{border-color:rgba(84,240,210,.40)!important;background:linear-gradient(135deg,rgba(84,240,210,.10),rgba(103,189,255,.08))!important;}
body.avdena-v7 .v30-modal-location.selected,
body.avdena-v7 .v43-modal-user.selected{border-color:rgba(84,240,210,.56)!important;box-shadow:0 0 0 1px rgba(84,240,210,.12),0 18px 38px rgba(0,0,0,.22)!important;}
body.avdena-v7 .v30-modal-logo,
body.avdena-v7 .v43-user-avatar{flex:0 0 auto!important;}

body.avdena-v7 .av-energy-tabs{display:flex!important;flex-wrap:wrap!important;gap:10px!important;}
body.avdena-v7 .av-energy-tabs button{flex:1 1 180px!important;text-align:center!important;justify-content:center!important;}
body.avdena-v7 .energy-modebar-v689{min-width:0!important;}
body.avdena-v7 .energy-mode-actions-v689{display:flex!important;flex-wrap:wrap!important;gap:10px!important;}
body.avdena-v7 .energy-mode-actions-v689 button{flex:1 1 170px!important;justify-content:center!important;}
body.avdena-v7 .energy-profile-hint-v6819,
body.avdena-v7 .energy-test-result{border-radius:18px!important;border:1px solid rgba(103,189,255,.18)!important;background:rgba(103,189,255,.07)!important;color:#d8edff!important;}
body.avdena-v7 .energy-device-row{align-items:center!important;}
body.avdena-v7 .energy-device-metrics{display:grid!important;gap:10px!important;}
body.avdena-v7 .energy-device-metrics>div{min-width:0!important;border-radius:14px!important;background:rgba(255,255,255,.035)!important;border:1px solid rgba(125,176,230,.10)!important;}
body.avdena-v7 .energy-row-actions button{justify-content:center!important;}
body.avdena-v7 .status-pill{border-radius:999px!important;white-space:nowrap!important;}

@media(max-width:980px){
  body.avdena-v7 .dashboard{grid-template-columns:1fr!important;}
  body.avdena-v7 .sidebar{position:relative!important;height:auto!important;}
  body.avdena-v7 .nav{grid-template-columns:repeat(auto-fit,minmax(160px,1fr))!important;}
  body.avdena-v7 .topbar{display:grid!important;grid-template-columns:1fr!important;}
  body.avdena-v7 .toolbar{justify-content:flex-start!important;}
  body.avdena-v7 .cards,
  body.avdena-v7 .loc-kpi-grid,
  body.avdena-v7 .ops2-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}
@media(max-width:720px){
  body.avdena-v7 .auth-card{padding:22px!important;border-radius:22px!important;}
  body.avdena-v7 .auth-card h2,
  body.avdena-v7 .page-title h1{font-size:clamp(30px,10vw,36px)!important;}
  body.avdena-v7 .content{padding:14px!important;}
  body.avdena-v7 .cards,
  body.avdena-v7 .loc-kpi-grid,
  body.avdena-v7 .ops2-summary,
  body.avdena-v7 .license-grid,
  body.avdena-v7 .v54-create-license-grid{grid-template-columns:1fr!important;}
  body.avdena-v7 .nav{grid-template-columns:1fr!important;}
  body.avdena-v7 .toolbar,
  body.avdena-v7 .actions{display:grid!important;grid-template-columns:1fr!important;width:100%!important;}
  body.avdena-v7 .toolbar>*,
  body.avdena-v7 .actions>*{width:100%!important;max-width:none!important;}
  body.avdena-v7 .password-wrap input{padding-right:92px!important;}
  body.avdena-v7 .show-pass{min-width:76px!important;padding:0 10px!important;}
  body.avdena-v7 .av-energy-tabs button,
  body.avdena-v7 .energy-mode-actions-v689 button{flex-basis:100%!important;}
  body.avdena-v7 .energy-device-metrics{grid-template-columns:1fr!important;}
  body.avdena-v7 .energy-row-actions{grid-template-columns:1fr!important;}
  body.avdena-v7 .license-control,
  body.avdena-v7 .v36-license-control,
  body.avdena-v7 .v51-editor-row{grid-template-columns:1fr!important;}
}

/* v7.1.1 energy device form dropdown and alignment fix */
body.avdena-v7 .energy-builder-form .energy-form-section-v685,
body.avdena-v7 .energy-builder-form .energy-dynamic-section-v685{overflow:visible!important;}
body.avdena-v7 .energy-builder-form .energy-section-head-v685{margin-bottom:24px!important;}
body.avdena-v7 .energy-builder-form .energy-step-grid,
body.avdena-v7 .energy-builder-form .energy-dynamic-grid{align-items:start!important;row-gap:24px!important;}
body.avdena-v7 .energy-builder-form .energy-profile-hint-v6819{margin:18px 0 26px!important;}
body.avdena-v7 .energy-builder-form .energy-step-grid label,
body.avdena-v7 .energy-builder-form .energy-dynamic-grid label{position:relative!important;display:grid!important;align-content:start!important;gap:10px!important;}
body.avdena-v7 .energy-builder-form .energy-step-grid label>small,
body.avdena-v7 .energy-builder-form .energy-dynamic-grid label>small{position:relative!important;z-index:2!important;margin:0!important;line-height:1.25!important;}
body.avdena-v7 .energy-builder-form select.av-ui-select-v7,
body.avdena-v7 .energy-builder-form select{
  cursor:pointer!important;
  pointer-events:auto!important;
  position:relative!important;
  z-index:1!important;
  min-height:70px!important;
  padding-right:56px!important;
  background-position:right 24px center!important;
}
body.avdena-v7 .energy-builder-form input.av-ui-control-v7,
body.avdena-v7 .energy-builder-form textarea.av-ui-control-v7{min-height:70px!important;}
body.avdena-v7 .energy-location-field{position:relative!important;z-index:20!important;}
body.avdena-v7 .energy-location-combobox{
  grid-template-columns:minmax(0,1fr) 82px!important;
  min-height:70px!important;
  isolation:isolate!important;
  overflow:visible!important;
}
body.avdena-v7 .energy-location-combobox>input{
  min-height:68px!important;
  z-index:1!important;
  padding-right:16px!important;
}
body.avdena-v7 .energy-location-combobox>button,
body.avdena-v7 .energy-combobox-toggle-v6820{
  position:relative!important;
  z-index:5!important;
  width:82px!important;
  min-width:82px!important;
  min-height:68px!important;
  cursor:pointer!important;
  pointer-events:auto!important;
  color:transparent!important;
}
body.avdena-v7 .energy-location-combobox>button:before,
body.avdena-v7 .energy-combobox-toggle-v6820:before{
  content:""!important;
  position:absolute!important;
  inset:0!important;
  z-index:1!important;
}
body.avdena-v7 .energy-location-combobox>button .energy-caret-v6820,
body.avdena-v7 .energy-location-combobox>button .av-caret-v7{
  position:relative!important;
  z-index:2!important;
  pointer-events:none!important;
}
body.avdena-v7 .energy-location-menu{
  z-index:500!important;
  left:0!important;
  right:0!important;
  min-width:100%!important;
}
body.avdena-v7 .energy-location-menu.hidden{display:none!important;}
body.avdena-v7 .energy-location-menu:not(.hidden){display:block!important;}
body.avdena-v7 .energy-device-info-section-v6819{z-index:30!important;}
body.avdena-v7 .energy-dynamic-fields{position:relative!important;z-index:1!important;}

@media(max-width:720px){
  body.avdena-v7 .energy-builder-form select.av-ui-select-v7,
  body.avdena-v7 .energy-builder-form select,
  body.avdena-v7 .energy-builder-form input.av-ui-control-v7{min-height:58px!important;}
  body.avdena-v7 .energy-location-combobox{grid-template-columns:minmax(0,1fr) 60px!important;min-height:58px!important;}
  body.avdena-v7 .energy-location-combobox>input,
  body.avdena-v7 .energy-location-combobox>button,
  body.avdena-v7 .energy-combobox-toggle-v6820{min-height:56px!important;}
  body.avdena-v7 .energy-location-combobox>button,
  body.avdena-v7 .energy-combobox-toggle-v6820{width:60px!important;min-width:60px!important;}
}
