/* home, dashboard, tables, wizard, flyouts */

/* ---------- portal home ---------- */
.home-wrap { padding: 22px 26px 60px; max-width: 1180px; margin: 0 auto; }
.home-hello { font-size: 24px; font-weight: 600; margin: 6px 0 18px; display:flex; align-items:baseline; gap:10px; flex-wrap: wrap;}
.home-hello .sub { font-size: 13px; font-weight: 400; color: var(--az-text-2); }
.home-section { margin-bottom: 30px; }
.home-section h3 { font-size: 15px; font-weight: 600; margin: 0 0 4px; display: flex; align-items: center; gap: 8px; }
.home-section .hs-link { font-size: 12px; font-weight: 400; }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px; margin-top: 8px; }
.svc-tile {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 2px;
  border: 0; background: transparent; cursor: pointer; font-family: var(--font); font-size: 13px;
  color: var(--az-text); text-align: left;
}
.svc-tile:hover { background: var(--az-surface); box-shadow: var(--az-shadow-sm); text-decoration: none; }
.svc-tile:focus-visible { outline: 2px solid var(--az-blue); }
.svc-tile .svc-icon { width: 30px; height: 30px; flex: none; display: inline-flex; }
.svc-tile .svc-name { line-height: 1.2; }
.home-cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 34px; margin-top: 6px; }
@media (max-width: 900px) { .home-cols { grid-template-columns: 1fr; } }
.home-recent-row {
  display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 2px;
  cursor: pointer; border: 0; background: none; width: 100%; text-align: left;
  font-family: var(--font); font-size: 13px; color: var(--az-text);
}
.home-recent-row:hover { background: var(--az-surface); box-shadow: var(--az-shadow-sm); }
.home-recent-row .rr-icon { width: 22px; height: 22px; flex: none; display: inline-flex; }
.home-recent-row .rr-name { font-weight: 600; }
.home-recent-row .rr-type { color: var(--az-text-2); font-size: 12px; }
.home-recent-row .rr-when { margin-left: auto; color: var(--az-text-3); font-size: 11px; flex: none; }
.tools-list { display: flex; flex-direction: column; }
.tool-row {
  display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 2px;
  color: var(--az-text); cursor: pointer; border: 0; background: none; width: 100%;
  font-family: var(--font); font-size: 13px; text-align: left;
}
.tool-row:hover { background: var(--az-surface); box-shadow: var(--az-shadow-sm); }
.tool-row .tool-icon { width: 20px; height: 20px; color: var(--az-blue); display: inline-flex; flex: none; }
.tool-row .tool-sub { color: var(--az-text-3); font-size: 11px; margin-left: auto; flex: none; }

