/* FuntikCloud Admin — Stage 2 / core working pages
   Scope: dashboard, users, services, invoices. Requires no JS bundle rebuild. */

/* Shared page rhythm */
.fca-shell.is-admin-dashboard .fca-main,
.fca-shell.is-admin-users-index .fca-main,
.fca-shell.is-admin-users-detail .fca-main,
.fca-shell.is-admin-services-index .fca-main,
.fca-shell.is-admin-services-detail .fca-main,
.fca-shell.is-admin-invoices-index .fca-main{max-width:1580px}

.fca-shell.is-admin-users-index .fca-page-head,
.fca-shell.is-admin-services-index .fca-page-head,
.fca-shell.is-admin-invoices-index .fca-page-head{margin-bottom:20px}

/* Dashboard: hierarchy first, fewer tiny technical boxes */
.fca-shell.is-admin-dashboard .fca2-commandbar{
  min-height:72px;margin-bottom:16px;padding:14px 16px;
  border:1px solid var(--fca-line)!important;border-radius:12px;
  background:var(--fca-surface-1)!important
}
.fca-shell.is-admin-dashboard .fca2-command-state{gap:13px}
.fca-shell.is-admin-dashboard .fca2-command-state small{font-size:9.5px;color:var(--fca-text-4)!important}
.fca-shell.is-admin-dashboard .fca2-command-state strong{margin-top:3px;font-size:14px;font-weight:720;color:var(--fca-text)!important}
.fca-shell.is-admin-dashboard .fca2-health-dot{width:10px;height:10px}
.fca-shell.is-admin-dashboard .fca2-command-actions{gap:7px;flex-wrap:wrap}
.fca-shell.is-admin-dashboard .fca2-command-actions a{
  height:38px;padding:0 11px;border-color:var(--fca-line)!important;border-radius:8px;
  background:var(--fca-surface-2)!important;color:var(--fca-text-2)!important;font-size:11px;font-weight:680
}
.fca-shell.is-admin-dashboard .fca2-command-actions a:hover{background:var(--fca-surface-3)!important;color:var(--fca-text)!important;border-color:var(--fca-line-strong)!important}
.fca-shell.is-admin-dashboard .fca2-metrics{gap:11px;margin-bottom:16px}
.fca-shell.is-admin-dashboard .fca2-metric{
  min-height:100px;padding:16px;border-color:var(--fca-line)!important;border-radius:11px;
  background:var(--fca-surface-1)!important
}
.fca-shell.is-admin-dashboard .fca2-metric>span{font-size:9.5px;color:var(--fca-text-4)!important}
.fca-shell.is-admin-dashboard .fca2-metric>strong{margin-top:8px;font-size:24px;line-height:1;font-weight:760;color:var(--fca-text)!important}
.fca-shell.is-admin-dashboard .fca2-metric>small{margin-top:7px;font-size:10px;color:var(--fca-text-3)!important}
.fca-shell.is-admin-dashboard .fca2-grid-main,
.fca-shell.is-admin-dashboard .fca2-grid-secondary{gap:16px;margin-bottom:16px}
.fca-shell.is-admin-dashboard .fca2-node-row{
  min-height:68px;padding:11px 15px;gap:15px;border-bottom-color:var(--fca-line)!important
}
.fca-shell.is-admin-dashboard .fca2-node-row:hover{background:var(--fca-surface-2)!important}
.fca-shell.is-admin-dashboard .fca2-node-name strong{font-size:12.5px;color:var(--fca-text)!important}
.fca-shell.is-admin-dashboard .fca2-node-name small{margin-top:4px;font-size:10px;color:var(--fca-text-4)!important}
.fca-shell.is-admin-dashboard .fca2-node-meter span{font-size:9px;color:var(--fca-text-4)!important}
.fca-shell.is-admin-dashboard .fca2-node-meter b{font-size:10.5px;color:var(--fca-text-2)!important}
.fca-shell.is-admin-dashboard .fca2-node-meter>i{height:4px;background:var(--fca-surface-4)!important}
.fca-shell.is-admin-dashboard .fca2-simple-list>a{min-height:66px;padding:11px 15px;border-bottom-color:var(--fca-line)!important}
.fca-shell.is-admin-dashboard .fca2-simple-list>a:hover{background:var(--fca-surface-2)!important}
.fca-shell.is-admin-dashboard .fca2-simple-list strong{font-size:12px;color:var(--fca-text)!important}
.fca-shell.is-admin-dashboard .fca2-simple-list small{margin-top:4px;font-size:10px;color:var(--fca-text-4)!important}

