:root{--brand: #1e40af;--brand-light: #3b82f6;--brand-gradient: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);--sidebar-bg: #0f172a;--sidebar-hover: #1e293b;--sidebar-active: #2563eb;--sidebar-border: #1e293b;--text-main: #0f172a;--text-muted: #64748b;--bg-page: #f8fafc;--card-bg: #ffffff;--line: #e2e8f0;--radius: 10px;--radius-sm: 6px;--shadow-sm: 0 1px 3px rgba(0, 0, 0, .05), 0 1px 2px rgba(0, 0, 0, .03);--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .07), 0 2px 4px -2px rgba(0, 0, 0, .04)}*{box-sizing:border-box}html,body{margin:0;padding:0;width:100%;max-width:100vw;overflow-x:hidden;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;background:var(--bg-page);color:var(--text-main);-webkit-font-smoothing:antialiased}#root{width:100%;max-width:100vw;min-height:100vh;overflow-x:hidden}.app-shell{display:flex;min-height:100vh;width:100%}.sidebar{width:260px;min-width:260px;max-width:260px;background:var(--sidebar-bg);color:#94a3b8;display:flex;flex-direction:column;height:100vh;position:sticky;top:0;z-index:100;box-shadow:2px 0 10px #0000001f}.sidebar-brand{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:1.25rem 1.1rem;border-bottom:1px solid var(--sidebar-border);background:#0f172af2}.brand-header-left{display:flex;align-items:center;gap:.75rem}.brand-logo{font-size:1.2rem;font-weight:800;background:var(--brand-gradient);color:#fff;width:36px;height:36px;display:flex;align-items:center;justify-content:center;border-radius:8px;box-shadow:0 2px 6px #2563eb66}.brand-title strong{display:block;color:#f8fafc;font-size:1.05rem;letter-spacing:-.2px}.brand-title span{display:block;font-size:.7rem;color:#64748b;text-transform:uppercase;letter-spacing:.6px;font-weight:600}.sidebar-nav{flex:1;overflow-y:auto;padding:.75rem .6rem;scrollbar-width:thin;scrollbar-color:#334155 transparent}.sidebar-nav::-webkit-scrollbar{width:5px}.sidebar-nav::-webkit-scrollbar-thumb{background:#334155;border-radius:4px}.nav-group-title{font-size:.68rem;font-weight:700;color:#475569;padding:.85rem .6rem .35rem;letter-spacing:.8px;text-transform:uppercase}.sidebar-link{display:flex;align-items:center;gap:.65rem;padding:.55rem .75rem;color:#94a3b8;text-decoration:none;font-size:.87rem;font-weight:500;border-radius:var(--radius-sm);margin-bottom:2px;transition:all .15s ease-in-out}.sidebar-link .nav-icon{font-size:1rem;display:inline-flex;align-items:center;justify-content:center;width:20px}.sidebar-link:hover{background:var(--sidebar-hover);color:#f1f5f9}.sidebar-link.active{background:var(--sidebar-active);color:#fff;font-weight:600;box-shadow:0 2px 4px #2563eb4d}.sidebar-footer{padding:.85rem 1rem;background:#090d16;border-top:1px solid var(--sidebar-border);display:flex;align-items:center;justify-content:space-between;gap:.5rem}.user-profile{display:flex;align-items:center;gap:.6rem;overflow:hidden}.user-avatar{width:32px;height:32px;border-radius:50%;background:#2563eb;color:#fff;font-weight:700;display:flex;align-items:center;justify-content:center;font-size:.85rem;flex-shrink:0}.user-details{display:flex;flex-direction:column;overflow:hidden}.user-name{color:#f1f5f9;font-size:.85rem;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-role{color:#64748b;font-size:.72rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.btn-logout{background:#1e293b;border:1px solid #334155;color:#cbd5e1;padding:.35rem .6rem;border-radius:var(--radius-sm);font-size:.78rem;cursor:pointer;transition:all .15s ease;white-space:nowrap}.btn-logout:hover{background:#dc2626;border-color:#dc2626;color:#fff}.main-content-area{flex:1;display:flex;flex-direction:column;min-width:0;overflow-x:hidden}.topbar{display:flex;align-items:center;justify-content:space-between;padding:.85rem 2rem;background:#fff;border-bottom:1px solid var(--line);box-shadow:0 1px 2px #00000008}.topbar-left{display:flex;align-items:center;gap:.75rem}.mobile-menu-btn{display:none;align-items:center;justify-content:center;width:36px;height:36px;border-radius:var(--radius-sm);background:#f1f5f9;border:1px solid var(--line);color:#1e293b;font-size:1.25rem;cursor:pointer;transition:all .15s ease}.mobile-menu-btn:hover{background:#e2e8f0}.mobile-close-btn{display:none;align-items:center;justify-content:center;width:32px;height:32px;border-radius:var(--radius-sm);background:#1e293b;border:1px solid #334155;color:#cbd5e1;font-size:1.1rem;cursor:pointer;transition:all .15s ease}.mobile-close-btn:hover{background:#334155;color:#fff}.sidebar-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#0f172aa6;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);z-index:999;animation:fadeIn .2s ease}.topbar-title{font-size:1rem;font-weight:700;color:#1e293b;letter-spacing:-.2px}.topbar-right{display:flex;align-items:center;gap:.85rem}.user-badge{background:#eff6ff;color:#1d4ed8;border:1px solid #bfdbfe;padding:.25rem .65rem;border-radius:20px;font-size:.78rem;font-weight:600}.page{max-width:1200px;width:100%;margin:0 auto;padding:2rem 2rem 3rem;flex:1}.page.narrow{max-width:500px}.page-header{margin-bottom:1.5rem}.page-header h1{margin:0 0 .35rem;font-size:1.65rem;font-weight:700;color:#0f172a}.page-subtitle{margin:0;color:var(--text-muted);font-size:.92rem}.center{text-align:center;margin-top:3rem}.grow{flex:1}.card{background:var(--card-bg);border-radius:var(--radius);padding:1.35rem 1.6rem;margin-bottom:1.5rem;box-shadow:var(--shadow-sm);border:1px solid var(--line);transition:box-shadow .2s ease}.card:hover{box-shadow:var(--shadow-md)}.card h2{margin-top:0;margin-bottom:1.1rem;font-size:1.15rem;font-weight:600;color:#1e293b}.field{display:flex;flex-direction:column;gap:.35rem;margin-bottom:1rem;font-size:.88rem;font-weight:500;color:#334155}.field.end-align{justify-content:flex-end}input,select{padding:.55rem .75rem;border:1px solid #cbd5e1;border-radius:var(--radius-sm);font-size:.92rem;background:#fff;color:#0f172a;transition:border-color .15s ease,box-shadow .15s ease}input:focus,select:focus,textarea:focus{outline:none;border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f626}textarea{padding:.6rem .75rem;border:1px solid #cbd5e1;border-radius:var(--radius-sm);font:inherit;font-size:.92rem;min-height:5.5rem}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:1rem}.permission-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:.5rem 1rem;margin-bottom:1.25rem;background:#f8fafc;padding:1rem;border-radius:var(--radius);border:1px solid var(--line)}.filter-card{padding:1.1rem 1.4rem}.filter-row{display:flex;gap:1rem;align-items:flex-end;flex-wrap:wrap}.field-inline{display:flex;flex-direction:column;gap:.35rem;font-size:.85rem;font-weight:600;color:#475569}.report-status-badge{display:inline-flex;align-items:center;gap:.5rem;font-size:.85rem;color:var(--text-muted);font-weight:500}.dashboard-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:1.25rem}.metric-card{margin-bottom:0;display:flex;flex-direction:column;justify-content:flex-start;padding:1.25rem 1.4rem;background:#fff;border-top:3px solid var(--brand-light)}.metric-title{margin:0 0 .85rem;font-size:.85rem;font-weight:700;color:#64748b;text-transform:uppercase;letter-spacing:.5px}.metric-body{flex:1;display:flex;flex-direction:column;justify-content:center}.metric-stat-number{font-size:2.2rem;font-weight:700;color:#1e3a8a;line-height:1.1}.metric-empty{font-size:1.4rem;color:#94a3b8}.metric-date-range{display:flex;flex-direction:column;gap:.3rem;font-size:.88rem;background:#f8fafc;padding:.6rem .8rem;border-radius:var(--radius-sm);border:1px solid var(--line)}.metric-kv-grid{display:flex;flex-direction:column;gap:.45rem}.metric-kv-row{display:flex;justify-content:space-between;align-items:center;padding:.3rem 0;border-bottom:1px dashed #f1f5f9;font-size:.88rem}.metric-kv-row:last-child{border-bottom:none}.metric-key{color:#64748b;text-transform:capitalize;font-weight:500}.metric-val{font-weight:700;color:#0f172a;background:#f1f5f9;padding:.15rem .45rem;border-radius:4px;font-size:.82rem}.metric-list{display:flex;flex-wrap:wrap;gap:.35rem}.metric-chip{background:#eff6ff;color:#1d4ed8;padding:.2rem .5rem;border-radius:4px;font-size:.8rem}.roles-table th{white-space:nowrap}.perm-chip-list{display:flex;flex-wrap:wrap;gap:.35rem;max-width:600px}.perm-chip{background:#f0fdf4;color:#166534;border:1px solid #bbf7d0;padding:.15rem .45rem;border-radius:4px;font-size:.74rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace}.type-tag{display:inline-block;padding:.2rem .5rem;border-radius:4px;font-size:.78rem;font-weight:600}.type-tag.system{background:#e2e8f0;color:#334155}.type-tag.custom{background:#fef3c7;color:#92400e}.row{display:flex;gap:.6rem;align-items:center;flex-wrap:wrap;margin:.6rem 0}.row.end{justify-content:flex-end}.btn{padding:.5rem 1rem;border:1px solid #cbd5e1;background:#fff;color:#334155;border-radius:var(--radius-sm);cursor:pointer;font-size:.92rem;font-weight:500;transition:all .15s ease;display:inline-flex;align-items:center;gap:.4rem}.btn:hover{background:#f8fafc;border-color:#94a3b8}.btn.primary{background:var(--brand);color:#fff;border-color:var(--brand);box-shadow:0 1px 2px #1e40af33}.btn.primary:hover{background:#1d4ed8;border-color:#1d4ed8}.btn.small{padding:.25rem .55rem;font-size:.8rem}.btn:disabled{opacity:.55;cursor:not-allowed}table{width:100%;border-collapse:collapse;font-size:.9rem}th,td{text-align:left;padding:.75rem .85rem;border-bottom:1px solid var(--line);vertical-align:middle}th{background:#f8fafc;color:#475569;font-weight:600;font-size:.82rem;text-transform:uppercase;letter-spacing:.5px}tr:hover td{background:#f8fafc}.scroll{overflow-x:auto;border-radius:var(--radius-sm)}.actions{display:flex;gap:.4rem;flex-wrap:wrap}.tag{margin-left:.5rem;padding:.15rem .45rem;background:#fff3cd;border-radius:4px;font-size:.75rem}.good-tag{background:#d9f2e0}.status{font-weight:600;font-size:.82rem}.status-badge{display:inline-block;padding:.2rem .55rem;border-radius:12px;font-size:.75rem;font-weight:600}.status.ACTIVE,.status-badge.ACTIVE{background:#dcfce7;color:#15803d}.status.LOCKED,.status-badge.LOCKED{background:#fef3c7;color:#b45309}.status.DISABLED,.status-badge.DISABLED{background:#fee2e2;color:#b91c1c}.good{color:#15803d;font-weight:600}.bad{color:#b91c1c;font-weight:600;margin:.35rem 0}.warn{background:#fff3cd;padding:.6rem .85rem;border-radius:var(--radius-sm)}.muted{color:var(--text-muted)}.small-text{font-size:.85rem}.check{display:flex;gap:.5rem;align-items:center;margin:.35rem 0;font-size:.88rem;cursor:pointer}.overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#0f172a99;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);display:flex;align-items:center;justify-content:center;padding:1rem;z-index:200}.modal{background:#fff;border-radius:var(--radius);padding:1.5rem;max-width:480px;width:100%;box-shadow:0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a}.modal.wide{max-width:760px;max-height:88vh;overflow-y:auto}.modal-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:1.25rem;border-bottom:1px solid var(--line);padding-bottom:.75rem}.modal-header h2{margin:0;font-size:1.25rem;color:#0f172a}.modal-close-btn{background:none;border:none;font-size:1.4rem;color:#64748b;cursor:pointer;padding:0 .4rem;line-height:1}.modal-close-btn:hover{color:#0f172a}.modal-footer{display:flex;justify-content:flex-end;gap:.75rem;margin-top:1.5rem;border-top:1px solid var(--line);padding-top:1rem}.excel-upload-zone{border:2px dashed #93c5fd;background:#f0f7ff;border-radius:var(--radius);padding:1.5rem;text-align:center;margin-top:.5rem}.excel-upload-zone:hover{border-color:#3b82f6;background:#e0f2fe}.excel-template-info{background:#f8fafc;border:1px solid var(--line);border-radius:var(--radius-sm);padding:.75rem 1rem;font-size:.84rem;color:#475569;margin-top:.75rem;text-align:left}.secret{background:#f1f5f9;padding:.85rem;border-radius:var(--radius-sm);font-size:1rem;-webkit-user-select:all;user-select:all;white-space:pre-wrap;word-break:break-all;border:1px dashed #cbd5e1}.audit-json{max-width:260px;max-height:180px;overflow:auto;white-space:pre-wrap;word-break:break-word;margin:0;font:.75rem ui-monospace,monospace}.loading-state{color:var(--text-muted);font-style:italic;padding:1rem 0}.sidebar-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#0f172aa6;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);z-index:998;cursor:pointer;animation:fadeIn .2s ease-out}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@media (max-width: 1024px){.app-shell{display:flex;flex-direction:column;position:relative;width:100%;min-height:100vh;overflow-x:hidden}.sidebar{position:fixed!important;top:0!important;left:0!important;bottom:0!important;width:280px!important;min-width:0!important;max-width:85vw!important;height:100vh!important;z-index:1000!important;transform:translate(-100%)!important;transition:transform .28s cubic-bezier(.4,0,.2,1)!important;box-shadow:none!important}.sidebar.open{transform:translate(0)!important;box-shadow:4px 0 35px #000000a6!important}.mobile-menu-btn,.mobile-close-btn{display:inline-flex!important}.main-content-area{width:100%!important;min-width:100%!important;max-width:100%!important;overflow-x:hidden}.topbar{padding:.65rem 1rem;position:sticky;top:0;z-index:90}.topbar-title{font-size:.95rem;max-width:180px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.page{padding:1rem .85rem 2.5rem;max-width:100%}.page-header{flex-direction:column!important;align-items:flex-start!important;gap:.75rem}.page-header h1,.page-header h2{font-size:1.35rem;line-height:1.25}.page-subtitle{font-size:.85rem}.card{padding:1.1rem;border-radius:8px;margin-bottom:1rem}.card h2,.card h3{font-size:1.1rem}.grid,.dashboard-grid{grid-template-columns:1fr;gap:.85rem}.permission-grid{grid-template-columns:1fr;padding:.75rem}.filter-row{flex-direction:column;align-items:stretch;gap:.75rem}.filter-row .field-inline,.filter-row select,.filter-row input,.filter-row button{width:100%}.tabs{display:flex!important;gap:.5rem!important;overflow-x:auto!important;padding-bottom:6px!important;-webkit-overflow-scrolling:touch!important;scrollbar-width:none!important;flex-wrap:nowrap!important}.tabs::-webkit-scrollbar{display:none}.tabs button,.tabs a{flex-shrink:0!important;white-space:nowrap!important;font-size:.85rem!important;padding:.45rem .8rem!important}.scroll,.table-responsive{overflow-x:auto;-webkit-overflow-scrolling:touch;margin-bottom:.5rem;border-radius:var(--radius-sm);width:100%}table{min-width:580px}input,select,textarea{font-size:16px!important}.modal,.modal.wide,[role=dialog]{width:95%!important;max-width:95%!important;max-height:90vh!important;padding:1.1rem!important;margin:.5rem auto!important;box-sizing:border-box!important}div[style*="display: flex"][style*=gap]{flex-wrap:wrap!important}.excel-upload-zone{padding:1rem .75rem}}@media (max-width: 480px){.topbar{padding:.5rem .75rem}.topbar-title{font-size:.85rem;max-width:130px}.user-badge{display:none}.page{padding:.75rem .5rem 2rem}.card{padding:.85rem .75rem}.btn{padding:.45rem .75rem;font-size:.85rem}.brand-title strong{font-size:.95rem}}