/* ---------- dashboard ---------- */
.dash-wrap { position: relative; height: 100%; overflow: auto; background: var(--az-bg); }
.dash-head {
  display: flex; align-items: center; gap: 8px; padding: 10px 18px 8px; position: sticky; top: 0;
  background: var(--az-bg); z-index: 50;
}
.dash-head h2 { font-size: 18px; font-weight: 600; margin: 0; display: flex; align-items: center; gap: 8px; }
.dash-head .chev-btn { border: 0; background: none; cursor: pointer; color: var(--az-text-2); padding: 3px; display: inline-flex; border-radius: 2px; }
.dash-head .chev-btn:hover { background: var(--az-border); }
.dash-toolbar { display: flex; align-items: center; gap: 6px; padding: 0 18px 10px; position: sticky; top: 37px; background: var(--az-bg); z-index: 50; flex-wrap: wrap; }
.dash-canvas { position: relative; margin: 4px 18px 80px; min-height: 480px; }
.tile {
  position: absolute; background: var(--az-surface); border-radius: 2px;
  box-shadow: var(--az-shadow-sm); border: 1px solid var(--az-border);
  overflow: hidden; display: flex; flex-direction: column;
  transition: box-shadow .1s ease;
}
.tile:hover { box-shadow: var(--az-shadow-md); }
.tile .tile-title {
  flex: none; font-size: 11px; font-weight: 600; color: var(--az-text-2);
  padding: 6px 10px 4px; display: flex; align-items: center; gap: 6px; text-transform: none;
}
.tile .tile-content { flex: 1; overflow: auto; padding: 2px 10px 8px; font-size: 12.5px; }
.tile .t-row { display: flex; align-items: center; gap: 7px; padding: 3px 0; cursor: pointer; border-radius: 2px; }
.tile .t-row:hover .t-row-name { color: var(--az-blue); text-decoration: underline; }
.tile .t-row .t-ic { width: 16px; height: 16px; flex: none; display: inline-flex; }
.tile .t-row-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile.editing { cursor: move; border: 1px dashed var(--az-blue); }
.tile.dragging { opacity: .75; z-index: 80; box-shadow: var(--az-shadow-lg); cursor: grabbing; }
.tile .tile-ctx { position: absolute; top: 2px; right: 2px; opacity: 0; }
.tile:hover .tile-ctx, .tile.editing .tile-ctx { opacity: 1; }
.tile .tile-ctx button {
  width: 24px; height: 24px; border: 0; border-radius: 2px; background: var(--az-surface);
  color: var(--az-text-2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.tile .tile-ctx button:hover { background: var(--az-hover); color: var(--az-text); }
.tile .resize-handle {
  position: absolute; right: 0; bottom: 0; width: 16px; height: 16px; cursor: nwse-resize;
  display: none; z-index: 5;
}
.tile.editing .resize-handle { display: block; }
.tile .resize-handle svg { color: var(--az-text-3); }
.dash-drop-hint { position: absolute; border: 2px dashed var(--az-blue); background: var(--az-blue-light); border-radius: 2px; opacity: .7; pointer-events: none; display: none; }
.tile-big-count { font-size: 30px; font-weight: 300; color: var(--az-text); line-height: 1.1; margin-top: 6px; }
.tile-count-sub { color: var(--az-text-2); font-size: 11px; }
.tile-hero { display: flex; align-items: center; justify-content: center; height: 100%; flex-direction: column; gap: 6px; cursor: pointer; }
.tile-hero .th-ic { width: 40px; height: 40px; display: inline-flex; }
.tile-hero .th-name { font-weight: 600; font-size: 13px; }
.tile-hero .th-sub { font-size: 11px; color: var(--az-text-2); }
.ctx-menu {
  position: fixed; z-index: 1300; background: var(--az-surface); border: 1px solid var(--az-border);
  box-shadow: var(--az-shadow-md); border-radius: 2px; min-width: 180px; padding: 3px 0;
  animation: pop-in .08s ease-out;
}
.ctx-menu .cm-item {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 12px;
  border: 0; background: none; cursor: pointer; font: inherit; font-size: 12.5px; color: var(--az-text); text-align: left;
}
.ctx-menu .cm-item:hover { background: var(--az-blue-light); }
.ctx-menu .cm-item.danger { color: var(--az-red); }
.ctx-menu .cm-sep { height: 1px; background: var(--az-border); margin: 3px 0; }
.ctx-menu .cm-head { padding: 5px 12px 3px; font-size: 11px; color: var(--az-text-3); font-weight: 600; }

/* ---------- data tables ---------- */
.tbl-toolbar { display: flex; align-items: center; gap: 8px; padding: 10px 0 8px; flex-wrap: wrap; }
.tbl-toolbar .tt-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px;
  background: none; border: 0; cursor: pointer; color: var(--az-blue); font-family: var(--font);
  font-size: 13px; border-radius: 2px; white-space: nowrap;
}
.tbl-toolbar .tt-btn:hover:not(:disabled) { background: var(--az-blue-light); }
.tbl-toolbar .tt-btn:disabled { color: var(--az-text-3); cursor: default; }
.tbl-toolbar .tt-sep { width: 1px; height: 18px; background: var(--az-border-strong); }
.tbl-filter-box { position: relative; display: inline-flex; align-items: center; }
.tbl-filter-box input { width: 200px; padding-left: 26px; height: 24px; font-size: 12.5px; }
.tbl-filter-box .icon { position: absolute; left: 6px; color: var(--az-text-2); }
.tbl-wrap { border: 1px solid var(--az-border); border-radius: 2px; overflow: hidden; background: var(--az-surface); }
table.grid { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.grid thead th {
  text-align: left; font-weight: 600; padding: 7px 10px; border-bottom: 1px solid var(--az-border-strong);
  background: var(--az-surface); white-space: nowrap; cursor: pointer; user-select: none; position: sticky; top: 0; z-index: 2;
}
table.grid thead th:hover { background: var(--az-hover); }
table.grid thead th .th-sort { margin-left: 4px; color: var(--az-blue); font-size: 10px; }
table.grid tbody td { padding: 7px 12px; border-bottom: 1px solid var(--az-border); vertical-align: middle; white-space: nowrap; }
table.grid tbody tr:hover { background: var(--az-blue-light); }
table.grid tbody tr.selected { background: var(--az-blue-lighter); }
table.grid tbody tr { cursor: default; }
table.grid .cell-link { color: var(--az-blue); cursor: pointer; font-weight: 400; }
table.grid .cell-link:hover { text-decoration: underline; }
table.grid .cell-type { display: inline-flex; align-items: center; gap: 6px; }
table.grid .cell-type .t-ic { width: 16px; height: 16px; display: inline-flex; flex: none; }
table.grid .grp-row td {
  background: var(--az-surface-2); font-weight: 600; cursor: pointer; padding: 6px 10px;
  border-bottom: 1px solid var(--az-border-strong);
}
table.grid td .icon-btn-inline { visibility: hidden; }
table.grid tr:hover td .icon-btn-inline { visibility: visible; }
.tbl-empty { padding: 30px; text-align: center; color: var(--az-text-2); }
.tbl-foot { padding: 6px 10px; font-size: 11.5px; color: var(--az-text-2); border-top: 1px solid var(--az-border); display: flex; align-items: center; gap: 12px; background: var(--az-surface-2); }
.colgroup-menu, .dd-filter-menu {
  position: fixed; z-index: 1300; background: var(--az-surface); border: 1px solid var(--az-border);
  box-shadow: var(--az-shadow-md); border-radius: 2px; min-width: 190px; max-height: 320px; overflow-y: auto; padding: 4px 0;
}
.dd-filter-menu .df-item { display: flex; align-items: center; gap: 8px; padding: 5px 12px; font-size: 12.5px; cursor: pointer; }
.dd-filter-menu .df-item:hover { background: var(--az-blue-light); }

/* ---------- wizard ---------- */
.wiz-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--az-border-strong); margin: 4px 0 18px; overflow-x: auto; flex-wrap: nowrap; }
.wiz-tab {
  border: 0; background: none; padding: 9px 14px; cursor: pointer; font-family: var(--font);
  font-size: 13px; color: var(--az-text-2); border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px;
  display: inline-flex; align-items: center; gap: 6px;
}
.wiz-tab .wt-num {
  width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--az-text-3); color: var(--az-text-3);
  display: inline-flex; align-items: center; justify-content: center; font-size: 10px;
}
.wiz-tab.active { color: var(--az-blue); border-bottom-color: var(--az-blue); font-weight: 600; }
.wiz-tab.done .wt-num { background: var(--az-green); border-color: var(--az-green); color: #fff; }
.wiz-tab:disabled { cursor: default; }
.wiz-tab:not(.active):hover { background: var(--az-hover); }
.form-row { margin-bottom: 16px; max-width: 460px; }
.form-row label.flabel { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 4px; }
.form-row label.flabel .req { color: var(--az-red); margin-left: 2px; }
.form-row label.flabel .opt { color: var(--az-text-3); font-weight: 400; font-size: 11px; }
.form-row input[type="text"], .form-row input[type="password"], .form-row select { width: 100%; height: 28px; }
.form-row input[type="radio"] { margin-right: 6px; }
.form-row .fhelp { font-size: 11.5px; color: var(--az-text-2); margin-top: 3px; }
.form-row .ferr { font-size: 11.5px; color: var(--az-red); margin-top: 3px; display: flex; align-items: center; gap: 4px; }
.form-row input.invalid, .form-row select.invalid { border-color: var(--az-red); box-shadow: 0 0 0 1px var(--az-red); }
.form-row .inline-check { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
.radio-stack { display: flex; flex-direction: column; gap: 5px; padding-top: 3px; }
.radio-stack label { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.radio-cards { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-card {
  border: 1px solid var(--az-border-strong); border-radius: 2px; padding: 10px 12px; cursor: pointer;
  flex: 1; min-width: 130px; background: var(--az-surface); position: relative;
}
.radio-card:hover { background: var(--az-hover); }
.radio-card.selected { border-color: var(--az-blue); box-shadow: 0 0 0 1px var(--az-blue); background: var(--az-blue-light); }
.radio-card .rc-title { font-weight: 600; font-size: 12.5px; }
.radio-card .rc-sub { color: var(--az-text-2); font-size: 11.5px; margin-top: 2px; }
.wiz-review-block { border: 1px solid var(--az-border); border-radius: 2px; margin-bottom: 14px; }
.wiz-review-block .wrb-head { padding: 9px 14px; font-weight: 600; border-bottom: 1px solid var(--az-border); background: var(--az-surface-2); font-size: 13px; }
.wiz-review-block .kv { padding: 10px 14px; }
.wiz-foot { display: flex; gap: 8px; padding-top: 10px; border-top: 1px solid var(--az-border); margin-top: 8px; position: sticky; bottom: 0; background: var(--az-surface); padding-bottom: 6px; }
.validation-pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--az-green); font-weight: 600;
}
.validation-pill.err { color: var(--az-red); }

/* deployment progress blade */
.deploy-status-hero { display: flex; flex-direction: column; align-items: center; padding: 26px 0 18px; gap: 10px; text-align: center; }
.deploy-status-hero .ds-msg { font-size: 14px; font-weight: 600; }
.deploy-status-hero .ds-sub { color: var(--az-text-2); font-size: 12.5px; }
.progress-track { width: 100%; height: 4px; background: var(--az-border); border-radius: 2px; overflow: hidden; margin: 4px 0 2px; }
.progress-track .progress-fill { height: 100%; background: var(--az-blue); transition: width .5s ease; }
.progress-track.done .progress-fill { background: var(--az-green); }
.deploy-steps { margin-top: 8px; }
.deploy-step { display: flex; align-items: center; gap: 9px; padding: 6px 0; font-size: 12.5px; }
.deploy-step .dstep-ic { width: 18px; display: inline-flex; justify-content: center; flex: none; }
.deploy-step .dstep-time { margin-left: auto; color: var(--az-text-3); font-size: 11px; flex: none; }

/* ---------- flyout specifics ---------- */
#fly-search { left: 50%; transform: translateX(-50%); width: 560px; max-width: calc(100vw - 24px); }
#fly-search .s-input-row { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--az-border); }
#fly-search .s-input-row input { flex: 1; border: 0; outline: none; font-size: 14px; background: transparent; color: var(--az-text); padding: 4px 0; }
#fly-search .s-results { overflow-y: auto; max-height: 62vh; padding: 4px 0; }
#fly-search .s-group { padding: 8px 16px 2px; font-size: 11px; font-weight: 600; color: var(--az-text-3); text-transform: uppercase; letter-spacing: .5px; }
#fly-search .s-item {
  display: flex; align-items: center; gap: 10px; padding: 6px 16px; cursor: pointer; border: 0;
  background: none; width: 100%; text-align: left; font: inherit; color: var(--az-text);
}
#fly-search .s-item:hover, #fly-search .s-item.cursor { background: var(--az-blue-light); }
#fly-search .s-item .si-ic { width: 20px; height: 20px; flex: none; display: inline-flex; }
#fly-search .s-item .si-main { min-width: 0; }
#fly-search .s-item .si-name { font-size: 13px; }
#fly-search .s-item .si-sub { font-size: 11px; color: var(--az-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#fly-search .s-foot { border-top: 1px solid var(--az-border); padding: 7px 16px; font-size: 11px; color: var(--az-text-3); display: flex; gap: 16px; }
#fly-search .s-foot kbd { background: var(--az-surface-2); border: 1px solid var(--az-border-strong); border-radius: 2px; padding: 0 4px; font-size: 10px; font-family: inherit; }

#fly-bell { right: 0; width: 400px; max-width: 100vw; height: calc(100vh - var(--topbar-h)); max-height: none; border-radius: 0; }
.notif-item { display: flex; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--az-border); cursor: pointer; }
.notif-item:hover { background: var(--az-hover); }
.notif-item .n-ic { flex: none; margin-top: 2px; width: 18px; display: inline-flex; justify-content: center; }
.notif-item .n-body { flex: 1; min-width: 0; }
.notif-item .n-title { font-size: 12.5px; font-weight: 600; }
.notif-item .n-msg { font-size: 12px; color: var(--az-text-2); margin-top: 1px; overflow-wrap: anywhere; }
.notif-item .n-time { font-size: 10.5px; color: var(--az-text-3); margin-top: 3px; }
.notif-item .progress-track { margin-top: 7px; }
.notif-item.unread { background: var(--az-blue-light); }
.notif-item.unread:hover { background: var(--az-blue-lighter); }

