:root{color-scheme:light;--bg:#f4f6fa;--surface:#ffffff;--surface-2:#f1f3f7;--fg:#1c2330;--muted:#67707e;--border:#e6e9ef;--border-strong:#d4d9e1;--accent:#2563eb;--accent-hover:#1d4ed8;--accent-soft:#eaf1fe;--danger:#dc2626;--warn:#c2700a;--ok:#15803d;--radius:10px;--radius-sm:7px;--shadow-sm:0 1px 2px rgba(16,24,40,0.06),0 1px 3px rgba(16,24,40,0.08);--shadow-md:0 4px 14px rgba(16,24,40,0.1);--shadow-lg:0 16px 40px rgba(16,24,40,0.16);--ring:0 0 0 3px var(--accent-soft);--sidebar-w:256px;--sb-bg:#18181b;--sb-fg:#e4e4e7;--sb-muted:#a1a1aa;--sb-border:#27272a;--sb-hover:#27272a;--sb-active:#2563eb}*{box-sizing:border-box}body,html{margin:0;padding:0;background:var(--bg);color:var(--fg);font-family:system-ui,-apple-system,Segoe UI,Helvetica Neue,Hiragino Sans,Noto Sans JP,sans-serif;-webkit-font-smoothing:antialiased;font-size:14px;line-height:1.6}a{color:var(--accent)}h1{font-size:1.5rem;font-weight:700;letter-spacing:.01em}button,input,select,textarea{font-family:inherit;font-size:.92rem;color:var(--fg)}input,select,textarea{background:var(--surface);border:1px solid var(--border-strong);border-radius:var(--radius-sm);padding:.5rem .6rem}input:focus,select:focus,textarea:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}button{cursor:pointer;border:1px solid var(--border-strong);background:var(--surface);border-radius:var(--radius-sm);padding:.45rem .8rem;transition:background .12s ease,border-color .12s ease}button:hover:not(:disabled){background:var(--surface-2)}button:disabled{opacity:.55;cursor:not-allowed}.error{color:var(--danger);background:#fdecec;border:1px solid #f7c9c9;border-radius:var(--radius-sm);padding:.5rem .7rem;font-size:.88rem}main.center{min-height:100vh;display:grid;place-items:center;padding:2rem}.card{text-align:center;max-width:640px}.card h1{font-size:clamp(2rem,6vw,3.5rem);margin:0 0 .5rem}.badge{display:inline-block;font-size:.8rem;color:var(--accent);border:1px solid var(--accent);padding:.2rem .8rem;margin-bottom:1.25rem}.card p{color:var(--muted);line-height:1.7}.card code{background:var(--surface-2);padding:.15rem .4rem;border-radius:6px}.auth-main{min-height:100vh;display:grid;place-items:center;padding:2rem;background:linear-gradient(180deg,#eef2f9 0,var(--bg) 100%)}.auth-card{width:100%;max-width:380px;display:flex;flex-direction:column;gap:.9rem;background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:2rem 1.75rem;box-shadow:var(--shadow-md)}.auth-card h1{font-size:1.45rem;margin:0;text-align:center}.auth-sub{margin:0 0 .5rem;font-size:.85rem;color:var(--muted);text-align:center}.auth-error{color:var(--danger);background:#fdecec;border:1px solid #f7c9c9;border-radius:8px}.auth-error,.auth-note{margin:0;font-size:.85rem;padding:.55rem .75rem}.auth-note{color:#166534;background:#e8f6ec;border:1px solid #bfe3c8;border-radius:8px}.field{display:flex;flex-direction:column;gap:.3rem;font-size:.85rem}.field input{font-size:1rem}.btn-primary,.btn-secondary{border-radius:8px;padding:.65rem 1rem;font-size:.95rem;cursor:pointer;font-weight:600}.btn-primary{background:var(--accent);color:#fff;border:1px solid var(--accent)}.btn-primary:hover:not(:disabled){background:var(--accent-hover)}.btn-secondary{background:var(--surface);color:var(--fg);border:1px solid var(--border-strong)}.app-shell{display:grid;grid-template-columns:var(--sidebar-w) 1fr;min-height:100vh}.app-sidebar{background:var(--sb-bg);color:var(--sb-fg);display:flex;flex-direction:column;position:-webkit-sticky;position:sticky;top:0;height:100vh;overflow-y:auto;z-index:50}.app-brand{font-weight:700;font-size:1rem;letter-spacing:.01em;padding:1.05rem 1.15rem;color:#fff;border-bottom:1px solid var(--sb-border);display:flex;align-items:center;gap:.6rem}.app-brand:before{content:"";width:10px;height:10px;border-radius:3px;background:var(--accent);box-shadow:0 0 0 3px rgba(37,99,235,.35);flex-shrink:0}.app-nav{display:flex;flex-direction:column;gap:2px;padding:.6rem .55rem;flex:1 1}.app-nav a{display:flex;align-items:center;gap:.65rem;padding:.55rem .7rem;border-radius:8px;color:var(--sb-muted);text-decoration:none;font-size:.9rem;font-weight:500;transition:background .12s ease,color .12s ease}.app-nav a:hover{background:var(--sb-hover);color:#fff}.app-nav a.is-active{background:var(--sb-active);color:#fff;font-weight:600}.app-nav a .nav-ico{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.app-nav a .nav-ico,.app-nav a .nav-ico svg{width:18px;height:18px}.app-sidebar-footer{border-top:1px solid var(--sb-border);padding:.8rem .95rem;font-size:.82rem;color:var(--sb-muted);display:flex;align-items:center;gap:.55rem}.app-avatar{width:28px;height:28px;border-radius:50%;background:var(--accent);color:#fff;display:grid;place-items:center;font-size:.8rem;font-weight:700;flex-shrink:0}.app-main{display:flex;flex-direction:column;min-width:0}.app-topbar{height:56px;display:flex;align-items:center;gap:.75rem;padding:0 1.25rem;background:var(--surface);border-bottom:1px solid var(--border);position:-webkit-sticky;position:sticky;top:0;z-index:20}.app-topbar-title{font-weight:600;font-size:.95rem;flex:1 1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.app-topbar-right{display:flex;align-items:center;gap:.85rem;margin-left:auto}.app-burger{display:none;align-items:center;justify-content:center;width:38px;height:38px;border:1px solid var(--border);background:var(--surface);border-radius:8px;color:var(--fg);cursor:pointer}.app-burger:hover{background:var(--surface-2)}.app-user{font-size:.85rem;color:var(--muted)}.app-content{padding:1.5rem;flex:1 1;min-width:0}.app-drawer-overlay{display:none}@media (max-width:1023px){.app-shell{grid-template-columns:1fr}.app-sidebar{position:fixed;top:0;left:0;bottom:0;height:100vh;width:var(--sidebar-w);transform:translateX(-100%);transition:transform .2s ease}.app-sidebar.is-open{transform:translateX(0);box-shadow:var(--shadow-lg)}.app-burger{display:inline-flex}.app-drawer-overlay.is-open{display:block;position:fixed;inset:0;background:rgba(16,24,40,.4);z-index:40}}.card-panel{max-width:560px;margin:0 auto;display:flex;flex-direction:column;gap:1rem;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:1.5rem;box-shadow:var(--shadow-sm)}.card-panel h1{font-size:1.4rem;margin:0}.muted{color:var(--muted);margin:0}.notice{margin:0;background:var(--accent-soft);border:1px solid #c7dbfb;border-radius:8px;padding:.55rem .75rem;font-size:.85rem}.form-stack{display:flex;flex-direction:column;gap:.9rem}.files-layout{display:grid;grid-template-columns:minmax(200px,240px) 1fr;grid-gap:1rem;gap:1rem;align-items:start}.files-cards,.files-folder-toggle{display:none}.files-sidebar{border:1px solid var(--border);background:var(--surface);border-radius:var(--radius);padding:.9rem;box-shadow:var(--shadow-sm)}.files-sidebar__head{display:flex;align-items:center;justify-content:space-between;margin-bottom:.6rem}.folder-tree{list-style:none;margin:0;padding-left:.8rem}.files-folder-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));grid-gap:.6rem;gap:.6rem;margin-bottom:.9rem}.files-folder-card{display:flex;align-items:center;gap:.5rem;padding:.6rem .75rem;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);cursor:pointer;text-align:left;min-width:0;transition:background .12s ease,border-color .12s ease}.files-folder-card:hover{background:var(--surface-2,#f3f6fb);border-color:var(--border-strong,#c8d2e0)}.files-folder-card__icon{font-size:1.3rem;flex:0 0 auto}.files-folder-card__name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.9rem;font-weight:500}.files-file-icon{margin-right:.15rem}.files-row-draggable{cursor:-webkit-grab;cursor:grab}.files-row-draggable:active{cursor:-webkit-grabbing;cursor:grabbing}.files-folder-card[data-dragover=true],.folder-tree-btn[data-dragover=true]{outline:2px dashed var(--accent);outline-offset:-2px;background:var(--accent-soft)}.files-company-group{margin-top:.6rem;padding-top:.5rem;border-top:1px solid var(--border)}.files-company-header{display:flex;align-items:center;gap:.25rem;width:100%;font-size:.72rem;font-weight:700;letter-spacing:.02em;color:var(--muted);text-transform:none;padding:.25rem .25rem .3rem;background:transparent;border:none;cursor:pointer;text-align:left;white-space:nowrap}.files-company-header:hover{color:var(--fg)}.folder-row{display:flex;align-items:center;gap:.1rem}.folder-caret{flex:0 0 auto;width:1.1rem;height:1.4rem;display:inline-flex;align-items:center;justify-content:center;background:transparent;border:none;color:var(--muted);font-size:.7rem;cursor:pointer;padding:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.folder-caret:hover{color:var(--fg)}.files-folder-scroll{overflow-x:auto;overflow-y:hidden}.files-folder-scroll-inner{width:max-content;min-width:100%}.folder-tree-btn{white-space:nowrap}.folder-node{display:block;width:100%;text-align:left;background:transparent;border:none;color:var(--fg);padding:.3rem .4rem;border-radius:6px;cursor:pointer;font-size:.9rem}.folder-node:hover{background:var(--surface-2)}.folder-node--active{background:var(--accent-soft);color:var(--accent-hover);font-weight:600}.files-main{display:flex;flex-direction:column;gap:.9rem;min-width:0}.files-breadcrumb{font-size:.85rem;color:var(--muted)}.crumb{background:transparent;border:none;color:var(--accent);cursor:pointer;padding:0;font-size:.85rem}.files-toolbar{display:flex;align-items:center;justify-content:space-between;gap:.8rem;flex-wrap:wrap}.files-toolbar__actions{display:flex;align-items:center;gap:.6rem}.btn-xs{font-size:.78rem;padding:.35rem .6rem;text-decoration:none;display:inline-block}.files-table{width:100%;border-collapse:collapse;font-size:.88rem;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden}.files-table td,.files-table th{text-align:left;padding:.55rem .6rem;border-bottom:1px solid var(--border)}.files-table th{background:var(--surface-2);font-weight:600;color:var(--muted)}.files-table tr:last-child td{border-bottom:none}.files-table__actions{display:flex;gap:.4rem}.files-conf-select{font-size:.78rem;padding:.2rem .35rem;border:1px solid var(--border,#d0d5dd);border-radius:6px;background:#fff;color:#344054;max-width:7.5rem}.files-conf-select:disabled{opacity:.6}.files-filterbar{gap:.4rem;margin:.4rem 0 .6rem}.files-filterbar,.files-filterbar__tags{display:flex;flex-wrap:wrap;align-items:center}.files-filterbar__tags{gap:.3rem}.files-row-tags{display:inline-flex;flex-wrap:wrap;gap:.25rem;margin-left:.35rem;vertical-align:middle}.files-tag{display:inline-flex;align-items:center;gap:.2rem;font-size:.72rem;line-height:1.4;padding:.08rem .45rem;border-radius:999px;background:#eef2f6;color:#475467;border:1px solid #e0e6ec;white-space:nowrap}.files-tag--btn{cursor:pointer}.files-tag--btn:hover{background:#e4ebf2}.files-tag--on{background:#1d4ed8;color:#fff;border-color:#1d4ed8}.files-tag__count{font-size:.66rem;opacity:.7;background:rgba(0,0,0,.06);border-radius:999px;padding:0 .3rem}.files-tag--on .files-tag__count{background:rgba(255,255,255,.25);opacity:.95}.files-tag__x{border:none;background:transparent;color:inherit;cursor:pointer;font-size:.85rem;line-height:1;padding:0 .1rem}.files-tagedit__chips{display:flex;flex-wrap:wrap;gap:.35rem;align-items:center;min-height:1.8rem}.files-card{display:flex;flex-direction:column;gap:.55rem;padding:.75rem .85rem;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);box-shadow:var(--shadow-sm)}.files-card__main{display:flex;align-items:flex-start;gap:.6rem;min-width:0}.files-card__icon{font-size:1.6rem;flex:0 0 auto;line-height:1.2}.files-card__info{min-width:0;flex:1 1 auto}.files-card__title{font-weight:600;font-size:.95rem;word-break:break-word;line-height:1.35}.files-card__meta{display:flex;flex-wrap:wrap;align-items:center;gap:.35rem;margin-top:.2rem;font-size:.82rem;color:var(--muted)}.files-card__dot{opacity:.6}.files-card__actions{display:flex;flex-wrap:wrap;gap:.4rem}.files-card__actions .ui-btn{flex:1 1 auto;min-width:0}.files-cards__empty{border:1px dashed var(--border);border-radius:var(--radius-sm);background:var(--surface)}@media (max-width:768px){.files-layout{display:block}.files-folder-toggle{display:flex;align-items:center;gap:.5rem;width:100%;min-height:48px;padding:0 .85rem;margin-bottom:.75rem;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);box-shadow:var(--shadow-sm);font-size:.95rem;font-weight:600;color:var(--fg);cursor:pointer;text-align:left}.files-folder-toggle .ui-spacer{display:inline-block;flex:1 1 auto}.files-folder-toggle__icon{font-size:1.2rem;flex:0 0 auto}.files-folder-toggle__caret{font-size:.7rem;color:var(--muted);flex:0 0 auto}.files-folder-toggle span:not(.ui-spacer):not(.files-folder-toggle__icon):not(.files-folder-toggle__caret){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.files-sidebar{display:none;margin-bottom:.75rem;position:static!important;max-height:60vh;overflow-y:auto}.files-layout.is-folder-open .files-sidebar{display:block}.files-main{width:100%}.files-table-wrap{display:none}.files-cards{display:flex;flex-direction:column;gap:.6rem}.files-folder-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.files-toolbar{flex-direction:column;align-items:stretch}.files-toolbar .ui-input[type=search],.files-toolbar>input{width:100%;min-width:0}.files-toolbar__actions{width:100%}.files-toolbar__actions .ui-btn{flex:1 1 auto;min-height:44px}.files-toolbar__actions input[type=file]{flex:1 1 100%;width:100%;min-height:44px}.files-breadcrumb{flex-wrap:wrap}}.modal-overlay{position:fixed;inset:0;background:rgba(16,24,40,.45);display:flex;align-items:center;justify-content:center;z-index:50;padding:1rem}.modal-card{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:1.25rem;width:min(560px,100%);max-height:86vh;overflow:auto;box-shadow:var(--shadow-lg)}.modal-card h3{margin:0 0 .75rem;font-size:1.05rem}.modal-card__row{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;margin-bottom:.6rem}.acl-list{list-style:none;padding:0;margin:.5rem 0;font-size:.85rem}.acl-list li{display:flex;justify-content:space-between;gap:.5rem;padding:.35rem 0;border-bottom:1px solid var(--border)}.share-warn{color:var(--warn);font-size:.8rem;margin:.4rem 0}.badge{font-size:.68rem;padding:.1rem .45rem;border-radius:999px;margin-left:.35rem;vertical-align:middle}.badge--everyone{background:#e0edff;color:#1e4fa3}.badge--company{background:#d8f3e3;color:#15803d}.badge--pending{background:#fdecc8;color:#b45309}.approval-panel{border:1px solid #f0d089;border-radius:8px;padding:.6rem .75rem;margin-bottom:.75rem;background:#fdf6e3}.admin-tabs{margin-top:1rem}.admin-tabnav{display:flex;flex-wrap:wrap;gap:.4rem;margin-bottom:1rem;border-bottom:1px solid var(--border);padding-bottom:.6rem}.admin-tabpanel{display:block}.admin-tabpanel .field{display:flex;flex-wrap:wrap;gap:.4rem;align-items:center;margin:.4rem 0}.admin-tabpanel h3{margin:1rem 0 .4rem}.admin-tabpanel table.files-table input[type=checkbox]{margin:0}.app-header-right{display:flex;align-items:center;gap:1rem}.notif-bell,.notif-bell-btn{position:relative}.notif-bell-btn{background:none;border:none;color:var(--fg);font-size:1.2rem;cursor:pointer;padding:.2rem .4rem}.notif-bell-btn:hover{background:var(--surface-2);border-radius:8px}.notif-badge{position:absolute;top:-2px;right:-2px;background:var(--danger);color:#fff;font-size:.65rem;font-weight:700;border-radius:999px;padding:.05rem .3rem;min-width:1.1rem;text-align:center}.notif-dropdown{position:absolute;right:0;top:2.2rem;width:320px;max-height:70vh;overflow-y:auto;background:var(--surface);border:1px solid var(--border);border-radius:10px;z-index:50;box-shadow:var(--shadow-lg)}.notif-empty{padding:1rem;color:var(--muted)}.notif-list{list-style:none;margin:0;padding:0}.notif-item{display:flex;flex-direction:column;gap:.2rem;width:100%;text-align:left;background:none;border:none;border-bottom:1px solid var(--border);color:var(--fg);padding:.7rem .9rem;cursor:pointer}.notif-item:hover{background:var(--surface-2)}.notif-item.is-unread{border-left:3px solid var(--accent);background:var(--accent-soft)}.notif-item-title{font-size:.9rem;font-weight:600}.notif-item-body{font-size:.8rem;color:var(--muted)}.notif-item-time{font-size:.7rem;color:var(--muted)}.notif-dropdown-footer{padding:.6rem .9rem;text-align:center;font-size:.85rem}.notif-page{max-width:720px}.notif-toolbar{justify-content:space-between;gap:1rem}.notif-filter,.notif-toolbar{display:flex;align-items:center}.notif-filter{gap:.4rem;font-size:.9rem}.notif-list-full .notif-item{border:1px solid var(--border);border-radius:8px;margin-bottom:.5rem}.dash-panel{max-width:880px}.dash-header{display:flex;align-items:center;justify-content:space-between;gap:1rem}.dash{display:flex;flex-direction:column;gap:1.5rem}.dash-stats{display:grid;grid-template-columns:repeat(3,1fr);grid-gap:1rem;gap:1rem}.dash-card{display:flex;flex-direction:column;align-items:center;gap:.3rem;padding:1.2rem;border:1px solid var(--border);border-radius:var(--radius);text-decoration:none;color:var(--fg);background:var(--surface);box-shadow:var(--shadow-sm);transition:box-shadow .12s ease,transform .12s ease}.dash-card:hover{box-shadow:var(--shadow-md);transform:translateY(-1px)}.dash-card-num{font-size:1.8rem;font-weight:700;color:var(--accent)}.dash-card-label{font-size:.85rem;color:var(--muted)}.dash-section h2{font-size:1.05rem;margin:0 0 .6rem}.alert{display:block;border-radius:8px;padding:.6rem .8rem;margin-bottom:.5rem;font-size:.9rem;text-decoration:none;color:var(--fg)}.alert-expired{background:#fdecec;border:1px solid #f3b4b4}.alert-pending,.alert-soon{background:#fdf3e2;border:1px solid #f0d089}.dash-others{margin-top:.5rem;font-size:.85rem}.dash-others summary{cursor:pointer}.dash-recent{list-style:none;margin:0;padding:0}.dash-recent li{display:flex;align-items:center;gap:.8rem;padding:.4rem 0;border-bottom:1px solid var(--border);font-size:.9rem}.dash-recent-date,.dash-tags{font-size:.75rem;color:var(--muted)}.dash-recent-date{margin-left:auto}.dash-quick{display:flex;gap:.8rem;flex-wrap:wrap}.dash-quick a{text-decoration:none}.page{max-width:1100px}.page-wide{max-width:100%}.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin-bottom:1.25rem}.page-title{font-size:1.5rem;font-weight:700;letter-spacing:-.01em;margin:0;color:var(--fg)}.page-sub{margin:.25rem 0 0;font-size:.88rem;color:var(--muted)}.ui-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-sm)}.ui-card-pad{padding:1.1rem 1.25rem}.ui-card+.ui-card{margin-top:1rem}.ui-toolbar{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap}.ui-spacer{margin-left:auto}.ui-btn{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;height:36px;padding:0 .9rem;border-radius:var(--radius-sm);border:1px solid var(--border-strong);background:var(--surface);color:var(--fg);font-size:.88rem;font-weight:600;cursor:pointer;transition:background .12s ease,border-color .12s ease,opacity .12s ease;white-space:nowrap}.ui-btn:hover:not(:disabled){background:var(--surface-2)}.ui-btn:active:not(:disabled){transform:translateY(.5px)}.ui-btn:disabled{opacity:.5;cursor:not-allowed}.ui-btn--primary{background:var(--accent);border-color:var(--accent);color:#fff}.ui-btn--primary:hover:not(:disabled){background:var(--accent-hover)}.ui-btn--danger{background:#fff;border-color:#f1c5c5;color:var(--danger)}.ui-btn--danger:hover:not(:disabled){background:#fdecec}.ui-btn--ghost{border-color:transparent;background:transparent}.ui-btn--ghost:hover:not(:disabled){background:var(--surface-2)}.ui-btn--sm{height:30px;padding:0 .6rem;font-size:.8rem}.ui-btn--icon{width:34px;padding:0}.ui-btn svg{width:16px;height:16px}.ui-input,.ui-select,.ui-textarea{width:100%;height:36px;padding:0 .6rem;border:1px solid var(--border-strong);border-radius:var(--radius-sm);background:var(--surface);color:var(--fg);font-size:.9rem}.ui-textarea{height:auto;padding:.5rem .6rem;resize:vertical}.ui-input:focus,.ui-select:focus,.ui-textarea:focus{outline:none;border-color:var(--accent);box-shadow:var(--ring)}.ui-field{display:flex;flex-direction:column;gap:.3rem}.ui-label{font-size:.78rem;font-weight:600;color:var(--muted)}.ui-table{width:100%;border-collapse:collapse;font-size:.88rem}.ui-table th{text-align:left;background:var(--surface-2);color:var(--muted);font-weight:600;white-space:nowrap}.ui-table td,.ui-table th{padding:.6rem .75rem;border-bottom:1px solid var(--border)}.ui-table tbody tr:hover{background:var(--surface-2)}.ui-table tbody tr:last-child td{border-bottom:none}.ui-table-wrap{overflow-x:auto;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow-sm)}.ui-badge{display:inline-flex;align-items:center;gap:.25rem;height:22px;padding:0 .5rem;border-radius:999px;font-size:.74rem;font-weight:600;background:var(--surface-2);color:var(--muted);border:1px solid var(--border)}.ui-badge--green{background:#e7f6ec;color:#15803d;border-color:#c7ebd4}.ui-badge--red{background:#fdecec;color:#b91c1c;border-color:#f5cccc}.ui-badge--amber{background:#fdf3e2;color:#b45309;border-color:#f3dca6}.ui-badge--blue{background:var(--accent-soft);color:var(--accent-hover);border-color:#c7dbfb}.ui-badge--gray{background:#eef0f3;color:#6b7280;border-color:#e2e5ea}.ui-seg{display:inline-flex;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--radius-sm);padding:2px;gap:2px}.ui-seg button{border:none;background:transparent;padding:.32rem .7rem;border-radius:6px;font-size:.83rem;font-weight:600;color:var(--muted);cursor:pointer}.ui-seg button.is-active{background:var(--surface);color:var(--fg);box-shadow:var(--shadow-sm)}.ui-empty{text-align:center;color:var(--muted);padding:2.5rem 1rem;font-size:.9rem}.ui-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));grid-gap:.85rem;gap:.85rem}.ui-stat{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:1rem 1.1rem;box-shadow:var(--shadow-sm)}.ui-stat-num{font-size:1.6rem;font-weight:700;line-height:1.1}.ui-stat-label{font-size:.8rem;color:var(--muted);margin-top:.2rem}.ui-modal-overlay{position:fixed;inset:0;background:rgba(16,24,40,.45);display:flex;align-items:center;justify-content:center;z-index:100;padding:1rem}.ui-modal{background:var(--surface);border-radius:var(--radius);box-shadow:var(--shadow-lg);width:480px;max-width:92vw;max-height:88vh;overflow-y:auto;padding:1.25rem}.ui-modal h2{margin:0 0 .9rem;font-size:1.1rem;font-weight:700}.share-modal{width:600px;max-width:94vw}.share-modal__note{margin:-.2rem 0 .75rem;font-size:.82rem;color:var(--muted)}.share-modal__legend{list-style:none;margin:0 0 1rem;padding:.6rem .75rem;display:flex;flex-wrap:wrap;gap:.4rem 1rem;background:var(--surface-2);border-radius:var(--radius-sm);font-size:.8rem;color:var(--muted)}.share-modal__legend li{display:inline-flex;align-items:center;gap:.35rem}.share-modal__section{margin-bottom:1.1rem}.share-modal__heading{margin:0 0 .5rem;font-size:.92rem;font-weight:700}.share-modal__empty{margin:.4rem 0 0;font-size:.82rem;color:var(--muted)}.share-modal__list{list-style:none;margin:0;padding:0;border:1px solid var(--border);border-radius:var(--radius);overflow:hidden}.share-acl-row{display:flex;align-items:center;justify-content:space-between;gap:.6rem;min-height:48px;padding:.45rem .7rem;border-bottom:1px solid var(--border)}.share-acl-row:last-child{border-bottom:none}.share-acl-row--readonly{background:var(--surface-2)}.share-acl-row__who{display:flex;align-items:center;flex-wrap:wrap;gap:.4rem;min-width:0}.share-acl-row__name{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:16rem}.share-acl-row__src{font-size:.76rem;color:var(--muted)}.share-acl-row__ctrl{display:flex;align-items:center;gap:.4rem;flex-shrink:0}.share-acl-row__level{width:auto;min-width:6.5rem}.share-modal__add{margin-top:.8rem}.share-modal__add-grid{display:flex;flex-wrap:wrap;align-items:center;gap:.45rem}.share-modal__add-grid .ui-select{width:auto;min-width:9rem;flex:1 1 9rem}.share-modal__add-hint{font-size:.82rem;color:var(--muted);align-self:center}.share-modal__add-btn{flex-shrink:0}.share-modal__broad{margin-top:.5rem}.ui-modal--wide{width:960px;max-width:96vw;max-height:92vh;display:flex;flex-direction:column}.preview-head{display:flex;align-items:center;gap:.5rem;margin-bottom:.75rem}.preview-title{font-size:1rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:60%}.preview-body{flex:1 1;min-height:0;overflow:auto;background:var(--surface-2,#f8fafc);border:1px solid var(--border);border-radius:var(--radius-sm);padding:.75rem}.preview-frame{width:100%;height:78vh;border:none;background:#fff}.preview-pdf{display:flex;flex-direction:column;align-items:center;gap:.75rem}.preview-pdf-page{max-width:100%;height:auto;box-shadow:var(--shadow-sm,0 1px 4px rgba(0,0,0,.15));background:#fff}.preview-text{margin:0;white-space:pre-wrap;word-break:break-word;font-size:.85rem;line-height:1.5;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.preview-html{background:#fff;padding:1rem 1.25rem;font-size:.9rem;line-height:1.6}.preview-html table{border-collapse:collapse;margin:.5rem 0}.preview-html td,.preview-html th{border:1px solid var(--border);padding:.25rem .5rem;text-align:left;vertical-align:top}.preview-html h3{margin:1rem 0 .4rem;font-size:.95rem}.preview-html img{max-width:100%;height:auto}.ui-row{display:flex;gap:.6rem;flex-wrap:wrap}.safety{max-width:1100px}.safety>h1{font-size:1.5rem;font-weight:700;margin:0 0 1.1rem}.safety-create{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-sm);padding:1.1rem 1.25rem;margin-bottom:1.25rem}.safety-create h2{font-size:1.05rem;font-weight:700;margin:0 0 .7rem}.safety-create input,.safety-create textarea{width:100%;margin-bottom:.6rem}.safety-layout{display:grid;grid-template-columns:320px 1fr;grid-gap:1.25rem;gap:1.25rem;align-items:start}@media (max-width:860px){.safety-layout{grid-template-columns:1fr}}.safety-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}.safety-list li{margin:0}.safety-list>li>button{display:block;width:100%;text-align:left;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);padding:.7rem .8rem;cursor:pointer;font-size:.9rem;transition:border-color .12s,background .12s}.safety-list>li>button:hover{background:var(--surface-2)}.safety-list>li>button.selected{border-color:var(--accent);box-shadow:var(--ring)}.safety-list .my{color:var(--muted);font-size:.82rem}.safety-aggregate,.safety-detail,.safety-locations,.safety-respond,.safety-roster{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-sm);padding:1.1rem 1.25rem;margin-bottom:1rem}.safety-detail h2{font-size:1.15rem;font-weight:700;margin:0 0 .4rem}.safety-aggregate h3,.safety-detail h3,.safety-locations h3,.safety-respond h3,.safety-roster h3{font-size:1rem;font-weight:700;margin:0 0 .6rem}.safety-admin{display:flex;gap:.6rem;flex-wrap:wrap;margin:.6rem 0}.safety-admin button{background:var(--accent);color:#fff;border:1px solid var(--accent);border-radius:var(--radius-sm);padding:.5rem .9rem;font-weight:600}.status-buttons{display:flex;gap:.6rem;flex-wrap:wrap;margin-bottom:.9rem}.status-buttons button{flex:1 1;min-width:110px;padding:.7rem;border-radius:var(--radius-sm);border:1.5px solid var(--border-strong);background:var(--surface);font-weight:700;font-size:.95rem;cursor:pointer}.status-buttons button.picked-safe{background:#e7f6ec;border-color:#15803d;color:#15803d}.status-buttons button.picked-concern{background:#fdf3e2;border-color:#b45309;color:#b45309}.status-buttons button.picked-help{background:#fdecec;border-color:#b91c1c;color:#b91c1c}.location-pick{margin:.6rem 0;display:flex;flex-direction:column;gap:.4rem}.location-pick label{display:inline-flex;align-items:center;gap:.3rem;margin-right:.6rem;font-size:.9rem}.location-pick input[type=text],.location-pick>input{max-width:360px}.gps-msg{font-size:.82rem;color:var(--muted)}.safety-aggregate ul{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));grid-gap:.5rem;gap:.5rem}.safety-aggregate li{background:var(--surface-2);border-radius:var(--radius-sm);padding:.6rem .8rem;font-size:.9rem}.safety-locations table,.safety-roster table{width:100%;border-collapse:collapse;font-size:.86rem}.safety-locations th,.safety-roster th{text-align:left;background:var(--surface-2);color:var(--muted)}.safety-locations td,.safety-locations th,.safety-roster td,.safety-roster th{padding:.5rem .6rem;border-bottom:1px solid var(--border)}.safety-respond textarea{width:100%;margin:.5rem 0}.reservations{max-width:100%}.reservations>h1{font-size:1.5rem;font-weight:700;margin:0}.rsv-header{display:flex;align-items:center;gap:1rem;flex-wrap:wrap;margin-bottom:1rem}.rsv-rooms{display:inline-flex;gap:4px;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--radius-sm);padding:3px}.rsv-rooms .tab{border:none;background:transparent;padding:.4rem .85rem;border-radius:6px;font-size:.85rem;font-weight:600;color:var(--muted);cursor:pointer}.rsv-rooms .tab.active{background:var(--surface);color:var(--fg);box-shadow:var(--shadow-sm)}.rsv-nav{display:inline-flex;align-items:center;gap:.5rem}.rsv-nav button{background:var(--surface);border:1px solid var(--border-strong);border-radius:var(--radius-sm);padding:.4rem .7rem;font-size:.85rem;font-weight:600;cursor:pointer}.rsv-nav button:hover{background:var(--surface-2)}.rsv-range{font-size:.85rem;color:var(--muted);margin-left:.25rem}.rsv-grid{border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow-sm)}@media (max-width:640px){.app-content{padding:1rem .85rem}.page,.page-wide{max-width:100%}.auth-card input,.field input,.ui-input,.ui-select,.ui-textarea,input,select,textarea{font-size:16px}.ui-input,.ui-select{height:42px}.ui-toolbar{gap:.5rem}.ui-toolbar>.ui-input,.ui-toolbar>.ui-select,.ui-toolbar>input,.ui-toolbar>select{flex:1 1 100%!important;width:100%!important;min-width:0!important;max-width:100%!important}.ui-spacer{display:none}.ui-btn{min-height:44px;padding:0 1rem}.ui-btn--sm{min-height:36px}.ui-btn--icon{min-height:44px;width:44px}.page-head{flex-direction:column;align-items:stretch;gap:.75rem}.page-head .ui-btn,.page-head>.ui-btn{width:100%}.page-title{font-size:1.3rem}.ui-row{flex-direction:column}.ui-row>*{width:100%}.ui-stats{grid-template-columns:repeat(2,1fr)}.data-table,.files-table,.ui-table-wrap{-webkit-overflow-scrolling:touch}.ui-table{min-width:560px}.ui-table td,.ui-table th{padding:.5rem .55rem}.ui-seg{overflow-x:auto;max-width:100%}.modal-overlay,.ui-modal-overlay{align-items:flex-end;padding:0}.modal-card,.ui-modal{border-radius:16px 16px 0 0;max-height:90vh;padding:1.1rem 1rem calc(1rem + env(safe-area-inset-bottom))}.modal-card,.share-modal,.ui-modal{width:100%;max-width:100%}.share-acl-row{flex-direction:column;align-items:stretch;gap:.5rem;min-height:0;padding:.7rem}.share-acl-row__ctrl{justify-content:space-between}.share-acl-row__level{flex:1 1;min-height:44px}.share-acl-row__revoke{min-height:44px}.share-acl-row__name{max-width:100%}.share-modal__add-grid{flex-direction:column;align-items:stretch}.share-modal__add-grid .ui-select{width:100%;flex:none;min-height:44px}.share-modal__add-btn{width:100%;min-height:44px}.auth-card{max-width:100%}.safety-layout{grid-template-columns:1fr!important}.status-buttons button{min-height:48px}.rsv-header{gap:.6rem}.rsv-grid{-webkit-overflow-scrolling:touch}.rsv-nav{flex-wrap:wrap}}@media (hover:none){.ui-btn:active:not(:disabled){background:var(--surface-2)}.app-nav a:active{background:var(--sb-hover);color:#fff}}.emp-tabs{display:flex;flex-wrap:wrap;gap:6px;margin:14px 0}.emp-tab{display:inline-flex;align-items:center;height:38px;padding:0 .95rem;border:1px solid var(--border-strong);background:var(--surface);color:var(--fg);border-radius:999px;font-size:.88rem;font-weight:600;cursor:pointer;transition:background .12s ease,color .12s ease,border-color .12s ease}.emp-tab:hover{background:var(--surface-2)}.emp-tab.is-active{background:var(--accent);border-color:var(--accent);color:#fff}.emp-field{display:grid;grid-template-columns:168px 1fr;grid-gap:12px;gap:12px;padding:.55rem 0;border-bottom:1px solid var(--border);align-items:baseline}.emp-field:last-child{border-bottom:none}.emp-field-label{color:var(--muted);font-size:.85rem;font-weight:600}.emp-field-value{display:inline-flex;align-items:center;gap:8px;word-break:break-word}@media (max-width:640px){.emp-field{grid-template-columns:1fr;gap:2px;padding:.5rem 0}.emp-field-label{font-size:.78rem}.emp-tab{height:42px}}.emp-timeline__filters{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap;margin-bottom:.75rem}.emp-timeline__chk{display:inline-flex;align-items:center;gap:.3rem;font-size:.85rem;color:var(--muted)}.emp-timeline__group{margin-bottom:.5rem}.emp-timeline__date{font-size:.8rem;font-weight:700;color:#475467;padding:.3rem 0;position:-webkit-sticky;position:sticky;top:0;background:var(--bg,#fff)}.emp-timeline__item{display:flex;gap:.6rem;padding:.1rem 0 .1rem .25rem;position:relative}.emp-timeline__item:before{content:"";position:absolute;left:.55rem;top:0;bottom:0;width:2px;background:#e4e7ec}.emp-timeline__dot{width:.7rem;height:.7rem;border-radius:50%;background:#98a2b3;margin-top:.45rem;flex:0 0 auto;z-index:1;box-shadow:0 0 0 3px var(--bg,#fff)}.emp-timeline__dot--edit{background:#1d4ed8}.emp-timeline__dot--request{background:#d97706}.emp-timeline__dot--view{background:#98a2b3}.emp-timeline__body{flex:1 1;padding:.4rem .6rem;border:1px solid #eaecf0;border-radius:8px;margin-bottom:.45rem;background:#fff}.emp-timeline__head{display:flex;align-items:center;gap:.4rem;flex-wrap:wrap}.emp-timeline__section{font-weight:600;font-size:.85rem;color:#344054}.emp-timeline__mode{font-size:.75rem;color:var(--muted)}.emp-timeline__time{font-size:.78rem;color:var(--muted);white-space:nowrap}.emp-timeline__fields{display:flex;flex-wrap:wrap;gap:.3rem;margin-top:.4rem}.emp-timeline__field{font-size:.74rem;padding:.08rem .45rem;border-radius:999px;background:#eef4ff;color:#1d4ed8;border:1px solid #d6e4ff}.emp-timeline__who{font-size:.76rem;color:var(--muted);margin-top:.35rem}.chk-grid{display:grid;grid-template-columns:1fr 1fr;grid-gap:.9rem;gap:.9rem}@media (max-width:860px){.chk-grid{grid-template-columns:1fr}}.chk-card__head{display:flex;align-items:baseline;justify-content:space-between;gap:.5rem}.chk-card__count{font-size:.8rem;color:var(--muted)}.chk-progress{height:8px;background:#eaecf0;border-radius:999px;overflow:hidden;margin:.5rem 0 .75rem}.chk-progress__bar{height:100%;background:#16a34a;transition:width .2s ease}.chk-list{list-style:none;margin:0;padding:0}.chk-item{justify-content:space-between;padding:.4rem 0;border-bottom:1px solid #f2f4f7;flex-wrap:wrap}.chk-item,.chk-item__main{display:flex;align-items:center;gap:.5rem}.chk-item__main{cursor:pointer;flex:1 1;min-width:0}.chk-item__title{font-size:.9rem;word-break:break-word}.chk-item--done .chk-item__title{text-decoration:line-through;color:var(--muted)}.chk-item__meta{display:inline-flex;align-items:center;gap:.5rem;font-size:.74rem;color:var(--muted);white-space:nowrap}.chk-item__due{color:#b54708}.chk-add{display:flex;gap:.4rem;margin-top:.6rem;flex-wrap:wrap}.chk-add .ui-input{flex:1 1;min-width:8rem}.org-grid{display:grid;grid-template-columns:1fr 240px;grid-gap:14px;gap:14px;align-items:start}@media (max-width:860px){.org-grid{grid-template-columns:1fr}}.org-tree{min-height:120px;border:1px dashed var(--border-strong);border-radius:var(--radius);padding:10px;background:var(--surface-2)}.org-roothint{font-size:.72rem;color:var(--muted);margin:6px 2px 0}.org-node{border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface);margin:6px 0;padding:8px;box-shadow:var(--shadow-sm)}.org-node-head{display:flex;align-items:center;gap:8px}.org-grip{cursor:-webkit-grab;cursor:grab;color:var(--muted);font-size:.9rem}.org-node-name{font-weight:700}.org-node-actions{margin-left:auto;display:inline-flex;gap:2px}.org-node-actions .ui-btn{min-height:26px;height:26px;padding:0 .4rem}.org-members{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px;min-height:24px}.org-empty{color:var(--muted);font-size:.78rem}.org-emp{display:inline-flex;align-items:center;background:var(--accent-soft);color:var(--accent-hover);border:1px solid #c7dbfb;border-radius:999px;padding:2px 10px;font-size:.8rem;font-weight:600;cursor:-webkit-grab;cursor:grab}.org-children{margin-left:18px;border-left:2px solid var(--border);padding-left:10px;margin-top:4px}.org-pool{border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);padding:10px;box-shadow:var(--shadow-sm);position:-webkit-sticky;position:sticky;top:70px}