/* Municipal orange theme: local fonts, existing icons and no external assets. */
:root {
  --primary: #e84e10;
  --dark: #b83a0a;
  --orange: #b83a0a;
  --blue: #a83208;
  --text: #30302e;
  --border: #e3e0dc;
  --background: #f6f5f2;
  --surface: #fff;
  --muted: #66635f;
  --orange-soft: #fff0e7;
  --surface-shadow: 0 3px 14px rgba(48, 38, 25, .035);
}
body { font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif; }
a { text-underline-offset: 3px; }
h1, h2, h3, h4 { color: #282825; font-weight: 650; letter-spacing: -.025em; }
h1 { font-size: 32px; margin-bottom: 20px; }
h2 { font-size: 23px; }
h3 { font-size: 19px; }
p { line-height: 1.6; }
.breadcrumb { color: var(--muted); margin-bottom: 9px; }
button, .button { border-color: #d3cec7; border-radius: 10px; padding: 10px 16px; font-weight: 600; line-height: 1.4; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
button:hover:not(:disabled), .button:hover { background: #faf7f3; border-color: #b9b1a7; color: var(--text); }
.primary { background: var(--dark); border-color: var(--dark); color: #fff; box-shadow: 0 2px 4px rgba(133, 49, 14, .1); }
button.primary:hover:not(:disabled), .button.primary:hover { background: #993009; border-color: #993009; color: #fff; }
button:disabled { opacity: .55; box-shadow: none; }
:focus-visible { outline: 3px solid var(--dark); outline-offset: 3px; }
.municipal { gap: 22px; padding: 14px 28px; min-height: 88px; background: #fff; color: var(--text); border-top: 4px solid var(--primary); border-bottom: 1px solid var(--border); }
.municipal .municipal-logo { padding: 9px 16px; background: transparent; border-radius: 16px 5px 16px 5px; }
.municipal-logo img { width: 150px; height: auto; }
.municipal-caption { font-size: 14px; color: var(--muted); }
.municipal-caption strong { font-size: 17px; font-weight: 650; color: var(--text); }
.municipal a { color: var(--text); }
.municipal .header-username { padding: 9px 12px; border-radius: 10px; text-decoration: none; }
.municipal .header-username:hover { background: var(--orange-soft); color: var(--dark); }
.header-account { gap: 12px; }
.header-account button { border-color: var(--border); background: #fff; font-size: 14px; }
.header-account button:hover { background: #faf7f3; border-color: #b9b1a7; }
.header-account .header-logout { width:44px; height:44px; padding:0; border:0; background:transparent; }
.header-account .header-logout:hover { background:var(--orange-soft); color:var(--dark); }
.backup-transfers { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; align-items:start; }
.backup-comparison table { table-layout:fixed; white-space:normal; }
.backup-comparison th, .backup-comparison td { white-space:normal; overflow-wrap:anywhere; vertical-align:top; }
.backup-comparison thead small { display:block; margin-top:4px; color:var(--dark); }
.backup-comparison > .field-help { margin:14px 0 0; }
.backup-transfers > .panel { margin:12px 0; min-width:0; }
.backup-transfers input[type=file] { max-width:100%; }
.backup-transfers [hidden] { display:none!important; }
#data-backups-table td:first-child { white-space:normal; overflow-wrap:anywhere; }
#data-backups-table td small { display:block; margin-top:5px; color:var(--muted); }
@media(max-width:1100px) { .backup-transfers { grid-template-columns:minmax(0,1fr); } }
.workspace { grid-template-columns: 232px minmax(0, 1fr); }
.workspace-sidebar { padding: 24px 16px; background: #fff; align-self: start; position: sticky; top: 20px; }
.workspace-sidebar > nav { display: flex; flex-direction: column; gap: 8px; min-height: max(264px, calc(100dvh - 160px)); }
.workspace-sidebar > nav > .sidebar-admin { margin-top: auto; border: 1px solid var(--border); }
.workspace-sidebar > nav > a { position: relative; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 12px 14px; border-radius: 12px; font-size: 15px; font-weight: 500; }
.workspace-sidebar > nav > a > svg { flex-shrink: 0; color: #78726a; }
.workspace-sidebar > nav > a > .tooltip { display: none; }
.workspace-sidebar > nav > a:hover { background: #faf7f3; }
[aria-current=page] { background: var(--orange-soft)!important; color: var(--dark)!important; }
.workspace-sidebar > nav > a[aria-current=page] { font-weight: 650; box-shadow: inset 3px 0 0 var(--primary); }
.workspace-sidebar > nav > a[aria-current=page] > svg { color: var(--dark); }
main { padding: 30px 32px 40px; }
.heading { margin-bottom: 8px; }
.heading > .actions { gap: 10px; }
label { font-weight: 600; color: #45413c; }
input:not([type=checkbox]), select, textarea { border-color: #cdc7be; border-radius: 10px; min-height: 46px; padding: 10px 13px; background: #fff; }
input::placeholder, textarea::placeholder { color: #77716a; opacity: 1; }
input[type=checkbox], input[type=radio] { accent-color: var(--dark); }
fieldset { border-radius: 12px; padding: 16px; }
legend { font-size: 15px; font-weight: 600; }
.toolbar:has(#document-search) { padding: 18px 20px; background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--surface-shadow); margin: 16px 0; }
.toolbar:has(#document-search) button { min-height: 46px; }
.selection-bar { padding: 12px 16px; border: 1px solid var(--border); border-radius: 12px; background: #eeece7; gap: 8px; }
.selection-bar > span { color: var(--muted); }
.selection-bar button { font-size: 13px; }
.table-wrap { border-radius: 16px; box-shadow: var(--surface-shadow); }
thead { background: #f9f8f5; }
th { color: #5c564e; font-size: 13px; font-weight: 600; }
th, td { padding: 14px 16px; border-bottom-color: #eeebe6; }
tbody tr:hover { background: #fffbf6; }
.table-sort { border-radius: 0; min-height: 36px; padding: 4px 0; box-shadow: none; }
.table-sort:hover:not(:disabled) { background: transparent; color: var(--dark); }
.filename { gap: 10px; }
.filename small, .recovery-document { color: var(--muted); }
.document-title { color: #37332d; text-decoration: none; font-weight: 600; }
.document-title:hover { color: var(--dark); text-decoration: underline; }
.icon-action { border-radius: 10px; color: #676159; }
.icon-action:hover { background: var(--orange-soft); color: var(--dark); }
.icon-action:has(svg):is([href*="trash"], [data-open*="delete"]):hover { color: #991b1b; background: #fef2f2; }
.star { border-radius: 10px; box-shadow: none; }
.star:hover:not(:disabled) { background: var(--orange-soft); border-color: transparent; color: var(--dark); }
.panel { border-radius: 18px; padding: 26px; box-shadow: var(--surface-shadow); }
.panel > h2:first-child, .panel > h3:first-child { margin-top: 0; }
.auth-card { border-top: 4px solid var(--primary); border-radius: 20px 6px 20px 6px; }
.admin-stats { gap: 16px; }
.admin-stats > div { position: relative; border-radius: 16px; padding: 22px; box-shadow: var(--surface-shadow); border-top: 3px solid #f1aa7e; }
.admin-stats span { color: var(--muted); }
.admin-stats strong { font-size: 28px; color: #34302b; }
.admin-tabs-bar { padding: 6px; border: 1px solid var(--border); border-radius: 14px; background: #eeece7; }
.admin-tabs-bar .admin-tabs { gap: 5px; padding: 0 0 3px; }
.admin-tabs a { border-radius: 10px; border-color: transparent; background: transparent; font-size: 14px; }
.admin-tabs a[aria-current=page] { background: #fff!important; box-shadow: 0 2px 5px rgba(48, 38, 25, .07); border-color: var(--border); }
.admin-tabs-arrow { border-radius: 10px; background: #fff; }
.settings-nav { border-radius: 14px; padding: 8px; }
.settings-nav a { border-radius: 10px; font-size: 14px; }
.settings-nav a:hover { background: #faf7f3; }
.folder-links > div { border-radius: 12px; }
.folder-tree { border-radius: 16px; }
.tree-page .folder-tree { padding: 20px; box-shadow: var(--surface-shadow); }
.tree-row { border-radius: 10px; }
.tree-page .tree-row:hover, .workspace-sidebar .tree-row:hover { background: #fff5ec; }
.tree-page .tree-folder-toggle:hover { background: var(--orange-soft); }
.upload-drop-zone { border-color: #cf9c7b; border-radius: 18px 6px 18px 6px; background: #fff8f1; padding: 30px 20px; }
.upload-drop-zone > svg { color: var(--dark); }
.upload-drop-zone.drag-over { background: var(--orange-soft); border-color: var(--dark); }

dialog { border-color: var(--border); border-radius: 20px; padding: 28px; box-shadow: 0 24px 80px rgba(42, 32, 20, .2); }
dialog::backdrop { background: rgba(40, 35, 28, .42); }
.dialog-head { align-items: center; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.dialog-head button { font-size: 14px; }
dialog.filters-sidebar { border-radius: 20px 0 0 20px; }
.filters-sidebar > .dialog-head { margin-bottom: 0; }
.filters-footer { background: #faf8f5; }
.notice, .error { border-radius: 0 12px 12px 0; }
.error { border-left-color: #991b1b; background: #fff5f4; color: #991b1b; }
.health-alerts { background: #fff8df; border-color: #e9c869; box-shadow: none; }
.hosting-result, .versioning-status { font-size: 13px; }
.group-member-picker, .template-preview { background: #faf8f5; border-radius: 12px; }
.group-member-list, .document-permission, .permission-choice, .bulk-destination { border-radius: 10px; }
.group-member-option:hover { background: #fff8f1; }
.document-table.grid tr { border-radius: 14px; }
.document-table.grid tbody { gap: 16px; padding: 18px; }
.secret, .template-preview pre { background: #f5f2ed; border-radius: 10px; }
.tooltip { border-radius: 8px; background: #37332d; opacity: 1; pointer-events: none; }
.password-tool:hover:not(:disabled) { background: var(--orange-soft); }
.page-upload-feedback { border-radius: 12px; }
@media (max-width: 1000px) {
  .workspace { grid-template-columns: 204px minmax(0, 1fr); }
  main { padding: 24px; }
}
@media (max-width: 700px) {
  .municipal { padding: 12px 16px; gap: 12px; }
  .municipal .municipal-logo { padding: 7px 10px; border-radius: 12px 4px 12px 4px; }
  .municipal-logo img { width: 124px; }
  .municipal-caption { font-size: 12px; }
  .municipal-caption strong { font-size: 15px; }
  .header-account { gap: 8px; }
  .municipal .header-username { max-width: calc(100% - 140px); }
  .workspace { display: block; }
  .workspace-sidebar { padding: 10px 12px; position: static; }
  .workspace-sidebar > nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; min-height: 0; }
  .workspace-sidebar > nav > .sidebar-admin { grid-column: 1 / -1; margin-top: 8px; }
  .workspace-sidebar > nav > a { padding: 9px 12px; gap: 9px; min-height: 44px; font-size: 14px; }
  .workspace-sidebar > nav > a > svg { width: 19px; height: 19px; }
  main { padding: 22px 16px 30px; }
  h1 { font-size: 28px; }
  .heading > .actions { margin-bottom: 16px; }
  .toolbar:has(#document-search) { padding: 16px; }
  .toolbar:has(#document-search) button { width: 100%; }
  .selection-bar { padding: 12px; }
  .selection-bar > span { flex-basis: 100%; }
  .selection-bar button { flex: 1 1 145px; white-space: normal; }
  .panel { padding: 20px; border-radius: 14px; }
  .table-wrap { border-radius: 12px; }
  dialog { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); padding: 20px; border-radius: 16px; }
  dialog.filters-sidebar { width: min(420px, 100vw); max-height: 100dvh; padding: 0; }
  .dialog-head { align-items: flex-start; gap: 10px; }
  .dialog-head h2 { font-size: 20px; }
  .dialog-head button { flex-shrink: 0; }
  .document-table.grid tbody { grid-template-columns: minmax(0, 1fr); padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto!important; }
  .action-toast.is-timed .action-toast-progress > span { animation: none; }
}
.folder-breadcrumb { display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0 0 12px;font-size:13px;color:var(--muted); }
.folder-breadcrumb a { color:var(--muted);text-decoration:none;min-height:32px;display:inline-flex;align-items:center; }
.folder-breadcrumb a:hover { color:var(--dark);text-decoration:underline; }
.active-filters { display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:12px 0 18px; }
.filter-chip { display:inline-flex;align-items:center;gap:12px;max-width:100%;overflow-wrap:anywhere;min-height:40px;padding:7px 12px;border:1px solid #edc2a7;background:var(--orange-soft);border-radius:20px;color:var(--dark);font-size:13px;text-decoration:none; }
.filter-chip > span { font-size:20px;line-height:1; }
.clear-filters { min-height:40px;display:inline-flex;align-items:center;padding:7px 10px;font-size:13px; }
.dialog-actions { display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin-top:24px;padding-top:18px;border-top:1px solid var(--border); }
.dialog-actions > button { min-width:110px; }
.document-status { display:inline-flex;align-items:center;padding:2px 8px;border:1px solid;border-radius:20px;font-size:11px;font-weight:600;line-height:1.5;white-space:nowrap; }
.status-draft { color:#625547;background:#f5f2ed;border-color:#ddd4c8; }
.status-progress { color:#854d0e;background:#fff8df;border-color:#e9c869; }
.status-validated { color:#166534;background:#ecfdf3;border-color:#86c99b; }
.status-archived { color:#545d68;background:#edf0f4;border-color:#cdd4dd; }
.empty-state { text-align:center;white-space:normal;padding:38px 22px!important; }
.empty-state strong { display:block;font-size:17px; }
.empty-state p { color:var(--muted);margin:10px auto 16px;max-width:540px; }
.tree-empty { padding:18px;color:var(--muted);font-size:14px; }
.field-help,.ownership-summary,.empty-hint { color:var(--muted);font-size:14px; }
.context-help { padding:14px 16px;background:#faf8f5;border:1px solid var(--border);border-radius:12px; }
.context-help p { margin:12px 0 0;font-size:14px; }
.resource-shares td { white-space:normal;overflow-wrap:anywhere; }
.resource-shares td[data-inline-actions] { white-space:nowrap; }
@media(max-width:700px) { .dialog-actions > button { flex:1 1 120px; }.filter-chip { border-radius:12px; } }
.document-search .search-scope { flex:0 1 280px; }
[data-copy-document-link].icon-action > svg { width:18px;height:18px; }
.client-action-toast { position:fixed;right:24px;bottom:24px;width:min(460px,calc(100vw - 32px));max-width:calc(100vw - 32px);padding:16px 18px 20px;border:1px solid #86c99b;border-radius:14px;box-shadow:0 8px 28px rgba(35,50,35,.14);z-index:20; }
@media(max-width:700px) { .client-action-toast { right:16px;bottom:16px; } }
.undo-trash-form { margin:0;flex-shrink:0; }
.undo-trash-form button { color:inherit;border-color:currentColor;background:transparent; }
@media(max-width:700px) { .document-search .search-scope { flex-basis:100%; }.undo-trash-form { flex-basis:100%;margin-left:38px; }.undo-trash-form button { width:100%; } }
.danger-button { color:#991b1b;background:#fef2f2;border-color:#eaa2a2; }
.danger-button:hover:not(:disabled) { color:#fff;background:#991b1b;border-color:#991b1b; }
[data-delete-folder]:hover { color:#991b1b;background:#fef2f2; }





@media(max-width:700px) { .tree-page .tree-file .tree-row { flex-wrap:wrap; }.tree-page .tree-file .tree-item-link { flex-basis:100%; } }

.header-notifications { position:relative; flex-shrink:0; margin:0; }
.notification-bell { position:relative; display:flex; align-items:center; justify-content:center; width:44px; height:44px; padding:0; border:0; border-radius:10px; list-style:none; color:var(--text); cursor:pointer; }
.notification-bell::-webkit-details-marker { display:none; }
.notification-bell::marker { content:''; }
.notification-bell:hover, .header-notifications[open] > .notification-bell { background:var(--orange-soft); }
.notification-bell:hover > .tooltip, .notification-bell:focus-visible > .tooltip { visibility:visible; }
.notification-count { position:absolute; top:0; right:-3px; display:flex; align-items:center; justify-content:center; min-width:20px; min-height:20px; padding:1px 5px; border:2px solid #fff; border-radius:20px; background:var(--dark); color:#fff; font-size:11px; line-height:1.2; font-weight:700; }
.notification-panel { position:absolute; top:calc(100% + 10px); right:0; z-index:1100; width:min(420px,calc(100vw - 32px)); max-height:min(70vh,560px); overflow:auto; padding:16px; border:1px solid var(--border); border-radius:12px; background:#fff; color:var(--text); box-shadow:0 8px 30px rgba(48,38,25,.16); text-align:left; }
.notification-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.notification-heading h2 { margin:0; font-size:20px; }
.notification-heading .icon-action { flex-shrink:0; }
.notification-total, .notification-empty { margin:8px 0; font-size:14px; color:var(--muted); }
.notification-list { margin:12px 0; padding:0; list-style:none; }
.notification-list li + li { border-top:1px solid var(--border); }
.municipal .notification-list a { display:block; padding:12px 8px; border-radius:8px; text-decoration:none; white-space:normal; overflow-wrap:anywhere; }
.municipal .notification-list a:hover { background:var(--orange-soft); }
.notification-list strong, .notification-list span, .notification-list time { display:block; }
.notification-list span { margin-top:4px; font-size:14px; }
.notification-list time { margin-top:4px; font-size:12px; color:var(--muted); }
.header-account .notification-read-form { margin-top:12px; }
.notification-read-form button { width:100%; }
.folder-filter { margin:0 0 16px; padding:12px; min-width:0; }
.folder-filter legend { float:none; width:auto; padding:0 5px; margin:0; font-size:14px; font-weight:600; }
.folder-filter .field-help { margin:6px 0 10px; font-size:13px; }
.folder-filter-list { max-height:260px; overflow:auto; padding:2px; }
.folder-filter-list .check { align-items:flex-start; margin:0; padding:8px 4px; border-radius:6px; cursor:pointer; }
.folder-filter-list .check:hover { background:var(--orange-soft); }
.folder-filter-list input { flex-shrink:0; margin-top:1px; }
.folder-filter-list span { min-width:0; overflow-wrap:anywhere; }
.row-action-menu { display:inline-flex; flex-shrink:0; vertical-align:middle; }
.row-action-menu > .row-actions-toggle { width:36px; height:40px; padding:0; border:0; background:transparent; color:var(--text); }
.row-action-menu > .row-actions-toggle:hover, .row-action-menu > .row-actions-toggle[aria-expanded="true"] { background:var(--orange-soft); color:var(--dark); }
.row-actions-panel { position:fixed; inset:auto; margin:0; padding:6px; width:max-content; min-width:220px; max-width:calc(100vw - 16px); max-height:min(440px,calc(100dvh - 16px)); overflow:auto; border:1px solid var(--border); border-radius:12px; background:#fff; color:var(--text); box-shadow:0 8px 30px rgba(48,38,25,.18); white-space:normal; }
.row-actions-panel::backdrop { background:transparent; }
.row-actions-panel .row-action-form { display:block; width:100%; margin:0; }
.row-action-menu .row-actions-panel .row-action-item { display:flex; align-items:center; justify-content:flex-start; gap:12px; width:100%; min-height:42px; height:auto; padding:10px 12px; border:0; border-radius:7px; background:transparent; color:var(--text); font-size:14px; font-weight:500; text-align:left; text-decoration:none; cursor:pointer; }
.row-actions-panel .row-action-item:hover:not(:disabled), .row-actions-panel .row-action-item:focus-visible { background:var(--orange-soft); color:var(--dark); }
.row-actions-panel .row-action-item > svg { flex:0 0 22px; width:22px; height:22px; }
.row-actions-panel .row-action-label { display:block; min-width:0; white-space:normal; overflow-wrap:anywhere; }
.row-actions-panel .row-action-item:disabled { opacity:.45; cursor:not-allowed; }
.header-account > .header-bug-report { flex-shrink:0; width:44px; height:44px; padding:0; border:0; background:transparent; }
.header-account > .header-bug-report:hover { background:var(--orange-soft); color:var(--dark); }
#bug-report-dialog { width:min(720px,94vw); }
.bug-ticket-table { white-space:normal; }
.bug-ticket-table td { vertical-align:top; }
.bug-ticket-table td:nth-child(2) { white-space:nowrap; }
.bug-ticket-table td:nth-child(3) { min-width:160px; overflow-wrap:anywhere; }
.bug-ticket-table td:nth-child(4) { min-width:240px; max-width:520px; overflow-wrap:anywhere; }
.bug-ticket-table small { display:block; margin-top:4px; color:var(--muted); }
.bug-ticket-content { margin:10px 0 0; }
.bug-ticket-content summary { font-size:13px; }
.bug-ticket-content h3 { margin-top:16px; font-size:15px; }
.bug-ticket-text { white-space:pre-wrap; overflow-wrap:anywhere; }
.storage-breakdown { display:block; margin:16px 0; }
.storage-breakdown > div { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:12px 0; border-bottom:1px solid var(--border); }
.storage-breakdown dt { min-width:0; font-weight:600; }
.storage-breakdown dt small { display:block; margin-top:4px; color:var(--muted); font-size:12px; font-weight:400; }
.storage-breakdown dd { flex-shrink:0; margin:0; font-weight:650; white-space:nowrap; }