/* Users index: identity is the primary object */
.fca-shell.is-admin-users-index .fca-toolbar{
  display:grid;grid-template-columns:minmax(320px,1fr) auto auto auto;align-items:center;
  padding:10px 11px;margin-bottom:14px
}
.fca-shell.is-admin-users-index .fca-search{min-width:0}
.fca-shell.is-admin-users-index .fca-toolbar-meta{margin-left:0;justify-self:end;white-space:nowrap}
.fca-shell.is-admin-users-index .fca-table-card{overflow:hidden}
.fca-shell.is-admin-users-index .fca-table{min-width:860px;table-layout:fixed}
.fca-shell.is-admin-users-index .fca-table th:nth-child(1){width:42%}
.fca-shell.is-admin-users-index .fca-table th:nth-child(2){width:18%}
.fca-shell.is-admin-users-index .fca-table th:nth-child(3){width:16%}
.fca-shell.is-admin-users-index .fca-table th:nth-child(4){width:14%}
.fca-shell.is-admin-users-index .fca-table th:nth-child(5){width:90px}
.fca-shell.is-admin-users-index .fca-table td{padding-top:15px;padding-bottom:15px}
.fca-shell.is-admin-users-index .fca-user-cell{gap:12px;min-width:0}
.fca-shell.is-admin-users-index .fca-avatar-sm{
  width:40px;height:40px;flex-basis:40px;border-radius:10px;
  background:var(--fca-surface-3)!important;color:var(--fca-text-2)!important;font-size:12px;font-weight:780
}
.fca-shell.is-admin-users-index .fca-user-cell strong{font-size:13.5px!important;font-weight:730}
.fca-shell.is-admin-users-index .fca-user-cell small{margin-top:2px;font-size:10.5px!important;color:var(--fca-text-3)!important}
.fca-shell.is-admin-users-index .fca-table td:nth-child(3)>strong{font-size:13px;color:var(--fca-text)!important;font-weight:720}
.fca-shell.is-admin-users-index .fca-row-actions{justify-content:flex-end}
.fca-shell.is-admin-users-index .fca-row-actions .fca-icon-btn{opacity:.74}
.fca-shell.is-admin-users-index .fca-table tbody tr:hover .fca-row-actions .fca-icon-btn,
.fca-shell.is-admin-users-index .fca-row-actions .fca-icon-btn:focus-visible{opacity:1}

/* User detail: fewer nested rectangles, stronger information hierarchy */
.fca-shell.is-admin-users-detail .fca-stat-grid{margin-bottom:18px}
.fca-shell.is-admin-users-detail .fca-two-col{grid-template-columns:minmax(0,1.5fr) minmax(340px,.72fr);gap:18px}
.fca-shell.is-admin-users-detail .fca-kv-grid{gap:0 22px}
.fca-shell.is-admin-users-detail .fca-kv{
  min-height:66px;padding:11px 0;border:0!important;border-bottom:1px solid var(--fca-line)!important;
  border-radius:0!important;background:transparent!important
}
.fca-shell.is-admin-users-detail .fca-kv:nth-last-child(-n+2){border-bottom-color:transparent!important}
.fca-shell.is-admin-users-detail .fca-kv>span{font-size:9.5px;color:var(--fca-text-4)!important}
.fca-shell.is-admin-users-detail .fca-kv>strong{font-size:12px;font-weight:680}
.fca-shell.is-admin-users-detail .fca-list-row{min-height:68px;padding:12px 16px}
.fca-shell.is-admin-users-detail .fca-server-dot{width:36px;height:36px;flex-basis:36px;border-radius:9px}
.fca-shell.is-admin-users-detail .fca-list-main strong{font-size:12.5px}
.fca-shell.is-admin-users-detail .fca-list-main small{font-size:10px}
.fca-shell.is-admin-users-detail .fca-confirm-bar{border-radius:9px;padding:14px 15px}

/* Services index: service + owner + plan are the main scan path */
.fca-shell.is-admin-services-index .fca-toolbar{
  display:grid;grid-template-columns:minmax(300px,1.4fr) minmax(155px,.45fr) minmax(145px,.4fr) auto auto;
  align-items:center;padding:10px 11px;margin-bottom:14px
}
.fca-shell.is-admin-services-index .fca-toolbar-meta{margin-left:0;justify-self:end;white-space:nowrap}
.fca-shell.is-admin-services-index .fca-table-card{overflow:hidden}
.fca-shell.is-admin-services-index .fca-table{min-width:1120px;table-layout:fixed}
.fca-shell.is-admin-services-index .fca-table th:nth-child(1){width:44px}
.fca-shell.is-admin-services-index .fca-table th:nth-child(2){width:20%}
.fca-shell.is-admin-services-index .fca-table th:nth-child(3){width:20%}
.fca-shell.is-admin-services-index .fca-table th:nth-child(4){width:18%}
.fca-shell.is-admin-services-index .fca-table th:nth-child(5){width:12%}
.fca-shell.is-admin-services-index .fca-table th:nth-child(6){width:12%}
.fca-shell.is-admin-services-index .fca-table th:nth-child(7){width:11%}
.fca-shell.is-admin-services-index .fca-table th:nth-child(8){width:92px}
.fca-shell.is-admin-services-index .fca-table td{padding-top:14px;padding-bottom:14px}
.fca-shell.is-admin-services-index .fca-primary-link strong{font-size:12.5px!important;font-weight:720}
.fca-shell.is-admin-services-index .fca-primary-link small{margin-top:3px;font-size:10px!important;color:var(--fca-text-4)!important;font-weight:550!important;letter-spacing:0!important}
.fca-shell.is-admin-services-index .fca-table td:nth-child(6)>strong{font-size:12px;color:var(--fca-text)!important}

