#sites-view { flex: 1; flex-direction: column; min-width: 0; min-height: 0; background: #f8fafc; border-radius: 12px; padding: 1rem; overflow: hidden; }
#sites-view [hidden] { display: none !important; }
.sites-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; margin-bottom: .75rem; }
.sites-toolbar h2 { margin: 0; font-size: 1.2rem; color: #1f2937; }
#sites-search { flex: 1 1 180px; min-width: 100px; border: 1px solid #dbe1ea; border-radius: 7px; background: white; padding: .5rem .75rem; font: inherit; font-size: .875rem; }
.sites-toolbar-actions, .sites-actions { display: flex; flex-wrap: wrap; gap: .375rem; }
.sites-button { border: 1px solid #dbe1ea; border-radius: 6px; background: white; color: #475569; padding: .375rem .625rem; font: inherit; font-size: .8rem; cursor: pointer; white-space: nowrap; }
.sites-button:hover { background: #eef2ff; border-color: #a5b4fc; }
.sites-button:disabled { opacity: .45; cursor: default; }
.sites-button:focus-visible, .sites-link:focus-visible { outline: 2px solid #6366f1; outline-offset: 2px; }
.sites-primary, #sites-manage[aria-pressed="true"] { background: #6366f1; border-color: #6366f1; color: white; }
.sites-primary:hover { background: #4f46e5; }
.sites-danger { color: #dc2626; }
#sites-notice { color: #9a3412; font-size: .875rem; }
#sites-notice:not(:empty) { padding: .5rem 0; }
.sites-workspace { display: flex; flex: 1; min-height: 0; gap: 1rem; }
.sites-content { flex: 1; min-width: 0; overflow-y: auto; padding-right: .25rem; }
.sites-category { background: white; border: 1px solid #e5e7eb; border-radius: 8px; padding: .875rem; margin-bottom: .75rem; }
.sites-category-heading { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1rem; margin-bottom: .75rem; }
.sites-category-text { flex: 1; min-width: 120px; overflow-wrap: anywhere; }
.sites-category-heading h3 { font-size: .95rem; color: #334155; margin: 0; }
.sites-description { font-size: .8rem; color: #64748b; line-height: 1.45; margin: .25rem 0 0; overflow-wrap: anywhere; }
.sites-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: .625rem; }
.sites-card { border: 1px solid #e5e7eb; border-radius: 6px; min-width: 0; display: flex; flex-direction: column; }
.sites-card:hover { border-color: #a5b4fc; background: #fafaff; }
.sites-link { display: flex; flex-direction: column; gap: .25rem; flex: 1; padding: .75rem; color: inherit; text-decoration: none; min-width: 0; }
.sites-link-title { display: flex; align-items: center; flex-wrap: wrap; gap: .375rem; font-size: .875rem; color: #334155; font-weight: 600; overflow-wrap: anywhere; }
.sites-link-title small { font-weight: 400; color: #9a3412; }
.sites-link-icon { width: 20px; height: 20px; object-fit: contain; }
.sites-link-url { margin-top: .25rem; color: #94a3b8; font-size: .75rem; overflow-wrap: anywhere; }
.sites-card > .sites-actions { padding: .5rem; border-top: 1px solid #f1f5f9; }
.sites-card .sites-button { padding: .2rem .4rem; font-size: .75rem; }
.sites-inactive { background: #f8fafc; }
.sites-empty { color: #94a3b8; font-size: .875rem; padding: 1rem; }
.sites-editor-heading { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .75rem; border-bottom: 1px solid #e5e7eb; }
.sites-editor-heading h3 { margin: 0; font-size: 1rem; }
.sites-dialog { margin: auto; border: none; border-radius: 10px; width: min(540px, calc(100vw - 24px)); max-height: 90vh; padding: 0; box-shadow: 0 16px 60px #0003; }
.sites-dialog::backdrop { background: #0006; }
.sites-dialog fieldset { border: none; padding: .875rem; min-width: 0; }
.sites-dialog label { display: block; margin-bottom: .75rem; font-size: .85rem; color: #475569; }
.sites-dialog input:not([type="checkbox"]), .sites-dialog textarea, .sites-dialog select { display: block; margin-top: .25rem; padding: .5rem; width: 100%; border: 1px solid #dbe1ea; border-radius: 6px; font: inherit; box-sizing: border-box; }
.sites-dialog textarea { resize: vertical; }
.sites-field-hint { display: block; font-size: .75rem; color: #94a3b8; margin-top: .25rem; }
.sites-editor-footer { display: flex; justify-content: flex-end; gap: .5rem; padding: .75rem; border-top: 1px solid #e5e7eb; }
#sites-editor-error { margin: 0; padding: 0 .875rem; color: #b91c1c; font-size: .85rem; }
@media (max-width: 600px) { #sites-view { padding: .75rem; } .sites-toolbar { gap: .5rem; } .sites-toolbar h2 { font-size: 1.05rem; } #sites-search { flex-basis: 100%; } .sites-category { padding: .625rem; } .sites-links { grid-template-columns: 1fr; } }
