:root{--bg: #0b1220;--surface: #ffffff;--surface-2: #f1f5f9;--border: #e2e8f0;--text: #0f172a;--text-muted: #64748b;--primary: #0f172a;--accent: #0ea5e9;--accent-soft: #e0f2fe;--success: #16a34a;--warning: #d97706;--danger: #dc2626;--radius: 12px;--shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .04);--shadow-lg: 0 10px 30px rgba(15, 23, 42, .12)}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;color:var(--text);background:var(--surface-2);-webkit-font-smoothing:antialiased}a{color:var(--accent);text-decoration:none}h1,h2,h3,h4{margin:0 0 .4em;line-height:1.2}p{margin:0 0 .6em}.app-shell{display:grid;grid-template-columns:248px 1fr;min-height:100vh}.sidebar{background:var(--bg);color:#cbd5e1;display:flex;flex-direction:column;padding:20px 14px;gap:4px;position:sticky;top:0;height:100vh}.sidebar .brand{display:flex;align-items:center;gap:12px;padding:10px 10px 22px;margin-bottom:6px;border-bottom:1px solid rgba(255,255,255,.08);color:#fff}.sidebar .brand .logo{width:44px;height:44px;border-radius:11px;background:linear-gradient(135deg,var(--accent),#6366f1);display:grid;place-items:center;font-size:24px;flex-shrink:0;box-shadow:0 4px 12px #0ea5e959}.brand-name{font-family:Segoe Script,Brush Script MT,Snell Roundhand,Apple Chancery,cursive;font-style:italic;font-weight:700;font-size:1.35rem;line-height:1.05;background:linear-gradient(90deg,#38bdf8,#818cf8);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.nav-link{display:flex;align-items:center;gap:11px;padding:9px 12px;border-radius:9px;color:#cbd5e1;font-size:.9rem;font-weight:500;cursor:pointer}.nav-link:hover{background:#ffffff0f;color:#fff}.nav-link.active{background:var(--accent);color:#fff}.nav-link .ico{width:18px;text-align:center}.sidebar .spacer{flex:1}.sidebar .user-chip{padding:10px 12px;border-top:1px solid rgba(255,255,255,.08);margin-top:8px;font-size:.82rem}.sidebar .user-chip .role{color:var(--accent);font-weight:600;text-transform:capitalize}.main{display:flex;flex-direction:column;min-width:0}.topbar{height:60px;background:var(--surface);border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;padding:0 28px;position:sticky;top:0;z-index:5}.topbar h1{font-size:1.1rem;margin:0}.content{padding:28px;max-width:1280px;width:100%}.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);padding:20px}.card.pad-0{padding:0;overflow:hidden}.table-scroll{width:100%;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-scroll table.tbl{min-width:max-content}.table-scroll::-webkit-scrollbar{height:9px}.table-scroll::-webkit-scrollbar-thumb{background:var(--border);border-radius:999px}.table-scroll::-webkit-scrollbar-thumb:hover{background:#cbd5e1}.grid{display:grid;gap:18px}.grid.cols-2{grid-template-columns:repeat(2,1fr)}.grid.cols-3{grid-template-columns:repeat(3,1fr)}.grid.cols-4{grid-template-columns:repeat(4,1fr)}.stat{display:flex;flex-direction:column;gap:4px}.stat .value{font-size:1.8rem;font-weight:700}.stat .label{color:var(--text-muted);font-size:.82rem}.stat.alert .value{color:var(--danger)}.section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.muted{color:var(--text-muted)}.small{font-size:.82rem}.btn{display:inline-flex;align-items:center;gap:7px;justify-content:center;border:1px solid var(--border);background:var(--surface);color:var(--text);border-radius:9px;padding:9px 15px;font-size:.875rem;font-weight:600;cursor:pointer;transition:.12s;white-space:nowrap}.btn:hover{background:var(--surface-2)}.btn.primary{background:var(--primary);color:#fff;border-color:var(--primary)}.btn.primary:hover{opacity:.9}.btn.accent{background:var(--accent);color:#fff;border-color:var(--accent)}.btn.danger{background:#fff;color:var(--danger);border-color:#fecaca}.btn.danger:hover{background:#fef2f2}.btn.sm{padding:6px 11px;font-size:.8rem}.btn:disabled{opacity:.5;cursor:not-allowed}.btn-row{display:flex;gap:8px;flex-wrap:wrap}.badge{display:inline-flex;align-items:center;gap:5px;padding:3px 9px;border-radius:999px;font-size:.72rem;font-weight:600;background:var(--surface-2);color:var(--text-muted)}.badge.green{background:#dcfce7;color:#166534}.badge.blue{background:var(--accent-soft);color:#075985}.badge.amber{background:#fef3c7;color:#92400e}.badge.red{background:#fee2e2;color:#991b1b}.badge.gray{background:#e2e8f0;color:#475569}.badge.purple{background:#ede9fe;color:#5b21b6}.field{display:flex;flex-direction:column;gap:6px;margin-bottom:14px}.field label{font-size:.82rem;font-weight:600;color:var(--text)}.input,.select,.textarea{border:1px solid var(--border);border-radius:9px;padding:9px 12px;font-size:.9rem;font-family:inherit;background:var(--surface);color:var(--text);width:100%}.input:focus,.select:focus,.textarea:focus{outline:2px solid var(--accent-soft);border-color:var(--accent)}.textarea{resize:vertical;min-height:70px}.checkbox-row{display:flex;align-items:center;gap:8px;margin-bottom:10px}.checkbox-row input{width:16px;height:16px}table.tbl{width:100%;border-collapse:collapse;font-size:.875rem}table.tbl th{text-align:left;color:var(--text-muted);font-weight:600;font-size:.76rem;text-transform:uppercase;letter-spacing:.03em;padding:11px 14px;border-bottom:1px solid var(--border)}table.tbl td{padding:12px 14px;border-bottom:1px solid var(--border)}table.tbl tr:last-child td{border-bottom:none}table.tbl tr.clickable:hover{background:var(--surface-2);cursor:pointer}.progress{height:8px;background:var(--surface-2);border-radius:999px;overflow:hidden}.progress>span{display:block;height:100%;background:var(--accent);border-radius:999px}.timeline{display:flex;flex-direction:column;gap:12px}.step-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:14px 16px;box-shadow:var(--shadow)}.step-card.dragging{opacity:.5}.step-card .step-head{display:flex;align-items:center;gap:12px}.step-card .grip{cursor:grab;color:var(--text-muted);font-size:1.1rem;-webkit-user-select:none;user-select:none}.step-card .step-icon{font-size:1.5rem;width:38px;height:38px;display:grid;place-items:center;background:var(--surface-2);border-radius:9px}.step-card .step-title{font-weight:600}.step-card.kind-START,.step-card.kind-END{border-style:dashed;background:var(--surface-2)}.step-actions-list{margin-top:10px;padding-top:10px;border-top:1px dashed var(--border);display:flex;flex-direction:column;gap:6px}.action-chip{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 10px;background:var(--surface-2);border-radius:8px;font-size:.82rem}.flow{display:flex;flex-direction:column;align-items:center;margin:-6px 0;pointer-events:none}.flow .stem{width:2px;height:18px;border-radius:2px;background:var(--border)}.flow .chev{font-size:14px;line-height:.5;margin-top:1px;color:var(--border)}.flow.done .stem{background:var(--success)}.flow.done .chev{color:var(--success)}.flow.active .stem{background:linear-gradient(var(--success),var(--accent))}.flow.active .chev{color:var(--accent)}.portal-timeline .flow{margin:-8px 0}.dot{width:10px;height:10px;border-radius:50%;display:inline-block}.dot.COMPLETE{background:var(--success)}.dot.IN_PROGRESS{background:var(--accent)}.dot.PENDING{background:#cbd5e1}.dot.BLOCKED,.dot.DECLINED{background:var(--danger)}.overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#0f172a73;display:grid;place-items:center;z-index:50;padding:20px}.modal{background:var(--surface);border-radius:14px;box-shadow:var(--shadow-lg);width:100%;max-width:560px;max-height:90vh;overflow:auto}.modal .modal-head{padding:18px 22px;border-bottom:1px solid var(--border);display:flex;justify-content:space-between;align-items:center}.modal .modal-body{padding:22px}.modal .modal-foot{padding:16px 22px;border-top:1px solid var(--border);display:flex;justify-content:flex-end;gap:10px}.drawer{position:fixed;top:0;right:0;height:100vh;width:440px;max-width:92vw;background:var(--surface);box-shadow:var(--shadow-lg);z-index:50;overflow:auto}.auth-wrap{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#0b1220,#1e293b);padding:20px}.auth-card{background:var(--surface);border-radius:16px;box-shadow:var(--shadow-lg);padding:36px;width:100%;max-width:400px}.auth-card .logo-lg{width:52px;height:52px;border-radius:12px;background:linear-gradient(135deg,var(--accent),#6366f1);display:grid;place-items:center;font-size:26px;margin-bottom:16px}.portal{min-height:100vh;background:var(--surface-2)}.portal-header{padding:28px 20px;text-align:center;color:#fff}.portal-header .logo{width:60px;height:60px;border-radius:14px;background:#ffffff26;display:grid;place-items:center;font-size:30px;margin:0 auto 12px}.portal-body{max-width:720px;margin:-20px auto 0;padding:0 16px 60px}.portal-timeline{display:flex;flex-direction:column;gap:14px}.portal-step{background:var(--surface);border-radius:var(--radius);border:1px solid var(--border);padding:16px 18px;box-shadow:var(--shadow)}.portal-step.current{border-color:var(--accent);border-width:2px}.portal-step .head{display:flex;align-items:center;gap:12px}.portal-step .num{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;font-weight:700;background:var(--surface-2);flex-shrink:0}.portal-step.done .num{background:var(--success);color:#fff}.portal-step.current .num{background:var(--accent);color:#fff}.action-panel{margin-top:12px;padding:14px;background:var(--accent-soft);border-radius:10px}.portal-brand{text-align:center;font-family:Segoe Script,Brush Script MT,Snell Roundhand,Apple Chancery,cursive;font-style:italic;font-weight:700;font-size:1.05rem;color:#ffffffe6;margin-bottom:10px}.empty{text-align:center;padding:50px 20px;color:var(--text-muted)}.spinner{width:28px;height:28px;border:3px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:spin .7s linear infinite;margin:40px auto}@keyframes spin{to{transform:rotate(360deg)}}.toast{position:fixed;bottom:24px;right:24px;background:var(--primary);color:#fff;padding:12px 18px;border-radius:10px;box-shadow:var(--shadow-lg);z-index:100;font-size:.875rem}@media (max-width: 860px){.app-shell{grid-template-columns:1fr}.sidebar{position:static;height:auto;flex-direction:row;flex-wrap:wrap}.sidebar .spacer{display:none}.grid.cols-3,.grid.cols-4,.grid.cols-2{grid-template-columns:1fr}}