/* Service detail: one outer panel = one section; internal data uses separators, not boxes */
.fca-shell.is-admin-services-detail .fca-two-col-wide{grid-template-columns:minmax(0,1.42fr) minmax(350px,.68fr);gap:18px}
.fca-shell.is-admin-services-detail .fca-kv-grid{gap:0 22px}
.fca-shell.is-admin-services-detail .fca-kv{
  min-height:64px;padding:10px 0;border:0!important;border-bottom:1px solid var(--fca-line)!important;
  border-radius:0!important;background:transparent!important
}
.fca-shell.is-admin-services-detail .fca-kv>span{font-size:9.5px;color:var(--fca-text-4)!important}
.fca-shell.is-admin-services-detail .fca-kv>strong{font-size:12px;font-weight:680}
.fca-shell.is-admin-services-detail .fca-service-state{
  padding:2px 0 16px;margin-bottom:5px;border:0!important;border-bottom:1px solid var(--fca-line)!important;
  border-radius:0!important;background:transparent!important
}
.fca-shell.is-admin-services-detail .fca-service-state>div:first-child>span{font-size:10.5px;color:var(--fca-text-3)!important}
.fca-shell.is-admin-services-detail .fca-server-summary{
  padding:13px 0 15px;margin-bottom:0;border:0!important;border-bottom:1px solid var(--fca-line)!important;
  border-radius:0!important;background:transparent!important
}
.fca-shell.is-admin-services-detail .fca-server-summary>div strong{font-size:13px}
.fca-shell.is-admin-services-detail .fca-server-summary>div small{font-size:10px;color:var(--fca-text-4)!important}
.fca-shell.is-admin-services-detail .fca-resource-grid{gap:0;margin-top:2px}
.fca-shell.is-admin-services-detail .fca-resource-grid>div{
  padding:14px 16px;border:0!important;border-left:1px solid var(--fca-line)!important;
  border-radius:0!important;background:transparent!important
}
.fca-shell.is-admin-services-detail .fca-resource-grid>div:first-child{border-left:0!important;padding-left:0}
.fca-shell.is-admin-services-detail .fca-resource-grid span{font-size:9px;color:var(--fca-text-4)!important}
.fca-shell.is-admin-services-detail .fca-resource-grid strong{font-size:12.5px}
.fca-shell.is-admin-services-detail .fca-action-form{gap:11px}
.fca-shell.is-admin-services-detail .fca-chip-row button{height:32px;padding:0 10px;font-size:10px;background:var(--fca-surface-2)!important}
.fca-shell.is-admin-services-detail .fca-link-block{display:block;margin-top:12px;padding-top:12px;border-top:1px solid var(--fca-line);font-size:11px}

/* Invoices: filters are one section, not a panel inside a panel */
.fca-shell.is-admin-invoices-index .fca-stat-grid{margin-bottom:16px}
.fca-shell.is-admin-invoices-index .fca-panel .fca-toolbar{
  min-height:0;margin:0;padding:0;border:0!important;border-radius:0!important;background:transparent!important
}
.fca-shell.is-admin-invoices-index .fca-panel .fca-toolbar .fca-search{min-width:280px}
.fca-shell.is-admin-invoices-index .fca-table{min-width:1080px;table-layout:fixed}
.fca-shell.is-admin-invoices-index .fca-table th:nth-child(1){width:42px}
.fca-shell.is-admin-invoices-index .fca-table th:nth-child(2){width:13%}
.fca-shell.is-admin-invoices-index .fca-table th:nth-child(3){width:22%}
.fca-shell.is-admin-invoices-index .fca-table th:nth-child(4){width:18%}
.fca-shell.is-admin-invoices-index .fca-table th:nth-child(5){width:13%}
.fca-shell.is-admin-invoices-index .fca-table th:nth-child(6){width:12%}
.fca-shell.is-admin-invoices-index .fca-table th:nth-child(7){width:12%}
.fca-shell.is-admin-invoices-index .fca-table th:nth-child(8){width:92px}
.fca-shell.is-admin-invoices-index .fca-table td{padding-top:14px;padding-bottom:14px}
.fca-shell.is-admin-invoices-index .fca-cell-main strong{font-size:12.5px!important}
.fca-shell.is-admin-invoices-index .fca-cell-main small{font-size:10px!important;color:var(--fca-text-4)!important;font-weight:550!important;letter-spacing:0!important}