#fly-account { right: 4px; width: 320px; }
.acct-card { padding: 14px; border-bottom: 1px solid var(--az-border); display: flex; gap: 10px; align-items: center; }
.acct-card .avatar-lg { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg,#0078d4,#004e8c); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; }
.acct-card .ac-id { font-size: 11px; color: var(--az-text-3); overflow-wrap: anywhere; }

#fly-help { right: 4px; width: 340px; }
#fly-help .help-q { padding: 10px 14px; border-bottom: 1px solid var(--az-border); }
#fly-help .help-q input { width: 100%; }

/* directory switcher */
.dir-switch-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 2px; cursor: pointer; border: 1px solid transparent; }
.dir-switch-row:hover { background: var(--az-hover); }
.dir-switch-row.current { border-color: var(--az-blue); background: var(--az-blue-light); }
.dir-switch-row .ds-main { flex: 1; min-width: 0; }
.dir-switch-row .ds-name { font-weight: 600; font-size: 13px; }
.dir-switch-row .ds-id { font-size: 11px; color: var(--az-text-3); }
.sub-check-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; font-size: 13px; cursor: pointer; border-radius: 2px; }
.sub-check-row:hover { background: var(--az-hover); }
.sub-check-row .sc-sub { flex: 1; }
.sub-check-row .sc-cost { font-size: 11px; color: var(--az-text-3); }

