/* Kompaktni karta domeny a moduly AdminAI.cloud */
.dm-enabled .domain-table{table-layout:fixed;width:100%}
.domain-table tr[hidden],.dm-drawer[hidden],.dm-stage[hidden],.dm-catalog[hidden],.dm-tiles [hidden],.dm-inline-panel [hidden],.dm-enabled [hidden]{display:none!important}
.dm-row>td{padding:9px 15px!important;border-bottom:1px solid var(--line)!important}
.dm-card{border:1px solid #e2e5ec;border-radius:17px;background:#fff;overflow:hidden}
.dm-header{width:100%;border:0;background:transparent;display:flex;align-items:center;justify-content:space-between;text-align:left;gap:10px;cursor:pointer;padding:14px 17px;min-height:67px;color:var(--text)}
.dm-header:hover,.dm-card.dm-expanded .dm-header{background:#f8f9fd}
.dm-heading{min-width:0;display:flex;flex-direction:column;gap:4px}
.dm-name{font-size:15px;letter-spacing:-.2px;overflow-wrap:anywhere}
.dm-heading-meta{font-size:10px;color:var(--muted);line-height:1.3}
.dm-header-right{display:flex;align-items:center;gap:12px;flex-shrink:0}
.dm-header-badge{font-size:10px;font-weight:800;color:#996725;background:#fff5e2;border-radius:999px;padding:6px 9px}
.dm-header-badge.ready{background:#edf9f3;color:#15845d}
.dm-chevron{font-size:25px;font-weight:400;transition:transform .2s;color:#757d8b}
.dm-expanded .dm-chevron{transform:rotate(180deg)}
.dm-drawer{padding:14px;border-top:1px solid var(--line)}
.dm-onboard{margin-bottom:12px;padding:14px 16px;border:1px solid #dfe5f1;border-radius:13px;background:#f8faff;display:flex;flex-direction:column;gap:5px}
.dm-onboard-heading{font-size:12px;font-weight:800;color:#354a84}
.dm-onboard-detail{font-size:11px;line-height:1.5;color:#626e83}
.dm-tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
.dm-tile{border:1px solid #e1e4ed;border-radius:14px;min-width:0;min-height:102px;display:flex;flex-direction:column;gap:7px;padding:12px;text-align:left;background:#fff;color:var(--text);cursor:pointer;transition:border-color .16s,background .16s,transform .16s}
.dm-tile:hover{border-color:#bfc5e5;transform:translateY(-1px)}
.dm-tile.dm-selected{border-color:var(--accent);background:#f5f5ff;box-shadow:0 0 0 1px rgba(91,92,226,.12)}
.dm-tile-top{display:flex;justify-content:space-between;align-items:center;gap:6px}
.dm-tile-icon{font-size:20px;line-height:1.3}
.dm-status-dot{height:9px;width:9px;border-radius:50%;background:#a0a7b2;flex-shrink:0}
.dm-status-dot.ok{background:#15966b}.dm-status-dot.missing{background:#27303b}.dm-status-dot.warn{background:#dc8e26}.dm-status-dot.error{background:var(--red)}
.dm-tile-title{font-size:11px;font-weight:800;line-height:1.35;overflow-wrap:anywhere}
.dm-tile-status{font-size:10px;color:#727b87;line-height:1.25}
.dm-stage{margin-top:14px;min-width:0;scroll-margin-top:72px}
.dm-animate{animation:dm-show .25s ease both}
@keyframes dm-show{from{opacity:0;transform:translateY(-7px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.dm-animate{animation:none}.dm-chevron,.dm-tile{transition:none}}
.dm-stage .panel{margin:0!important;box-shadow:none;border-radius:15px;max-width:100%;overflow:hidden}
.dm-stage .panel-head{padding:15px}
.dm-stage .tool-body,.dm-stage .backup-body{padding:14px}
.dm-stage .d-tpl-panel{margin:0;max-width:100%;overflow-wrap:anywhere}
.dm-tech-part{padding:14px;border-bottom:1px solid var(--line)}
.dm-tech-part:last-child{border-bottom:0}
.dm-technical{background:#fff;border:1px solid var(--line);border-radius:15px}
.dm-tech-part>strong{display:block;margin-bottom:8px;color:var(--muted);font-size:11px}
.dm-tech-value{display:flex;flex-wrap:wrap;gap:7px;align-items:center}
.dm-tech-value .ns-box{width:100%}
.dm-tech-value .ns-line{flex-wrap:wrap;overflow-wrap:anywhere}
.dm-tech-value .ns-line code{overflow-wrap:anywhere}
.dm-tech-value>div{max-width:100%}
.dm-filter-empty{padding:13px;color:var(--muted);font-size:11px}
.dm-catalog{margin:18px 0 34px;border:1px solid var(--line);border-radius:18px;background:#fff;overflow:hidden}
.dm-catalog>summary{padding:19px;cursor:pointer;font-size:13px;font-weight:850;list-style:none}
.dm-catalog>summary::-webkit-details-marker{display:none}
.dm-catalog>summary::after{content:'⌄';float:right;color:var(--muted)}
.dm-catalog[open]>summary::after{content:'⌃'}
.dm-catalog-body{padding:0 10px 10px}
.dm-catalog-body>.panel{margin-bottom:15px}
.dm-row{scroll-margin-top:72px}
@media(max-width:850px){.dm-tiles{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.domain-table .dm-row{padding:0!important;display:block!important;width:100%}.domain-table .dm-row>td{display:block!important;width:100%!important;padding:8px 12px!important}.dm-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}.dm-drawer{padding:10px}.dm-header{padding:12px}.dm-tile{min-height:100px;padding:10px}.dm-header-badge{font-size:9px}.dm-name{font-size:14px}.dm-stage .panel-head{flex-wrap:wrap}}
@media(max-width:365px){.dm-header-badge{display:none}.dm-tile{min-height:95px}}

/* AI onboarding: optional third step after domain and Drive backup. */
.dm-ai-setup{padding:15px 17px;margin-bottom:12px;border:1px solid #dbe1f2;border-radius:14px;background:#f7f9ff}
.dm-ai-summary{font-size:12px;line-height:1.6;margin:0 0 11px;color:var(--text)}
.dm-ai-skip{margin:0}
.dm-ai-message{font-size:11px;color:var(--red);margin-top:8px}
.dm-ai-message:empty{display:none}

/* Existing aaPanel sites shown in Registered Domains are overview-only.
   They intentionally have no managed domain ID or destructive actions. */
.dm-attached-card>summary.dm-header{list-style:none}
.dm-attached-card>summary.dm-header::-webkit-details-marker{display:none}
.dm-attached-card[open] .dm-chevron{transform:rotate(180deg)}
.dm-attached-row .dm-header-badge{background:#f0f2ff;color:#5356a5}
.dm-attached-row .dm-header-badge.ready{background:#edf9f3;color:#15845d}
.dm-attached-info{display:flex;flex-direction:column;gap:7px;font-size:11px;line-height:1.5;color:var(--muted)}
.dm-attached-info strong{font-size:12px;color:var(--text)}
.dm-attached-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:13px}
.dm-attached-actions .btn{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;min-height:38px}
@media(max-width:520px){.dm-attached-actions .btn{flex:1 1 100%}}

/* Imported aaPanel sites: tile overview (read-only until backup adapters exist). */
.dm-attached-tiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:14px}
.dm-attached-tile{min-width:0;border:1px solid #e2e5ed;border-radius:14px;background:#fff;overflow:hidden}
.dm-attached-tile>summary{display:flex;flex-direction:column;gap:6px;min-height:105px;padding:12px;list-style:none;cursor:pointer}
.dm-attached-tile>summary::-webkit-details-marker{display:none}
.dm-attached-tile>summary:hover,.dm-attached-tile[open]>summary{background:#f7f8fd}
.dm-attached-tile>summary strong{font-size:11px;font-weight:800;line-height:1.35}
.dm-attached-tile>summary small{font-size:10px;line-height:1.4;color:var(--muted)}
.dm-attached-tile-icon{font-size:20px;line-height:1.3}
.dm-attached-tile-body{border-top:1px solid #e2e5ed;padding:12px;font-size:11px;line-height:1.6;color:var(--muted)}
.dm-attached-tile-body>b{display:block;color:var(--text);margin-bottom:5px}
.dm-attached-tile-body p{margin:0 0 8px;overflow-wrap:anywhere}
.dm-attached-tile-body a{color:var(--accent);font-weight:700}
@media(max-width:850px){.dm-attached-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:360px){.dm-attached-tiles{grid-template-columns:1fr}}

/* Shared per-site backup policy: selected targets are not proof of a usable copy. */
.dm-policy-panel{margin:14px 0;padding:15px;border:1px solid #dbe2ef;border-radius:14px;background:#f8faff}
.dm-policy-heading{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px}
.dm-policy-heading>strong{font-size:12px;overflow-wrap:anywhere}
.dm-policy-panel p{margin:9px 0;font-size:11px;line-height:1.6;color:var(--muted)}
.dm-policy-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:12px 0}
.dm-policy-options label{display:flex;align-items:flex-start;gap:10px;padding:12px;background:#fff;border:1px solid #e2e5ed;border-radius:12px;cursor:pointer}
.dm-policy-options input{width:18px;height:18px;flex:0 0 18px;accent-color:#575be5;margin-top:2px}
.dm-policy-options b{display:block;font-size:12px}
.dm-policy-options small{display:block;font-size:10px;line-height:1.5;color:var(--muted);margin-top:4px}
.dm-policy-status{padding:6px 9px;border-radius:999px;font-size:10px;font-weight:800}
.dm-policy-ok{color:#188459;background:#edf9f3}
.dm-policy-warning{color:#9e6727;background:#fff5e6}
.dm-policy-error{color:#ba4747!important;overflow-wrap:anywhere}
.dm-policy-message{min-height:14px;padding-top:8px;font-size:11px;color:#775ab2}
@media(max-width:440px){.dm-policy-options{grid-template-columns:1fr}.dm-policy-heading{align-items:flex-start}}

/* Existing aaPanel sites use the same backup frequency, history and now workflow. */
.dm-import-backup{margin:13px 0;padding:14px;border:1px solid #dbe2ef;border-radius:14px;background:#fff}
.dm-import-backup p{font-size:11px;line-height:1.6;color:var(--muted);margin:0 0 12px}
.dm-import-settings{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.dm-import-settings>label{min-width:0;display:flex;flex-direction:column;gap:6px;font-size:11px;font-weight:750}
.dm-import-settings input,.dm-import-settings select{width:100%;height:40px;min-width:0;border:1px solid var(--line);border-radius:9px;background:#fff;padding:0 10px;color:var(--text);font-size:12px}
.dm-import-settings [data-import-times]{display:flex;gap:6px;flex-wrap:wrap}
.dm-import-settings [data-import-times] input{flex:1 1 90px}
.dm-import-db{grid-column:1 / -1;display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.dm-import-db-option{display:flex;align-items:center;gap:9px;font-size:11px;line-height:1.5}
.dm-import-db-option input{width:17px;height:17px;accent-color:#575be5}
.dm-import-actions{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0 8px}
.dm-import-actions .btn{min-height:38px}
.dm-import-history-box{margin-top:10px;border-top:1px solid #e9edf4;padding-top:9px}
.dm-import-history-box>summary{cursor:pointer;font-size:11px;font-weight:800}
.dm-import-history-box p,.dm-import-history{padding:8px 0;border-bottom:1px solid #edf0f5;font-size:11px;line-height:1.55}
@media(max-width:460px){.dm-import-settings{grid-template-columns:1fr}.dm-import-actions .btn{flex:1 1 100%}}

/* Shared private .env module for registered AdminAI and attached aaPanel sites. */
.dm-env-tile[open]{grid-column:1 / -1}
.dm-env-tile-body{padding:7px!important;background:#fafbff}
.dm-private-env-iframe{display:block;width:100%;min-width:0;height:880px;border:0;background:#fff;border-radius:12px}
.dm-stage>.dm-private-env-iframe{height:880px;border:1px solid #e3e7f0}
@media(max-width:600px){.dm-private-env-iframe{height:1000px}.dm-env-tile-body{padding:3px!important}}
