/* FILE: assets/css/app.css */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');
*{box-sizing:border-box;margin:0;padding:0}
:root{--bg:#fff;--surface:#f7f7f8;--border:#e2e2e5;--border-light:#eeeeef;--text:#1a1a1e;--text-2:#5a5a6a;--text-3:#9898a8;--accent:#1a6ef7;--accent-bg:#eff4ff;--ok:#16a34a;--warn:#d97706;--err:#dc2626;--err-bg:#fef2f2;--header-h:48px}
body{font-family:'DM Sans',sans-serif;background:var(--bg);color:var(--text);font-size:13px;height:100vh;overflow:hidden}
a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}
#topbar{height:var(--header-h);border-bottom:1px solid var(--border);display:flex;align-items:center;gap:12px;padding:0 14px;background:var(--bg);z-index:10}
.logo{font-family:'JetBrains Mono',monospace;font-size:12px;font-weight:600;color:var(--text-2);letter-spacing:.08em}.sep{width:1px;height:20px;background:var(--border)}.spacer{flex:1}
.btn{height:28px;padding:0 12px;border-radius:5px;border:1px solid var(--border);background:var(--bg);color:var(--text);font-size:12px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;gap:5px;white-space:nowrap}.btn:hover{background:var(--surface)}.btn.primary{background:var(--accent);border-color:var(--accent);color:#fff}.btn.danger{background:var(--err-bg);border-color:#fecaca;color:var(--err)}
.profile-chip{display:flex;flex-direction:column;line-height:1.1;border-left:1px solid var(--border);padding-left:12px}.profile-chip span{font-weight:600}.profile-chip small{color:var(--text-3);font-size:10px;text-transform:uppercase}
.db-nav{height:100%;display:flex;align-items:center;gap:2px}.nav-node{position:relative;height:100%;display:flex;align-items:center}.nav-node>a{height:100%;display:flex;align-items:center;padding:0 10px;color:var(--text-2);font-weight:600}.nav-node:hover>a{background:var(--surface);color:var(--text)}.nav-children{display:none;position:absolute;top:100%;left:0;min-width:210px;background:#fff;border:1px solid var(--border);box-shadow:0 12px 40px rgba(0,0,0,.12);z-index:50}.nav-node:hover>.nav-children{display:block}.nav-children .nav-node{height:auto;display:block}.nav-children .nav-node>a{height:34px;justify-content:space-between}.nav-children .nav-children{top:0;left:100%}
#main{height:calc(100vh - var(--header-h));overflow:hidden}.board-shell{height:100%;display:flex;flex-direction:column}.board-toolbar{height:58px;border-bottom:1px solid var(--border);background:var(--surface);display:flex;align-items:center;justify-content:space-between;padding:0 14px}.board-toolbar h1{font-size:16px}.board-toolbar p{font-size:12px;color:var(--text-3)}
.tweetdeck-board{flex:1;display:flex;gap:10px;overflow-x:auto;overflow-y:hidden;padding:10px;background:#fbfbfc}.board-column{width:330px;min-width:330px;height:100%;border:1px solid var(--border);background:#fff;border-radius:8px;display:flex;flex-direction:column}.col-head{height:42px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;padding:0 10px}.col-head h2{font-size:14px}.col-actions{display:flex;gap:6px}.col-body{flex:1;overflow:auto;padding:10px;display:flex;flex-direction:column;gap:8px}.card{border:1px solid var(--border-light);border-radius:8px;background:#fff;padding:10px;display:grid;gap:7px}.card:hover{border-color:var(--accent)}.card-title{font-weight:700}.card-meta{font-size:11px;color:var(--text-3)}.chip{display:inline-flex;width:max-content;padding:2px 7px;border-radius:99px;font-size:10px;font-weight:700;background:var(--accent-bg);color:var(--accent)}.chip.Urgent{background:#fef2f2;color:#dc2626}.chip.High{background:#fff7ed;color:#d97706}.chip.Medium{background:#f0fdf4;color:#16a34a}.card-actions{display:flex;gap:6px;justify-content:flex-end}.empty{color:var(--text-3);text-align:center;padding:30px 10px}
.modal-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.35);display:none;align-items:center;justify-content:center;z-index:100}.modal-backdrop.open{display:flex}.modal{width:680px;max-width:96vw;max-height:90vh;background:#fff;border:1px solid var(--border);border-radius:10px;box-shadow:0 20px 60px rgba(0,0,0,.2);overflow:hidden}.modal.small{width:420px}.modal-header{height:44px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;padding:0 14px}.modal-header button{border:0;background:transparent;font-size:18px;cursor:pointer}.modal-body{padding:14px;display:grid;gap:10px;overflow:auto}.modal-body label,.auth-form label{display:grid;gap:5px;font-size:11px;font-weight:700;color:var(--text-2);text-transform:uppercase}.modal-body input,.modal-body select,.modal-body textarea,.auth-form input{height:34px;border:1px solid var(--border);border-radius:6px;padding:0 10px;background:#fff;outline:none}.modal-body textarea{height:90px;padding:10px;resize:vertical}.ql-container{min-height:180px}
.auth-wrap{min-height:100vh;display:grid;place-items:center;background:var(--surface);padding:20px}.auth-card{width:390px;max-width:100%;background:#fff;border:1px solid var(--border);border-radius:10px;padding:22px;box-shadow:0 20px 60px rgba(0,0,0,.1)}.auth-brand{display:flex;gap:12px;align-items:center;margin-bottom:18px}.auth-brand span{width:44px;height:44px;border-radius:10px;background:var(--accent-bg);display:grid;place-items:center;color:var(--accent);font-weight:800}.auth-brand h1{font-size:20px}.auth-brand p,.muted{color:var(--text-3);font-size:12px}.auth-form{display:grid;gap:12px}#authMsg{font-size:12px;color:var(--err);line-height:1.4}.password-field{position:relative;display:block}.password-field input{width:100%;padding-right:42px}.password-toggle{position:absolute;right:6px;top:50%;transform:translateY(-50%);width:28px;height:28px;border:0;border-radius:5px;background:transparent;display:grid;place-items:center;cursor:pointer;color:var(--text-3)}.password-toggle:hover,.password-toggle.active{background:var(--surface);color:var(--accent)}.password-toggle svg{width:18px;height:18px;fill:currentColor}#toastBox{position:fixed;right:16px;top:16px;z-index:999;display:grid;gap:8px;max-width:min(360px,calc(100vw - 32px))}.toast{border:1px solid var(--border);border-left:4px solid var(--err);background:#fff;color:var(--text);box-shadow:0 14px 38px rgba(0,0,0,.14);border-radius:8px;padding:11px 12px;font-size:12px;line-height:1.4;opacity:0;transform:translateY(-6px);transition:.2s}.toast.show{opacity:1;transform:translateY(0)}.toast.error{border-left-color:var(--err)}
@media(max-width:800px){body{overflow:auto}#main{height:auto}.tweetdeck-board{height:calc(100vh - 106px)}.board-column{width:86vw;min-width:86vw}.db-nav{display:none}}

/* Tailwind-style UI refresh */
.btn{min-height:38px;height:auto;padding:0 16px;border-radius:10px;font-size:13px;font-weight:700;justify-content:center;gap:7px;transition:.16s}.btn:hover{border-color:#cbd5e1}.btn.primary{box-shadow:0 8px 18px rgba(26,110,247,.18)}.btn.primary:hover{background:#155bd1}.btn.danger:hover{background:#fee2e2;border-color:#fca5a5}.btn:disabled{opacity:.65;cursor:not-allowed}
#topbar{min-height:56px;height:56px;padding:0 16px}.profile-chip span{font-size:13px}.nav-node>a{padding:0 12px}.nav-children{border-radius:12px;overflow:hidden;box-shadow:0 18px 50px rgba(15,23,42,.16)}
#main{height:calc(100vh - 56px)}.board-toolbar{min-height:72px;height:auto;padding:12px 18px;background:#f8fafc}.board-toolbar h1{font-size:18px;font-weight:800}.board-toolbar p{font-size:13px}.tweetdeck-board{gap:14px;padding:14px;background:#f8fafc}.board-column{width:380px;min-width:380px;border-radius:14px;box-shadow:0 10px 30px rgba(15,23,42,.04)}.col-head{min-height:58px;height:auto;align-items:flex-start;gap:10px;padding:12px}.col-head h2{font-size:15px;font-weight:800;letter-spacing:0}.col-actions{gap:7px;flex-wrap:wrap;justify-content:flex-end}.col-body{padding:12px;gap:10px}.card{border-radius:12px;padding:12px;gap:8px;box-shadow:0 8px 20px rgba(15,23,42,.03)}.card-title{font-weight:800;color:#0f172a}.card-meta{font-size:12px}.card-content{font-size:13px;line-height:1.5;color:#334155}.card-actions{gap:7px;flex-wrap:wrap}.chip{padding:4px 9px;font-size:11px;font-weight:800}.empty.compact{padding:14px 10px}
.modal-backdrop{background:rgba(15,23,42,.42);backdrop-filter:blur(4px);padding:18px}.modal{width:720px;border-radius:16px;box-shadow:0 24px 80px rgba(15,23,42,.22)}.modal.small{width:440px}.modal-header{min-height:56px;height:auto;padding:0 18px}.modal-header strong{font-size:15px}.modal-header button{width:34px;height:34px;border-radius:10px;background:#f8fafc;color:#64748b}.modal-header button:hover{background:#e2e8f0;color:#0f172a}.modal-body{padding:18px;gap:13px}.modal-actions{padding:14px 18px;border-top:1px solid var(--border);display:flex;gap:10px;justify-content:flex-end}.modal-body label,.auth-form label{gap:7px;font-weight:800;letter-spacing:.04em}.modal-body input,.modal-body select,.modal-body textarea,.auth-form input{min-height:42px;height:auto;border-radius:10px;padding:0 12px;font-size:13px}.modal-body input:focus,.modal-body select:focus,.modal-body textarea:focus,.auth-form input:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(26,110,247,.12)}.modal-body textarea{height:104px;padding:12px}.dialog-text{font-size:13px;line-height:1.6;color:#334155}.dialog-input{width:100%}
.auth-card{width:420px;border-radius:18px;padding:28px;box-shadow:0 24px 70px rgba(15,23,42,.12)}.auth-brand{gap:14px;margin-bottom:20px}.auth-brand span{width:48px;height:48px;border-radius:14px}.auth-brand h1{font-size:24px}.auth-brand p,.muted{font-size:13px}.auth-form{gap:14px}#authMsg{font-size:13px}.password-field input{padding-right:46px}.password-toggle{right:7px;width:32px;height:32px;border-radius:9px}.password-toggle svg{width:19px;height:19px}
.link-group{display:grid;gap:8px;border-bottom:1px solid var(--border-light);padding-bottom:12px}.link-group:last-child{border-bottom:0}.link-group-title{font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.06em;color:#475569;background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;padding:8px 10px}.link-list{display:grid;gap:8px}.link-url{font-family:'JetBrains Mono',monospace;font-size:12px;color:#2563eb;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.category-manager{display:grid;gap:14px}.category-list{display:grid;gap:8px}.category-row{display:grid;grid-template-columns:1fr auto auto;gap:8px;align-items:center}
.nav-caret{margin-left:8px;color:#94a3b8}.rbac-menu-tree{display:grid;gap:8px}.rbac-menu-tree.level-1,.rbac-menu-tree.level-2{margin-top:8px;margin-left:14px;padding-left:12px;border-left:2px solid #e2e8f0}.rbac-menu-node.level-0{background:#fff}.rbac-menu-node.level-1{background:#fbfdff}.rbac-menu-node.level-2{background:#f8fafc}.rbac-menu-line{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.rbac-menu-line small{display:block;margin-top:4px;color:var(--text-3)}
.dialog-text{white-space:pre-line}
@media(max-width:800px){#main{height:auto}.board-column{width:88vw;min-width:88vw}.col-actions .btn{min-height:34px;padding:0 12px}}

/* Compact mode */
:root{--header-h:44px}
body{font-size:12px}
#topbar{min-height:44px;height:44px;padding:0 10px;gap:8px}.logo{font-size:11px}.sep{height:18px}.profile-chip{padding-left:8px}.profile-chip span{font-size:12px}.profile-chip small{font-size:9px}.db-nav{gap:0}.nav-node>a{padding:0 9px;font-size:12px}.nav-children .nav-node>a{height:30px;font-size:12px}.nav-children{min-width:190px;border-radius:9px}
#main{height:calc(100vh - 44px)}.board-toolbar{min-height:48px;padding:7px 10px}.board-toolbar h1{font-size:15px}.board-toolbar p{font-size:11px}.tweetdeck-board{gap:8px;padding:8px}.board-column{width:315px;min-width:315px;border-radius:9px}.col-head{min-height:40px;padding:7px 8px;align-items:center}.col-head h2{font-size:13px;line-height:1.2}.col-actions{gap:4px}.col-body{padding:8px;gap:7px}.card{border-radius:8px;padding:8px;gap:5px}.card-title{font-size:12.5px}.card-meta,.link-url{font-size:11px}.card-content{font-size:12px;line-height:1.35}.card-actions{gap:4px}.chip{padding:2px 7px;font-size:10px}
.btn{min-height:32px;height:32px;padding:0 10px;border-radius:8px;font-size:12px;gap:5px;box-shadow:none}.btn.primary{box-shadow:none}.btn svg,.btn [data-lucide]{width:15px;height:15px;stroke-width:2}.icon-btn{width:30px;min-width:30px;height:30px;min-height:30px;padding:0}.icon-btn svg,.icon-btn [data-lucide]{width:15px;height:15px}
.modal{border-radius:12px}.modal.small{width:390px}.modal-header{min-height:44px;padding:0 12px}.modal-header strong{font-size:13px}.modal-header button{width:30px;height:30px}.modal-body{padding:12px;gap:9px}.modal-actions{padding:10px 12px;gap:8px}.modal-body label,.auth-form label{font-size:10px;gap:5px}.modal-body input,.modal-body select,.modal-body textarea,.auth-form input{min-height:36px;border-radius:8px;font-size:12px}.modal-body textarea{height:84px;padding:9px}.ql-container{min-height:140px}
.auth-card{width:380px;border-radius:14px;padding:20px}.auth-brand{gap:10px;margin-bottom:14px}.auth-brand span{width:40px;height:40px;border-radius:10px}.auth-brand h1{font-size:20px}.auth-brand p,.muted,#authMsg{font-size:12px}.auth-form{gap:10px}.password-toggle{width:28px;height:28px;border-radius:7px}.password-toggle svg{width:17px;height:17px}
.link-group{gap:6px;padding-bottom:8px}.link-group-title{font-size:10px;border-radius:8px;padding:6px 8px}.link-list{gap:6px}.category-row{grid-template-columns:1fr 30px 30px;gap:5px}.rbac-menu-tree{gap:6px}.rbac-menu-tree.level-1,.rbac-menu-tree.level-2{margin-top:6px;margin-left:10px;padding-left:9px}.rbac-menu-line{gap:6px}.rbac-menu-line small{font-size:10.5px}
.user-column{width:430px;min-width:430px}
@media(max-width:800px){#main{height:auto}.board-column{width:86vw;min-width:86vw}.col-actions .btn{min-height:30px;padding:0}.tweetdeck-board{height:calc(100vh - 92px)}}

/* Request feedback */
#appLoadingBar{position:fixed;top:0;left:0;right:0;height:3px;z-index:2000;display:none;background:rgba(26,110,247,.12);overflow:hidden}#appLoadingBar.show{display:block}#appLoadingBar span{display:block;width:38%;height:100%;background:var(--accent);border-radius:99px;animation:appLoad 1s ease-in-out infinite}@keyframes appLoad{0%{transform:translateX(-120%)}100%{transform:translateX(280%)}}body.is-loading{cursor:progress}.btn-loading{pointer-events:none;opacity:.82}.mini-spinner{width:13px;height:13px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;display:inline-block;animation:spinMini .65s linear infinite}@keyframes spinMini{to{transform:rotate(360deg)}}.toast.success{border-left-color:var(--ok)}

/* Mobile friendly layout */
@media(max-width:900px){
  body{height:auto;min-height:100vh;overflow:auto}
  #topbar{height:auto;min-height:46px;align-items:center;gap:7px;padding:6px 8px;position:sticky;top:0}
  .logo{flex:0 0 auto}
  .db-nav{display:flex;flex:1;min-width:0;overflow-x:auto;overflow-y:visible;gap:2px;padding-bottom:2px;scrollbar-width:none}
  .db-nav::-webkit-scrollbar{display:none}
  .nav-node{height:34px;flex:0 0 auto}
  .nav-node>a{height:34px;border-radius:8px;background:#f8fafc;padding:0 10px}
  .nav-children{position:fixed;top:46px;left:8px;right:8px;min-width:0;max-height:70vh;overflow:auto}
  .nav-children .nav-children{position:static;border:0;border-top:1px solid var(--border);box-shadow:none;margin-left:10px}
  .profile-chip{display:none}
  #main{height:auto;min-height:calc(100vh - 46px);overflow:visible}
  .board-shell{height:auto;min-height:calc(100vh - 46px)}
  .board-toolbar{position:sticky;top:46px;z-index:8;min-height:50px;padding:8px 10px;gap:8px}
  .board-toolbar h1{font-size:14px}
  .board-toolbar p{display:none}
  .tweetdeck-board{height:auto;min-height:calc(100vh - 96px);display:flex;flex-direction:column;overflow:visible;padding:8px;gap:8px}
  .board-column,.user-column{width:100%;min-width:0;max-width:none;height:auto;min-height:180px}
  .col-head{position:sticky;top:96px;z-index:5;background:#fff}
  .col-actions{flex-wrap:nowrap}
  .col-body{max-height:none;overflow:visible}
  .card{word-break:break-word}
  .card-actions{justify-content:flex-start}
  .modal-backdrop{align-items:flex-end;padding:0}
  .modal,.modal.small{width:100%;max-width:100vw;max-height:92vh;border-radius:14px 14px 0 0}
  .modal-header{min-height:46px;padding:0 12px}
  .modal-body{max-height:calc(92vh - 98px);overflow:auto;padding:12px}
  .modal-actions{padding:10px 12px}
  .category-row{grid-template-columns:1fr 34px 34px}
  #toastBox{left:10px;right:10px;top:56px;max-width:none}
}

@media(max-width:480px){
  .btn{min-height:34px;height:34px;padding:0 10px}
  .icon-btn{width:34px;min-width:34px;height:34px;min-height:34px}
  .auth-wrap{padding:12px}
  .auth-card{width:100%;padding:18px;border-radius:14px}
  .auth-brand h1{font-size:18px}
  .modal-body input,.modal-body select,.modal-body textarea,.auth-form input{font-size:16px}
  .link-url{white-space:normal;word-break:break-all}
  .rbac-menu-line{display:grid}
  .rbac-menu-tree.level-1,.rbac-menu-tree.level-2{margin-left:6px;padding-left:8px}
}

/* Burger navigation */
.mobile-menu-btn,.mobile-nav-head,.mobile-menu-overlay{display:none}
@media(max-width:900px){
  .mobile-menu-btn{display:inline-flex;flex:0 0 auto}
  #topbar{height:48px;min-height:48px;flex-wrap:nowrap;overflow:visible;padding:6px 10px}
  #topbar .sep{display:none}
  .logo{min-width:0;overflow:hidden;text-overflow:ellipsis;font-size:12px}
  .profile-chip{display:none}
  body.mobile-menu-open{overflow:hidden}
  body.mobile-menu-open::before{display:none}
  .mobile-menu-overlay{position:fixed;inset:0;z-index:800;background:rgba(15,23,42,.42);backdrop-filter:blur(2px)}
  body.mobile-menu-open .mobile-menu-overlay{display:block}
  .db-nav{display:flex;position:fixed;top:0;bottom:0;left:0;width:min(86vw,340px);height:100vh;z-index:900;overflow:auto;flex-direction:column;align-items:stretch;gap:4px;background:#fff;border-right:1px solid var(--border);box-shadow:18px 0 70px rgba(15,23,42,.28);padding:10px;transform:translateX(-105%);transition:transform .22s ease;scrollbar-width:thin}
  body.mobile-menu-open .db-nav{transform:translateX(0)}
  .mobile-nav-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:6px 2px 12px;margin-bottom:4px;border-bottom:1px solid var(--border)}
  .mobile-nav-head strong{display:block;font-size:14px;color:#0f172a}
  .mobile-nav-head small{display:block;margin-top:1px;font-size:11px;color:var(--text-3)}
  .db-nav .nav-node{display:block;height:auto;width:100%;position:static}
  .db-nav .nav-node>a{width:100%;height:40px;border-radius:10px;background:#fff;border:1px solid transparent;display:flex;align-items:center;justify-content:space-between;padding:0 11px;color:#1e293b;font-weight:700}
  .db-nav>.nav-node>a{background:#f8fafc;border-color:#eef2f7}
  .db-nav .nav-node>a:hover{background:#eff6ff;border-color:#dbeafe;color:#1d4ed8}
  .db-nav .nav-node.open>a{background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8}
  .db-nav .nav-caret{margin-left:auto;transition:transform .18s;color:#94a3b8}
  .db-nav .nav-node.open>a>.nav-caret{transform:rotate(90deg)}
  .db-nav .nav-children{display:none;position:static;min-width:0;max-height:none;box-shadow:none;border:0;border-left:2px solid #e2e8f0;border-radius:0;margin:5px 0 7px 12px;padding:3px 0 3px 8px;background:transparent;overflow:visible}
  .db-nav .nav-node.open>.nav-children{display:flex;flex-direction:column;gap:4px}
  .db-nav .nav-children .nav-node>a{height:36px;background:#fff;border-color:transparent;font-size:12px;font-weight:650}
  .db-nav .nav-children .nav-children{margin-left:10px;padding-left:8px}
  .board-toolbar{top:48px}
  .col-head{top:98px}
}