/* cloud shell */
#cloud-shell {
  position: fixed; left: 0; right: 0; bottom: 0; height: 260px; z-index: 1000;
  background: #1e1e1e; border-top: 1px solid #000; display: none; flex-direction: column;
  box-shadow: 0 -4px 12px rgba(0,0,0,.3);
}
#cloud-shell.open { display: flex; animation: shell-up .18s ease-out; }
@keyframes shell-up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
#cloud-shell .cs-head {
  display: flex; align-items: center; gap: 8px; background: #2d2d30; color: #e8e8e8;
  padding: 4px 10px; font-size: 12px; flex: none;
}
#cloud-shell .cs-head .cs-title { font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
#cloud-shell .cs-head .cs-env { color: #9d9d9d; font-size: 11px; }
#cloud-shell .cs-body {
  flex: 1; overflow-y: auto; padding: 8px 12px; font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 12px; color: #d4d4d4; line-height: 1.55;
}
#cloud-shell .cs-line { white-space: pre-wrap; overflow-wrap: anywhere; }
#cloud-shell .cs-prompt { color: #4ec9b0; }
#cloud-shell .cs-input-row { display: flex; gap: 0; }
#cloud-shell input.cs-input {
  flex: 1; background: transparent; border: 0; outline: none; color: #d4d4d4;
  font-family: inherit; font-size: inherit; padding: 0; height: auto; box-shadow: none;
}
#cloud-shell .cs-ok { color: #6a9955; }
#cloud-shell .cs-err { color: #f48771; }
#cloud-shell .cs-accent { color: #569cd6; }

/* icons */
.svc-icon svg, .rr-icon svg, .t-ic svg, .si-ic svg, .tool-icon svg, .th-ic svg, .mi-icon svg { width: 100%; height: 100%; }
.mi-icon svg { width: 18px; height: 18px; }
.svc-icon svg { width: 30px; height: 30px; }
.icon svg { width: 14px; height: 14px; }

/* settings rows */
.set-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--az-border); }
.set-row .set-main { flex: 1; }
.set-row .set-label { font-weight: 600; font-size: 13px; }
.set-row .set-help { font-size: 11.5px; color: var(--az-text-2); margin-top: 1px; }

/* focus visibility default */
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible, [tabindex]:focus-visible {
  outline-color: var(--az-blue);
}