/* Common list/detail readability */
.fca-shell.is-admin-users-detail .fca-panel-head,
.fca-shell.is-admin-services-detail .fca-panel-head{padding-top:17px;padding-bottom:17px}
.fca-shell.is-admin-users-detail .fca-panel-head h2,
.fca-shell.is-admin-services-detail .fca-panel-head h2{font-size:14.5px}

/* Responsive tables become readable entity cards below tablet size. */
@media(max-width:760px){
  .fca-shell.is-admin-users-index .fca-toolbar,
  .fca-shell.is-admin-services-index .fca-toolbar{grid-template-columns:1fr}
  .fca-shell.is-admin-users-index .fca-toolbar-meta,
  .fca-shell.is-admin-services-index .fca-toolbar-meta{justify-self:start}

  .fca-shell [data-fca-responsive-table="1"]{min-width:0!important;border-collapse:separate;border-spacing:0 10px}
  .fca-shell [data-fca-responsive-table="1"] thead{display:none}
  .fca-shell [data-fca-responsive-table="1"] tbody{display:grid;gap:10px;padding:10px}
  .fca-shell [data-fca-responsive-table="1"] tbody tr{
    display:grid;grid-template-columns:minmax(0,1fr) auto;gap:0 16px;
    padding:14px;border:1px solid var(--fca-line);border-radius:11px;background:var(--fca-surface-2)
  }
  .fca-shell [data-fca-responsive-table="1"] tbody td{
    display:grid;grid-template-columns:minmax(90px,.42fr) minmax(0,1fr);gap:10px;align-items:center;
    padding:9px 0!important;border-bottom:1px solid var(--fca-line)!important
  }
  .fca-shell [data-fca-responsive-table="1"] tbody td::before{
    content:attr(data-label);color:var(--fca-text-4);font-size:9px;font-weight:800;letter-spacing:.06em;text-transform:uppercase
  }
  .fca-shell [data-fca-responsive-table="1"] tbody td:first-child:not(.fca-col-check){grid-column:1/-1;display:block;padding-top:0!important}
  .fca-shell [data-fca-responsive-table="1"] tbody td:first-child:not(.fca-col-check)::before{display:none}
  .fca-shell [data-fca-responsive-table="1"] tbody td:last-child{border-bottom:0!important}
  .fca-shell [data-fca-responsive-table="1"] .fca-col-check{grid-column:2;grid-row:1;padding:0!important;border-bottom:0!important;display:block}
  .fca-shell [data-fca-responsive-table="1"] .fca-col-check::before{display:none}
  .fca-shell [data-fca-responsive-table="1"] .fca-col-action{grid-column:1/-1;display:flex;justify-content:flex-end;padding-bottom:0!important}
  .fca-shell [data-fca-responsive-table="1"] .fca-col-action::before{display:none}
  .fca-shell [data-fca-responsive-table="1"] .fca-row-actions,
  .fca-shell [data-fca-responsive-table="1"] .fca-table-actions{width:100%;justify-content:flex-end}
  .fca-shell.is-admin-users-detail .fca-two-col,
  .fca-shell.is-admin-services-detail .fca-two-col-wide{grid-template-columns:1fr}
  .fca-shell.is-admin-services-detail .fca-resource-grid{grid-template-columns:1fr 1fr}
  .fca-shell.is-admin-services-detail .fca-resource-grid>div:nth-child(3){border-left:0!important;padding-left:0}
}

@media(max-width:520px){
  .fca-shell.is-admin-dashboard .fca2-metrics{grid-template-columns:1fr 1fr}
  .fca-shell.is-admin-dashboard .fca2-command-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}
  .fca-shell.is-admin-dashboard .fca2-command-actions a{justify-content:center}
  .fca-shell.is-admin-services-detail .fca-resource-grid{grid-template-columns:1fr}
  .fca-shell.is-admin-services-detail .fca-resource-grid>div{border-left:0!important;border-top:1px solid var(--fca-line)!important;padding-left:0}
  .fca-shell.is-admin-services-detail .fca-resource-grid>div:first-child{border-top:0!important}
}
