/* ==================== RESET & BASE ==================== */
:root{
  --text-muted:#646970;
  --shadow-card:0 1px 2px rgba(16,24,40,.06);
  --shadow-card-hover:0 2px 8px rgba(16,24,40,.09);
}
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;font-size:13px;color:#1d2327;background:#f0f0f1;line-height:1.4;min-height:100vh}
a{color:#2271b1;text-decoration:none}
a:hover{color:#135e96}

/* Keyboard focus (accessibility) */
a:focus-visible,button:focus-visible,[tabindex]:focus-visible{outline:2px solid #2271b1;outline-offset:2px}
input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid #2271b1;outline-offset:1px}

/* ==================== LOGIN PAGE ==================== */
.login-page{background:#fff;min-height:100vh;font-family:Arial,Roboto,sans-serif;color:#222}
.login-container{width:1010px;margin:0 auto;padding-top:4px;position:relative;left:-50px;max-width:calc(100vw - 44px)}
.login-header{width:100%;height:62px;display:flex;align-items:center;justify-content:space-between}
.login-header-left{display:flex;align-items:center}
.main-logo{width:150px;height:56px;display:flex;align-items:center;gap:9px;justify-content:flex-start}
.main-logo span{font-size:15px;font-weight:700;color:#33691E;letter-spacing:-0.3px;line-height:1.15}
.login-page .main-logo span{color:#1670b3}
.login-header-right{display:flex;align-items:center}
.main-logo-img{height:34px;width:auto;max-width:132px;object-fit:contain;flex-shrink:0}
.logo-group{display:flex;align-items:center;gap:9px;height:52px}
.logo-badge{height:36px;padding:0 13px;display:flex;align-items:center;justify-content:center;background:#f0f4f8;border:1px solid #dde3e9;border-radius:4px;font-size:10.5px;font-weight:600;color:#4a5568;letter-spacing:0.5px;text-transform:uppercase;white-space:nowrap}
.login-divider{width:100%;height:5px;background:#2294bd}
.login-main{width:100%;padding:20px 0 0}
.login-main-inner{display:flex;align-items:flex-start;min-height:252px;justify-content:flex-start}
.login-left{flex:0 0 640px}
.login-left h1{font-size:20px;font-weight:600;color:#CC5C70;margin:0 0 2px 0;line-height:1.25}
.login-left .desc{font-size:13px;line-height:19px;color:#222;margin:0}
.login-images{display:flex;gap:6px;margin-top:18px}
.login-image-card{width:258px;height:164px;flex-shrink:0;background:linear-gradient(135deg,#f8fafc 0%,#e8eef5 100%);border:1px solid #e2e8f0;display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden}
.login-image-card svg{width:48px;height:48px;color:#94a3b8;opacity:0.6}
.login-image-card .img-label{position:absolute;bottom:8px;left:8px;font-size:10.5px;font-weight:700;color:#fff;text-transform:uppercase;letter-spacing:0.5px;background:rgba(12,18,26,0.62);padding:4px 9px;border-radius:4px;box-shadow:0 1px 3px rgba(0,0,0,0.3);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);max-width:calc(100% - 16px)}
.login-image-card .img-bg-icon{position:absolute;top:-6px;right:-6px;font-size:96px;color:#e2e8f0;opacity:0.4}
.login-image-card .card-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
.login-vertical-divider{width:1px;height:225px;background:#2294bd;margin:0 26px;flex-shrink:0}
.login-right{flex:1 1 auto;max-width:300px}
.login-panel{width:100%}
.login-panel h2{text-align:center;font-size:20px;font-weight:600;color:#17706e;margin:0 0 16px 0}
.login-panel .field{margin-bottom:12px}
.login-panel .field label{display:block;font-size:12px;font-weight:600;color:#222;margin-bottom:4px}
.login-panel .field input{width:198px;height:31px;padding:3px 8px;border:1px solid #aaa;border-radius:4px;font-size:11.5px;color:#222;background:#fff;outline:none;transition:border-color 0.2s}
.login-panel .field input:focus{border-color:#1F88D1}
.login-btn{display:flex;align-items:center;justify-content:center;gap:4px;width:112px;height:27px;padding:0;background:#1F88D1;color:#fff;border:none;border-radius:4px;font-size:12.5px;font-weight:700;cursor:pointer;margin-top:3px}
.login-btn:hover{background:#1670b3}
.login-btn:disabled{opacity:0.5;cursor:not-allowed}
.login-btn svg{width:11px;height:11px;flex-shrink:0}
.login-demo{text-align:center;margin-top:13px;padding-top:10px;border-top:1px solid #e5e7eb;font-size:9px;color:#6b7280;line-height:1.6}
.login-demo code{background:#f3f4f6;padding:1px 5px;border-radius:3px;font-size:8.5px;color:#1F88D1}
.login-footer-bar{width:100%;height:30px;background:#2294bd;display:flex;align-items:center;padding-left:10px}
.login-footer-bar span{color:#fff;font-size:11px}

/* Login toast (top-right) */
.login-toast-container{position:fixed;top:16px;right:16px;z-index:10000;display:flex;flex-direction:column;gap:10px;align-items:flex-end;pointer-events:none}
.login-toast{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:250px;max-width:340px;padding:12px 14px 12px 16px;border-radius:8px;font-size:13px;font-weight:500;color:#fff;box-shadow:0 8px 24px rgba(0,0,0,0.22);animation:loginToastIn 0.3s ease-out;pointer-events:auto}
.login-toast .toast-close{background:none;border:none;color:rgba(255,255,255,0.85);cursor:pointer;font-size:16px;line-height:1;padding:0 2px}
.login-toast .toast-close:hover{color:#fff}
.login-toast-error{background:#b32d2e;border-left:4px solid #fff}
.login-toast-success{background:#17706e;border-left:4px solid #fff}
.login-toast-info{background:#1670b3;border-left:4px solid #fff}
.login-toast.fade-out{animation:loginToastOut 0.3s ease-in forwards}
@keyframes loginToastIn{from{opacity:0;transform:translateY(-14px)}to{opacity:1;transform:translateY(0)}}
@keyframes loginToastOut{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-14px)}}

/* Login loading overlay (blur + dotted spinner) */
.login-navigating{filter:blur(4px);pointer-events:none;transition:filter 0.25s ease}
.login-loader{position:fixed;inset:0;z-index:9999;flex-direction:column;align-items:center;justify-content:center;gap:26px;background:rgba(255,255,255,0.4);animation:loginLoaderFade 0.25s ease-out}
.login-loader-spin{position:relative;width:170px;height:170px}
.login-loader-ring{width:170px;height:170px;border-radius:50%;border:9px dotted rgba(31,136,209,0.28);border-top-color:#1F88D1;border-right-color:#1F88D1;animation:loginLoaderSpin 1.1s linear infinite}
@keyframes loginLoaderSpin{to{transform:rotate(360deg)}}
.login-loader-dots{position:absolute;top:50%;left:50%;width:96px;height:96px;margin:-48px 0 0 -48px}
.login-loader-dots span{position:absolute;top:50%;left:50%;width:14px;height:14px;border-radius:50%;background:#1F88D1;margin:-7px 0 0 -7px;opacity:0;animation:loginDot 1.2s linear infinite}
.login-loader-dots span:nth-child(1){transform:rotate(0deg) translateX(32px);animation-delay:0s}
.login-loader-dots span:nth-child(2){transform:rotate(45deg) translateX(32px);animation-delay:0.15s}
.login-loader-dots span:nth-child(3){transform:rotate(90deg) translateX(32px);animation-delay:0.3s}
.login-loader-dots span:nth-child(4){transform:rotate(135deg) translateX(32px);animation-delay:0.45s}
.login-loader-dots span:nth-child(5){transform:rotate(180deg) translateX(32px);animation-delay:0.6s}
.login-loader-dots span:nth-child(6){transform:rotate(225deg) translateX(32px);animation-delay:0.75s}
.login-loader-dots span:nth-child(7){transform:rotate(270deg) translateX(32px);animation-delay:0.9s}
.login-loader-dots span:nth-child(8){transform:rotate(315deg) translateX(32px);animation-delay:1.05s}
@keyframes loginDot{0%{opacity:0}50%{opacity:1}100%{opacity:0}}
@keyframes loginLoaderFade{from{opacity:0}to{opacity:1}}
.login-loader-text{font-size:14px;font-weight:600;color:#17706e;letter-spacing:0.3px}

/* Login responsive: shrink elements + lean content slightly left as window narrows */
@media (max-width: 1160px){
  .login-container{width:auto;margin:0 30px;left:-22px;max-width:none}
  .login-left{flex:0 0 58%}
  .login-image-card{width:225px;height:152px}
  .login-image-card svg{width:42px;height:42px}
  .login-vertical-divider{height:210px;margin:0 20px}
}
@media (max-width: 980px){
  .login-container{margin:0 3vw;left:-8px;width:auto;max-width:none}
  .login-main{padding-top:16px}
  .login-main-inner{justify-content:flex-start;margin-left:-8px}
  .login-left{flex:0 0 54%}
  .login-left h1{font-size:18px}
  .login-left .desc{font-size:12px;line-height:17px}
  .login-image-card{width:196px;height:140px}
  .login-image-card svg{width:38px;height:38px}
  .login-vertical-divider{height:200px;margin:0 16px}
  .login-panel h2{font-size:18px;margin-bottom:14px}
  .login-panel .field{margin-bottom:10px}
  .login-panel .field input{width:180px;height:30px;font-size:11px}
  .login-btn{width:104px;height:25px;font-size:12px}
  .main-logo span{font-size:13px}
  .logo-badge{height:33px;padding:0 10px;font-size:9.5px}
  .main-logo-img{height:30px}
}

/* ==================== LAYOUT ==================== */
.app-layout{display:flex;height:100vh;overflow:hidden}
.sidebar{width:240px;background:#1d2327;color:#a7aaad;display:flex;flex-direction:column;flex-shrink:0;z-index:100}
.sidebar-header{padding:14px 14px 10px;border-bottom:1px solid rgba(255,255,255,0.06);flex-shrink:0}
.sidebar-logo{display:flex;align-items:center;gap:9px;color:#fff;font-weight:700;font-size:0.95rem}
.sidebar-logo svg{width:20px;height:20px;color:#2271b1;flex-shrink:0}
.sidebar-logo-img{width:30px;height:30px;flex-shrink:0;border-radius:50%;object-fit:cover;background:#fff;box-shadow:0 0 0 2px rgba(255,255,255,0.14)}
.sidebar-nav{flex:1;padding:2px 0;overflow-y:auto}
.sidebar-nav::-webkit-scrollbar{width:4px}
.sidebar-nav::-webkit-scrollbar-thumb{background:#2c3338;border-radius:4px}
.sidebar-section-title{padding:12px 14px 3px;font-size:0.6rem;font-weight:600;text-transform:uppercase;letter-spacing:0.08em;color:#787c82}
.sidebar-link{display:flex;align-items:center;gap:8px;padding:7px 14px;color:#a7aaad;font-size:0.78rem;transition:all 0.15s;border-left:3px solid transparent;cursor:pointer;text-decoration:none}
.sidebar-link:hover{background:rgba(255,255,255,0.04);color:#fff}
.sidebar-link.active{background:rgba(255,255,255,0.06);color:#fff;border-left-color:#2271b1}
.sidebar-link svg{width:15px;height:15px;opacity:0.7;flex-shrink:0}
.sidebar-link.active svg,.sidebar-link:hover svg{opacity:1}
.sidebar-footer{padding:10px 14px;border-top:1px solid rgba(255,255,255,0.06);flex-shrink:0}
.sidebar-avatar{width:28px;height:28px;border-radius:50%;background:#2c3338;display:flex;align-items:center;justify-content:center;font-weight:600;font-size:0.7rem;color:#fff;flex-shrink:0}
.sidebar-user{display:flex;align-items:center;gap:8px}
.sidebar-user-name{font-weight:500;color:#f0f0f1;font-size:0.78rem}
.sidebar-user-role{font-size:0.65rem;color:#787c82;text-transform:capitalize}

.main-content{flex:1;display:flex;flex-direction:column;min-width:0}
.header{height:40px;background:#fff;border-bottom:1px solid #e2e4e7;display:flex;align-items:center;justify-content:space-between;padding:0 14px;flex-shrink:0}
.header-left{display:flex;align-items:center;gap:10px}
.header-title{font-size:0.9rem;font-weight:600;color:#1d2327}
.header-right{display:flex;align-items:center;gap:4px}
.header-btn{display:inline-flex;align-items:center;gap:5px;padding:5px 10px;background:#2271b1;color:#fff;border:none;border-radius:3px;font-weight:500;font-size:0.75rem;cursor:pointer;text-decoration:none;transition:background 0.15s}
.header-btn:hover{background:#135e96}
.header-btn svg{width:13px;height:13px}
.header-icon-btn{background:none;border:none;cursor:pointer;padding:6px;color:#787c82;border-radius:3px;transition:all 0.15s;display:flex;align-items:center}
.header-icon-btn:hover{background:#f0f0f1;color:#1d2327}
.header-icon-btn svg{width:16px;height:16px}

/* Status Dot */
.status-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0;display:inline-block}
.status-dot.green{background:#008a20;box-shadow:0 0 0 2px #e5f5e8}
.status-dot.orange{background:#b26200;box-shadow:0 0 0 2px #fef8e7}
.status-dot.red{background:#b32d2e;box-shadow:0 0 0 2px #fae6e6}

/* Global Search */
.header-search{display:flex;align-items:center;background:#f0f0f1;border-radius:4px;padding:0 8px;height:26px;min-width:120px;transition:all 0.2s;margin-right:4px;position:relative}
.header-search:focus-within{background:#fff;border:1px solid #2271b1;box-shadow:0 0 0 1px #2271b1;min-width:180px}
.header-search-icon{color:#8c8f94;flex-shrink:0;margin-right:5px}
.header-search input{border:none;background:none;outline:none;font-size:0.7rem;color:#1d2327;width:100%;line-height:1}
.header-search input::placeholder{color:#a7aaad}
.header-search-dropdown{position:absolute;top:calc(100% + 5px);left:-2px;right:-2px;min-width:260px;background:#fff;border:1px solid #e2e4e7;border-radius:6px;box-shadow:0 8px 20px rgba(0,0,0,0.12);z-index:300;display:none;overflow:hidden}
.gsearch-item{display:flex;align-items:center;gap:8px;padding:7px 10px;cursor:pointer;border-bottom:1px solid #f6f7f7}
.gsearch-item:hover{background:#f6f7f7}
.gsearch-empty{color:#646970;font-size:0.7rem;justify-content:center;padding:12px 10px;cursor:default}
.gsearch-avatar{width:26px;height:26px;border-radius:50%;background:#e8f0fe;color:#1d4e89;display:flex;align-items:center;justify-content:center;font-size:0.62rem;font-weight:700;flex-shrink:0}
.gsearch-info{display:flex;flex-direction:column;min-width:0}
.gsearch-name{font-weight:600;color:#1d2327;font-size:0.72rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gsearch-meta{color:#646970;font-size:0.62rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gsearch-footer{padding:5px 10px;font-size:0.6rem;color:#a7aaad;background:#fafbfc;border-top:1px solid #f0f0f1;text-align:center}

/* Notifications - unread state */
.notify-item.unread{background:#fae6e6;position:relative}
.notify-item.unread::before{content:"";position:absolute;left:0;top:4px;bottom:4px;width:3px;background:#b32d2e;border-radius:0 3px 3px 0}
.notify-item.read{opacity:0.6}
.notify-item.read strong{color:#50575e}
.notify-item.read:hover{opacity:1;background:#f6f7f7}
.notify-empty{padding:18px 12px;text-align:center}
.notify-empty-icon{width:34px;height:34px;margin:0 auto 8px;border-radius:50%;background:#e5f5e8;color:#008a20;display:flex;align-items:center;justify-content:center}
.notify-empty-title{font-size:0.72rem;font-weight:700;color:#3c434a}
.notify-empty-sub{font-size:0.64rem;color:#8c8f94;margin-top:2px}
.notify-section-label{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 9px 5px;background:#f6f7f7;border-top:1px solid #e2e4e7;border-bottom:1px solid #e2e4e7;font-size:0.56rem;font-weight:700;letter-spacing:0.06em;text-transform:uppercase;color:#8c8f94}
.notify-section-label:first-child{border-top:none}
.notify-section-label span{font-size:0.55rem;font-weight:600;color:#a7aaad;letter-spacing:0}

/* Help Tooltip */
.header-help-wrap{position:relative}
.help-tooltip{position:absolute;top:38px;right:0;width:210px;background:#fff;border:1px solid #e2e4e7;border-radius:6px;box-shadow:0 8px 20px rgba(0,0,0,.12);padding:8px;z-index:120;font-size:0.7rem;color:#3c434a}
.help-title{font-size:0.72rem;font-weight:700;color:#1d2327;padding:2px 4px 6px;border-bottom:1px solid #f0f0f1;margin-bottom:4px}
.help-item{padding:3px 4px;display:flex;align-items:center;gap:6px}
.help-item kbd{display:inline-block;padding:1px 5px;font-size:0.62rem;font-family:monospace;background:#f0f0f1;border:1px solid #dcdcde;border-radius:3px;color:#3c434a;min-width:20px;text-align:center}
.help-divider{height:1px;background:#f0f0f1;margin:4px 0}

/* User Dropdown */
.header-user-wrap{position:relative}
.header-user-btn{display:flex;align-items:center;gap:6px;padding:3px 8px 3px 4px;background:none;border:1px solid transparent;border-radius:4px;cursor:pointer;color:#1d2327;transition:all 0.15s;height:30px}
.header-user-btn:hover{background:#f0f0f1;border-color:#dcdcde}
.header-user-avatar{width:24px;height:24px;border-radius:50%;background:#2271b1;color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:0.6rem;flex-shrink:0}
.header-user-greeting{font-size:0.7rem;font-weight:500;color:#3c434a;white-space:nowrap}
.user-dropdown{position:absolute;top:38px;right:0;width:200px;background:#fff;border:1px solid #e2e4e7;border-radius:6px;box-shadow:0 8px 20px rgba(0,0,0,.12);padding:6px;z-index:120}
.user-dropdown-header{font-size:0.72rem;font-weight:600;color:#1d2327;padding:6px 8px 8px;border-bottom:1px solid #f0f0f1;margin-bottom:4px}
.user-dropdown-item{display:flex;align-items:center;gap:8px;padding:6px 8px;font-size:0.72rem;color:#3c434a;cursor:pointer;border-radius:3px;transition:background 0.12s}
.user-dropdown-item:hover{background:#f0f0f1}
.user-dropdown-item svg{color:#787c82;flex-shrink:0}
.user-dropdown-divider{height:1px;background:#f0f0f1;margin:4px 0}

/* Notification dropdown wider */
.notify-dropdown{width:272px}

.content{flex:1;padding:8px 12px;overflow-y:auto;min-height:0;display:flex;flex-direction:column}

/* ==================== STATS CARDS ==================== */
.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-bottom:6px}
.stat-card{background:#fff;border:1px solid #e2e4e7;border-radius:5px;padding:9px 12px;display:flex;align-items:center;gap:8px;box-shadow:var(--shadow-card);transition:box-shadow 0.18s ease}
.stat-icon{width:34px;height:34px;border-radius:5px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.stat-icon svg{width:17px;height:17px}
.stat-icon.blue{background:#e5f0fa;color:#2271b1}
.stat-icon.green{background:#e5f5e8;color:#008a20}
.stat-icon.orange{background:#fef8e7;color:#b26200}
.stat-icon.red{background:#fae6e6;color:#b32d2e}
.stat-label{font-size:0.7rem;color:#646970;margin-bottom:1px}
.stat-value{font-size:1.22rem;font-weight:600;color:#1d2327}
/* Clickable dashboard stat cards (filter / navigate shortcuts) */
.stat-card-action{width:100%;font-family:inherit;text-align:left;cursor:pointer;-webkit-appearance:none;appearance:none}
.stat-card-action:hover{box-shadow:var(--shadow-card-hover);border-color:#c3d0dd}
.stat-card-action:active{transform:translateY(1px)}
.stat-card-action.is-active{border-color:#2271b1;box-shadow:0 0 0 1px #2271b1}
.stat-content{min-width:0}

/* ==================== DASHBOARD INFO BAR ==================== */
.dash-bar{background:#fff;border:1px solid #e2e4e7;border-radius:5px;padding:5px 10px;margin-bottom:5px;display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:0.7rem;color:#646970;box-shadow:var(--shadow-card)}
.dash-bar-item{white-space:nowrap}
.dash-bar-item strong{color:#1d2327}
.dash-bar-sep{width:1px;height:20px;background:#e2e4e7}
.dash-bar-mini{display:flex;align-items:center;gap:5px;font-size:0.68rem;white-space:nowrap}
.dash-bar-mini span{color:#646970}
.dash-bar-track{width:44px;height:4px;border-radius:999px;background:#eef0f3;overflow:hidden}
.dash-bar-fill{height:100%;border-radius:999px;transition:width 0.3s ease}
.dash-bar-fill.green{background:#008a20}
.dash-bar-fill.orange{background:#b26200}
.dash-bar-reminders{display:flex;align-items:center;gap:8px;font-size:0.68rem;white-space:nowrap}
.dash-bar-reminders span{color:#646970}
.dash-bar-actions{display:flex;align-items:center;gap:4px;margin-left:auto;padding-right:4px}
.dash-bar-actions .btn-reset,.dash-bar-actions .header-btn{min-width:64px;justify-content:center}

/* ==================== SEARCH & FILTER ==================== */
.search-card{background:#fff;border:1px solid #e2e4e7;border-radius:5px;padding:10px 14px;margin-bottom:10px;box-shadow:var(--shadow-card)}
.search-form{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.search-input{flex:1;min-width:140px;height:30px;padding:0 8px;border:1px solid #dcdcde;border-radius:3px;font-size:0.75rem;color:#1d2327;background:#fff;outline:none;transition:border-color 0.15s}
.search-input:focus{border-color:#2271b1;box-shadow:0 0 0 1px #2271b1}
.search-input::placeholder{color:#a7aaad}
.form-select{height:30px;min-width:100px;padding:0 24px 0 8px;border:1px solid #dcdcde;border-radius:3px;font-size:0.75rem;color:#1d2327;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23787c82' fill='none' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 8px center;outline:none;appearance:none;cursor:pointer}
.form-select:focus{border-color:#2271b1;box-shadow:0 0 0 1px #2271b1}
.btn-reset{height:30px;padding:0 10px;background:#f6f7f7;border:1px solid #dcdcde;border-radius:3px;font-size:0.75rem;color:#3c434a;cursor:pointer;transition:background 0.15s;white-space:nowrap}
.btn-reset:hover{background:#f0f0f1}
.offline-conflict-notice{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 10px;padding:10px 12px;background:#fcf0f1;border:1px solid #d63638;border-radius:5px;color:#3c434a;font-size:.75rem}
.offline-conflict-notice[hidden]{display:none}
.offline-conflict-notice strong,.offline-conflict-notice span{display:block}
.offline-conflict-notice strong{color:#8a2424;margin-bottom:2px}
.offline-conflict-notice .btn-reset{flex:0 0 auto}
.offline-conflict-overlay{z-index:12000}
.offline-conflict-modal{width:min(760px,94vw);max-height:88vh}
.offline-conflict-intro,.offline-conflict-message{font-size:.75rem;line-height:1.5;color:#50575e;margin:0 0 10px}
.offline-conflict-item{border:1px solid #dcdcde;border-radius:6px;padding:12px;margin:10px 0;background:#fff}
.offline-conflict-item h4{font-size:.8rem;color:#1d2327;overflow-wrap:anywhere}
.offline-conflict-version{font-size:.68rem;color:#646970;margin:0 0 8px}
.offline-conflict-field{padding:8px 0;border-top:1px solid #f0f0f1}
.offline-conflict-field h5{font-size:.72rem;margin-bottom:6px;color:#1d2327}
.offline-conflict-comparison{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.offline-conflict-value{min-width:0;padding:8px;background:#f6f7f7;border-radius:4px}
.offline-conflict-value strong{font-size:.65rem;color:#646970}
.offline-conflict-value pre{white-space:pre-wrap;overflow-wrap:anywhere;font: .7rem/1.4 ui-monospace,SFMono-Regular,Consolas,monospace;color:#1d2327;margin:4px 0 0}
.offline-conflict-actions{flex-wrap:wrap}
.offline-conflict-actions button:disabled{opacity:.55;cursor:not-allowed}
@media(max-width:600px){.offline-conflict-notice{align-items:flex-start;flex-direction:column}.offline-conflict-comparison{grid-template-columns:1fr}}

/* ==================== TABLE ==================== */
.table-card{background:#fff;border:1px solid #e2e4e7;border-radius:5px;overflow:hidden;box-shadow:var(--shadow-card)}
.table-header{padding:5px 8px;border-bottom:1px solid #e2e4e7;display:flex;align-items:center;justify-content:space-between;gap:6px;flex-wrap:wrap}
.table-title{font-weight:600;font-size:0.85rem;color:#1d2327}
.table-toolbar{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.table-wrap{overflow-x:auto}
table{width:100%;text-align:left;border-collapse:collapse}
table th{padding:7px 10px;font-weight:600;font-size:0.65rem;text-transform:uppercase;letter-spacing:0.05em;color:#646970;background:#f6f7f7;border-bottom:1px solid #e2e4e7;white-space:nowrap}
table td{padding:7px 10px;border-bottom:1px solid #f0f0f1;font-size:0.75rem;color:#3c434a}
table tr:last-child td{border-bottom:none}
table tr:hover td{background:#f6f7f7}
.badge{display:inline-flex;padding:1px 8px;font-size:0.65rem;font-weight:600;border-radius:50px}
.badge-active{background:#e5f5e8;color:#008a20}
.badge-retired{background:#fef8e7;color:#b26200}
.badge-inactive{background:#f0f0f1;color:#646970}
.badge-warning{background:#fef8e7;color:#b26200}
.user-cell{display:flex;align-items:center;gap:8px}
.user-avatar{width:26px;height:26px;border-radius:50%;background:#e5f0fa;display:flex;align-items:center;justify-content:center;font-weight:600;font-size:0.65rem;color:#2271b1;flex-shrink:0}
.user-cell-info{min-width:0}
.user-cell-name{font-weight:500;font-size:0.75rem;color:#1d2327;display:block}
.user-cell-email{font-size:0.65rem;color:#646970;display:block}
.table-actions{display:flex;gap:3px}
.table-actions button{padding:4px;background:none;border:none;cursor:pointer;color:#646970;border-radius:3px;transition:all 0.15s}
.table-actions button:hover{background:#f0f0f1;color:#1d2327}
.table-actions button svg{width:14px;height:14px}

/* ==================== PAGINATION ==================== */
.pagination{display:flex;align-items:center;padding:5px 8px;justify-content:space-between}
.pagination-info{font-size:0.7rem;color:#646970}
.pagination-btns{display:flex;gap:2px}
.page-btn{min-width:26px;height:26px;padding:0 6px;border:1px solid #dcdcde;border-radius:3px;background:#fff;cursor:pointer;font-size:0.7rem;color:#3c434a;transition:all 0.15s;display:flex;align-items:center;justify-content:center}
.page-btn:hover{background:#f0f0f1}
.page-btn.active{background:#2271b1;color:#fff;border-color:#2271b1}
.page-btn:disabled{opacity:0.4;cursor:default}

/* ==================== WELCOME MESSAGE ==================== */
.welcome-msg{font-size:0.78rem;color:#50575e;padding:0 2px;margin-bottom:8px;line-height:1.4;font-weight:500}
.welcome-msg strong{color:#1d2327}

/* ==================== TWO-COLUMN DASHBOARD ==================== */
#dashboardHomeView{display:flex;flex-direction:column;height:100%}
.dash-main{display:flex;gap:12px;flex:1;min-height:0}
.dash-main-left{flex:0 1 auto;width:60%;min-width:0;display:flex;flex-direction:column}
.dash-main-left .table-card{flex:0 1 auto;min-height:0;display:flex;flex-direction:column}
.dash-main-left .table-card .table-wrap{flex:1;overflow-y:auto}
.dash-main-left .table-card .table-wrap::-webkit-scrollbar{width:4px}
.dash-main-left .table-card .table-wrap::-webkit-scrollbar-thumb{background:#dcdcde;border-radius:4px}
.dash-main-right{flex:0 1 auto;width:34%;min-width:280px;display:flex;flex-direction:column;gap:5px;padding-right:4px}
/* Fill the old 6% slack while keeping each view's column ratio */
@media (min-width:769px){
  .dash-main-left,.dash-main-right{flex-grow:1;flex-basis:auto}
}
@media (max-width:900px){
  .admin-shell .dash-main-left,.admin-shell .dash-main-right{flex-grow:0}
}
.doc-view-shell{gap:4px!important;min-height:0}
.doc-view-shell .dash-main{gap:8px;flex:1;min-height:0}
.doc-view-shell .dash-main-left{flex:0 1 auto;width:65%;display:flex;flex-direction:column;min-height:0}
.doc-view-shell .dash-main-right{flex:0 1 auto;width:35%;display:flex;flex-direction:column;gap:4px;min-height:0;overflow-y:visible}
@media (min-width:769px){
  .doc-view-shell .dash-main-left,.doc-view-shell .dash-main-right{flex-grow:1}
}
.doc-view-shell .dash-main-right .widget{flex-shrink:0}
.doc-view-shell .dash-main-right .widget-title{padding:4px 8px;font-size:0.64rem}
.doc-view-shell .doc-upload-zone{padding:10px}
.doc-view-shell .doc-upload-zone svg{width:18px;height:18px;margin-bottom:3px}
.doc-view-shell .doc-upload-zone div{font-size:0.68rem}
.doc-view-shell .doc-stats-grid{gap:4px}
.doc-view-shell .stat-card{padding:6px 10px}
.doc-view-shell .stat-label{font-size:0.62rem}
.doc-view-shell .stat-value{font-size:0.95rem}
.doc-view-shell .stat-icon{width:28px;height:28px}
.doc-view-shell .stat-icon svg{width:14px;height:14px}
.doc-view-shell .table-card{flex:0 1 auto;display:flex;flex-direction:column;min-height:0;width:100%}
.doc-view-shell .table-card .table-wrap{flex:0 1 auto;overflow-y:auto;min-height:0}
.dash-search-bar{display:flex;gap:6px;padding:5px 8px;border-bottom:1px solid #e2e4e7;align-items:center}
/* Single-row filter bar: every control stays on one line (Reset never wraps) */
.dash-filter-bar{flex-wrap:nowrap;gap:5px;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin}
.dash-filter-bar>*{flex-shrink:1;min-width:0}
.dash-filter-bar .search-input{flex:1 1 120px;min-width:90px;height:28px;font-size:0.7rem}
.dash-filter-bar .form-select{height:28px;font-size:0.7rem;min-width:0;padding-left:6px;padding-right:18px}
.dash-filter-bar #statusSelect{flex:0 1 84px}
.dash-filter-bar #sortDateSelect{flex:0 1 134px}
.dash-filter-bar #sortDirSelect{flex:0 1 74px}
.dash-filter-bar #docCatFilter{flex:0 1 104px}
.dash-filter-bar .filter-date-input{flex:0 1 126px;padding:0 4px}
.dash-filter-bar .btn-reset{flex:0 0 auto;height:28px;padding:0 9px;font-size:0.7rem}
.dash-filter-bar .search-input::placeholder{font-size:0.68rem}

/* ==================== WIDGETS ==================== */
.widget{background:#fff;border:1px solid #e2e4e7;border-radius:5px;overflow:hidden;box-shadow:var(--shadow-card);transition:box-shadow 0.18s ease}
.widget:hover{box-shadow:var(--shadow-card-hover)}
.widget-title{font-size:0.7rem;font-weight:700;color:#1d2327;padding:5px 10px;border-bottom:1px solid #f0f0f1;display:flex;align-items:center;justify-content:space-between;text-transform:uppercase;letter-spacing:0.04em}
.widget-toggle{font-size:0.8rem;color:#8c8f94}
.widget-body{font-size:0.7rem;color:#3c434a;padding:5px 12px 8px}
.widget-empty{color:#8c8f94;text-align:center;padding:5px 0;font-size:0.68rem}
.widget-health .widget-body{display:flex;flex-wrap:wrap;gap:5px}
.widget-split-body.collapsed{display:none}
.cal-nav-title{display:flex;align-items:center;gap:6px}
.cal-nav-btn{background:none;border:1px solid #dcdcde;border-radius:3px;cursor:pointer;font-size:0.75rem;font-weight:700;color:#2271b1;width:20px;height:20px;display:flex;align-items:center;justify-content:center;line-height:1;padding:0;transition:all 0.15s}
.cal-nav-btn:hover{background:#edf6ff;border-color:#2271b1}

/* ==================== WIDGET LIST ITEMS ==================== */
.milestone-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:3px 0 5px;margin-bottom:2px;border-bottom:1px solid #eef0f2}
.milestone-head-txt{display:inline-flex;align-items:center;gap:6px;font-size:0.6rem;font-weight:700;color:#1d2327;text-transform:uppercase;letter-spacing:.04em}
.milestone-head-dot{width:8px;height:8px;border-radius:50%;background:#b32d2e;box-shadow:0 0 0 0 rgba(179,45,46,.5);animation:msPulse 1.6s infinite}
@keyframes msPulse{0%{box-shadow:0 0 0 0 rgba(179,45,46,.5)}70%{box-shadow:0 0 0 6px rgba(179,45,46,0)}100%{box-shadow:0 0 0 0 rgba(179,45,46,0)}}
.milestone-viewall{font-size:0.6rem;font-weight:700;color:#2271b1;background:transparent;border:1px solid #cfe0f2;border-radius:4px;padding:1px 6px;cursor:pointer;flex-shrink:0}
.milestone-viewall:hover{background:#e8f0fa}
.milestone-item{display:flex;align-items:flex-start;gap:7px;padding:6px 0;margin-top:2px;border-bottom:1px solid #f6f7f7;border-left:3px solid transparent;padding-left:6px;border-radius:0 4px 4px 0;font-size:0.7rem}
.milestone-item:last-child{border-bottom:none}
.milestone-item.ms-bday{border-left-color:#e26a2b;background:#fdf5ee}
.milestone-item.ms-jubilee{border-left-color:#c99b1f;background:#fdf9e9}
.milestone-item.ms-profession{border-left-color:#8e4ec6;background:#f6f0fb}
.milestone-item.ms-reminder{border-left-color:#2271b1;background:#f2f7ff}
.milestone-icon{width:16px;flex-shrink:0;text-align:center;line-height:1.3;color:#646970}
.milestone-info{flex:1;min-width:0;line-height:1.3;word-break:break-word}
.milestone-top{display:flex;align-items:center;justify-content:space-between;gap:6px}
.milestone-type{font-size:0.6rem;font-weight:700;text-transform:uppercase;letter-spacing:.03em;color:#646970}
.milestone-name{font-weight:600;color:#1d2327;font-size:0.72rem;margin-top:1px}
.milestone-date{color:#646970;font-size:0.65rem;margin-top:1px}
.ms-urg{font-size:0.6rem;font-weight:700;padding:1px 7px;border-radius:999px;background:#eef1f4;color:#3c434a;flex-shrink:0;white-space:nowrap}
.ms-urg-today{background:#b32d2e;color:#fff}
.ms-urg-tomorrow{background:#d9751b;color:#fff}

.doc-item{display:flex;align-items:flex-start;gap:6px;padding:4px 0;border-bottom:1px solid #f6f7f7;font-size:0.7rem;cursor:pointer}
.doc-item:last-child{border-bottom:none}
.doc-item:hover .doc-name{color:#2271b1}
.doc-icon{width:14px;flex-shrink:0;color:#2271b1;margin-top:1px}
.doc-info{flex:1;min-width:0;line-height:1.3;word-break:break-word}
.doc-name{font-weight:500;color:#1d2327}
.doc-meta{color:#646970;font-size:0.65rem;margin-top:1px}
.doc-badge{font-size:0.6rem;padding:1px 6px;border-radius:999px;background:#edf6ff;color:#2271b1;white-space:nowrap;flex-shrink:0;margin-top:1px}

.health-item{display:inline-flex;align-items:center;gap:2px;padding:2px 6px;font-size:0.65rem;border-radius:999px;background:#f6f7f7;color:#3c434a;white-space:nowrap;line-height:1.3}
.health-item.issue{background:#fef8e7;color:#b26200}
.health-item.issue strong,.health-item strong{color:#1d2327}
.health-item.missing{background:#fae6e6;color:#b32d2e}

.activity-item{display:flex;align-items:flex-start;gap:6px;padding:4px 0;border-bottom:1px solid #f6f7f7;font-size:0.7rem;word-break:break-word}
.activity-item:last-child{border-bottom:none}
.activity-icon{width:17px;height:17px;border-radius:4px;display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-top:1px}
.activity-icon svg{width:10px;height:10px}
.activity-icon.blue{background:#e5f0fa;color:#2271b1}
.activity-icon.green{background:#e5f5e8;color:#008a20}
.activity-icon.orange{background:#fef8e7;color:#b26200}
.activity-icon.purple{background:#f6f0fb;color:#8e4ec6}
.activity-icon.grey{background:#f0f0f1;color:#646970}
.activity-main{flex:1;min-width:0}
.activity-title{font-weight:500;color:#1d2327;line-height:1.3}
.activity-detail{color:#646970;font-size:0.65rem;margin-top:1px}
.activity-time{color:#8c8f94;font-size:0.625rem;margin-top:1px}
.activity-empty{padding:10px 0}
.activity-empty-sub{font-size:0.65rem;color:#a7aaad;margin-top:2px}

/* Combined Calendar & Activity widget */
.widget-split{display:flex;min-height:0}
.widget-split-left{flex:1;padding:4px 6px 6px;width:50%}
.widget-split-right{flex:1;padding:4px 6px 6px;width:50%}
.widget-split-divider{width:1px;background:#f0f0f1;margin:4px 0}
.widget-split-label{font-size:0.625rem;font-weight:600;color:#8c8f94;text-transform:uppercase;letter-spacing:0.05em;margin-bottom:4px;display:flex;align-items:center;justify-content:space-between;gap:4px}
.activity-label{display:inline-flex;align-items:center;gap:5px;cursor:pointer}
.activity-viewall{background:transparent;border:1px solid #cfe0f2;border-radius:4px;padding:0 5px;font-size:0.6rem;font-weight:700;color:#2271b1;cursor:pointer;flex-shrink:0;text-transform:none;letter-spacing:0}
.activity-viewall:hover{background:#e8f0fa}
.widget-split-body{font-size:0.68rem;color:#3c434a}
/* Calendar inside split - tighter fit */
.widget-split-right .cal-grid{font-size:0.7rem;gap:1px}
.widget-split-right .cal-header{padding:2px 0;font-size:0.6rem}
.widget-split-right .cal-day{padding:3px 1px;font-size:0.7rem;line-height:1.25}
.widget-split-right .cal-day .cal-dot{width:3px;height:3px;  margin:1px auto 0}

/* ==================== MINI CALENDAR ==================== */
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px;text-align:center;font-size:0.82rem}
.cal-header{font-weight:600;color:#646970;padding:4px 0;font-size:0.65rem}
.cal-day{padding:6px 3px;color:#3c434a;border-radius:4px;position:relative;font-size:0.82rem;line-height:1.35}
.cal-day.other{color:#c3c4c7}
.cal-day.today{background:#2271b1;color:#fff;font-weight:700}
.cal-day.has-event{font-weight:600;background:#edf6ff}
.cal-day.has-event.today{background:#2271b1;color:#fff}
.cal-day .cal-dot{width:4px;height:4px;border-radius:50%;background:#2271b1;margin:2px auto 0;display:block}
.cal-day.today .cal-dot{background:#fff}
.cal-nav{display:flex;align-items:center;justify-content:space-between;font-size:0.7rem;padding:4px 0}
.cal-nav button{background:none;border:none;cursor:pointer;color:#2271b1;font-size:0.75rem;padding:2px 6px;border-radius:3px}
.cal-nav button:hover{background:#f0f0f1}

/* ==================== INLINE DETAIL ROW ==================== */
tr.detail-row td{padding:0 !important;border-bottom:2px solid #e2e4e7;background:#fafbfc}
.detail-card{display:flex;align-items:flex-start;gap:14px;padding:12px 14px}
.detail-avatar{width:40px;height:40px;border-radius:50%;background:#e5f0fa;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:0.85rem;color:#2271b1;flex-shrink:0}
.detail-info{flex:1;display:grid;grid-template-columns:1fr 1fr;gap:4px 20px}
.detail-card .detail-row{display:flex;align-items:center;gap:6px;font-size:0.7rem}
.detail-label{color:#646970;white-space:nowrap;min-width:72px;font-size:0.65rem}
.detail-val{color:#1d2327;font-weight:500}

/* ==================== ANALYTICS VIEW ==================== */
.analytics-shell .dash-main{gap:8px;flex:1;min-height:0}
.analytics-shell .dash-main-left{display:flex;flex-direction:column;gap:6px;min-height:0;overflow-y:auto}
.analytics-shell .dash-main-right{min-height:0;overflow-y:auto}
.analytics-shell .table-card{flex:none;min-height:0;width:100%;margin-bottom:0}
.analytics-shell .table-card .table-wrap{overflow:hidden;min-height:0}
.analytics-shell .doc-coverage-bar{height:6px;margin-top:0}
.analytics-shell .chart-item{flex:none}

/* ==================== ACTIVITY VIEW ==================== */
.activity-shell{overflow:hidden}
.activity-shell .dash-main{align-items:stretch;gap:8px;flex:1;min-height:0}
.activity-shell .dash-main-left{display:flex;flex-direction:column;gap:8px;min-height:0}
.activity-shell .dash-main-left .table-card{flex:none;width:100%}
.activity-shell .dash-main-left .table-card .table-wrap{overflow:hidden}
.activity-shell .dash-main-right{min-height:0;overflow-y:auto}
.analytics-table{display:flex;flex-direction:column;padding:2px 0}
.analytics-row{display:flex;align-items:center;gap:8px;padding:4px 10px;border-bottom:1px solid #f0f0f1;min-width:0}
.analytics-row:last-child{border-bottom:none}
.analytics-row-head{padding:5px 10px;background:#f6f7f7;border-bottom:1px solid #e2e4e7;font-size:0.6rem;text-transform:uppercase;letter-spacing:0.05em;color:#646970;font-weight:600}
.analytics-row-head span{color:#646970;font-size:0.6rem;white-space:nowrap}
.analytics-name{flex:0 1 150px;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:0.72rem;color:#3c434a}
.analytics-num{min-width:44px;text-align:right;flex-shrink:0;font-size:0.72rem;color:#646970;white-space:nowrap}
.analytics-bar-col{flex:1;min-width:0;display:flex;align-items:center;gap:6px;padding-left:8px}
.analytics-bar-col .doc-coverage-bar{flex:1;min-width:0;background:#e2e4e7}
.analytics-pct{flex-shrink:0;min-width:34px;text-align:right;font-size:0.62rem;font-weight:600;color:#1d2327;white-space:nowrap}
.chart-item{flex-shrink:0;background:#fff;border:1px solid #e2e4e7;border-radius:5px;padding:8px 10px;overflow:hidden}
.chart-header{margin-bottom:6px}
.chart-title{font-weight:600;font-size:0.72rem;color:#1d2327}
.status-bar{display:flex;height:18px;border-radius:3px;overflow:hidden;background:#e2e4e7}
.status-seg{display:flex;align-items:center;justify-content:center;color:#fff;font-size:0.62rem;font-weight:700;min-width:0;white-space:nowrap}
.status-seg span{padding:0 4px;overflow:hidden;text-overflow:ellipsis}
.status-legend{display:flex;gap:12px;margin-top:6px;flex-wrap:wrap}
.legend-item{display:flex;align-items:center;gap:4px;font-size:0.66rem;color:#3c434a}
.legend-item strong{color:#1d2327;font-weight:600}
.legend-dot{width:8px;height:8px;border-radius:2px;flex-shrink:0}
.chart-grid{display:flex;gap:4px;justify-content:space-between}
.chart-donut-card{display:flex;flex-direction:column;align-items:center;gap:3px;flex:1;min-width:0}
.chart-donut{width:26px;height:26px;border-radius:50%;position:relative;flex-shrink:0}
.chart-donut-hole{position:absolute;inset:4px;background:#fff;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1}
.donut-count{font-size:0.48rem;font-weight:700;color:#1d2327}
.donut-pct{font-size:0.4rem;color:#646970;margin-top:1px}
.chart-label{font-size:0.5rem;color:#646970;text-align:center;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chart-sub{font-size:0.58rem;color:#8c8f94;margin-left:auto;font-weight:400}
.analysis-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.analysis-grid .chart-item{flex:none}
.trend-chart{padding:2px 2px 0}
.trend-xaxis{display:flex;justify-content:space-between;padding:2px 0 0;font-size:0.5rem;color:#8c8f94}
.mini-pie{display:flex;align-items:center;gap:16px}
.mini-pie-ring{position:relative;flex-shrink:0;width:80px;height:80px}
.mini-pie-ring svg{display:block}
.mini-pie-total{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center}
.mini-pie-total strong{font-size:0.9rem;color:#1d2327;line-height:1}
.mini-pie-total span{font-size:0.5rem;color:#646970}
.mini-pie-legend{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.mp-legend-row{display:flex;align-items:center;gap:6px;font-size:0.62rem;color:#3c434a}
.mp-label{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mp-count{font-weight:600;color:#1d2327;font-size:0.66rem}
.histogram{display:flex;align-items:flex-end;gap:8px;height:70px;padding:2px 4px 0}
.hist-col{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:2px;height:100%}
.hist-track{display:flex;align-items:flex-end;width:100%;height:52px}
.hist-bar{width:100%;min-height:3px;border-radius:2px 2px 0 0}
.hist-label{font-size:0.5rem;color:#646970;white-space:nowrap}
.hist-count{font-size:0.56rem;font-weight:600;color:#1d2327}

/* ==================== VIEW PANEL (sidebar tab views) ==================== */
.view-panel{flex:1;min-height:0;display:flex;flex-direction:column}
.view-shell{display:flex;flex-direction:column;gap:10px;flex:1;min-height:0}
.view-header h2{margin:0 0 2px;font-size:1rem;color:#1d2327}
.view-header p{margin:0;color:#646970;font-size:0.8rem}
.view-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.view-card{background:#fff;border:1px solid #e2e4e7;border-radius:5px;padding:14px}
.view-card-title{font-size:0.72rem;font-weight:700;color:#8c8f94;text-transform:uppercase;letter-spacing:.08em;margin-bottom:6px}
.view-stat{font-size:1.4rem;font-weight:700;color:#1d2327}
.view-caption{font-size:0.75rem;color:#646970;margin-top:3px}
.view-list{display:flex;flex-direction:column;gap:6px}
.view-list-item{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:8px 10px;border:1px solid #f0f0f1;border-radius:5px;background:#fafbfc}
.view-list-title{font-size:0.78rem;font-weight:700;color:#1d2327}
.view-list-meta{font-size:0.7rem;color:#646970;margin-top:1px}
.view-list-pill{font-size:0.68rem;font-weight:700;color:#2271b1;background:#edf6ff;padding:4px 7px;border-radius:999px;white-space:nowrap}
.empty-state{padding:12px;text-align:center;color:#646970;background:#fafbfc;border:1px dashed #dcdcde;border-radius:5px;font-size:0.75rem}

/* ==================== CARDS (admin panel, add-sister, etc) ==================== */
.card{background:#fff;border:1px solid #e2e4e7;border-radius:5px;padding:14px 16px;margin-bottom:14px}
.card-title{font-size:0.85rem;font-weight:600;color:#1d2327;margin-bottom:10px;display:flex;align-items:center;gap:6px}
.card-title svg{width:15px;height:15px;color:#2271b1;flex-shrink:0}
.card-section{padding:0 0 14px;margin-bottom:14px;border-bottom:1px solid #f0f0f1}
.card-section:last-child{border-bottom:none;margin-bottom:0;padding-bottom:0}
.card-section-title{font-size:0.8rem;font-weight:600;color:#1d2327;margin-bottom:10px;display:flex;align-items:center;gap:6px}
.card-section-title svg{width:14px;height:14px;color:#2271b1}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.form-grid .full{grid-column:1/-1}
.fld{margin-bottom:10px}
.fld:last-child{margin-bottom:0}
.fld label{display:block;font-size:0.75rem;font-weight:600;color:#1d2327;margin-bottom:4px}
.fld .required{color:#b32d2e}
.fld input,.fld select{width:100%;height:32px;padding:0 8px;border:1px solid #dcdcde;border-radius:3px;font-size:0.75rem;color:#1d2327;background:#fff;outline:none;transition:border-color 0.15s}
.fld input:focus{border-color:#2271b1;box-shadow:0 0 0 1px #2271b1}
.pw-field{position:relative}
.pw-field input{padding-right:34px}
.pw-field .pw-toggle{position:absolute;top:1px;right:1px;bottom:1px;width:32px;display:flex;align-items:center;justify-content:center;background:none;border:none;cursor:pointer;color:#757575}
.pw-field .pw-toggle:hover{color:#2271b1}
.pw-field .pw-toggle:focus{outline:none}
.pw-field .pw-toggle svg{width:16px;height:16px}
.form-actions{display:flex;gap:8px;justify-content:flex-end;padding-top:2px}
.card-body{max-width:780px;margin:0 auto}

/* ==================== PROFILE ==================== */
.profile-header{background:#fff;border:1px solid #e2e4e7;border-radius:5px;padding:16px 18px;margin-bottom:14px;display:flex;align-items:flex-start;gap:16px}
.profile-photo{width:56px;height:56px;border-radius:50%;background:#e5f0fa;display:flex;align-items:center;justify-content:center;font-size:1.15rem;font-weight:600;color:#2271b1;flex-shrink:0}
.profile-name{font-size:1.1rem;font-weight:600;color:#1d2327;margin-bottom:1px}
.profile-id{color:#646970;font-size:0.75rem;margin-bottom:8px}
.profile-meta{display:flex;gap:12px;flex-wrap:wrap}
.profile-meta-item{display:flex;align-items:center;gap:4px;font-size:0.75rem;color:#646970}
.profile-meta-item svg{width:13px;height:13px}
.profile-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.profile-field{display:flex;padding:5px 0;border-bottom:1px solid #f0f0f1}
.profile-field:last-child{border-bottom:none}
.profile-field-label{width:100px;flex-shrink:0;font-size:0.75rem;color:#646970}
.profile-field-value{flex:1;font-size:0.75rem;color:#1d2327}

/* ==================== ADMIN VIEW ==================== */
.admin-shell{overflow:hidden;min-height:0}
.admin-shell .dash-main{gap:8px;flex:1;min-height:0}
.admin-shell .dash-main-left{width:55%;display:flex;flex-direction:column;gap:8px;min-height:0}
.admin-shell .dash-main-right{width:45%;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:8px}
.admin-shell .card{margin-bottom:0}
.admin-shell .dash-main-left .stats-grid{margin-bottom:0}
.admin-shell .dash-main-left .table-card{flex:1;display:flex;flex-direction:column;min-height:0;width:100%}
.admin-shell .dash-main-left .table-card .table-wrap{flex:1;overflow-y:auto;min-height:0}
.admin-snapshot-card .card-title{margin-bottom:6px}
.admin-snapshot-card .snapshot-grid{gap:6px}
.admin-snapshot-card .snapshot-item{padding:6px 10px}
.admin-snapshot-card .snapshot-num{font-size:0.9rem}
.admin-snapshot-card .snapshot-lbl{font-size:0.6rem}
.db-actions{display:flex;gap:8px;margin-bottom:2px}
.db-actions button{flex:1;justify-content:center;height:30px;font-size:0.72rem;margin:0;padding:0 8px;display:inline-flex;align-items:center;gap:5px}
.db-actions svg,.backup-row svg{width:13px;height:13px;flex-shrink:0}
.backup-row{display:flex;margin-bottom:8px}
.backup-row button{flex:1;justify-content:center;height:30px;font-size:0.72rem;margin:0;display:inline-flex;align-items:center;gap:5px}
.user-sess-avatar{width:24px;height:24px;border-radius:50%;background:#e5f0fa;color:#2271b1;display:flex;align-items:center;justify-content:center;font-size:0.62rem;font-weight:700;flex-shrink:0}
.role-list{display:flex;flex-direction:column;gap:8px}
.role-item{display:flex;align-items:flex-start;gap:10px;padding:8px 10px;border:1px solid #f0f0f1;border-radius:6px;background:#fafbfc}
.role-item-ic{width:28px;height:28px;border-radius:7px;display:flex;align-items:center;justify-content:center;font-size:0.6rem;font-weight:700;flex-shrink:0}
.role-item-info{min-width:0}
.role-item-title{font-size:0.74rem;font-weight:600;color:#1d2327;display:flex;align-items:center;gap:6px}
.role-item-desc{font-size:0.66rem;color:#646970;margin-top:2px;line-height:1.4}
.snapshot-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.snapshot-item{background:#fafbfc;border:1px solid #f0f0f1;border-left:3px solid #c3c9cf;border-radius:6px;padding:8px 12px}
.snapshot-item:nth-child(1){background:#f2f7ff;border-left-color:#2271b1}
.snapshot-item:nth-child(2){background:#f2faf4;border-left-color:#008a20}
.snapshot-item:nth-child(3){background:#fffaf0;border-left-color:#b26e00}
.snapshot-item:nth-child(4){background:#fdf3f3;border-left-color:#b32d2e}
.snapshot-num{font-size:1rem;font-weight:700;color:#1d2327}
.snapshot-lbl{font-size:0.62rem;color:#646970;margin-top:1px}
.health-checklist{display:flex;flex-direction:column;gap:6px}
.health-check{display:flex;align-items:center;gap:9px;padding:6px 8px;border:1px solid #f0f0f1;border-left:3px solid #2271b1;border-radius:5px;background:#fafbfc}
.health-check.ok{border-left-color:#008a20}
.health-check.warn{border-left-color:#b26200}
.health-check-ic{width:26px;height:26px;border-radius:5px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.health-check.ok .health-check-ic{background:#e7f4ea;color:#008a20}
.health-check.warn .health-check-ic{background:#fdf3e7;color:#b26200}
.health-check-info{flex:1;min-width:0}
.health-check-name{font-size:0.7rem;font-weight:600;color:#1d2327}
.health-check-desc{font-size:0.6rem;color:#8c8f94;margin-top:1px}
.health-check > strong{font-size:0.85rem;color:#1d2327;flex-shrink:0}
@media (max-width:720px){.snapshot-grid{grid-template-columns:repeat(2,1fr)}}
.announcement-card{flex:none}
.ann-textarea{width:100%;box-sizing:border-box;border:1px solid #dcdcde;border-radius:4px;padding:6px 8px;font-size:0.72rem;color:#1d2327;font-family:inherit;resize:vertical;outline:none;min-height:48px}
.ann-textarea:focus{border-color:#2271b1;box-shadow:0 0 0 1px #2271b1}
.ann-actions{display:flex;align-items:center;gap:10px;margin:6px 0 8px}
.ann-count{font-size:0.62rem;color:#646970}
.ann-list{display:flex;flex-direction:column;gap:6px;max-height:132px;overflow-y:auto;border-top:1px solid #f0f0f1;padding-top:8px}
.ann-item{display:flex;align-items:flex-start;gap:8px;padding:6px 8px;border:1px solid #f0f0f1;border-left:3px solid #2271b1;border-radius:5px;background:#f2f7ff}
.ann-main{flex:1;min-width:0}
.ann-text{font-size:0.72rem;color:#1d2327;line-height:1.4}
.ann-meta{font-size:0.6rem;color:#8c8f94;margin-top:3px}
.ann-del{flex-shrink:0;width:24px;height:24px;margin:2px 0 0 8px;display:flex;align-items:center;justify-content:center;border:1px solid #e0c1c1;border-radius:5px;color:#b32d2e;background:#fff;cursor:pointer}
.ann-del:hover{background:#fdf3f3;border-color:#e8b4b4}
.perm-wrap{overflow-x:auto}
.perm-table{width:100%;min-width:360px;border-collapse:collapse}
.perm-table th,.perm-table td{border:1px solid #f0f0f1;padding:5px 8px;font-size:0.68rem;text-align:center}
.perm-table thead th{background:#fafbfc;color:#646970;font-weight:600}
.perm-table .perm-role{text-align:left;font-weight:600;color:#1d2327;background:#fafbfc}
.perm-table input[type=checkbox]{accent-color:#2271b1;width:14px;height:14px;cursor:pointer}
.int-list,.sc-list{display:flex;flex-direction:column;gap:6px}
.int-item,.storage-conn{display:flex;align-items:center;gap:9px;padding:6px 8px;border:1px solid #f0f0f1;border-left:3px solid #dcdcde;border-radius:5px;background:#fafbfc}
.int-item{border-left-color:#dcdcde}
.int-item:has(.on){border-left-color:#2271b1}
.int-ic{width:26px;height:26px;border-radius:5px;display:flex;align-items:center;justify-content:center;flex-shrink:0;background:#eef1f4;color:#8c8f94}
.int-ic.on{background:#e5f0fa;color:#2271b1}
.int-info,.sc-info{flex:1;min-width:0}
.int-name,.sc-name{font-size:0.72rem;font-weight:600;color:#1d2327}
.int-desc,.sc-status{font-size:0.6rem;color:#8c8f94;margin-top:1px}
.sc-status.on{color:#008a20;font-weight:600}
.sc-icon{width:26px;height:26px;border-radius:5px;display:flex;align-items:center;justify-content:center;flex-shrink:0;background:#eef1f4;color:#8c8f94}
.sc-icon.on{background:#e7f4ea;color:#008a20}
.sc-btn{flex-shrink:0;height:24px;padding:0 10px;border:1px solid #2271b1;border-radius:4px;background:#2271b1;color:#fff;font-size:0.64rem;font-weight:600;cursor:pointer}
.sc-btn:hover{background:#135e96;border-color:#135e96}
.sc-btn.off{background:transparent;color:#b32d2e;border-color:#dcdcde}
.sc-btn.off:hover{background:#fdf3f3;border-color:#f0e0e0}
.cache-row{display:flex;align-items:center;gap:10px;justify-content:space-between}
.cache-info{min-width:0}
.cache-lbl{font-size:0.66rem;color:#646970}
.cache-val{font-size:0.74rem;font-weight:600;color:#1d2327;margin-top:1px}
.primary-btn{border:1px solid #2271b1;border-radius:4px;background:#2271b1;color:#fff;font-size:0.68rem;font-weight:600;padding:6px 12px;cursor:pointer}
.primary-btn:hover{background:#135e96;border-color:#135e96}
.primary-btn:disabled{opacity:0.5;cursor:not-allowed;pointer-events:none}
.danger-btn{background:#b32d2e;border-color:#b32d2e}
.danger-btn:hover{background:#8c2424;border-color:#8c2424}
.admin-actions{justify-content:flex-end}
@media (max-width:900px){.admin-shell .dash-main{flex-direction:column;overflow-y:auto}.admin-shell .dash-main-left,.admin-shell .dash-main-right{width:100%!important;overflow-y:visible}.admin-shell .table-card{flex:none}}
.home-announce{margin:0 0 2px;padding:5px 10px;background:#f2f7ff;border:1px solid #d5e3f3;border-left:3px solid #2271b1;border-radius:5px;box-shadow:var(--shadow-card)}
.home-announce-title{font-size:0.62rem;font-weight:700;color:#2271b1;display:flex;align-items:center;gap:6px;margin-bottom:4px;text-transform:uppercase;letter-spacing:.05em}
.home-announce-item{padding:4px 0;border-top:1px solid #e3edf7;cursor:pointer}
.home-announce-item:first-of-type{border-top:none}
.home-announce-item:hover .home-announce-text{color:#1670b3}
.home-announce-text{font-size:0.72rem;color:#1d2327;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.home-announce-item.unread .home-announce-text{font-weight:600}
.home-announce-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:4px}
.home-announce-head .home-announce-title{margin-bottom:0}
.home-announce-count{background:#b32d2e;color:#fff;font-size:0.55rem;font-weight:700;padding:1px 6px;border-radius:999px}
.home-announce-actions{display:flex;gap:6px}
.home-announce-btn{font-size:0.55rem;color:#2271b1;background:transparent;border:1px solid #cfe0f2;border-radius:4px;padding:1px 6px;cursor:pointer}
.home-announce-btn:hover{background:#e8f0fa}
.home-announce-body{max-height:150px;overflow-y:auto}
.home-announce-caught{font-size:0.66rem;color:#8c8f94;padding:2px 0;border-top:1px solid #e3edf7}
.rem-ann-badge{display:inline-block;font-size:0.55rem;font-weight:700;padding:0 5px;border-radius:999px;margin-right:4px;background:#fef0e7;color:#b26200;vertical-align:1px}
.rem-ann-badge.bday{background:#edf7ee;color:#008a20}
.home-announce-bday{background:#f4fbf5;border-left:2px solid #008a20;padding-left:6px}
.home-announce-meta{font-size:0.6rem;color:#8c8f94;margin-top:2px}
.ann-detail-body{white-space:pre-wrap;font-size:0.8rem;color:#1d2327;line-height:1.5;margin:0 0 10px;max-height:60vh;overflow-y:auto}
.ann-toggle{display:inline-flex;align-items:center;gap:4px;font-size:0.62rem;color:#646970;background:#f6f7f7;border:1px solid #e2e4e7;border-radius:4px;padding:2px 7px;cursor:pointer}
.ann-toggle:hover{background:#eef1f4}
.ann-toggle svg{transition:transform 0.15s}
.ann-toggle.collapsed svg{transform:rotate(180deg)}
.home-announce-meta{font-size:0.6rem;color:#8c8f94;margin-top:2px}
.perm-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-top:8px;border-top:1px solid #f0f0f1;margin-top:8px}
.perm-status,.sys-status{font-size:0.62rem;color:#8c8f94}
.perm-actions{display:flex;gap:6px;flex-shrink:0}
.perm-cancel-btn{height:26px;padding:0 12px;border:1px solid #b32d2e;border-radius:4px;background:#fff;color:#b32d2e;font-size:0.66rem;font-weight:600;cursor:pointer;display:inline-flex;align-items:center}
.perm-cancel-btn:hover{background:#fdf3f3;border-color:#8c2424;color:#8c2424}
.perm-table .perm-sup{background:#f2f7ff}
.perm-table .perm-sup-role{background:#e5f0fa;color:#135e96}
.perm-table .perm-th-sup{background:#e5f0fa;color:#135e96;font-weight:700}
.perm-sup-tag{font-size:0.5rem;font-weight:600;background:#2271b1;color:#fff;border-radius:3px;padding:1px 4px;margin-left:2px;text-transform:uppercase;letter-spacing:.02em}
.perm-table tr.perm-sup-row td{background:#f2f7ff}
.perm-table tr.perm-sup-row td.perm-role{background:#e5f0fa;color:#135e96}
.perm-table .perm-sup input[type=checkbox]{accent-color:#2271b1;opacity:0.5;cursor:not-allowed}
.sys-cat-list{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:6px}
.sys-cat-chip{display:inline-flex;align-items:center;gap:4px;background:#eef1f4;border:1px solid #dcdcde;border-left:3px solid #2271b1;border-radius:4px;padding:3px 6px;font-size:0.68rem;color:#1d2327;font-weight:500}
.sys-cat-del{border:none;background:transparent;color:#8c8f94;font-size:0.8rem;line-height:1;cursor:pointer;padding:0 2px}
.sys-cat-del:hover{color:#b32d2e}
.sys-cat-add{display:flex;gap:6px;margin-bottom:6px}
.sys-cat-add input{flex:1;height:28px;padding:0 8px;border:1px solid #dcdcde;border-radius:4px;font-size:0.72rem;outline:none}
.sys-cat-add input:focus{border-color:#2271b1;box-shadow:0 0 0 1px #2271b1}
.sys-cat-btn{height:28px;padding:0 12px;border:1px solid #2271b1;border-radius:4px;background:#2271b1;color:#fff;font-size:0.66rem;font-weight:600;cursor:pointer}
.sys-cat-btn:hover{background:#135e96;border-color:#135e96}
.int-config{margin-top:4px;padding:8px;background:#f6f7f7;border:1px solid #f0f0f1;border-radius:5px;display:flex;flex-direction:column;gap:6px}
.cfg-row{display:flex;flex-direction:column;gap:3px}
.cfg-row label{font-size:0.62rem;font-weight:600;color:#3c434a}
.cfg-row input{height:26px;padding:0 8px;border:1px solid #dcdcde;border-radius:4px;font-size:0.68rem;outline:none}
.cfg-row input:focus{border-color:#2271b1;box-shadow:0 0 0 1px #2271b1}


.profile-doc-item{display:flex;align-items:center;gap:6px;padding:6px 0;border-bottom:1px solid #f0f0f1}
.profile-doc-item:last-child{border-bottom:none}
.profile-doc-item svg{width:14px;height:14px;color:#2271b1;flex-shrink:0}
.up-file-list{max-height:130px;overflow-y:auto;border:1px dashed #dcdcde;border-radius:4px;padding:6px 8px;background:#fafbfc}
.up-file-list-label{font-size:0.65rem;font-weight:700;color:#2271b1;margin-bottom:4px}
.up-file-item{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:3px 0;border-bottom:1px solid #f0f0f1;font-size:0.7rem}
.up-file-item:last-child{border-bottom:none}
.up-file-name{color:#1d2327;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.up-file-size{color:#646970;flex-shrink:0;font-size:0.62rem}

/* ==================== REMINDERS & SETTINGS ==================== */
.reminders-shell{overflow:hidden;min-height:0}
.reminders-shell .stats-grid{margin-bottom:0}
.reminders-card{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden;margin-bottom:0}
.reminders-card .card-title{flex:none}
.reminders-list{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;border-top:1px solid #f0f0f1}
.reminder-section{font-size:0.6rem;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:#8c8f94;padding:9px 10px 4px}
.reminder-row{display:flex;align-items:center;gap:8px;padding:6px 10px;border-bottom:1px solid #f0f0f1}
.reminder-row:last-child{border-bottom:none}
.reminder-main{flex:1;min-width:0}
.reminder-title{font-size:0.75rem;font-weight:600;color:#1d2327;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.reminder-meta{font-size:0.65rem;color:#646970;margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.reminder-view-btn{height:26px;padding:0 8px;font-size:0.66rem;white-space:nowrap;flex-shrink:0;display:inline-flex;align-items:center;gap:4px}
.reminders-main{display:flex;gap:8px;flex:1;min-height:0}
.reminders-left{width:40%;display:flex;flex-direction:column;gap:8px;min-height:0;overflow-y:auto}
.reminders-right{width:58%;display:flex;flex-direction:column;min-height:0}
.reminders-left .card{margin-bottom:0}
.reminder-overview{display:flex;flex-direction:column;gap:6px}
.ro-item{display:flex;justify-content:space-between;align-items:center;font-size:0.72rem;color:#3c434a;padding:4px 0;border-bottom:1px solid #f0f0f1}
.ro-item:last-child{border-bottom:none}
.ro-item strong{color:#1d2327}
.ro-sub{padding-left:10px;font-size:0.68rem;color:#646970}
.reminder-date{font-size:0.62rem;font-weight:600;color:#2271b1;background:#edf6ff;border-radius:3px;padding:2px 5px;white-space:nowrap;flex-shrink:0}
.reminder-group{display:flex;flex-direction:column;border-bottom:1px solid #f0f0f1}
.reminder-group-head{display:flex;align-items:center;gap:8px;padding:7px 10px;cursor:pointer}
.reminder-group-head:hover{background:#fafbfc}
.reminder-group-count{flex:1;font-size:0.7rem;color:#3c434a}
.reminder-chevron{font-size:0.58rem;color:#8c8f94}
.reminder-group-body{padding:0 10px 8px;background:#fafbfc;border-top:1px solid #f0f0f1}
.reminder-group-inner{display:flex;flex-direction:column;gap:4px;padding-top:6px}
.reminder-group-member{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:4px 6px;background:#fff;border:1px solid #f0f0f1;border-radius:4px;font-size:0.7rem;color:#1d2327}
.reminder-group-member > span:first-child{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.reminder-section-more{font-size:0.62rem;color:#8c8f94;padding:2px 10px 8px}
.cal-legend{display:flex;align-items:center;gap:6px;margin-top:8px;font-size:0.62rem;color:#646970}
.cal-legend-dot{width:8px;height:8px;border-radius:50%;display:inline-block}
.cal-legend-dot.sys{background:#2271b1}
.cal-nav-title{display:flex;align-items:center;gap:6px;margin-left:auto;font-size:0.75rem;font-weight:600;color:#1d2327}
.cal-nav-btn{background:none;border:none;cursor:pointer;font-size:0.9rem;color:#646970;padding:0 4px;line-height:1}
.cal-nav-btn:hover{color:#1d2327}
.settings-shell{overflow:hidden;min-height:0}
.settings-shell .dash-main{gap:8px;flex:1;min-height:0}
.settings-shell .dash-main-left{width:56%;display:flex;flex-direction:column;gap:8px;min-height:0;overflow-y:auto}
.settings-shell .dash-main-right{width:42%;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:8px}
.settings-shell .card{margin-bottom:0}
.settings-shell .dash-main-left .stats-grid{margin-bottom:0}
.settings-actions{display:flex;flex-wrap:wrap;gap:6px}
.settings-actions button{height:29px;font-size:0.7rem;margin:0;display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
.settings-actions svg{width:12px;height:12px;flex-shrink:0}
.settings-form{display:flex;flex-direction:column;gap:10px}
.settings-form-compact{gap:8px}
.settings-form-compact .fld input{height:30px}
.fld-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.settings-form-footer{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-top:2px}
.settings-form-footer .header-btn{height:28px;padding:0 14px;font-size:0.7rem;white-space:nowrap;display:inline-flex;align-items:center;gap:5px}
.storage-card{border-left:3px solid #008a20}
.storage-body{padding:2px 0 4px}
.storage-num{font-size:1.3rem;font-weight:700;color:#1d2327;line-height:1}
.storage-cap{font-size:0.68rem;color:#8c8f94;margin:2px 0 8px}
.storage-bar{height:8px;border-radius:999px;background:#efeff1;overflow:hidden}
.storage-fill{height:100%;border-radius:999px;transition:width 0.3s}
.storage-meta{display:flex;justify-content:space-between;font-size:0.6rem;color:#8c8f94;margin-top:6px}
.notif-list{display:flex;flex-direction:column;gap:4px}
.notif-row{display:flex;align-items:center;gap:10px;padding:6px 4px;border-bottom:1px solid #f0f0f1}
.notif-row:last-child{border-bottom:none}
.notif-info{flex:1;min-width:0}
.notif-name{font-size:0.72rem;font-weight:500;color:#1d2327}
.notif-desc{font-size:0.6rem;color:#8c8f94;margin-top:1px}
.switch{position:relative;display:inline-block;width:32px;height:18px;flex-shrink:0}
.switch input{opacity:0;width:0;height:0}
.switch-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background:#c3c4c7;border-radius:999px;transition:0.2s}
.switch-slider::before{content:"";position:absolute;height:14px;width:14px;left:2px;bottom:2px;background:#fff;border-radius:50%;transition:0.2s}
.switch input:checked + .switch-slider{background:#2271b1}
.switch input:checked + .switch-slider::before{transform:translateX(14px)}

/* ==================== TIMELINE ==================== */
.timeline{position:relative;padding-left:22px}
.timeline::before{content:"";position:absolute;left:6px;top:0;bottom:0;width:2px;background:#e2e4e7}
.timeline-item{position:relative;padding-bottom:14px}
.timeline-item:last-child{padding-bottom:0}
.timeline-dot{position:absolute;left:-18px;top:2px;width:8px;height:8px;border-radius:50%;background:#2271b1;border:2px solid #fff;box-shadow:0 0 0 1.5px #2271b1}
.timeline-dot.completed{background:#008a20;box-shadow:0 0 0 1.5px #008a20}
.timeline-content{background:#f6f7f7;border:1px solid #e2e4e7;border-radius:4px;padding:8px 12px}
.timeline-date{font-size:0.65rem;color:#646970;margin-bottom:2px}
.timeline-title{font-weight:500;font-size:0.75rem;color:#1d2327}

/* ==================== NOTIFICATIONS ==================== */
.header-notify-wrap{position:relative}
.notify-badge{position:absolute;top:-2px;right:-2px;min-width:14px;height:14px;padding:0 3px;border-radius:999px;background:#d63638;color:#fff;font-size:0.6rem;display:flex;align-items:center;justify-content:center;font-weight:700}
.notify-dropdown{position:absolute;top:38px;right:0;width:272px;background:#fff;border:1px solid #e2e4e7;border-radius:6px;box-shadow:0 8px 20px rgba(0,0,0,.12);padding:8px;z-index:120}
.notify-title{font-size:0.72rem;font-weight:700;color:#1d2327;padding:2px 6px 7px;border-bottom:1px solid #f0f0f1;margin-bottom:4px}
.notify-item{padding:7px 8px;border-bottom:1px solid #f6f7f7;font-size:0.7rem;border-radius:3px;transition:background 0.12s;cursor:pointer}
.notify-item:last-child{border-bottom:none}
.notify-item:hover{background:#f6f7f7}
.notify-item strong{display:block;font-size:0.7rem;color:#1d2327}
.notify-item span{display:block;margin-top:2px;font-size:0.65rem;color:#646970;line-height:1.3}
.notify-item .notify-time{font-size:0.6rem;color:#8c8f94;margin-top:2px}
.notify-viewall{display:block;width:100%;text-align:center;padding:7px 8px;margin-top:6px;font-size:0.68rem;font-weight:700;color:#2271b1;background:#f6f7f7;border:1px solid #e2e4e7;border-radius:5px;cursor:pointer;transition:background 0.12s}
.notify-viewall:hover{background:#e8f0fa}

/* ==================== MODAL ==================== */
.modal-card{background:#fff;border-radius:10px;padding:18px;width:min(720px,92vw);max-height:90vh;overflow:auto;box-shadow:0 16px 32px rgba(0,0,0,.16)}
.modal-header{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:12px}
.modal-eyebrow{font-size:0.65rem;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:#2271b1;margin-bottom:3px}
.modal-header h3{font-size:1rem;color:#1d2327}
.modal-grid{display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));gap:10px}
.modal-field{display:flex;flex-direction:column;gap:4px;font-size:0.75rem;color:#1d2327}
.modal-field input,.modal-field select{width:100%;height:34px;padding:0 8px;border:1px solid #dcdcde;border-radius:4px;font-size:0.75rem;color:#1d2327;background:#fff;outline:none;transition:border-color .15s}
.modal-field input:focus,.modal-field select:focus{border-color:#2271b1;box-shadow:0 0 0 1px #2271b1}
.modal-footer{display:flex;justify-content:flex-end;gap:8px;margin-top:12px;padding-top:10px;border-top:1px solid #f0f0f1}

/* ==================== MOTION ==================== */
@keyframes modalIn{from{opacity:0;transform:translateY(6px) scale(.985)}to{opacity:1;transform:none}}
@keyframes dropIn{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
.modal-card,.preview-modal-window{animation:modalIn 0.18s ease-out}
.notify-dropdown,.user-dropdown,.help-tooltip,.header-search-dropdown{animation:dropIn 0.14s ease-out}
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{animation-duration:0.01ms!important;animation-iteration-count:1!important;transition-duration:0.01ms!important;scroll-behavior:auto!important}
}

/* ==================== DOCUMENT TOOLTIP ==================== */
.doc-tooltip-wrap{position:relative;display:inline-flex;align-items:center;gap:8px;cursor:pointer}
.doc-tooltip{visibility:hidden;opacity:0;position:absolute;top:calc(100% + 6px);left:0;background:#1d2327;color:#f0f0f1;font-size:0.65rem;padding:8px 10px;border-radius:5px;white-space:nowrap;z-index:9999;transition:all 0.15s;box-shadow:0 4px 12px rgba(0,0,0,0.25);pointer-events:none;min-width:180px}
.doc-tooltip::after{content:'';position:absolute;bottom:100%;left:10px;border:5px solid transparent;border-bottom-color:#1d2327}
.doc-tooltip-wrap:hover .doc-tooltip{visibility:visible;opacity:1}
.doc-tooltip-line{display:flex;justify-content:space-between;gap:12px;padding:2px 0}
.doc-tooltip-label{color:#a7aaad}
.doc-tooltip-value{color:#fff;font-weight:500}

/* ==================== PROGRESS BAR ==================== */
.progress-bar-wrap{display:flex;align-items:center;gap:6px}
.progress-bar{flex:1;height:4px;border-radius:999px;background:#eef0f3;overflow:hidden;min-width:50px}
.progress-bar-fill{height:100%;border-radius:999px;transition:width 0.3s}
.progress-bar-fill.green{background:#008a20}
.progress-bar-fill.orange{background:#b26200}
.progress-bar-fill.red{background:#b32d2e}
.progress-bar-label{font-size:0.62rem;color:#646970;white-space:nowrap}

/* ==================== TOAST ==================== */
.toast-container{position:fixed;bottom:20px;right:20px;z-index:9999;display:flex;flex-direction:column;gap:8px}
.toast{display:flex;align-items:center;gap:10px;background:#1d2327;color:#f0f0f1;padding:10px 16px;border-radius:6px;font-size:0.75rem;box-shadow:0 6px 20px rgba(0,0,0,0.25);animation:slideUp 0.25s ease-out;max-width:360px}
.toast-success{border-left:3px solid #008a20}
.toast-error{border-left:3px solid #b32d2e}
.toast-warning{border-left:3px solid #b98a2e}
.toast-info{border-left:3px solid #2271b1}
.toast-btn{background:none;border:none;color:#2271b1;font-weight:600;font-size:0.72rem;cursor:pointer;padding:2px 6px;border-radius:3px;white-space:nowrap}
.toast-btn:hover{background:rgba(255,255,255,0.1)}
.toast-close{background:none;border:none;color:#a7aaad;cursor:pointer;font-size:0.85rem;padding:0 2px;line-height:1}
.toast-close:hover{color:#fff}
@keyframes slideUp{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}

/* ==================== QUICK LINKS ==================== */
.quick-links{display:flex;gap:4px;flex-wrap:wrap;padding:4px 0}
.quick-link{font-size:0.62rem;padding:2px 8px;border-radius:999px;border:1px solid #dcdcde;background:#f6f7f7;color:#3c434a;cursor:pointer;transition:all 0.15s;white-space:nowrap}
.quick-link:hover{background:#2271b1;color:#fff;border-color:#2271b1}
.quick-link.active{background:#2271b1;color:#fff;border-color:#2271b1}

/* ==================== CATEGORY DISTRIBUTION ==================== */
.cat-dist{display:flex;flex-direction:column;gap:5px;padding:2px 0}
.cat-dist-item{display:flex;align-items:center;gap:8px;font-size:0.65rem}
.cat-dist-label{min-width:60px;text-align:left;color:#646970;flex-shrink:0}
.cat-dist-bar{flex:1;min-width:0;height:5px;border-radius:999px;background:#eef0f3;overflow:hidden}
.cat-dist-fill{height:100%;border-radius:999px;transition:width 0.3s}
.cat-dist-count{min-width:52px;text-align:right;font-weight:600;color:#1d2327;font-size:0.62rem;white-space:nowrap;flex-shrink:0}

/* ==================== IMAGE THUMBNAIL ==================== */
.doc-thumb{width:28px;height:28px;border-radius:4px;object-fit:cover;border:1px solid #e2e4e7;flex-shrink:0}
.doc-file-img{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff}
.doc-file-txt{background:#646970;color:#fff}
.doc-file-zip{background:#b26200;color:#fff}

/* ==================== MISSING DOCS LIST ==================== */
.missing-docs-list{display:flex;flex-wrap:wrap;gap:3px;margin-top:4px}
.missing-doc-tag{font-size:0.58rem;padding:1px 6px;border-radius:999px;background:#fae6e6;color:#b32d2e;border:1px solid #fecaca;white-space:nowrap}
.missing-doc-tag.complete{background:#e5f5e8;color:#008a20;border-color:#b5e5c0}

/* ==================== PRINT DOC MODAL ==================== */
@media print{
  body.print-doc-modal *{visibility:hidden}
  body.print-doc-modal .printable-area,body.print-doc-modal .printable-area *{visibility:visible}
  body.print-doc-modal .printable-area{position:absolute;left:0;top:0;width:100%;padding:20px;font-size:11pt}
  body.print-doc-modal .no-print{display:none!important}
}

/* ==================== PRINT APP (REPORTS & ANALYTICS) ==================== */
@media print{
  body{background:#fff!important}
  *{-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .app-layout{display:block!important;height:auto!important;overflow:visible!important}
  .sidebar,.header,.notify-dropdown,.user-dropdown,.help-tooltip,.no-print,#confirmDialog{display:none!important}
  .content{display:block!important;padding:10px 14px!important;overflow:visible!important}
  .view-shell{display:block!important}
  .view-header h2{font-size:1.15rem;color:#1d4e89}
  .stat-card,.widget{break-inside:avoid;margin-bottom:8px}
  .chart-item,.timeline-item,.analytics-row{break-inside:avoid}
  table{page-break-inside:auto}
  table tr{page-break-inside:avoid}
}

/* ==================== UTILITY ==================== */
.text-sm{font-size:0.75rem}
.text-xs{font-size:0.65rem}
.text-muted{color:#646970}
.font-medium{font-weight:500}
.font-semibold{font-weight:600}
.mb-4{margin-bottom:12px}
.mt-3{margin-top:10px}
.flex{display:flex}
.gap-3{gap:10px}
.gap-2{gap:6px}
.items-center{align-items:center}
.justify-between{justify-content:space-between}
.btn-save{height:32px;padding:0 14px;background:#2271b1;color:#fff;border:none;border-radius:3px;cursor:pointer;font-weight:500;font-size:0.75rem;transition:background 0.15s}
.btn-save:hover{background:#135e96}
.btn-save:disabled{opacity:0.5;cursor:default}
.btn-cancel{height:32px;padding:0 10px;background:#f6f7f7;border:1px solid #dcdcde;border-radius:3px;font-size:0.75rem;color:#3c434a;cursor:pointer}
.btn-cancel:hover{background:#f0f0f1}
/* ==================== DOCUMENTS VIEW ==================== */
.doc-stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:8px}
.doc-toolbar{background:#fff;border:1px solid #e2e4e7;border-radius:5px;padding:4px 8px;margin-bottom:4px;display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.doc-toolbar-left{display:flex;align-items:center;gap:4px;flex:1}
.doc-toolbar-right{display:flex;align-items:center;gap:8px}
.doc-search-wrap{position:relative;width:260px;max-width:100%}
.doc-search-dropdown{position:absolute;top:100%;left:0;right:0;background:#fff;border:1px solid #e2e4e7;border-radius:0 0 5px 5px;box-shadow:0 8px 16px rgba(0,0,0,.1);z-index:100;max-height:250px;overflow-y:auto;display:none}
.doc-search-item{padding:8px 12px;border-bottom:1px solid #f0f0f1;cursor:pointer;display:flex;align-items:center;gap:10px}
.doc-search-item:hover{background:#f6f7f7}
.doc-search-item-info{display:flex;flex-direction:column}
.doc-search-item-name{font-weight:600;color:#1d2327;font-size:0.75rem}
.doc-search-item-meta{color:#646970;font-size:0.65rem}
.doc-sister-profile{background:#fff;border:1px solid #e2e4e7;border-radius:5px;padding:16px;margin-bottom:16px;display:flex;flex-direction:column;gap:16px}
.doc-sister-header{display:flex;align-items:center;gap:16px;border-bottom:1px solid #f0f0f1;padding-bottom:12px}
.doc-sister-info{flex:1}
.doc-sister-name{font-size:1.1rem;font-weight:600;color:#1d2327;margin-bottom:4px}
.doc-sister-meta{display:flex;gap:12px;font-size:0.75rem;color:#646970}
.doc-mini-stats{display:flex;gap:10px;flex-wrap:wrap}
.doc-mini-stat{background:#f6f7f7;border:1px solid #e2e4e7;border-radius:4px;padding:6px 12px;display:flex;align-items:center;gap:8px;font-size:0.75rem}
.doc-mini-stat strong{font-size:0.9rem;color:#1d2327}
.doc-action-bar{display:flex;gap:8px;margin-top:auto}
.doc-group{margin-bottom:16px}
.doc-group-title{font-size:0.8rem;font-weight:600;color:#1d2327;margin-bottom:8px;padding-bottom:4px;border-bottom:2px solid #f0f0f1;display:flex;align-items:center;gap:6px}
.doc-upload-zone{border:2px dashed #dcdcde;border-radius:5px;padding:20px;text-align:center;background:#fafbfc;cursor:pointer;transition:all 0.2s}
.doc-upload-zone:hover{border-color:#2271b1;background:#edf6ff}
.doc-upload-zone svg{width:24px;height:24px;color:#8c8f94;margin-bottom:8px}
.doc-coverage-bar{height:5px;border-radius:999px;background:#c3c4c7;overflow:hidden;margin-top:3px;box-shadow:inset 0 1px 2px rgba(0,0,0,0.15)}
.doc-coverage-fill{height:100%;border-radius:999px;box-shadow:inset 0 -1px 2px rgba(0,0,0,0.15)}
.doc-file-icon{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:4px;font-size:0.5rem;font-weight:700;color:#fff;text-transform:uppercase}
.doc-file-pdf{background:#d63638}
.doc-file-doc{background:#2271b1}
.doc-file-xls{background:#008a20}
.doc-file-other{background:#646970}
.doc-category-badge{font-size:0.65rem;padding:2px 6px;border-radius:999px;font-weight:600}
.doc-missing-alert{display:flex;align-items:flex-start;gap:6px;padding:6px 0;border-bottom:1px solid #f0f0f1;font-size:0.7rem;color:#3c434a;word-wrap:break-word;white-space:normal}
.doc-missing-alert svg{color:#d63638;flex-shrink:0;margin-top:2px}
.doc-missing-alert:last-child{border-bottom:none}
.doc-back-link{display:inline-flex;align-items:center;gap:4px;color:#2271b1;font-size:0.75rem;cursor:pointer;margin-bottom:10px;font-weight:500}
.doc-back-link:hover{text-decoration:underline}
.doc-row-hover:hover{background-color:#f6f7f7;cursor:pointer}

/* ==================== DOCUMENTS WORKSPACE ==================== */
.doc-view-shell{gap:8px!important}
.doc-view-shell .doc-page-head{display:flex;flex-direction:column;gap:0;padding:2px 2px 6px!important;margin-bottom:0!important}
.doc-page-title{display:flex;align-items:center;gap:10px;min-width:0}
.doc-page-title-icon{width:34px;height:34px;border-radius:7px;background:#eaf3fb;border:1px solid #d8e8f7;color:#2271b1;display:flex;align-items:center;justify-content:center;flex:0 0 auto}
.doc-page-title-icon svg{width:18px;height:18px}
.doc-view-shell .view-header h2{font-size:1.08rem;line-height:1.22;letter-spacing:-.01em}
.doc-view-shell .view-header p{font-size:.74rem;margin:2px 0 0;color:#646970}

.doc-view-shell .doc-stats-grid{gap:8px;margin-bottom:0}
.doc-view-shell .stat-card{min-height:58px;padding:8px 12px;border-radius:6px;box-shadow:0 1px 2px rgba(29,35,39,.04)}
.doc-view-shell .stat-icon{width:32px;height:32px;border-radius:7px}
.doc-view-shell .stat-label{font-size:.64rem;line-height:1.2}
.doc-view-shell .stat-value{font-size:1.18rem;line-height:1.1;letter-spacing:-.01em}
.doc-view-shell .stat-content{display:flex;flex-direction:column;gap:1px}

.doc-view-shell .doc-toolbar{padding:7px 9px;border-radius:6px;margin-bottom:0;box-shadow:0 1px 2px rgba(29,35,39,.04)}
.doc-toolbar-left{gap:6px}
.doc-toolbar-right{gap:6px;margin-left:auto}
.doc-search-wrap{width:280px}
#docSearchInput{width:100%;height:32px;padding-left:30px;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238c8f94' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16' y2='16'/%3E%3C/svg%3E") no-repeat 9px center;font-size:.72rem}
.doc-view-shell .doc-toolbar .form-select{height:32px;font-size:.72rem}
.doc-view-shell .doc-toolbar .btn-reset,.doc-view-shell .doc-toolbar .header-btn{height:32px;font-size:.72rem;border-radius:4px;padding:0 10px}
.doc-export-btn{display:inline-flex;align-items:center;gap:5px}
.doc-export-btn svg{width:12px;height:12px}

.doc-view-shell .table-card{border-radius:6px;box-shadow:0 1px 2px rgba(29,35,39,.04)}
.doc-view-shell .table-card .table-header{padding:8px 11px;background:#fff}
.doc-table-title{display:flex;align-items:center;gap:7px;min-width:0;font-size:.82rem;font-weight:650;color:#1d2327}
.doc-table-title-icon{width:25px;height:25px;border-radius:5px;background:#eef5fb;color:#2271b1;display:flex;align-items:center;justify-content:center;flex:0 0 auto}
.doc-table-title-icon svg{width:13px;height:13px}
.doc-count-pill{font-size:.6rem;font-weight:600;color:#50575e;background:#f6f7f7;border:1px solid #e2e4e7;padding:2px 7px;border-radius:999px;white-space:nowrap}
#docMainArea table{table-layout:fixed;width:100%}
#docMainArea th:nth-child(1){width:30px}
#docMainArea th:nth-child(3){width:108px}
#docMainArea th:nth-child(4){width:92px}
#docMainArea th:nth-child(5){width:82px}
#docMainArea th:nth-child(6){width:136px}
.doc-view-shell table th{padding:8px 10px;font-size:.59rem;background:#f8f9fa;letter-spacing:.045em}
.doc-view-shell table td{padding:8px 10px;font-size:.73rem;vertical-align:middle}
.doc-view-shell table tr:hover td{background:#f8fbff}
#docMainArea .doc-tooltip-wrap{display:flex;width:100%;min-width:0}
.doc-name-cell{display:flex;align-items:center;gap:8px;min-width:0;width:100%;overflow:hidden}
.doc-name-wrap{display:flex;flex-direction:column;gap:1px;min-width:0;max-width:none;width:100%;flex:1}
.doc-name-text{display:block;max-width:100%;width:100%;font-weight:500;color:#1d2327;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.35}
.doc-name-sub{display:block;max-width:100%;width:100%;font-size:.58rem;color:#8c8f94;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3}
.doc-view-shell .table-actions button{width:26px;height:26px;display:inline-flex;align-items:center;justify-content:center}
.doc-view-shell .pagination{padding:8px 11px}

.doc-view-shell .dash-main-right{gap:8px;width:35%}
.doc-side-card{background:#fff;border:1px solid #e2e4e7;border-radius:6px;box-shadow:0 1px 2px rgba(29,35,39,.04);overflow:hidden;min-width:0}
.doc-side-head{display:flex;align-items:center;gap:7px;padding:7px 9px;border-bottom:1px solid #f0f0f1;background:#fff;min-width:0}
.doc-side-head-icon{width:23px;height:23px;border-radius:5px;background:#eef5fb;color:#2271b1;display:flex;align-items:center;justify-content:center;flex:0 0 auto}
.doc-side-head-icon svg{width:12px;height:12px}
.doc-side-head-title{font-size:.63rem;font-weight:700;letter-spacing:.055em;text-transform:uppercase;color:#3c434a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.doc-side-head-meta{margin-left:auto;font-size:.58rem;font-weight:500;color:#8c8f94;letter-spacing:0;text-transform:none;white-space:nowrap}
.doc-side-body{padding:7px 9px}
.doc-side-body-tight{padding:6px 7px}
.doc-view-shell .doc-upload-zone{min-height:0;padding:10px 12px;border-width:1.5px;border-radius:6px;display:flex;align-items:center;justify-content:center;gap:10px;text-align:center}
.doc-view-shell .doc-upload-zone svg{width:17px;height:17px;color:#2271b1;flex:0 0 auto}
.doc-upload-title{font-size:.69rem;font-weight:600;color:#3c434a;line-height:1.2}
.doc-upload-sub{font-size:.58rem;color:#8c8f94;margin-top:2px;line-height:1.2}
.doc-quick-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
.doc-quick-link{display:flex;align-items:center;gap:6px;min-width:0;height:29px;padding:0 7px;border:1px solid #e2e4e7;background:#fff;border-radius:4px;font:inherit;font-size:.64rem;color:#3c434a;cursor:pointer;text-align:left;transition:background .12s,border-color .12s,color .12s}
.doc-quick-link svg{width:12px;height:12px;color:#787c82;flex:0 0 auto}
.doc-quick-link span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.doc-quick-link:hover{background:#f0f6ff;border-color:#b9d7f2;color:#135e96}
.doc-quick-link:hover svg{color:#2271b1}
.doc-quick-link.tone-green{background:#eaf6ec;border-color:#cde8d2;color:#0a6b24}
.doc-quick-link.tone-green svg{color:#008a20}
.doc-quick-link.tone-blue{background:#eef5fb;border-color:#d8e8f7;color:#135e96}
.doc-quick-link.tone-blue svg{color:#2271b1}
.doc-quick-link.tone-purple{background:#f0eefa;border-color:#d9d4f0;color:#5a4b9b}
.doc-quick-link.tone-purple svg{color:#667eea}
.doc-quick-link.tone-orange{background:#fdf3e7;border-color:#f3ddb6;color:#8a4a00}
.doc-quick-link.tone-orange svg{color:#b26200}
.doc-quick-link.tone-teal{background:#e9f6f6;border-color:#c9e5e5;color:#0a6b6b}
.doc-quick-link.tone-teal svg{color:#008080}
.doc-quick-link.tone-indigo{background:#eef0fd;border-color:#d5d9f7;color:#3d4b9b}
.doc-quick-link.tone-indigo svg{color:#667eea}
.doc-quick-link.tone-green:hover{background:#e0f3e3;border-color:#b6ddc0}
.doc-quick-link.tone-blue:hover{background:#e5f0fb;border-color:#bcd9f0}
.doc-quick-link.tone-purple:hover{background:#eae7f8;border-color:#cbc3ea}
.doc-quick-link.tone-orange:hover{background:#fcecd6;border-color:#eccf9a}
.doc-quick-link.tone-teal:hover{background:#dff1f1;border-color:#aed9d9}
.doc-quick-link.tone-indigo:hover{background:#e6e9fb;border-color:#c2c8f2}

.doc-coverage-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.doc-coverage-tile{border:1px solid #eef0f3;background:#fafbfc;border-radius:5px;padding:7px 8px;min-width:0}
.doc-coverage-tile-top{display:flex;align-items:center;justify-content:space-between;gap:5px;font-size:.61rem;color:#646970;line-height:1.25}
.doc-coverage-tile-top strong{font-size:.74rem;color:#1d2327;flex:0 0 auto}
.doc-view-shell .doc-coverage-bar{height:5px;margin-top:5px;background:#e5e8eb;box-shadow:none}
.doc-view-shell .doc-coverage-fill{box-shadow:none}
.doc-cat-list{display:flex;flex-direction:column;gap:5px;margin-top:8px;padding-top:8px;border-top:1px solid #f0f0f1}
.doc-cat-row{display:grid;grid-template-columns:68px minmax(30px,1fr) 32px;align-items:center;gap:7px;font-size:.61rem;color:#646970}
.doc-cat-row>strong{text-align:right;font-size:.59rem;color:#3c434a;font-weight:600}
.doc-cat-track{height:5px;border-radius:999px;background:#eef0f3;overflow:hidden;min-width:0}
.doc-cat-track>span{display:block;height:100%;border-radius:999px}

.doc-activity-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:8px 10px}
.doc-activity-pane{border:1px solid #eef0f3;border-radius:5px;overflow:hidden;background:#fff;min-width:0}
.doc-activity-pane-head{display:flex;align-items:center;gap:4px;padding:5px 6px;background:#fafbfc;border-bottom:1px solid #f0f0f1;font-size:.57rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:#646970;min-width:0}
.doc-activity-pane-head>span:nth-child(2){white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.doc-pane-icon{display:inline-flex;align-items:center;flex:0 0 auto}
.doc-pane-icon-danger{color:#b32d2e}
.doc-pane-icon-info{color:#2271b1}
.doc-pane-count{margin-left:auto;background:#f0f0f1;border-radius:999px;padding:1px 5px;font-size:.54rem;color:#50575e;letter-spacing:0;flex:0 0 auto}
.doc-activity-pane-body{padding:2px 6px;min-height:50px}
.doc-activity-item{display:flex;align-items:center;gap:5px;padding:4px 0;border-bottom:1px solid #f6f7f7;font-size:.59rem;color:#3c434a;cursor:pointer;min-width:0}
.doc-activity-item:last-child{border-bottom:none}
.doc-activity-item:hover .doc-activity-name{color:#2271b1}
.doc-activity-tag{background:#fae6e6;color:#b32d2e;border-radius:3px;padding:1px 4px;font-size:.52rem;font-weight:600;flex:0 0 auto}
.doc-activity-name{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.doc-activity-time{color:#8c8f94;font-size:.53rem;flex:0 0 auto}
.doc-activity-empty{font-size:.59rem;color:#8c8f94;padding:8px 0;text-align:center;line-height:1.3}

.doc-upload-icon{width:34px;height:34px;border-radius:7px;background:#eaf3fb;color:#2271b1;display:flex;align-items:center;justify-content:center;flex:0 0 auto}
.doc-upload-icon svg{width:17px;height:17px}
.doc-upload-copy{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.doc-upload-copy strong{font-size:.66rem;font-weight:500;color:#50575e;line-height:1.2}
.doc-upload-copy span{font-size:.58rem;color:#8c8f94;line-height:1.2}
.doc-upload-browse{flex:0 0 auto;font:inherit;font-size:.62rem;font-weight:600;color:#2271b1;background:#fff;border:1px solid #c3c9cf;border-radius:4px;padding:5px 9px;cursor:pointer}
.doc-upload-browse:hover{background:#f0f6ff;border-color:#b9d7f2;color:#135e96}

.doc-cov-row{display:block;width:100%;height:auto;padding:7px 2px;border:0;border-bottom:1px solid #f0f0f1;background:none;text-align:left;cursor:pointer;font:inherit;align-items:stretch;gap:0}
.doc-cov-row:last-child{border-bottom:0}
.doc-cov-row:hover .doc-cov-label{color:#135e96}
.doc-cov-top{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:4px}
.doc-cov-label{font-size:.66rem;font-weight:600;color:#3c434a}
.doc-cov-meta{font-size:.58rem;color:#8c8f94;white-space:nowrap}
.doc-cov-track{display:block;height:4px;border-radius:999px;background:#eef0f3;overflow:hidden}
.doc-cov-track>span{display:block;height:100%;border-radius:999px;background:#2271b1}

.doc-recent-alert{display:flex;align-items:center;gap:7px;padding:6px 8px;margin-bottom:8px;background:#fdf0f0;border:1px solid #f4c7c7;border-radius:5px}
.doc-recent-alert-dot{width:6px;height:6px;border-radius:50%;background:#b32d2e;flex:0 0 auto}
.doc-recent-alert-text{flex:1;min-width:0;font-size:.62rem;color:#b32d2e;line-height:1.3}
.doc-recent-alert-text strong{font-weight:700}
.doc-recent-alert-btn{flex:0 0 auto;font:inherit;font-size:.58rem;font-weight:600;color:#b32d2e;background:#fff;border:1px solid #f4c7c7;border-radius:4px;padding:3px 7px;cursor:pointer}
.doc-recent-alert-btn:hover{background:#fff5f5}
.doc-recent-body{padding:6px 2px}
.doc-recent-item{display:flex;align-items:center;gap:8px;padding:7px 2px;border-bottom:1px solid #f0f0f1;cursor:pointer}
.doc-recent-item:last-child{border-bottom:0}
.doc-recent-filetag{flex:0 0 auto;width:26px;height:26px;border-radius:5px;background:#eef5fb;color:#2271b1;display:flex;align-items:center;justify-content:center;font-size:.5rem;font-weight:700;letter-spacing:.02em}
.doc-recent-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.doc-recent-name{font-size:.66rem;font-weight:600;color:#1d2327;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.25}
.doc-recent-meta{font-size:.57rem;color:#8c8f94;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.25}
.doc-recent-item:hover .doc-recent-name{color:#2271b1}

/* ==================== SISTER DOCUMENT PROFILE MODAL ==================== */
.doc-profile-card{width:min(760px,94vw)!important;max-height:88vh!important;padding:0!important;display:flex!important;flex-direction:column;overflow:hidden!important;border-radius:8px!important}
.doc-profile-head{display:flex;align-items:center;gap:10px;padding:12px 14px;border-bottom:1px solid #e2e4e7;background:#fff;flex-shrink:0;min-width:0}
.doc-profile-head-icon{width:34px;height:34px;border-radius:7px;background:#eef5fb;border:1px solid #d8e8f7;color:#2271b1;display:flex;align-items:center;justify-content:center;flex:0 0 auto}
.doc-profile-head-icon svg{width:17px;height:17px}
.doc-profile-heading{min-width:0}
.doc-profile-heading h3{font-size:.94rem;line-height:1.2;color:#1d2327;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.doc-profile-sub{font-size:.61rem;color:#646970;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.doc-profile-head-actions{display:flex;align-items:center;gap:6px;margin-left:auto;flex:0 0 auto}
.doc-profile-head .btn-reset{height:30px;padding:0 9px;font-size:.66rem;display:inline-flex;align-items:center;gap:4px}
.doc-profile-print svg{width:12px;height:12px}
.doc-modal-close{width:32px;height:32px;padding:0;border:1px solid #dcdcde;border-radius:5px;background:#fff;color:#50575e;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:background .12s,color .12s,border-color .12s;flex:0 0 auto}
.doc-modal-close svg{width:15px;height:15px}
.doc-modal-close:hover{background:#f0f0f1;color:#1d2327;border-color:#c3c9cf}
.doc-modal-close:focus-visible{outline:2px solid #2271b1;outline-offset:1px}

.doc-profile-scroll{flex:1;min-height:0;overflow-y:auto;padding:12px 14px 14px;background:#f6f7f7}
.doc-profile-hero{background:#fff;border:1px solid #e2e4e7;border-radius:6px;padding:12px;display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.doc-profile-avatar{width:56px;height:56px;border-radius:50%;background:#eaf3fb;border:1px solid #d8e8f7;color:#2271b1;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:1.04rem;flex:0 0 auto}
.doc-profile-identity{flex:1;min-width:190px}
.doc-profile-name{display:flex;align-items:center;gap:6px;flex-wrap:wrap;font-size:1rem;font-weight:650;color:#1d2327;line-height:1.3}
.doc-profile-id{font-size:.59rem;font-weight:600;color:#646970;background:#f6f7f7;border:1px solid #e2e4e7;border-radius:3px;padding:1px 5px;letter-spacing:.01em}
.doc-profile-meta{display:flex;align-items:center;gap:5px 12px;flex-wrap:wrap;font-size:.62rem;color:#646970;margin-top:4px}
.doc-profile-meta span{display:inline-flex;align-items:center;gap:4px;min-width:0}
.doc-profile-meta svg{width:11px;height:11px;color:#8c8f94;flex:0 0 auto}
.doc-profile-actions{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.doc-profile-actions .btn-reset,.doc-profile-actions .header-btn{height:29px;padding:0 9px;font-size:.63rem;display:inline-flex;align-items:center;gap:4px;white-space:nowrap}
.doc-profile-actions svg{width:12px;height:12px}
.doc-profile-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;margin-top:8px;background:#fff;border:1px solid #e2e4e7;border-radius:6px;overflow:hidden;box-shadow:0 1px 2px rgba(29,35,39,.04)}
.doc-profile-summary-item{display:flex;flex-direction:column;align-items:center;gap:3px;padding:10px 8px;text-align:center;border-left:1px solid #f0f0f1;min-width:0}
.doc-profile-summary-item:first-child{border-left:0}
.doc-profile-summary-icon{width:30px;height:30px;border-radius:7px;display:flex;align-items:center;justify-content:center;background:#f6f7f7;color:#50575e;margin-bottom:1px}
.doc-profile-summary-icon svg{width:15px;height:15px}
.doc-profile-summary-item:nth-child(1) .doc-profile-summary-icon{background:#eef5fb;color:#2271b1}
.doc-profile-summary-item:nth-child(2) .doc-profile-summary-icon{background:#eaf6ec;color:#008a20}
.doc-profile-summary-item:nth-child(3) .doc-profile-summary-icon{background:#fdf3e7;color:#b26200}
.doc-profile-summary-item:nth-child(4) .doc-profile-summary-icon{background:#eef0fd;color:#667eea}
.doc-profile-summary-label{font-size:.54rem;font-weight:600;letter-spacing:.045em;text-transform:uppercase;color:#646970;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.doc-profile-summary-item strong{font-size:1.05rem;font-weight:700;line-height:1.1;color:#1d2327}
.doc-profile-panel{background:#fff;border:1px solid #e2e4e7;border-radius:6px;margin-top:8px;overflow:hidden}
.doc-profile-panel-body{padding:10px 12px}
.doc-progress-head{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:.64rem;color:#646970;margin-bottom:6px}
.doc-progress-head strong{font-size:.63rem;font-weight:600;color:#3c434a;text-align:right}
.doc-profile-panel .progress-bar{height:6px}
.doc-profile-required{display:flex;flex-wrap:wrap;gap:4px;margin-top:8px}
.doc-profile-alert{display:flex;align-items:flex-start;gap:7px;background:#fdf0f0;border:1px solid #f4c7c7;color:#b32d2e;padding:7px 10px;border-radius:5px;font-size:.64rem;line-height:1.4;margin-top:8px}
.doc-profile-alert svg{width:14px;height:14px;flex:0 0 auto;margin-top:1px}
.doc-profile-alert strong{font-weight:700}
.doc-doc-group{background:#fff;border:1px solid #e2e4e7;border-radius:6px;margin-top:8px;overflow:hidden}
.doc-doc-group-head{display:flex;align-items:center;gap:6px;padding:8px 11px;background:#fbfcfd;border-bottom:1px solid #e2e4e7;min-width:0}
.doc-doc-group-head svg{width:13px;height:13px;color:#2271b1;flex:0 0 auto}
.doc-doc-group-head h4{font-size:.67rem;font-weight:700;color:#1d2327;margin:0;letter-spacing:.035em;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.doc-doc-count{margin-left:auto;font-size:.57rem;font-weight:600;color:#646970;background:#f0f0f1;border:1px solid #e2e4e7;padding:1px 6px;border-radius:999px;white-space:nowrap}
.doc-doc-group table{min-width:520px}
.doc-doc-group table th{padding:6px 10px;font-size:.55rem;background:#f8f9fa}
.doc-doc-group table td{padding:6px 10px;font-size:.65rem;vertical-align:middle}
.doc-doc-group table tr:hover td{background:#f8fbff}
.doc-doc-group .table-actions{justify-content:flex-end}
.doc-doc-group .table-actions button{width:24px;height:24px;display:inline-flex;align-items:center;justify-content:center}
.doc-doc-actions-col{width:92px;text-align:right!important}
.doc-doc-file{display:flex;align-items:center;gap:8px;min-width:0}
.doc-doc-name{font-weight:500;color:#1d2327;line-height:1.35;word-break:break-word}
.doc-profile-empty{background:#fff;border:1px solid #e2e4e7;border-radius:6px;margin-top:8px;padding:22px 12px;text-align:center;color:#8c8f94;font-size:.7rem}

@media(max-width:1320px){
  .doc-view-shell .dash-main{flex-direction:column}
  .doc-view-shell .dash-main-left,.doc-view-shell .dash-main-right{width:100%!important}
  .doc-view-shell .table-card{flex:none}
  .doc-view-shell .dash-main-right{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;overflow:visible}
  .doc-view-shell .doc-side-wide{grid-column:1/-1}
}
@media(max-width:768px){
  .doc-search-wrap{width:100%}
  .doc-toolbar-left{flex-wrap:wrap}
  .doc-toolbar-right{width:100%;justify-content:flex-end}
  .doc-view-shell .dash-main-right{grid-template-columns:1fr}
  .doc-profile-card{width:calc(100vw - 20px)!important;max-height:92vh!important}
  .doc-profile-head{padding:10px 12px}
  .doc-profile-scroll{padding:10px}
  .doc-profile-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
  .doc-profile-summary-item:nth-child(odd){border-left:0}
  .doc-profile-summary-item:nth-child(n+3){border-top:1px solid #f0f0f1}
  .doc-profile-actions{width:100%}
}
@media(max-width:520px){
  .doc-view-shell .doc-stats-grid{grid-template-columns:1fr 1fr}
  .doc-view-shell .doc-toolbar-right{justify-content:stretch}
  .doc-view-shell .doc-toolbar-right>*{flex:1}
  .doc-profile-head-icon{display:none}
  .doc-profile-head .doc-profile-print{padding:0 7px}
  .doc-profile-head-actions{gap:4px}
  .doc-profile-hero{padding:10px}
  .doc-profile-summary-item{padding:8px 6px}
  .doc-coverage-grid{grid-template-columns:1fr}
  .doc-quick-grid{grid-template-columns:1fr}
}

/* ==================== RESPONSIVE ==================== */
@media(max-width:1024px){
  .stats-grid{grid-template-columns:repeat(2,1fr)}
  .profile-grid{grid-template-columns:1fr}
  .form-grid{grid-template-columns:1fr}
  .dash-main-right{width:40%}
}
@media(max-width:768px){
  .sidebar{width:200px}
  .stats-grid{grid-template-columns:1fr 1fr}
  .dash-main{flex-direction:column}
  .dash-main-right{width:100%;flex-direction:row;flex-wrap:wrap;overflow-y:visible;gap:6px}
  .dash-main-right .widget{flex:1 1 160px;min-width:140px}
  .widget-split{flex-direction:column}
  .widget-split-left,.widget-split-right{width:auto}
  .widget-split-divider{width:auto;height:1px;margin:0 6px}
  .header-user-greeting{display:none}
  .header-search{min-width:80px}
  .analysis-grid{grid-template-columns:1fr}
}
@media(max-width:600px){
  .sidebar{display:none}
  .content{padding:10px}
  .stats-grid{grid-template-columns:1fr}
  .header-search{display:none}
  .notify-dropdown{width:260px;right:-30px}
  .help-tooltip{right:-20px}
  .user-dropdown{right:-10px}
}
/* Profile & Help (settings) */
.profile-editor{display:flex;flex-direction:column;gap:10px}
.profile-av-row{display:flex;align-items:center;gap:14px}
.profile-avatar{width:64px;height:64px;border-radius:50%;background:linear-gradient(135deg,#2271b1,#5b9bd5);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:1.1rem;flex-shrink:0;overflow:hidden}
.profile-av-actions{display:flex;flex-direction:column;align-items:flex-start;gap:6px}
.profile-av-actions .header-btn,.profile-av-actions .btn-reset{height:24px;font-size:0.6rem;padding:0 10px}
.profile-av-hint{font-size:0.56rem;color:#8c8f94;line-height:1.3;max-width:230px}
.profile-av-ready{font-size:0.56rem;color:#008a20;font-weight:600}
.card-linked{border-left:3px solid #008a20}
.help-quicklinks{display:flex;gap:8px;flex-wrap:wrap}
.help-quicklinks .header-btn{font-size:0.6rem;height:26px;padding:0 12px}
.hp-tabs{display:flex;gap:6px;border-bottom:1px solid #e2e4e7;margin:0 -18px 6px;padding:0 18px}
.hp-tab{font-size:0.66rem;font-weight:600;color:#646970;padding:7px 10px;border-bottom:2px solid transparent;cursor:pointer}
.hp-tab.active{color:#2271b1;border-bottom-color:#2271b1}
.hp-body{padding:0 0 4px;max-height:52vh;overflow-y:auto}
.hp-item{padding:8px 0;border-bottom:1px solid #f0f0f1}
.hp-item:last-child{border-bottom:none}
.hp-item strong{display:block;font-size:0.7rem;color:#1d2327;margin-bottom:2px}
.hp-item span{font-size:0.66rem;color:#646970;line-height:1.45;display:block}

/* Searchable sister / user pickers */
.sis-picker{position:relative}
.sis-picker-input{width:100%;box-sizing:border-box;height:30px;padding:0 8px;border:1px solid #dcdcde;border-radius:3px;font-size:0.72rem;color:#1d2327;background:#fff;outline:none;transition:border-color .15s}
.sis-picker-input:focus{border-color:#2271b1;box-shadow:0 0 0 1px #2271b1}
.sis-picker-input::placeholder{color:#a7aaad}
.sis-picker-list{position:absolute;top:calc(100% + 2px);left:0;right:0;z-index:70;max-height:170px;overflow-y:auto;background:#fff;border:1px solid #dcdcde;border-radius:4px;box-shadow:0 4px 14px rgba(16,24,40,.14)}
.sis-picker-modal .sis-picker-list{z-index:90}
.sis-picker-item{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 9px;cursor:pointer;font-size:0.68rem}
.sis-picker-item:hover,.sis-picker-item.sis-picker-selected{background:#eef4fa}
.sis-picker-name{color:#1d2327;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sis-picker-id{color:#8c8f94;flex:none;font-size:0.6rem}
.sis-picker-empty{padding:8px;font-size:0.66rem;color:#8c8f94}

/* Profile editor avatar buttons */
.profile-av-btns{display:flex;gap:6px;flex-wrap:wrap}

/* Announcement recipients */
.ann-recip{background:#f7f9fb;border:1px solid #ececef;border-radius:4px;padding:8px 10px;margin:0 0 8px}
.ann-recip-title{font-size:0.66rem;font-weight:700;color:#1d2327;margin-bottom:6px}
.ann-recip-opts{display:flex;gap:14px;margin-bottom:8px}
.radio-inline{display:inline-flex;align-items:center;gap:5px;font-size:0.66rem;color:#3c434a;cursor:pointer}
.radio-inline input{accent-color:#2271b1}
.ann-recip-pick .sis-picker{max-width:360px}
.ann-recip-chips{display:flex;flex-wrap:wrap;gap:5px;margin-top:6px}
.ann-recip-chip{display:inline-flex;align-items:center;gap:5px;background:#e8f0fa;border:1px solid #c9d8ea;color:#1d2327;border-radius:12px;padding:2px 8px;font-size:0.62rem}
.ann-recip-chip button{border:none;background:none;color:#2271b1;font-size:0.82rem;line-height:1;cursor:pointer;padding:0}
.ann-recip-chip button:hover{color:#b32d2e}

/* Settings page polish (formal + tidy) */
.settings-shell .view-header h2{font-size:1.05rem;margin:0 0 2px}
.settings-shell .view-header p{font-size:0.7rem;color:#646970;margin:0 0 10px}
.settings-main .card{box-shadow:0 1px 2px rgba(16,24,40,.06)}
.settings-main .card .card-title{font-size:0.76rem}
.settings-main .fld label{font-size:0.66rem;font-weight:600;color:#3c434a}

/* Mini loading indicator (top-center pill shown briefly after actions) */
.mini-busy{position:fixed;top:14px;left:50%;transform:translateX(-50%) translateY(-16px);z-index:12000;display:flex;align-items:center;gap:8px;padding:7px 16px;border-radius:999px;background:#1d2327;color:#fff;font-size:0.7rem;font-weight:600;box-shadow:0 6px 18px rgba(0,0,0,0.28);opacity:0;pointer-events:none;transition:opacity 0.22s ease, transform 0.22s ease}
.mini-busy.show{opacity:1;transform:translateX(-50%) translateY(0)}
.mini-busy-spin{width:14px;height:14px;border:2px solid rgba(255,255,255,0.35);border-top-color:#fff;border-radius:50%;animation:miniBusySpin 0.75s linear infinite;flex-shrink:0}
@keyframes miniBusySpin{to{transform:rotate(360deg)}}

/* Full busy overlay used for async/network actions */
.busy-overlay{position:fixed;inset:0;z-index:11500;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;background:rgba(255,255,255,0.6);backdrop-filter:blur(2px)}
.busy-overlay.hidden{display:none}
.busy-ring{width:46px;height:46px;border:4px solid rgba(31,136,209,0.25);border-top-color:#1F88D1;border-radius:50%;animation:miniBusySpin 0.9s linear infinite}
.busy-overlay .busy-label{font-size:0.78rem;font-weight:600;color:#17706e;letter-spacing:0.2px}

/* Locked (view-only) inputs on Profile & Change Password */
.fld input[disabled], .fld select[disabled], .profile-editor input[disabled]{background:#f6f7f7;color:#8c8f94;cursor:not-allowed;box-shadow:none}
.field-editing input:not([disabled]), .field-editing select:not([disabled]){background:#fffbe6;box-shadow:inset 0 0 0 1.5px #d9a441}
.field-editing input.changed, .field-editing select.changed{background:#fff3bf;box-shadow:inset 0 0 0 2px #d98f00;animation:changedFlash 1.2s ease}
@keyframes changedFlash{0%{box-shadow:inset 0 0 0 3px #d98f00}100%{box-shadow:inset 0 0 0 2px #d98f00}}
.edit-hint-bar{display:flex;align-items:center;gap:8px;margin-bottom:8px;padding:7px 10px;border-radius:6px;background:#fff8e1;color:#7a5a00;font-size:0.66rem;font-weight:600;border:1px solid #f0dca0}
.edit-hint-bar .edit-dot{width:8px;height:8px;border-radius:50%;background:#d98f00;flex-shrink:0;animation:miniBusySpin 1.4s linear infinite}

/* Redesigned reminder overview */
.ro-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.ro-cell{display:flex;flex-direction:column;gap:2px;padding:10px 12px;border-radius:8px;border:1px solid #e9ecf1;background:#fbfcfe}
.ro-cell .ro-num{font-size:1.15rem;font-weight:700;color:#1d2327;line-height:1.1}
.ro-cell .ro-lbl{font-size:0.62rem;color:#646970;font-weight:600;text-transform:uppercase;letter-spacing:0.3px}
.ro-cell.ro-blue{background:#f0f7ff;border-color:#c9e0f7}
.ro-cell.ro-blue .ro-num{color:#2271b1}
.ro-cell.ro-orange{background:#fff7ed;border-color:#f6dcbf}
.ro-cell.ro-orange .ro-num{color:#b26200}
.ro-cell.ro-red{background:#fef1f0;border-color:#f7c7c4}
.ro-cell.ro-red .ro-num{color:#b32d2e}
.ro-cell.ro-green{background:#eefaf4;border-color:#c6ecd9}
.ro-cell.ro-green .ro-num{color:#008a20}
.ro-breakdown{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:8px}
.ro-chip{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:6px 9px;border-radius:6px;background:#f6f7f7;border:1px solid #ececf0;font-size:0.66rem;color:#3c434a}
.ro-chip strong{color:#1d2327}
.ro-chip.ro-empty{border-style:dashed;color:#a7aaad}

/* Compact reminder calendar */
.rem-cal--compact .cal-grid{font-size:0.66rem;gap:2px}
.rem-cal--compact .cal-header{padding:2px 0;font-size:0.55rem}
.rem-cal--compact .cal-day{padding:3px 2px;font-size:0.7rem;line-height:1.2;min-height:22px}
.rem-cal--compact .cal-day .cal-dot{width:3px;height:3px;margin:1px auto 0}
.rem-cal--compact .cal-day.has-event{font-weight:600}
.cal-legend .cal-legend-dot.sys{background:#2271b1}
.cal-legend .cal-legend-dot.cus{background:#17a673}
.cal-nav-btn{background:none;border:none;font-size:0.9rem;line-height:1;color:#2271b1;cursor:pointer;padding:0 8px}
.cal-nav-title{display:flex;align-items:center;justify-content:center;font-size:0.78rem;font-weight:700;color:#1d2327}

/* ============ INLINE SISTER PROFILE SUBPAGE (system template, compact) ============ */
.sp-sheet{max-width:880px;width:100%;margin:0 auto;display:flex;flex-direction:column;gap:10px}
.sp-card{background:#fff;border:1px solid #e2e4e7;border-radius:5px;overflow:hidden}
.sp-card-pad{padding:12px 14px}
.sp-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;padding:8px 4px}
.sp-bar-title{font-size:0.85rem;font-weight:600;color:#1d2327}
.sp-back{display:inline-flex;align-items:center;gap:5px;height:24px;padding:0 8px;font-size:0.65rem;background:#fff;border:1px solid #c3c9cf;border-radius:3px;color:#1d2327;cursor:pointer}
.sp-back:hover{background:#f6f7f7}
.sp-actions{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.sp-btn{display:inline-flex;align-items:center;gap:4px;height:24px;padding:0 9px;font-size:0.65rem;font-weight:600;background:#fff;border:1px solid #c3c9cf;border-radius:3px;color:#1d2327;cursor:pointer}
.sp-btn:hover{background:#f6f7f7}
.sp-btn.primary{background:#f0f6ff;border-color:#2271b1;color:#2271b1}
.sp-btn.primary:hover{background:#e2eefc}
.sp-btn.secondary{background:#fff;border-color:#2271b1;color:#2271b1}
.sp-btn.danger{color:#b32d2e;border-color:#e3b9b9}
.sp-btn.danger:hover{background:#fdf0f0}
.sp-head{display:flex;align-items:center;gap:12px;padding:14px 16px}
.sp-avatar{width:52px;height:52px;border-radius:50%;background:#eef2f7;border:1px solid #d9dfe7;color:#2c3e50;display:flex;align-items:center;justify-content:center;font-size:1.05rem;font-weight:700;flex-shrink:0}
.sp-identity{min-width:0}
.sp-identity h3{margin:0;font-size:0.95rem;color:#1d2327;line-height:1.2}
.sp-identity .sp-id{font-size:0.68rem;color:#646970}
.sp-meta{display:flex;flex-wrap:wrap;gap:4px 10px;margin-top:4px;font-size:0.66rem;color:#50575e}
.sp-meta span{white-space:nowrap}
.sp-layout{display:grid;grid-template-columns:1fr 250px;gap:10px;align-items:start}
.sp-tabs{display:flex;flex-wrap:wrap;gap:3px;border-bottom:1px solid #e2e4e7;padding:0 12px}
.sp-tab-btn{background:none;border:none;border-bottom:2px solid transparent;padding:8px 10px;font-size:0.7rem;color:#50575e;cursor:pointer;font-weight:500}
.sp-tab-btn:hover{color:#2271b1}
.sp-tab-btn.active{color:#2271b1;border-bottom-color:#2271b1;font-weight:600}
.sp-rows{display:grid;grid-template-columns:1fr 1fr;gap:7px 18px;padding:12px 14px}
.sp-row{display:flex;justify-content:space-between;gap:10px;font-size:0.68rem;line-height:1.4}
.sp-row .sp-lbl{color:#646970;flex-shrink:0}
.sp-row .sp-val{color:#1d2327;font-weight:500;text-align:right}
.sp-row .sp-val.strong{font-weight:700}
.sp-section-title{font-size:0.68rem;font-weight:700;text-transform:uppercase;letter-spacing:0.3px;color:#50575e;background:#f6f7f7;border-bottom:1px solid #e2e4e7;padding:6px 14px;display:flex;justify-content:space-between;align-items:center}
.sp-side{display:flex;flex-direction:column;gap:10px}
.sp-stat{display:flex;flex-direction:column;gap:2px;padding:10px 12px;background:#fbfcfd;border:1px solid #e9ecf1;border-radius:4px}
.sp-stat .sp-stat-num{font-size:1rem;font-weight:700;color:#1d2327}
.sp-stat .sp-stat-lbl{font-size:0.62rem;color:#646970;font-weight:600;text-transform:uppercase;letter-spacing:0.3px}
.sp-danger{font-size:0.66rem;color:#b32d2e}
.sp-check{display:flex;flex-wrap:wrap;gap:4px;margin-top:6px}
.sp-tag{display:inline-flex;align-items:center;gap:4px;padding:2px 7px;border-radius:3px;border:1px solid #dcdcde;font-size:0.62rem;color:#50575e}
.sp-tag.ok{background:#e5f5e8;border-color:#b7dfc2;color:#008a20}
.sp-tag.missing{background:#fdf0f0;border-color:#f1c9c7;color:#b32d2e}
.sp-doc-groups{display:flex;flex-direction:column;gap:8px}
.sp-doc-group{border:1px solid #e2e4e7;border-radius:4px;overflow:hidden}
.sp-doc-group .sp-doc-head{display:flex;align-items:center;justify-content:space-between;padding:6px 10px;background:#f6f7f7;font-size:0.68rem;font-weight:600;color:#3c434a}
.sp-empty{padding:12px;font-size:0.7rem;color:#646970;text-align:center}
@media (max-width:900px){.sp-layout{grid-template-columns:1fr}.sp-rows{grid-template-columns:1fr}}

/* ==================== SISTER PROFILE (ipd) STYLES - SHARED WITH dashboard.html ==================== */

/* ==================== SISTER PROFILE STYLES (MATCHING REFERENCE IMAGE) ==================== */
.ipd-page-wrapper {
  background: #f0f4f8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Reference-like Top Organization Banner */
.ipd-top-banner {
  background: #ffffff;
  border-bottom: 2px solid #2271b1;
  padding: 6px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.ipd-top-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ipd-top-banner-left img {
  height: 38px;
  width: auto;
  border-radius: 4px;
}
.ipd-top-banner-text h2 {
  font-size: 14px;
  font-weight: 700;
  color: #1d4e89;
  margin: 0;
  letter-spacing: 0.02em;
}
.ipd-top-banner-text p {
  font-size: 10px;
  color: #646970;
  margin: 0;
}
.ipd-top-banner-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ipd-badge-pill {
  padding: 4px 10px;
  background: #eef4fb;
  border: 1px solid #c9d8ea;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #1d4e89;
}

/* Reference Breadcrumb Bar (Dark Navy) */
.ipd-nav-bar {
  background: #112a42;
  color: #ffffff;
  padding: 6px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 500;
}
.ipd-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ipd-breadcrumb a {
  color: #8bbce6;
  text-decoration: none;
}
.ipd-breadcrumb a:hover {
  text-decoration: underline;
}
.ipd-breadcrumb-sep {
  color: #6c8ca6;
}
.ipd-bar-title {
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #e2f0fc;
}

/* Main Container: Centered Layout like Reference */
.ipd-container {
  max-width: 1260px;
  margin: 12px auto;
  padding: 0 16px 40px;
  width: 100%;
}

/* Profile Card (Tan/Gold gradient header card) */
.ipd-header-card {
  background: #ffffff;
  border: 1px solid #bfd3e6;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  margin-bottom: 12px;
  overflow: hidden;
}
.ipd-card-caption {
  background: #1a4268;
  color: #ffffff;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Profile Details Box (Matching the soft warm/tan bg from screenshot) */
.ipd-profile-body {
  background: #fbf5e8;
  border: 2px solid #ecd8ab;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: 140px 1.4fr 1.3fr 1.1fr;
  gap: 16px;
  align-items: center;
}
.ipd-avatar-col {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.ipd-avatar-wrap {
  width: 90px;
  height: 90px;
  border-radius: 6px;
  background: #dbe4ef;
  border: 2px solid #b8cbdf;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}
.ipd-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ipd-avatar-wrap svg {
  width: 60px;
  height: 60px;
  color: #ffffff;
  opacity: 0.9;
}
.ipd-sister-id-pill {
  margin-top: 6px;
  background: #cc4444;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  display: inline-block;
}
.ipd-status-pill {
  margin-top: 3px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 3px;
}

.ipd-identity-col h3 {
  font-size: 17px;
  font-weight: 800;
  color: #1a252f;
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.ipd-identity-sub {
  font-size: 12px;
  color: #4a5568;
  font-weight: 600;
  margin-bottom: 8px;
}
.ipd-field-row {
  font-size: 11.5px;
  color: #2d3748;
  margin-bottom: 4px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.ipd-field-label {
  font-weight: 600;
  color: #4a5568;
  min-width: 110px;
}
.ipd-field-val {
  font-weight: 500;
  color: #1a202c;
}
.ipd-field-val strong {
  font-weight: 700;
  color: #0f2b48;
}

/* Reference Action Ribbon (Row of Blue Buttons) */
.ipd-action-ribbon {
  background: #eef3f8;
  border: 1px solid #c9d8ea;
  border-radius: 5px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.ipd-ribbon-btn {
  background: #1976d2;
  color: #ffffff;
  border: 1px solid #145ca4;
  border-radius: 4px;
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.ipd-ribbon-btn:hover {
  background: #135ba2;
  color: #ffffff;
}
.ipd-ribbon-btn.secondary {
  background: #ffffff;
  color: #1d4e89;
  border-color: #b8cde4;
}
.ipd-ribbon-btn.secondary:hover {
  background: #eaf1f8;
}
.ipd-ribbon-btn.danger {
  background: #b32d2e;
  border-color: #8c1e1f;
}
.ipd-ribbon-btn.danger:hover {
  background: #8e1f20;
}
.ipd-ribbon-btn svg {
  width: 14px;
  height: 14px;
}

/* Split Main Section (Left Content 73%, Right Panel 27%) */
.ipd-split-layout {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.ipd-split-left {
  flex: 1;
  min-width: 0;
}
.ipd-split-right {
  width: 280px;
  flex-shrink: 0;
}

/* Reference Tabs */
.ipd-tabs-nav {
  display: flex;
  border-bottom: 2px solid #2271b1;
  background: #e2edf8;
  border-radius: 6px 6px 0 0;
  overflow-x: auto;
}
.ipd-tab-btn {
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  color: #1f4265;
  border: none;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  border-right: 1px solid #c9dbe9;
}
.ipd-tab-btn:hover {
  background: #d4e5f4;
  color: #103152;
}
.ipd-tab-btn.active {
  background: #2271b1;
  color: #ffffff;
}

/* Tab Content Box */
.ipd-tab-card {
  background: #ffffff;
  border: 1px solid #bfd3e6;
  border-top: none;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  padding: 16px 18px;
  min-height: 280px;
}
.ipd-section-banner {
  background: #1d4e89;
  color: #ffffff;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 4px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Reference Data Grid Rows (Clean Alternating / Labeled Rows) */
.ipd-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.ipd-data-table tr {
  border-bottom: 1px solid #e5edf5;
}
.ipd-data-table tr:nth-child(even) {
  background: #fafcff;
}
.ipd-data-table td {
  padding: 8px 12px;
  vertical-align: middle;
}
.ipd-data-table .cell-lbl {
  width: 32%;
  font-weight: 600;
  color: #4a5568;
}
.ipd-data-table .cell-val {
  font-weight: 500;
  color: #1a202c;
}
.ipd-data-table .cell-val strong {
  color: #103152;
}

/* Right Column: Reference Hospital Sidebar Button Stack */
.ipd-side-card {
  background: #ffffff;
  border: 1px solid #bfd3e6;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  margin-bottom: 14px;
  overflow: hidden;
}
.ipd-side-header {
  background: #1b75bb;
  color: #ffffff;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.ipd-side-stack {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.ipd-side-btn {
  width: 100%;
  padding: 7px 10px;
  background: #2ea2cc;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: block;
  transition: background 0.15s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.ipd-side-btn:hover {
  background: #238bb3;
  color: #ffffff;
}
.ipd-side-btn.highlight {
  background: #0073aa;
}
.ipd-side-btn.highlight:hover {
  background: #005f8c;
}
.ipd-side-btn.alt {
  background: #f0f4f8;
  color: #1d4e89;
  border: 1px solid #c9d8ea;
}
.ipd-side-btn.alt:hover {
  background: #e2ebf4;
}

/* Checklist widget */
.ipd-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 11px;
}
.ipd-checklist li {
  padding: 5px 8px;
  border-bottom: 1px solid #f0f4f8;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ipd-checklist li:last-child {
  border-bottom: none;
}
.ipd-check-ok {
  color: #008a20;
  font-weight: 700;
}
.ipd-check-missing {
  color: #b32d2e;
  font-weight: 700;
}

/* Documents Gallery Section (Below Overview) */
.ipd-docs-section {
  margin-top: 18px;
  background: #ffffff;
  border: 1px solid #bfd3e6;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  overflow: hidden;
}
.ipd-docs-header {
  background: #143d65;
  color: #ffffff;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ipd-docs-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ipd-docs-filter-bar {
  background: #f4f8fc;
  padding: 8px 16px;
  border-bottom: 1px solid #e1ebf5;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ipd-filter-chip {
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid #cfdeec;
  color: #2b547e;
  cursor: pointer;
  transition: all 0.12s;
}
.ipd-filter-chip:hover, .ipd-filter-chip.active {
  background: #1d4e89;
  color: #ffffff;
  border-color: #1d4e89;
}
.ipd-docs-grid {
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.ipd-doc-card {
  background: #ffffff;
  border: 1px solid #d5e2ef;
  border-radius: 6px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  transition: transform 0.12s, box-shadow 0.12s;
}
.ipd-doc-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border-color: #2271b1;
}
.ipd-doc-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}
.ipd-doc-icon {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background: #eaf2fb;
  color: #1d4e89;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  flex-shrink: 0;
}
.ipd-doc-meta h4 {
  font-size: 12px;
  font-weight: 700;
  color: #1d2327;
  margin: 0 0 2px;
  line-height: 1.3;
  word-break: break-word;
}
.ipd-doc-category {
  font-size: 10.5px;
  color: #646970;
}
.ipd-doc-details {
  font-size: 10.5px;
  color: #787c82;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed #e8eef5;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ipd-doc-actions {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}
.ipd-doc-btn {
  flex: 1;
  padding: 4px 6px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 3px;
  border: 1px solid #dcdcde;
  background: #f6f7f7;
  color: #2271b1;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.ipd-doc-btn:hover {
  background: #2271b1;
  color: #ffffff;
  border-color: #2271b1;
}
.ipd-doc-btn.danger-btn {
  color: #b32d2e;
}
.ipd-doc-btn.danger-btn:hover {
  background: #b32d2e;
  color: #ffffff;
  border-color: #b32d2e;
}

/* Document Preview Modal */
.preview-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 25, 41, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(2px);
}
.preview-modal-window {
  background: #ffffff;
  border-radius: 8px;
  width: 90vw;
  max-width: 980px;
  height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0,0,0,0.3);
}
.preview-modal-header {
  background: #143d65;
  color: #ffffff;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.preview-modal-body {
  flex: 1;
  background: #f0f3f6;
  position: relative;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.preview-iframe {
  width: 100%;
  height: 100%;
  border: none;
}
.preview-img {
  max-width: 95%;
  max-height: 95%;
  object-fit: contain;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  border-radius: 4px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .ipd-profile-body {
    grid-template-columns: 120px 1fr 1fr;
  }
  .ipd-profile-body > div:last-child {
    grid-column: 1 / -1;
    border-top: 1px solid #ebd9b7;
    padding-top: 8px;
  }
  .ipd-split-layout {
    flex-direction: column;
  }
  .ipd-split-right {
    width: 100%;
  }
}
/* ============ SYSTEM-TEMPLATE OVERRIDES (compact, centered, flat, wordpress-like) ============ */
.ipd-page-wrapper{background:#f6f7f7}
.ipd-top-banner{border-bottom:1px solid #e2e4e7;padding:5px 16px}
.ipd-top-banner-left img{height:30px}
.ipd-top-banner-text h2{font-size:12px;color:#1d2327}
.ipd-top-banner-text p{font-size:9px}
.ipd-badge-pill{font-size:10px;background:#f6f7f7;border-color:#dcdcde;color:#50575e}
.ipd-nav-bar{background:#ffffff;color:#1d2327;border-bottom:1px solid #e2e4e7;padding:5px 16px;font-size:11px}
.ipd-breadcrumb{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ipd-breadcrumb a{color:#2271b1}
.ipd-bar-title{color:#50575e;font-size:11px}

/* Centered, compact sheet (mirrors the login page proportions) */
.ipd-container{max-width:980px;margin:8px auto;padding:0 10px 26px}
.ipd-header-card{box-shadow:none;border-color:#e2e4e7;margin-bottom:10px}
.ipd-card-caption{background:#f6f7f7;color:#1d2327;border-bottom:1px solid #e2e4e7;font-size:11px;font-weight:600;padding:4px 8px 4px 10px;display:flex;align-items:center;justify-content:space-between;gap:8px}
.ipd-header-actions{display:flex;align-items:center;gap:3px}
.ipd-icon-btn{display:inline-flex;align-items:center;justify-content:center;width:23px;height:21px;padding:0;border:1px solid #dcdcde;border-radius:3px;background:#fff;color:#50575e;cursor:pointer;transition:background .12s,border-color .12s,color .12s}
.ipd-icon-btn svg{width:12px;height:12px}
.ipd-icon-btn:hover{background:#f0f6fc;border-color:#2271b1;color:#2271b1}
.ipd-icon-btn.danger:hover{background:#fcf0f1;border-color:#b32d2e;color:#b32d2e}
.ipd-icon-btn:focus-visible{outline:2px solid #2271b1;outline-offset:1px}
.ipd-profile-body{background:#ffffff;border:1px solid #f0f0f1;border-radius:3px;grid-template-columns:92px 1.2fr 1fr 1fr;gap:2px 18px;padding:12px 14px}
.ipd-avatar-col{gap:0;align-items:center}
.ipd-avatar-wrap{width:54px;height:54px;background:#eef4fb;border:1px solid #cfe0f2;box-shadow:none;color:#2271b1;font-size:15px;font-weight:700;letter-spacing:.02em}
.ipd-avatar-wrap svg{width:30px;height:30px;color:#a7aaad;opacity:1}
.ipd-sister-id-pill{margin-top:6px;background:#f6f7f7;color:#50575e;border:1px solid #dcdcde;font-size:9.5px;font-weight:600;padding:1px 6px;border-radius:3px;box-shadow:none;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ipd-status-pill{margin-top:4px;font-size:8.5px;font-weight:600;padding:1px 7px;border-radius:50px;letter-spacing:.04em;text-transform:uppercase}
.ipd-status-pill.badge-active{background:#008a20;color:#fff}
.ipd-status-pill.badge-retired{background:#b26200;color:#fff}
.ipd-status-pill.badge-inactive{background:#8c8f94;color:#fff}
.ipd-identity-col h3{font-size:15px;font-weight:700;margin:0 0 3px;letter-spacing:.01em;color:#1d2327}
.ipd-identity-sub{font-size:10.5px;margin-bottom:8px;color:#646970;font-weight:500}
.ipd-field-row{font-size:11px;margin-bottom:4px;gap:6px;white-space:nowrap;min-width:0}
.ipd-field-label{color:#646970;font-weight:600;min-width:0;flex:0 0 auto;font-size:10.5px}
.ipd-field-val{font-size:11px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ipd-field-val strong{color:#1d2327}

/* Action ribbon: one flat row of neutral buttons */
.ipd-action-ribbon{gap:6px;padding:7px 9px;background:#fff;border:1px solid #e2e4e7;border-radius:4px;margin-bottom:10px;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin}
.ipd-ribbon-btn,.ipd-side-btn{background:#fff;border:1px solid #c3c9cf;color:#1d2327;font-size:11px;font-weight:600;padding:5px 11px;border-radius:3px;box-shadow:none;white-space:nowrap;flex:0 0 auto;transition:background .15s,border-color .15s,color .15s}
.ipd-ribbon-btn:hover,.ipd-side-btn:hover{background:#f6f7f7;color:#2271b1;border-color:#2271b1}
.ipd-ribbon-btn.secondary,.ipd-side-btn.alt,.ipd-side-btn.highlight{background:#fff;color:#1d2327;border-color:#c3c9cf}
.ipd-ribbon-btn.danger,.ipd-side-btn.danger{background:#fff;color:#b32d2e;border-color:#d69a9a}

/* Split layout: content left, action rail right */
.ipd-split-layout{gap:12px;align-items:flex-start}
.ipd-split-left{display:flex;flex-direction:column}
.ipd-split-right{width:236px}
.ipd-side-card{border:1px solid #e2e4e7;border-radius:4px;box-shadow:none;margin-bottom:10px}
.ipd-side-header{background:#f6f7f7;color:#1d2327;border-bottom:1px solid #e2e4e7;font-size:11px;font-weight:700;padding:6px 10px;text-align:left;letter-spacing:.02em}
.ipd-side-stack{padding:9px;gap:6px}
.ipd-side-btn{width:100%;text-align:center;font-size:11px;padding:6px 9px}
.ipd-checklist{font-size:10.5px}
.ipd-checklist li{padding:5px 0;gap:6px}
.ipd-check-ok{color:#008a20;font-weight:700}
.ipd-check-missing{color:#b32d2e;font-weight:700}

/* Tabs */
.ipd-tabs-nav{gap:2px;border-bottom:1px solid #e2e4e7;background:#f6f7f7;border-radius:4px 4px 0 0}
.ipd-tab-btn{background:#fff;border:1px solid #e2e4e7;border-bottom:none;border-radius:3px 3px 0 0;font-size:11px;color:#50575e;padding:6px 11px}
.ipd-tab-btn:hover{color:#2271b1}
.ipd-tab-btn.active{background:#fff;color:#2271b1;border-color:#2271b1;border-bottom:2px solid #2271b1;font-weight:600}
.ipd-tab-card{border:1px solid #e2e4e7;border-radius:0 0 4px 4px;box-shadow:none;padding:12px 14px;min-height:0;flex:0 0 auto}
.ipd-section-banner{background:#f6f7f7;color:#3c434a;border:1px solid #e2e4e7;border-left:3px solid #2271b1;font-size:11px;padding:6px 10px;margin-bottom:8px;gap:8px}
.ipd-section-banner span:last-child{font-size:9.5px!important;color:#8c8f94!important;font-weight:400!important}
.ipd-data-table{font-size:11px}
.ipd-data-table td{padding:6px 10px}
.ipd-data-table tr{border-bottom:1px solid #f0f0f1}
.ipd-data-table tr:nth-child(even){background:#fafbfc}
.ipd-data-table tbody tr:hover{background:#f4f8fc}
.ipd-data-table .cell-lbl{color:#646970;width:34%;white-space:nowrap}
.ipd-data-table .cell-val{color:#1d2327;font-weight:500}
.ipd-data-table .cell-val strong{color:#1d2327}

/* Documents gallery */
.ipd-docs-section{margin-top:12px;background:#fff;border:1px solid #e2e4e7;border-radius:4px;box-shadow:none}
.ipd-docs-header{background:#f6f7f7;color:#1d2327;border-bottom:1px solid #e2e4e7;padding:7px 10px;gap:8px}
.ipd-docs-title{font-size:11px;font-weight:700;letter-spacing:.02em;text-transform:none;gap:6px}
.ipd-docs-title svg{color:#2271b1}
.ipd-docs-filter-bar{background:#fff;padding:6px 10px;border-bottom:1px solid #f0f0f1;gap:5px;flex-wrap:wrap;row-gap:4px}
.ipd-filter-chip{font-size:9.5px;color:#50575e;background:#fff;border-color:#dcdcde;padding:2px 7px;border-radius:3px}
.ipd-filter-chip:hover{background:#2271b1;border-color:#2271b1;color:#fff}
.ipd-filter-chip.active{background:#f0f6ff;color:#2271b1;border-color:#2271b1}
.ipd-docs-grid{padding:10px;grid-template-columns:repeat(auto-fill,minmax(206px,1fr));gap:8px}
.ipd-doc-card{border:1px solid #e2e4e7;border-radius:4px;padding:9px;cursor:pointer;transition:border-color .12s,box-shadow .12s}
.ipd-doc-card:hover{transform:none;border-color:#2271b1;box-shadow:0 1px 4px rgba(0,0,0,.07)}
.ipd-doc-top{gap:8px;margin-bottom:6px}
.ipd-doc-icon{width:30px;height:30px;background:#f0f6ff;color:#2271b1;border:1px solid #dbe8f7;border-radius:3px;font-size:9px}
.ipd-doc-meta h4{font-size:11px;margin:0 0 2px}
.ipd-doc-category{font-size:9.5px}
.ipd-doc-details{font-size:9.5px;padding-top:6px;border-top:1px dashed #f0f0f1}
.ipd-doc-actions{gap:4px;margin-top:6px}
.ipd-doc-btn{flex:1;padding:4px 5px;font-size:10px;font-weight:600;border-radius:3px;border:1px solid #c3c9cf;background:#fff;color:#1d2327;cursor:pointer;text-align:center;box-shadow:none}
.ipd-doc-btn:hover{background:#f6f7f7;color:#2271b1;border-color:#2271b1}
.ipd-doc-btn.danger-btn{color:#b32d2e;border-color:#d69a9a}
.ipd-doc-btn.danger-btn:hover{background:#b32d2e;color:#fff;border-color:#b32d2e}
.ipd-doc-open-hint{font-size:9px;color:#8c8f94;text-align:center;margin-top:5px}

/* Document preview modal (flat, wordpress-like) */
.preview-modal-overlay{position:fixed;inset:0;background:rgba(29,35,39,.62);display:flex;align-items:center;justify-content:center;z-index:10000;padding:16px}
.preview-modal-window{background:#fff;border:1px solid #c3c9cf;border-radius:4px;width:92vw;max-width:840px;height:82vh;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 8px 28px rgba(0,0,0,.22)}
.preview-modal-header{background:#1d2327;color:#fff;padding:7px 10px;display:flex;align-items:center;justify-content:space-between;gap:10px}
.preview-modal-title{min-width:0}
.preview-modal-name{font-size:11.5px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.preview-modal-sub{font-size:9.5px;color:#c3c4c7;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.preview-modal-tools{display:flex;align-items:center;gap:5px;flex-shrink:0}
.preview-modal-tools button,.preview-modal-tools a{height:24px;padding:0 8px;font-size:10px;font-weight:600;border-radius:3px;border:1px solid rgba(255,255,255,.35);background:transparent;color:#fff;cursor:pointer;display:inline-flex;align-items:center;gap:4px;text-decoration:none;white-space:nowrap}
.preview-modal-tools button:hover,.preview-modal-tools a:hover{background:rgba(255,255,255,.14);color:#fff}
.preview-modal-tools button:disabled{opacity:.35;cursor:default}
.preview-modal-body{flex:1;background:#f0f3f6;position:relative;overflow:auto;padding:12px;display:block;overscroll-behavior:contain}
.preview-modal-body.is-centered{display:flex;align-items:center;justify-content:center;padding:12px}
.preview-loading{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:#50575e;font-size:11px;height:100%;min-height:160px}
.preview-spin{width:26px;height:26px;border:3px solid #dcdcde;border-top-color:#2271b1;border-radius:50%;animation:ipdSpin .8s linear infinite}
@keyframes ipdSpin{to{transform:rotate(360deg)}}
.preview-img{max-width:100%;max-height:100%;object-fit:contain;background:#fff;border:1px solid #e2e4e7;border-radius:3px;touch-action:none;user-select:none;-webkit-user-drag:none}
.preview-img.zoomed{display:block;max-width:none;max-height:none;margin:0 auto}
.preview-iframe{width:100%;height:100%;min-height:400px;border:1px solid #e2e4e7;background:#fff}
.preview-text{background:#fff;border:1px solid #e2e4e7;border-radius:3px;padding:12px;margin:0;font-family:Consolas,Menlo,monospace;font-size:11px;line-height:1.5;white-space:pre-wrap;word-break:break-word;color:#1d2327;max-width:100%}
.preview-fallback{background:#fff;border:1px solid #e2e4e7;border-radius:4px;padding:22px;text-align:center;max-width:420px;margin:auto}
.preview-fallback h4{margin:0 0 6px;font-size:12.5px;color:#1d2327;word-break:break-word}
.preview-fallback p{margin:0 0 12px;font-size:11px;color:#646970;line-height:1.6}
.preview-fb-actions{display:flex;gap:6px;justify-content:center;flex-wrap:wrap}
.preview-fb-actions button,.preview-fb-actions a{height:28px;padding:0 12px;font-size:11px;font-weight:600;border-radius:3px;border:1px solid #c3c9cf;background:#fff;color:#1d2327;cursor:pointer;display:inline-flex;align-items:center;text-decoration:none}
.preview-fb-actions .primary{background:#2271b1;border-color:#2271b1;color:#fff}
.preview-fb-actions .primary:hover{background:#135e96;border-color:#135e96}
.preview-pdf-page{display:block;margin:0 auto 10px;background:#fff;box-shadow:0 1px 4px rgba(0,0,0,.14);max-width:100%;touch-action:none}
.preview-pdf-page canvas{display:block;width:100%;height:auto}
.preview-pdf-label{text-align:center;font-size:9.5px;color:#8c8f94;margin:-6px 0 10px}

@media (max-width: 1180px) {
  .ipd-profile-body{grid-template-columns:84px 1fr 1fr}
  .ipd-profile-body>div:last-child{grid-column:1/-1;border-top:1px solid #f0f0f1;padding-top:6px}
  .ipd-split-layout{flex-direction:column;align-items:stretch}
  .ipd-split-right{width:100%;display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px;align-items:start}
  .ipd-side-card{margin-bottom:0}
}
@media (max-width: 768px) {
  .ipd-container{max-width:100%;padding:0 6px 20px}
  .ipd-profile-body{grid-template-columns:1fr;text-align:center}
  .ipd-field-row{justify-content:center}
  .ipd-field-val{max-width:100%}
  .ipd-split-right{grid-template-columns:1fr}
}

/* ============ PROFILE ACTIONS (matches the system's blue template) ============ */
/* Back / return button */
.ipd-back-link{display:inline-flex;align-items:center;gap:5px;padding:4px 10px;background:#fff!important;border:1px solid #c3c9cf;color:#2271b1!important;font-weight:600;text-decoration:none!important;border-radius:3px;transition:background .15s,color .15s,border-color .15s}
.ipd-back-link:hover{background:#2271b1!important;border-color:#2271b1;color:#fff!important;text-decoration:none!important}

/* Primary (highlight) buttons: system blue with white text */
.ipd-ribbon-btn.highlight,.ipd-side-btn.highlight{background:#2271b1;border-color:#2271b1;color:#fff}
.ipd-ribbon-btn.highlight:hover,.ipd-side-btn.highlight:hover{background:#135e96;border-color:#135e96;color:#fff}

/* Image thumbnail in the documents gallery */
.ipd-doc-thumb{height:84px;overflow:hidden;border:1px solid #e2e4e7;border-radius:3px;margin-bottom:6px;background:#f0f3f6;display:flex;align-items:center;justify-content:center}
.ipd-doc-thumb img{width:100%;height:100%;object-fit:cover;display:block}

/* Profile print sheet: hide chrome, keep the dossier */
@media print {
  .ipd-action-ribbon,.ipd-split-right,.ipd-docs-filter-bar,.ipd-doc-actions,.ipd-top-banner-right,.ipd-nav-bar{display:none!important}
  .ipd-page-wrapper,.ipd-container{background:#fff;max-width:100%;margin:0;padding:0}
  .ipd-split-layout{display:block}
  .ipd-doc-card,.ipd-side-card,.ipd-header-card,.ipd-tab-card,.ipd-docs-section{break-inside:avoid;box-shadow:none}
  .ipd-tab-card{min-height:0;border:none;padding:0}
  .preview-modal-overlay{display:none!important}
}

/* ==================== INSTITUTIONS WORKSPACE ==================== */
.inst-shell{gap:8px!important;width:100%;max-width:100%;min-width:0}
.inst-page-header{padding:2px 2px 6px!important;margin-bottom:0!important}
.inst-page-header>div{width:100%;max-width:100%;min-width:0}
.inst-shell .view-header h2{font-size:1.08rem;line-height:1.22;letter-spacing:-.01em}
.inst-shell .view-header p{font-size:.74rem;margin:2px 0 0;color:#646970;white-space:normal;overflow-wrap:anywhere}
.inst-tabs{display:flex;align-items:stretch;gap:2px;min-width:0;overflow-x:auto;border-bottom:1px solid #e2e4e7;background:#f6f7f7;scrollbar-width:thin}
.inst-tab{display:inline-flex;align-items:center;justify-content:center;gap:6px;flex:0 0 auto;min-height:34px;padding:6px 11px;border:1px solid transparent;border-bottom:0;border-radius:4px 4px 0 0;background:transparent;color:#50575e;font:inherit;font-size:.72rem;font-weight:600;cursor:pointer;white-space:nowrap}
.inst-tab svg{width:14px;height:14px;flex:0 0 auto}
.inst-tab:hover{color:#2271b1;background:#fff}
.inst-tab.is-active{background:#fff;border-color:#e2e4e7;color:#2271b1}
.inst-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.inst-stat{display:flex;flex-direction:column;gap:2px;min-width:0;padding:8px 11px;background:#fff;border:1px solid #e2e4e7;border-radius:5px}
.inst-stat small{color:#646970;font-size:.65rem}
.inst-stat strong{color:#1d2327;font-size:1.08rem;line-height:1.2}
.inst-columns{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(270px,.85fr);align-items:start;gap:8px;min-width:0}
.inst-panel{min-width:0;overflow:hidden;background:#fff;border:1px solid #e2e4e7;border-radius:5px}
.inst-panel-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 11px;border-bottom:1px solid #f0f0f1}
.inst-panel-head h3,.inst-detail-heading h3{font-size:.83rem;font-weight:650;line-height:1.3;color:#1d2327}
.inst-panel-head p,.inst-detail-heading p{margin-top:2px;color:#646970;font-size:.65rem}
.inst-panel-body{padding:10px 11px}
.inst-toolbar{display:flex;align-items:center;gap:6px;padding:8px 9px;border-bottom:1px solid #f0f0f1}
.inst-toolbar input,.inst-toolbar select{height:30px;min-width:0;padding:4px 8px;border:1px solid #c3c4c7;border-radius:3px;background:#fff;color:#1d2327;font:inherit;font-size:.7rem;font-weight:400}
.inst-toolbar input{flex:1}
.inst-toolbar select{max-width:180px}
.inst-primary-button,.inst-secondary-button,.inst-row-action,.inst-text-button{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:29px;padding:5px 10px;border:1px solid #c3c9cf;border-radius:3px;background:#fff;color:#1d2327;font:inherit;font-size:.69rem;font-weight:600;cursor:pointer;white-space:nowrap}
.inst-primary-button{border-color:#2271b1;background:#2271b1;color:#fff}
.inst-primary-button:hover{border-color:#135e96;background:#135e96;color:#fff}
.inst-secondary-button:hover,.inst-row-action:hover,.inst-text-button:hover{border-color:#2271b1;color:#2271b1;background:#f6faff}
.inst-text-button{min-height:25px;padding:3px 7px;border-color:transparent;color:#2271b1}
.inst-row-action{min-height:25px;padding:3px 8px;color:#2271b1}
.inst-table-wrap{width:100%;overflow-x:auto}
.inst-table{width:100%;min-width:450px;border-collapse:collapse;text-align:left}
.inst-table th{padding:7px 9px;background:#f8f9fa;color:#646970;font-size:.59rem;font-weight:650;letter-spacing:.035em;text-transform:uppercase;white-space:nowrap}
.inst-table td{padding:8px 9px;border-top:1px solid #f0f0f1;color:#3c434a;font-size:.69rem;vertical-align:middle}
.inst-table td:first-child strong,.inst-table td:first-child small{display:block;min-width:0}
.inst-table td:first-child strong{color:#1d2327;font-weight:600}
.inst-table td:first-child small{margin-top:2px;color:#8c8f94;font-size:.61rem}
.inst-table tbody tr:hover td,.inst-table tbody tr.is-selected td{background:#f6faff}
.inst-pill{display:inline-flex;padding:2px 7px;border:1px solid #dcdcde;border-radius:999px;background:#f6f7f7;color:#50575e;font-size:.6rem;white-space:nowrap}
.inst-empty{padding:14px 10px;color:#646970;font-size:.68rem;line-height:1.5}
.inst-pagination{display:flex;align-items:center;justify-content:center;gap:4px;padding:9px 8px;border-top:1px solid #f0f0f1}
.inst-page-button{display:inline-flex;align-items:center;justify-content:center;min-width:26px;height:26px;padding:0 6px;border:1px solid #dcdcde;border-radius:3px;background:#fff;color:#3c434a;font:inherit;font-size:.67rem;font-weight:600;cursor:pointer}
.inst-page-button:hover:not(:disabled){border-color:#2271b1;color:#2271b1;background:#f6faff}
.inst-page-button.is-active{border-color:#2271b1;background:#2271b1;color:#fff}
.inst-page-button:disabled{opacity:.45;cursor:default}
.inst-page-ellipsis{min-width:18px;text-align:center;color:#8c8f94;font-size:.67rem}
.inst-detail-heading,.inst-list-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}
.inst-detail-heading{padding-bottom:9px;border-bottom:1px solid #f0f0f1}
.inst-list-heading{padding:9px 0 5px;color:#3c434a;font-size:.68rem}
.inst-school-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:9px 0}
.inst-school-facts div{display:flex;flex-direction:column;gap:2px;min-width:0}
.inst-school-facts small,.inst-doc-copy small,.inst-correspondence small{color:#646970;font-size:.61rem}
.inst-school-facts strong{overflow-wrap:anywhere;color:#1d2327;font-size:.7rem;font-weight:600}
.inst-doc-row{display:flex;align-items:center;gap:8px;min-width:0;padding:7px 0;border-top:1px solid #f0f0f1}
.inst-doc-icon{display:inline-flex;align-items:center;justify-content:center;width:25px;height:25px;flex:0 0 auto;border-radius:3px;background:#fce8e8;color:#b32d2e;font-size:.5rem;font-weight:700}
.inst-doc-copy{display:flex;flex:1;flex-direction:column;gap:2px;min-width:0}
.inst-doc-copy strong{overflow-wrap:anywhere;color:#3c434a;font-size:.66rem;font-weight:600}
.inst-doc-copy small{overflow-wrap:anywhere}
.inst-doc-status{color:#b32d2e;font-size:.59rem;font-weight:600;white-space:nowrap}
.inst-doc-status.is-ready{color:#008a20}
.inst-correspondence{display:flex;flex-direction:column;gap:2px;padding:8px 0;border-top:1px solid #f0f0f1}
.inst-correspondence strong{color:#3c434a;font-size:.68rem}
.inst-modal-backdrop{position:fixed;inset:0;z-index:10000;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(29,35,39,.45)}
.inst-modal{width:min(100%,440px);max-height:min(90vh,700px);overflow-y:auto;border:1px solid #dcdcde;border-radius:5px;background:#fff;box-shadow:0 8px 28px rgba(0,0,0,.2)}
.inst-modal-head,.inst-modal-actions{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 12px;border-bottom:1px solid #e2e4e7}
.inst-modal-head h3{color:#1d2327;font-size:.85rem}
.inst-modal-head button{width:28px;height:28px;border:0;border-radius:3px;background:transparent;color:#646970;font-size:1.2rem;cursor:pointer}
.inst-modal-fields{display:grid;gap:10px;padding:12px}
.inst-modal-fields label{display:grid;gap:4px;color:#3c434a;font-size:.68rem;font-weight:600}
.inst-modal-fields input,.inst-modal-fields select{width:100%;min-height:32px;padding:5px 8px;border:1px solid #c3c4c7;border-radius:3px;background:#fff;color:#1d2327;font:inherit;font-size:.72rem;font-weight:400}
.inst-modal-fields input[type="file"]{height:auto}
.inst-form-error{color:#b32d2e;font-size:.68rem}
.inst-modal-actions{justify-content:flex-end;border-top:1px solid #e2e4e7;border-bottom:0}
.inst-shell [hidden]{display:none!important}
@media (max-width: 980px){
  .inst-columns{grid-template-columns:minmax(0,1fr)}
}
@media (max-width: 760px){
  .inst-tabs{margin-right:-2px}
  .inst-tab{padding-right:9px;padding-left:9px}
}
@media (max-width: 520px){
  .inst-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
  .inst-stat:last-child{grid-column:1/-1}
  .inst-stat{padding:7px}
  .inst-stat small{font-size:.58rem}
  .inst-stat strong{font-size:.95rem}
  .inst-panel-head{align-items:flex-start;padding:8px}
  .inst-panel-head .inst-primary-button{padding:5px 7px;font-size:.63rem}
  .inst-toolbar{align-items:stretch;flex-direction:column}
  .inst-toolbar select{max-width:none}
  .inst-table{min-width:420px}
  .inst-modal-backdrop{align-items:flex-end;padding:8px}
  .inst-modal{max-height:88vh}
}

/* Institutions: overview, analytics, documents, and correspondence */
.inst-header-actions,.inst-head-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.inst-overview{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start;gap:8px;min-width:0}
.inst-overview-col{display:flex;flex-direction:column;gap:8px;min-width:0}
.inst-kpi-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.inst-kpi{display:flex;align-items:flex-start;gap:8px;min-width:0;padding:9px 10px;border:1px solid #e2e4e7;border-radius:5px;background:#fff;font:inherit;text-align:left;cursor:pointer}
.inst-kpi:hover{border-color:#2271b1;background:#f6faff}
.inst-kpi.is-active{border-color:#2271b1;box-shadow:inset 0 0 0 1px #2271b1}
.inst-kpi-icon{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;flex:0 0 auto;border-radius:4px;background:#f0f6fc;color:#2271b1}
.inst-kpi-icon svg{width:16px;height:16px}
.inst-kpi-copy{display:flex;flex-direction:column;gap:1px;min-width:0}
.inst-kpi-copy small{color:#646970;font-size:.61rem;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.inst-kpi-copy strong{color:#1d2327;font-size:1.05rem;line-height:1.15}
.inst-kpi-copy span{color:#646970;font-size:.6rem;line-height:1.3}
.inst-tab-count{display:inline-flex;align-items:center;justify-content:center;min-width:16px;height:16px;padding:0 4px;border-radius:999px;background:#f0f0f1;color:#50575e;font-size:.57rem;font-weight:700}
.inst-tab.is-active .inst-tab-count{background:#f0f6fc;color:#2271b1}
.inst-activity{display:flex;flex-direction:column;gap:2px;padding:4px 6px}
.inst-activity-item{display:flex;align-items:center;gap:8px;width:100%;padding:6px;border:0;border-radius:4px;background:transparent;font:inherit;text-align:left;cursor:pointer}
.inst-activity-item:hover{background:#f6faff}
.inst-activity-icon{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;flex:0 0 auto;border-radius:50%;background:#f6f7f7;color:#50575e}
.inst-activity-icon svg{width:12px;height:12px}
.inst-activity-copy{display:flex;flex:1;flex-direction:column;gap:1px;min-width:0}
.inst-activity-copy strong{overflow:hidden;color:#1d2327;font-size:.66rem;font-weight:600;text-overflow:ellipsis;white-space:nowrap}
.inst-activity-copy small{overflow:hidden;color:#646970;font-size:.6rem;text-overflow:ellipsis;white-space:nowrap}
.inst-activity-time{flex:0 0 auto;color:#8c8f94;font-size:.57rem;white-space:nowrap}
.inst-metric-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.inst-metric{display:flex;flex-direction:column;gap:1px;min-width:0;padding:8px 9px;border:1px solid #f0f0f1;border-radius:4px;background:#fafbfc}
.inst-metric small{color:#646970;font-size:.6rem}
.inst-metric strong{color:#1d2327;font-size:1rem;line-height:1.15}
.inst-metric span{color:#8c8f94;font-size:.57rem}
.inst-chart{padding:9px 0 2px}
.inst-chart-title{display:flex;align-items:baseline;justify-content:space-between;gap:8px;padding-bottom:6px}
.inst-chart-title strong{color:#3c434a;font-size:.66rem;font-weight:650}
.inst-chart-title span{color:#8c8f94;font-size:.58rem}
.inst-bar-row{display:grid;grid-template-columns:minmax(52px,auto) minmax(0,1fr) auto;align-items:center;gap:7px;padding:2px 0}
.inst-bar-label{color:#50575e;font-size:.6rem;white-space:nowrap}
.inst-bar-track{display:block;height:7px;overflow:hidden;border-radius:999px;background:#f0f0f1}
.inst-bar-fill{display:block;height:100%;border-radius:999px;background:#2271b1}
.inst-bar-value{color:#646970;font-size:.57rem;white-space:nowrap}
.inst-attention{margin-top:9px;border:1px solid #f0f0f1;border-radius:4px}
.inst-attention.is-clear{border-color:#d7e8d9;background:#f6fbf6}
.inst-attention.is-clear p{padding:0 9px 8px;color:#646970;font-size:.62rem}
.inst-attention-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 9px;border-bottom:1px solid #f0f0f1}
.inst-attention.is-clear .inst-attention-head{border-bottom:0}
.inst-attention-head strong{color:#3c434a;font-size:.64rem;font-weight:650}
.inst-attention-list{display:flex;flex-direction:column}
.inst-attention-item{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 9px;border-top:1px solid #f6f7f7}
.inst-attention-item:first-child{border-top:0}
.inst-attention-item span{display:flex;flex-direction:column;gap:1px;min-width:0}
.inst-attention-item strong{overflow:hidden;color:#1d2327;font-size:.64rem;font-weight:600;text-overflow:ellipsis;white-space:nowrap}
.inst-attention-item small{color:#8c8f94;font-size:.58rem}
.inst-pill.is-good{border-color:#c6e1c9;background:#f0f8f1;color:#008a20}
.inst-pill.is-bad{border-color:#f0c8c8;background:#fdf0f0;color:#b32d2e}
.inst-status{font-size:.61rem;font-weight:600;color:#b26b00}
.inst-status.is-good{color:#008a20}
.inst-status.is-bad{color:#b32d2e}
.inst-note{margin-top:9px;padding:8px 9px;border-left:3px solid #dcdcde;background:#fafbfc}
.inst-note strong{display:block;color:#3c434a;font-size:.62rem}
.inst-note p{margin-top:2px;color:#646970;font-size:.63rem;line-height:1.45;overflow-wrap:anywhere}
.inst-doc-group{padding-top:6px}
.inst-doc-group-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:5px 0 3px}
.inst-doc-group-head strong{color:#3c434a;font-size:.64rem;font-weight:650}
.inst-doc-slot{display:flex;align-items:center;gap:8px;min-width:0;padding:6px 0;border-top:1px solid #f0f0f1}
.inst-doc-slot.is-empty{opacity:.85}
.inst-doc-icon.is-empty{border:1px dashed #c3c4c7;background:#fff;color:#8c8f94;font-size:.8rem}
.inst-doc-actions{display:inline-flex;align-items:center;gap:4px;flex:0 0 auto}
.inst-doc-empty{padding:8px 9px;border:1px dashed #dcdcde;border-radius:4px;color:#8c8f94;font-size:.62rem}
.inst-progress{padding:2px 0 8px}
.inst-progress-head{display:flex;align-items:center;justify-content:space-between;gap:8px;color:#3c434a;font-size:.63rem}
.inst-progress-track{display:block;height:7px;margin-top:5px;overflow:hidden;border-radius:999px;background:#f0f0f1}
.inst-progress-track span{display:block;height:100%;border-radius:999px;background:#008a20;transition:width .25s ease}
.inst-progress p{margin-top:5px;color:#646970;font-size:.6rem;overflow-wrap:anywhere}
.inst-timeline{position:relative;display:flex;flex-direction:column;padding-left:12px}
.inst-timeline:before{position:absolute;top:4px;bottom:4px;left:3px;width:1px;background:#e2e4e7;content:""}
.inst-timeline-item{position:relative;padding:0 0 9px 4px}
.inst-timeline-dot{position:absolute;top:5px;left:-12px;width:7px;height:7px;border:2px solid #2271b1;border-radius:50%;background:#fff}
.inst-timeline-body{min-width:0;padding:6px 8px;border:1px solid #f0f0f1;border-radius:4px;background:#fafbfc}
.inst-timeline-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.inst-timeline-top strong{overflow-wrap:anywhere;color:#1d2327;font-size:.66rem;font-weight:600}
.inst-timeline-body small{display:block;margin-top:2px;color:#646970;font-size:.6rem}
.inst-timeline-body p{margin-top:4px;color:#50575e;font-size:.62rem;line-height:1.45;overflow-wrap:anywhere}
.inst-timeline-actions{display:flex;align-items:center;gap:4px;margin-top:5px}
.inst-text-button.is-danger{color:#b32d2e}
.inst-text-button.is-danger:hover{border-color:#b32d2e;background:#fdf0f0;color:#b32d2e}
.inst-danger-button{display:inline-flex;align-items:center;justify-content:center;min-height:29px;padding:5px 10px;border:1px solid #d63638;border-radius:3px;background:#fff;color:#b32d2e;font:inherit;font-size:.69rem;font-weight:600;cursor:pointer;white-space:nowrap}
.inst-danger-button:hover{background:#fdf0f0}
.inst-primary-button.is-danger{border-color:#d63638;background:#d63638;color:#fff}
.inst-primary-button.is-danger:hover{border-color:#b32d2e;background:#b32d2e}
.inst-icon-button{display:inline-flex;align-items:center;justify-content:center;width:25px;height:25px;padding:0;border:1px solid transparent;border-radius:3px;background:transparent;color:#8c8f94;font:inherit;font-size:.9rem;line-height:1;cursor:pointer};font
.inst-icon-button:hover{border-color:#f0c8c8;background:#fdf0f0;color:#b32d2e}
.inst-notice{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 10px;border:1px solid #c6e1c9;border-radius:4px;background:#f0f8f1;color:#008a20;font-size:.68rem}
.inst-notice.is-error{border-color:#f0c8c8;background:#fdf0f0;color:#b32d2e}
.inst-notice button{width:20px;height:20px;border:0;border-radius:3px;background:transparent;color:inherit;font-size:1rem;line-height:1;cursor:pointer}
.inst-toast{position:fixed;right:16px;bottom:16px;z-index:10001;max-width:320px;padding:9px 13px;border:1px solid #c6e1c9;border-radius:4px;background:#f0f8f1;color:#008a20;box-shadow:0 4px 14px rgba(0,0,0,.12);font-size:.7rem}
.inst-toast.is-error{border-color:#f0c8c8;background:#fdf0f0;color:#b32d2e}
.inst-modal.is-preview{width:min(100%,760px)}
.inst-preview-body{display:flex;align-items:center;justify-content:center;min-height:280px;max-height:65vh;overflow:auto;background:#f6f7f7}
.inst-preview-frame{width:100%;height:60vh;border:0;background:#fff}
.inst-preview-image{max-width:100%;max-height:62vh;display:block}
.inst-preview-empty{padding:28px 16px;text-align:center;color:#646970}
.inst-preview-empty strong{display:block;color:#1d2327;font-size:.85rem}
.inst-preview-empty p{margin-top:4px;font-size:.68rem;line-height:1.5}
.inst-confirm-copy{color:#3c434a;font-size:.7rem;line-height:1.55}
@media (max-width: 980px){
  .inst-overview{grid-template-columns:minmax(0,1fr)}
}
@media (max-width: 520px){
  .inst-kpi-grid,.inst-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .inst-header-actions,.inst-head-actions{width:100%;justify-content:flex-start}
  .inst-doc-slot{align-items:flex-start;flex-wrap:wrap}
  .inst-doc-actions{margin-left:33px}
  .inst-activity-time{display:none}
}
/* Institutions: list preview and full profile views */
.inst-back-button{display:inline-flex;align-items:center;gap:4px;margin:0 0 3px;padding:0;border:0;background:transparent;color:#2271b1;font:inherit;font-size:.66rem;font-weight:600;cursor:pointer}
.inst-back-button:hover{text-decoration:underline}
.inst-subpage-header h2{font-size:1rem}
.inst-see-all{flex:0 0 auto;font-size:.63rem}
.inst-preview-card{display:flex;flex-direction:column;gap:8px}
.inst-preview-card .inst-detail-heading{padding-bottom:8px}
.inst-preview-open{width:100%;margin-top:2px}
.inst-table tr.is-clickable{cursor:pointer}
.inst-profile-grid{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);align-items:start;gap:8px;min-width:0}
@media (max-width: 980px){
  .inst-profile-grid{grid-template-columns:minmax(0,1fr)}
}
.inst-preview-note{margin:0;color:#646970;font-size:.61rem;line-height:1.5}
/* Institutions: polished profile, preview, and analytics cards */
.inst-avatar{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;flex:0 0 auto;border-radius:12px;background:#f0f6fc;color:#2271b1;font-size:.82rem;font-weight:700;letter-spacing:.02em}
.inst-avatar.is-schools{background:#eaf3fb;color:#1d6fa5}
.inst-avatar.is-dioceses{background:#f3eefc;color:#6b4ea8}
.inst-avatar.is-collaborators{background:#eaf7f0;color:#1c7c4a}
.inst-avatar.is-foundingAgencies{background:#fdf3e3;color:#9a6412}
.inst-profile-hero{display:flex;align-items:center;gap:10px;margin-bottom:10px;padding:2px 0 12px;border-bottom:1px solid #f0f0f1}
.inst-profile-id{flex:1;min-width:0}
.inst-profile-id h3{color:#1d2327;font-size:.9rem;line-height:1.25}
.inst-profile-id p{margin-top:1px;color:#646970;font-size:.65rem}
.inst-info-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.inst-info-row{display:flex;align-items:flex-start;gap:7px;min-width:0;padding:7px 8px;border:1px solid #f0f0f1;border-radius:6px;background:#fafbfc}
.inst-info-icon{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;flex:0 0 auto;border:1px solid #f0f0f1;border-radius:6px;background:#fff;color:#646970}
.inst-info-icon svg{width:12px;height:12px}
.inst-info-copy{display:flex;flex-direction:column;gap:1px;min-width:0}
.inst-info-copy small{color:#8c8f94;font-size:.55rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase}
.inst-info-copy strong{overflow-wrap:anywhere;color:#1d2327;font-size:.67rem;font-weight:600}
.inst-metric{padding:10px;border-color:#e6e8eb;border-radius:7px;background:#fff;box-shadow:0 1px 2px rgba(16,24,40,.04)}
.inst-metric-top{display:flex;align-items:flex-start;justify-content:space-between;gap:6px}
.inst-metric-top small{color:#8c8f94;font-size:.55rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase}
.inst-metric-icon{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;flex:0 0 auto;border-radius:7px;background:#f0f6fc;color:#2271b1}
.inst-metric-icon svg{width:13px;height:13px}
.inst-metric strong{margin-top:2px;font-size:1.18rem;letter-spacing:-.02em}
.inst-metric-note{color:#8c8f94;font-size:.57rem}
.inst-metric.is-good .inst-metric-icon{background:#eaf7f0;color:#1c7c4a}
.inst-metric.is-warn .inst-metric-icon{background:#fdf3e3;color:#9a6412}
.inst-metric.is-bad .inst-metric-icon{background:#fdf0f0;color:#b32d2e}
.inst-chart-card{margin-top:10px;overflow:hidden;border:1px solid #f0f0f1;border-radius:7px;background:#fff}
.inst-chart-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;padding:8px 10px;border-bottom:1px solid #f6f7f7}
.inst-chart-head strong{display:block;color:#1d2327;font-size:.66rem;font-weight:650}
.inst-chart-head span{display:block;margin-top:1px;color:#8c8f94;font-size:.56rem}
.inst-chart-meta{padding:2px 7px;border:1px solid #f0f0f1;border-radius:999px;background:#f6f7f7;color:#646970;font-size:.56rem;white-space:nowrap}
.inst-bar-list{display:flex;flex-direction:column;gap:7px;padding:9px 10px}
.inst-bar-item{display:flex;flex-direction:column;gap:3px}
.inst-bar-top{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.inst-bar-label{color:#50575e;font-size:.6rem}
.inst-bar-value{color:#1d2327;font-size:.6rem;font-weight:650}
.inst-bar-track{display:block;height:6px;overflow:hidden;border-radius:999px;background:#f0f0f1}
.inst-bar-fill{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#2271b1,#4f9bd6)}
.inst-col-chart{display:flex;align-items:flex-end;justify-content:space-between;gap:8px;height:124px;padding:10px 12px 8px;background:repeating-linear-gradient(to top,#f6f7f7 0 1px,transparent 1px 25%)}
.inst-col{display:flex;flex:1;flex-direction:column;align-items:center;justify-content:flex-end;gap:3px;height:100%;min-width:0}
.inst-col-value{color:#646970;font-size:.55rem;font-weight:650}
.inst-col-track{display:flex;align-items:flex-end;justify-content:center;width:100%;max-width:34px;flex:1;min-height:0}
.inst-col-fill{display:block;width:100%;border-radius:4px 4px 2px 2px;background:linear-gradient(180deg,#4f9bd6,#2271b1)}
.inst-col-label{color:#8c8f94;font-size:.55rem}
.inst-attention{margin-top:10px;overflow:hidden;border-color:#f0f0f1;border-radius:7px}
.inst-attention-head{padding:8px 10px;border-bottom:1px solid #f6f7f7}
.inst-attention-head strong{display:block;color:#1d2327;font-size:.64rem}
.inst-attention-head small{display:block;margin-top:1px;color:#8c8f94;font-size:.56rem}
.inst-attention-item{gap:7px;padding:7px 10px;border-top:1px solid #f6f7f7}
.inst-attention-dot{width:7px;height:7px;flex:0 0 auto;border-radius:50%;background:#dba617;box-shadow:0 0 0 3px #fdf3e3}
.inst-attention-copy{display:flex;flex:1;flex-direction:column;gap:1px;min-width:0}
.inst-attention-copy strong{font-size:.63rem}
.inst-attention-copy small{font-size:.56rem}
.inst-pill.is-warn{border-color:#f0d9a8;background:#fdf3e3;color:#8a6116}
.inst-preview-card{gap:10px}
.inst-preview-hero{display:flex;align-items:center;gap:10px}
.inst-preview-id{min-width:0}
.inst-preview-id h3{color:#1d2327;font-size:.82rem;line-height:1.25}
.inst-preview-id p{margin-top:1px;color:#646970;font-size:.62rem}
.inst-preview-list{display:flex;flex-direction:column;gap:0;margin:0;overflow:hidden;border:1px solid #f0f0f1;border-radius:7px}
.inst-preview-row{display:flex;align-items:baseline;justify-content:space-between;gap:10px;padding:7px 9px;border-top:1px solid #f6f7f7}
.inst-preview-row:first-child{border-top:0}
.inst-preview-row dt{color:#8c8f94;font-size:.55rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;white-space:nowrap}
.inst-preview-row dd{min-width:0;margin:0;overflow-wrap:anywhere;color:#1d2327;font-size:.63rem;font-weight:600;text-align:right}
.inst-preview-note{margin:0;color:#646970;font-size:.6rem;line-height:1.5}
.inst-doc-slot{margin-bottom:6px;padding:8px 9px;border:1px solid #e6e8eb;border-radius:7px;background:#fff}
.inst-doc-slot:last-child{margin-bottom:0}
.inst-doc-slot.is-empty{border-style:dashed;background:#fafbfc}
.inst-doc-icon{width:32px;height:32px;border-radius:8px;font-size:.5rem}
.inst-doc-copy strong{font-size:.68rem}
.inst-doc-copy small{color:#8c8f94;font-size:.57rem}
.inst-doc-actions{gap:3px}
.inst-doc-group-head{padding:7px 0 5px}
.inst-doc-empty{border-radius:7px;background:#fafbfc}
.inst-profile-grid{gap:10px}
@media (max-width: 980px){
  .inst-info-list{grid-template-columns:minmax(0,1fr)}
}
@media (max-width: 520px){
  .inst-profile-hero{align-items:flex-start;flex-wrap:wrap}
  .inst-metric{padding:8px}
  .inst-doc-actions{margin-left:40px}
}
.inst-analytics-page .inst-metric-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.inst-analytics-page .inst-chart-card{margin-top:10px}
.inst-analytics-page .inst-col-track{max-width:44px}
@media (max-width: 1100px){
  .inst-analytics-page .inst-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width: 520px){
  .inst-analytics-page .inst-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .inst-col-chart{height:104px;gap:4px}
}

/* Institutions: live analytics report page */
.inst-analytics-page{max-width:100%;display:flex;flex-direction:column;gap:12px}
.inst-analytics-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.inst-analytics-live{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border:1px solid #c6e1c9;border-radius:999px;background:#f0f8f1;color:#008a2e;font-size:.62rem;font-weight:700}
.inst-live-dot{width:7px;height:7px;border-radius:50%;background:#00a32a;box-shadow:0 0 0 0 rgba(0,163,42,.5);animation:inst-live-pulse 1.8s infinite}
@keyframes inst-live-pulse{0%{box-shadow:0 0 0 0 rgba(0,163,42,.45)}70%{box-shadow:0 0 0 6px rgba(0,163,42,0)}100%{box-shadow:0 0 0 0 rgba(0,163,42,0)}}
.inst-analytics-clock{font-variant-numeric:tabular-nums;color:#2271b1;font-weight:600}
.inst-analytics-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:14px 16px;border:1px solid #e6e9ec;border-radius:10px;background:linear-gradient(135deg,#fff 0%,#f7fbff 100%);box-shadow:0 1px 2px rgba(16,24,40,.04)}
.inst-analytics-eyebrow{margin:0 0 3px;color:#2271b1;font-size:.58rem;font-weight:800;letter-spacing:.09em;text-transform:uppercase}
.inst-analytics-head h2{margin:0;color:#1d2327;font-size:1.35rem;font-weight:750;letter-spacing:-.01em}
.inst-analytics-sub{margin:5px 0 0;color:#646970;font-size:.66rem}
.inst-analytics-sub strong{color:#1d2327;font-weight:650}
.inst-analytics-sub .is-warn{color:#b26200}
.inst-analytics-sub .is-good{color:#008a20}
.inst-analytics-head-actions{display:flex;align-items:center;gap:8px}
.inst-analytics-refresh{display:inline-flex;align-items:center;gap:6px;padding:6px 11px;font-size:.66rem}
.inst-analytics-refresh svg{width:13px;height:13px}
.inst-analytics-kpi{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.inst-analytics-kpi-card{position:relative;overflow:hidden;border:1px solid #e9ecef;border-radius:10px;background:#fff;display:flex;flex-direction:column;padding:11px 12px 12px;box-shadow:0 1px 2px rgba(16,24,40,.04)}
.inst-analytics-kpi-card.is-good{border-color:#bfe0c4;background:linear-gradient(180deg,#fff,#f7fcf8)}
.inst-analytics-kpi-card.is-warn{border-color:#efd7a6;background:linear-gradient(180deg,#fff,#fffdf6)}
.inst-analytics-kpi-top{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px}
.inst-analytics-kpi-label{color:#646970;font-size:.58rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase}
.inst-analytics-kpi-icon{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;flex:0 0 auto;border-radius:7px;background:#eef5fd;color:#2271b1}
.inst-analytics-kpi-icon svg{width:13px;height:13px}
.inst-analytics-kpi-value{font-size:1.5rem;color:#1d2327;font-weight:750;line-height:1.05;letter-spacing:-.02em}
.inst-analytics-kpi-note{color:#8c8f94;font-size:.57rem;margin-top:3px}
.inst-analytics-kpi-meter{display:block;height:4px;margin-top:9px;border-radius:999px;background:#eef1f4;overflow:hidden}
.inst-analytics-kpi-meter span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#2271b1,#4f9be0)}
.inst-analytics-kpi-card.is-good .inst-analytics-kpi-meter span{background:linear-gradient(90deg,#008a20,#4caf50)}
.inst-analytics-kpi-card.is-warn .inst-analytics-kpi-meter span{background:linear-gradient(90deg,#b26200,#dba617)}
.inst-analytics-grid{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(250px,.75fr);gap:10px;align-items:stretch}
.inst-analytics-grid .inst-chart-card{margin-top:0}
.inst-analytics-card{overflow:hidden;border:1px solid #e9ecef;border-radius:10px;background:#fff;box-shadow:0 1px 2px rgba(16,24,40,.04)}
.inst-analytics-card-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:11px 13px;border-bottom:1px solid #f0f2f4}
.inst-analytics-card-head div{display:flex;flex-direction:column;gap:2px;min-width:0}
.inst-analytics-card-head strong{color:#1d2327;font-size:.7rem;font-weight:700}
.inst-analytics-card-head span{color:#8c8f94;font-size:.57rem}
.inst-analytics-donut-card{display:flex;flex-direction:column}
.inst-analytics-donut-wrap{display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:14px}
.inst-analytics-donut{display:flex;align-items:center;justify-content:center;width:132px;height:132px;border-radius:50%}
.inst-analytics-donut > span{display:flex;flex-direction:column;align-items:center;justify-content:center;width:96px;height:96px;border-radius:50%;background:#fff;box-shadow:inset 0 0 0 1px #f0f2f4}
.inst-analytics-donut strong{color:#1d2327;font-size:1.2rem;font-weight:750;line-height:1}
.inst-analytics-donut small{margin-top:3px;color:#8c8f94;font-size:.55rem}
.inst-analytics-donut-legend{display:grid;grid-template-columns:auto 1fr;gap:4px 7px;align-items:center;font-size:.58rem;color:#646970}
.inst-analytics-legend-dot{width:8px;height:8px;border-radius:2px;background:#2271b1}
.inst-analytics-legend-dot.is-empty{background:#eef1f4;box-shadow:inset 0 0 0 1px #dfe3e8}
.inst-analytics-attention{display:flex;flex-direction:column}
.inst-analytics-rows{display:flex;flex-direction:column}
.inst-analytics-row{display:flex;align-items:center;gap:10px;padding:10px 13px;border-top:1px solid #f3f5f7}
.inst-analytics-row:first-child{border-top:0}
.inst-analytics-row:hover{background:#fafbfc}
.inst-analytics-row-dot{width:8px;height:8px;flex:0 0 auto;border-radius:50%;background:#dba617;box-shadow:0 0 0 3px #fdf3e3}
.inst-analytics-row-copy{display:flex;flex:1;flex-direction:column;gap:1px;min-width:0}
.inst-analytics-row-copy strong{overflow:hidden;color:#1d2327;font-size:.66rem;font-weight:650;text-overflow:ellipsis;white-space:nowrap}
.inst-analytics-row-copy small{overflow:hidden;color:#8c8f94;font-size:.57rem;text-overflow:ellipsis;white-space:nowrap}
.inst-analytics-row-count{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:#fdf3e3;color:#b26200;font-size:.56rem;font-weight:700}
.inst-analytics-clear{border-color:#d7e8d9;background:linear-gradient(180deg,#fff,#f7fcf8)}
.inst-analytics-clear-body{display:flex;align-items:center;gap:10px;padding:16px 13px}
.inst-analytics-clear-body > svg{width:26px;height:26px;flex:0 0 auto;color:#008a20}
.inst-analytics-clear-body strong{display:block;color:#1d2327;font-size:.7rem}
.inst-analytics-clear-body p{margin:2px 0 0;color:#8c8f94;font-size:.6rem}
.inst-analytics-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:48px 20px;color:#8c8f94;text-align:center;border:1px dashed #dcdcde;border-radius:10px;background:#fff}
.inst-analytics-empty-icon{display:inline-flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:12px;background:#f0f6fc;color:#2271b1}
.inst-analytics-empty-icon svg{width:24px;height:24px}
.inst-analytics-empty-copy strong{display:block;margin-top:6px;color:#1d2327;font-size:.78rem;font-weight:700}
.inst-analytics-empty-copy p{margin:2px 0 0;color:#8c8f94;font-size:.62rem}
@media (max-width:1100px){.inst-analytics-kpi{grid-template-columns:repeat(2,minmax(0,1fr))}.inst-analytics-grid{grid-template-columns:minmax(0,1fr)}}
@media (max-width:620px){.inst-analytics-kpi{grid-template-columns:minmax(0,1fr)}.inst-analytics-head{padding:12px}.inst-analytics-row-count{display:none}}
.inst-info-row.is-wide{grid-column:1/-1}
@media (max-width: 520px){
  .inst-table{min-width:0}
  .inst-table.is-schools th:nth-child(2),.inst-table.is-schools td:nth-child(2),
  .inst-table.is-schools th:nth-child(4),.inst-table.is-schools td:nth-child(4){display:none}
  .inst-table.is-directory th:nth-child(3),.inst-table.is-directory td:nth-child(3){display:none}
  .inst-table th,.inst-table td{padding-right:6px;padding-left:6px}
  .inst-toolbar .inst-text-button{align-self:flex-start}
}
@media (max-width: 520px){
  .inst-head-actions{width:auto}
  .inst-panel-head{flex-wrap:wrap}
  .inst-doc-copy{flex:1 1 150px}
  .inst-doc-actions{flex:1 1 100%;justify-content:flex-end;margin-left:0}
}
/* Institutions: align overview columns and shorten preview action */
.inst-overview{align-items:stretch}
.inst-overview-col{align-items:stretch}
.inst-recent{display:flex;flex:1;flex-direction:column}
.inst-recent>.inst-panel-body{flex:1}
.inst-preview-open{width:auto;align-self:flex-start}
.inst-confirm-record{display:flex;align-items:center;gap:9px;margin-bottom:9px;padding:8px 10px;border:1px solid #f0f0f1;border-radius:7px;background:#fafbfc}
.inst-confirm-icon{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;flex:0 0 auto;border-radius:8px;background:#fdf0f0;color:#b32d2e}
.inst-confirm-icon svg{width:15px;height:15px}
.inst-confirm-record strong{display:block;color:#1d2327;font-size:.7rem;line-height:1.3}
.inst-confirm-record small{display:block;margin-top:1px;color:#8c8f94;font-size:.58rem}
@media (max-width: 980px){
  .inst-overview-col{align-items:stretch}
  .inst-recent{flex:0 0 auto}
}
/* Institutions: dossier profile matching the sisters-profile sheet, compact scale */
.inst-profile-page{--inst-accent:#2271b1;--inst-tint:#eef4fb;--inst-soft:#f6f9fd;--inst-line:#cfe0f2;width:100%;max-width:980px;margin:0 auto;padding-bottom:24px}
.inst-profile-page.is-dioceses{--inst-accent:#6b4ea8;--inst-tint:#f2eefb;--inst-soft:#faf8fe;--inst-line:#ddd2f0}
.inst-profile-page.is-collaborators{--inst-accent:#1c7c4a;--inst-tint:#eaf6ef;--inst-soft:#f6fbf8;--inst-line:#cbe6d7}
.inst-profile-page.is-foundingAgencies{--inst-accent:#9a6412;--inst-tint:#fbf2e2;--inst-soft:#fdf9f1;--inst-line:#eeddbe}
.inst-profile-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px;padding:5px 9px;border:1px solid #e2e4e7;border-radius:4px;background:#fff}
.inst-breadcrumb{display:flex;align-items:center;gap:5px;min-width:0;font-size:11px;color:#646970}
.inst-back-chip{display:inline-flex;align-items:center;gap:3px;flex:0 0 auto;padding:2px 7px 2px 5px;border:1px solid #dcdcde;border-radius:3px;background:#fff;color:var(--inst-accent);font:inherit;font-size:11px;font-weight:600;cursor:pointer;transition:background .12s,border-color .12s}
.inst-back-chip svg{width:12px;height:12px}
.inst-back-chip:hover{background:var(--inst-soft);border-color:var(--inst-accent)}
.inst-crumb-sep{color:#c3c4c7}
.inst-crumb-current{overflow:hidden;color:#1d2327;font-weight:600;text-overflow:ellipsis;white-space:nowrap}
.inst-bar-title{flex:0 0 auto;color:#8c8f94;font-size:9.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}
.inst-dossier{overflow:hidden;margin-bottom:8px;border:1px solid #e2e4e7;border-radius:4px;background:#fff}
.inst-card-caption{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:4px 10px;border-bottom:1px solid #e2e4e7;background:var(--inst-tint,#f6f7f7);color:#1d2327;font-size:11px;font-weight:600}
.inst-caption-meta{color:#646970;font-size:9.5px;font-weight:500;letter-spacing:.02em}
.inst-profile-body{display:grid;grid-template-columns:92px minmax(0,1.2fr) minmax(0,1fr) minmax(0,1fr);gap:2px 18px;padding:12px 14px;background:#fff}
.inst-avatar-col{display:flex;flex-direction:column;align-items:center;min-width:0}
.inst-avatar.is-lg{width:54px;height:54px;border:1px solid var(--inst-line,#cfe0f2);border-radius:10px;background:var(--inst-tint,#eef4fb);color:var(--inst-accent,#2271b1);font-size:.9rem}
.inst-id-pill{margin-top:6px;padding:1px 6px;border:1px solid #dcdcde;border-radius:3px;background:#f6f7f7;color:#50575e;font-size:9.5px;font-weight:600;white-space:nowrap}
.inst-status-pill{padding:1px 7px;border:1px solid #e2e4e7;border-radius:50px;background:#f6f7f7;color:#50575e;font-size:8.5px;font-weight:600;letter-spacing:.03em;text-align:center;text-transform:uppercase}
.inst-status-pill.is-good{border:1px solid #b8e0bf;background:#edfaef;color:#007017}
.inst-status-pill.is-bad{border:1px solid #f0c8c8;background:#fdf0f0;color:#b32d2e}
.inst-identity-col{min-width:0}
.inst-identity-col h3{overflow-wrap:anywhere;color:#1d2327;font-size:15px;font-weight:700;line-height:1.25;letter-spacing:.01em}
.inst-identity-sub{margin:2px 0 6px;color:#646970;font-size:10.5px;font-weight:500}
.inst-identity-pills{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:7px}
.inst-profile-col{min-width:0}
.inst-field-row{display:flex;align-items:baseline;gap:5px;min-width:0;margin-bottom:4px;font-size:11px;white-space:nowrap}
.inst-field-label{flex:0 0 auto;color:#646970;font-size:10.5px;font-weight:600}
.inst-field-val{min-width:0;overflow:hidden;color:#1d2327;font-size:11px;font-weight:500;text-overflow:ellipsis;white-space:nowrap}
.inst-action-ribbon{display:flex;align-items:center;gap:6px;margin-bottom:8px;padding:6px 9px;overflow-x:auto;border:1px solid #e2e4e7;border-radius:4px;background:#fff;scrollbar-width:thin}
.inst-ribbon-btn{display:inline-flex;align-items:center;gap:5px;flex:0 0 auto;padding:4px 10px;border:1px solid #c3c9cf;border-radius:3px;background:#fff;color:#1d2327;font:inherit;font-size:11px;font-weight:600;white-space:nowrap;cursor:pointer;transition:background .12s,border-color .12s,color .12s}
.inst-ribbon-btn svg{width:12px;height:12px}
.inst-ribbon-btn:hover{background:var(--inst-soft,#f6f7f7);border-color:var(--inst-accent,#2271b1);color:var(--inst-accent,#2271b1)}
.inst-ribbon-btn.is-primary{background:var(--inst-accent,#2271b1);border-color:var(--inst-accent,#2271b1);color:#fff}
.inst-ribbon-btn.is-primary:hover{color:#fff;filter:brightness(.94)}
.inst-ribbon-btn.is-danger{color:#b32d2e;border-color:#d69a9a}
.inst-ribbon-btn.is-danger:hover{background:#fcf0f1;border-color:#b32d2e;color:#b32d2e}
.inst-split-layout{display:grid;grid-template-columns:minmax(0,1fr) 236px;align-items:start;gap:10px;margin-bottom:8px}
.inst-split-left{min-width:0}
.inst-split-right{display:flex;flex-direction:column;gap:8px;min-width:0}
.inst-section-banner{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:5px 9px;border:1px solid #e2e4e7;border-left:3px solid var(--inst-accent,#2271b1);border-radius:3px 3px 0 0;background:var(--inst-soft,#f6f7f7);color:#3c434a;font-size:11px;font-weight:600}
.inst-section-banner span:last-child{color:#8c8f94;font-size:9.5px;font-weight:400}
.inst-data-table{width:100%;border:1px solid #e2e4e7;border-top:0;border-collapse:collapse;background:#fff;font-size:11px}
.inst-data-table tr{border-top:1px solid #f0f0f1}
.inst-data-table tr:first-child{border-top:0}
.inst-data-table tr:nth-child(even){background:#fafbfc}
.inst-data-table tbody tr:hover{background:var(--inst-soft,#f6f9fd)}
.inst-data-table td{padding:6px 10px;vertical-align:top}
.inst-cell-lbl{width:40%;color:#646970;font-weight:500;white-space:nowrap}
.inst-cell-val{color:#1d2327}
.inst-cell-val strong{font-weight:600}
.inst-side-card{overflow:hidden;border:1px solid #e2e4e7;border-radius:4px;background:#fff}
.inst-side-header{padding:5px 9px;border-bottom:1px solid #e2e4e7;background:var(--inst-soft,#f6f7f7);color:#1d2327;font-size:11px;font-weight:700;letter-spacing:.02em}
.inst-side-body{display:flex;flex-direction:column;padding:8px 9px}
.inst-side-row{display:flex;align-items:baseline;justify-content:space-between;gap:8px;padding:4px 0;border-bottom:1px solid #f6f7f7;font-size:10.5px}
.inst-side-row:last-of-type{border-bottom:0}
.inst-side-row span{color:#646970}
.inst-side-row strong{overflow-wrap:anywhere;color:#1d2327;font-weight:650;text-align:right}
.inst-side-progress{display:flex;align-items:center;justify-content:space-between;color:#3c434a;font-size:10.5px}
.inst-progress-track{display:block;height:6px;margin:5px 0 7px;overflow:hidden;border-radius:999px;background:#f0f0f1}
.inst-progress-track span{display:block;height:100%;border-radius:999px;background:var(--inst-accent,#2271b1);transition:width .25s ease}
.inst-checklist{display:flex;flex-direction:column;margin:0;padding:0;list-style:none;font-size:10.5px}
.inst-checklist li{display:flex;align-items:center;gap:6px;padding:4px 0;border-top:1px solid #f6f7f7;color:#50575e}
.inst-checklist li:first-child{border-top:0}
.inst-check-ok{color:#008a20;font-weight:700}
.inst-check-missing{color:#b32d2e;font-weight:700}
.inst-docs-section{overflow:hidden;border:1px solid #e2e4e7;border-radius:4px;background:#fff}
.inst-docs-header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:5px 9px;border-bottom:1px solid #e2e4e7;background:var(--inst-soft,#f6f7f7)}
.inst-docs-title{display:flex;align-items:center;gap:5px;color:#1d2327;font-size:11px;font-weight:700}
.inst-docs-title svg{width:13px;height:13px;color:var(--inst-accent,#2271b1)}
.inst-docs-count{margin-left:4px;color:#8c8f94;font-size:9.5px;font-weight:500}
.inst-storage-status{margin-left:7px;padding:1px 5px;border:1px solid #e6d7b4;border-radius:3px;background:#fcf8ed;color:#8a6116;font-size:9px;font-weight:600;white-space:nowrap}
.inst-sample-notice,.inst-connection-notice{margin:0 0 8px;padding:6px 9px;border-left:3px solid #b26200;background:#fcf8ed;color:#68480f;font-size:11px}
.inst-connection-notice{border-left-color:#b32d2e;background:#fcf0f0;color:#8a2424}
.inst-docs-body{padding:9px 10px}
.inst-docs-body .inst-doc-group:last-child{margin-bottom:0}
.inst-profile-page .inst-note{margin-top:8px;border-left:3px solid var(--inst-accent,#2271b1);border-radius:0 3px 3px 0}
@media (max-width: 980px){
  .inst-split-layout{grid-template-columns:minmax(0,1fr)}
  .inst-split-right{flex-direction:row;flex-wrap:wrap}
  .inst-side-card{flex:1 1 220px}
  .inst-profile-body{grid-template-columns:84px minmax(0,1.2fr) minmax(0,1fr)}
  .inst-profile-body>.inst-profile-col:last-child{grid-column:2/-1;margin-top:4px;padding-top:6px;border-top:1px solid #f0f0f1}
}
@media (max-width: 760px){
  .inst-profile-body{grid-template-columns:minmax(0,1fr);gap:9px}
  .inst-avatar-col{flex-direction:row;align-items:center;gap:6px}
  .inst-id-pill,.inst-status-pill{margin-top:0}
  .inst-profile-body>.inst-profile-col:last-child{grid-column:auto;margin-top:0;padding-top:0;border-top:0}
  .inst-split-right{flex-direction:column}
  .inst-bar-title{display:none}
  .inst-identity-sub{margin-bottom:6px}
}
@media (max-width: 520px){
  .inst-profile-bar{padding:0;border:0;background:transparent}
  .inst-back-chip{padding:4px 9px 4px 6px;background:#fff}
  .inst-crumb-current,.inst-crumb-sep{display:none}
  .inst-profile-body{padding:10px 11px}
  .inst-cell-lbl{width:44%}
  .inst-action-ribbon{gap:5px;padding:5px 7px}
  .inst-ribbon-btn{padding:4px 8px;font-size:10.5px}
  .inst-docs-header{flex-wrap:wrap}
}
/* Institutions: add-review step */
.inst-field-label{display:inline-flex;align-items:baseline;gap:2px}
.inst-required{color:#b32d2e;font-size:.75rem;line-height:1}
.inst-modal-fields input:required:not(:placeholder-shown):invalid{border-color:#e0a3a3}
.inst-modal-picker{width:min(100%,420px)}
.inst-doc-hint{margin:0;color:#646970;font-size:.63rem;line-height:1.5}
.inst-modal-review{width:min(100%,480px)}
.inst-review-card{overflow:hidden;border:1px solid #e6e8eb;border-radius:8px;background:#fff}
.inst-review-card .inst-preview-hero{gap:10px;padding:11px 12px;border-bottom:1px solid #f0f0f1;background:#fafbfc}
.inst-review-card .inst-preview-hero .inst-pill{margin-left:auto;flex:0 0 auto}
.inst-review-card .inst-preview-list{border:0;border-radius:0}
.inst-review-card .inst-preview-row{padding:7px 12px}
.inst-confirm-copy{margin:0;color:#646970;font-size:.62rem;line-height:1.5}
.inst-pill.is-new{border-color:#c6dff5;background:#f0f6fc;color:#135e96;font-weight:700}
@media (max-width: 520px){
  .inst-review-card .inst-preview-hero{flex-wrap:wrap}
  .inst-review-card .inst-preview-hero .inst-pill{margin-left:0}
}
