:root {
  --bg: #090909;
  --panel: #141414;
  --panel2: #1d1d1d;
  --line: #38312d;
  --text: #fffaf5;
  --muted: #b9b1aa;
  --mint: #ff7a1a;
  --violet: #ffb37a;
  --orange: #ff7a1a;
  --blue: #fffaf5;
  --red: #ff5b20;
}
html, body { font-size: 16px; line-height: 1.5; }
button, input, select, textarea { font-size: 15px; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #ff8c31;
  outline-offset: 2px;
}
.sidebar { width: 264px; background: #0b0b0b; }
.app { grid-template-columns: 264px minmax(0, 1fr); }
.brand { font-size: 18px; }
.brand small { color: #ffa161; font-size: 10px; }
.nav-label { color: #bbaea4; font-size: 11px; }
.nav-item { height: 47px; color: #d7d0ca; font-size: 15px; }
.nav-item b { font-weight: 600; }
.nav-item em, .nav-item i, .nav-item.active { background: #302014; color: #ffad70; }
.nav-item.active b { color: #fff; }
.create-btn { font-size: 14px; background: #ff7a1a; color: #0c0c0c; }
.create-btn kbd, .storage, .notification { display: none; }
.workspace { font-size: 13px; }
.workspace small, .profile small { font-size: 11px; }
.profile > span:nth-child(2), .profile b { font-size: 13px; }
.page { padding: 30px 34px 48px; }
.page-head h1 { font-size: clamp(27px, 2.3vw, 36px); }
.page-head p, .panel-head p { font-size: 15px; line-height: 1.5; }
.breadcrumb { font-size: 11px; color: #c7b9af; }
.primary, .secondary { min-height: 42px; font-size: 14px; }
.secondary, .lang-btn, .round-btn, .profile { background: #1a1715; border-color: #514035; color: #fff5ec; }
.panel, .kpi { background: #141414; border-color: #3b322c; }
.panel-head h3 { font-size: 17px; }
.kpi p { font-size: 12px; color: #d0b8a7; }
.kpi h2 { font-size: 28px; color: #fff; }
#page-home .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi small, .panel small, .page small { font-size: 12px; color: #c0b8b0; }
.role-kpi { font-size: 20px !important; text-transform: uppercase; }
.data-status { font-size: 13px; color: #ffcfaa; background: #21150d; border-color: #75401e; }
.status-pill { color: #ffb475; background: #21160e; border-color: #714021; }
.status-pill i { background: #ff7a1a; }
.login-box label, .login-box p, .auth-hint, .auth-message, .legal { font-size: 13px !important; }
.login-box input { font-size: 15px; }
.login-box h2 { font-size: 28px; }
.login-box .password-visibility, .auth-form-meta button { font-size: 12px; }
.invite-register { display: block; width: 100%; border: 0; background: transparent; color: #ffad72; padding: 11px 0 2px; text-align: center; font-size: 13px; }
.invite-register:hover { text-decoration: underline; }
.invite-register:disabled { opacity: .5; cursor: not-allowed; }
.avatar, .person-avatar, .pink, .blue-bg, .orange-bg, .violet-bg { background: #3b210f !important; color: #ffb979 !important; }
.mint, .violet, .orange, .blue, .up, .down, .tag, .state, .role-icon, .store-icon, .thumb { background: #332014 !important; color: #ffad72 !important; }
.connected, .warning, .available, .beta, .good, .risk { color: #ffad72 !important; }
.zalo, .facebook, .youtube, .tiktok, .shopee, .wechat, .momo, .vnpay, .stripe { background: #40200d !important; color: #ffb979 !important; }
.mint-line, .violet-line { stroke: #ff7a1a; }
.violet-line { opacity: .55; }
#page-home svg stop { stop-color: #ff7a1a; }
.global-search { border-color: #4b3a2d; }
.global-search input { font-size: 13px; }
.lang-menu, .lang-menu button:hover { background: #201811; }
.access-page h2, .access-page h3 { margin: 0; }
.access-page h2 { font-size: 19px; }
.access-page h3 { font-size: 16px; }
.access-page p, .access-page label, .access-page button, .access-page select, .access-page input, .access-page textarea { font-size: 15px; }
.generic-page:not(#page-progress)::before { content: 'BẢN XEM TRƯỚC GIAO DIỆN · CHƯA KẾT NỐI DỮ LIỆU'; display: block; margin-bottom: 18px; padding: 12px 15px; color: #ffcfaa; background: #21150d; border: 1px solid #75401e; border-radius: 10px; font-size: 14px; font-weight: 700; }
.generic-page:not(#page-progress) button { pointer-events: none; opacity: .62; }
.progress-live-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin: 20px 0; }
.progress-live-grid .panel { padding: 20px; }
.progress-live-grid b { display: block; font-size: 30px; color: #fff; }
.progress-live-grid small { color: #ffac70; }
.progress-project-list { display: grid; gap: 10px; margin-top: 18px; }
.progress-project-list button { display: flex; justify-content: space-between; width: 100%; padding: 14px 16px; border: 1px solid #704123; border-radius: 10px; background: #20160f; color: #fff; text-align: left; }
.progress-project-list button:hover { border-color: #ff7a1a; }
.access-notice { margin: 0 0 18px; padding: 12px 16px; color: #f4c9a8; background: #21160f; border: 1px solid #79401d; border-radius: 10px; }
.access-layout, .project-workspace { display: grid; grid-template-columns: minmax(270px, 320px) minmax(0, 1fr); gap: 16px; align-items: start; }
.access-people, .project-tree-panel { position: sticky; top: 83px; max-height: calc(100vh - 104px); overflow: auto; }
.access-detail, .project-detail-panel { min-height: 500px; }
.access-section-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.access-section-title span { font-size: 12px; color: #c1b4a8; }
.access-list { margin-bottom: 26px; }
.person-row, .tree-node { display: flex; align-items: center; gap: 10px; width: 100%; border: 1px solid transparent; border-radius: 9px; padding: 10px; color: #fff6ef; background: transparent; text-align: left; }
.person-row:hover, .person-row.selected, .tree-node:hover, .tree-node.selected { border-color: #7e441f; background: #24170f; }
.person-row > span:nth-child(2) { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.person-row b, .tree-node b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #bdb1a6; }
.person-row em { color: #ffa261; font-size: 12px; font-style: normal; }
.person-avatar { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; font-weight: 700; }
.access-empty { min-height: 390px; display: grid; place-items: center; text-align: center; color: #c0b5ac; font-size: 15px; padding: 28px; }
.access-form-head, .detail-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding-bottom: 18px; border-bottom: 1px solid #423329; }
.access-form-head p, .detail-head p { margin: 5px 0 0; color: #c8bdb4; }
.access-kicker { margin: 0 0 5px !important; color: #ff8b32 !important; font-size: 11px !important; font-weight: 700; letter-spacing: 1.3px; }
.access-state { flex: none; color: #ffb071; background: #2f1d11; border: 1px solid #674025; border-radius: 20px; padding: 5px 10px; font-size: 12px; }
.access-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0 24px; }
.access-fields label, .detail-form label { display: flex; flex-direction: column; gap: 7px; color: #ead9cb; font-weight: 600; }
.access-fields input, .access-fields select, .detail-form input, .detail-form textarea, .new-folder-form input, .new-item-form input, .new-item-form textarea, .work-item select { width: 100%; min-height: 42px; border: 1px solid #604735; border-radius: 8px; padding: 9px 12px; color: #fff; background: #0e0e0e; }
.access-fields select option, .grant-row option, .work-item option { background: #171717; color: #fff; }
.access-toolbar { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 24px 0 10px; }
.access-toolbar span, .grant-hint { color: #c2b5a9; font-size: 12px !important; }
.grant-list { border: 1px solid #43362d; border-radius: 10px; overflow: hidden; }
.grant-row { display: grid; grid-template-columns: minmax(0, 1fr) 78px 78px; align-items: center; gap: 12px; min-height: 51px; padding: 7px 12px 7px calc(12px + var(--depth, 0) * 20px); border-bottom: 1px solid #342a24; }
.grant-row:last-child { border-bottom: 0; }
.grant-row:nth-child(odd) { background: #191614; }
.grant-row span { font-weight: 600; }
.grant-row label { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; cursor: pointer; font-size: 12px !important; }
.grant-row input[type='checkbox'] { flex: none; }
.access-form-footer { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 24px; }
.access-disable { display: flex; align-items: center; gap: 8px; color: #e7d1c1; }
.access-disable input, .access-page input[type='checkbox'] { accent-color: #ff7a1a; width: 18px; height: 18px; }
.access-feedback { min-height: 20px; margin-top: 14px; color: #ffb77c; }
.access-feedback.error { color: #ff784a; }
.tree-group { border-bottom: 1px solid #352b24; padding: 7px 0; }
.tree-node { padding-left: calc(10px + var(--depth, 0) * 18px); min-height: 42px; }
.tree-node span { color: #ff8a31; font-size: 18px; }
.tree-project { font-size: 15px !important; }
.tree-folder { color: #e6d7cc; }
.detail-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; align-items: end; gap: 12px; padding: 22px 0; border-bottom: 1px solid #413227; }
.detail-form textarea { height: 44px; resize: vertical; }
.new-folder-form { margin: 22px 0; padding: 18px; background: #20160f; border: 1px solid #633a21; border-radius: 10px; }
.new-folder-form p { color: #c9b6a6; margin: 6px 0 12px; }
.new-folder-form > div { display: flex; gap: 9px; }
.new-folder-form input { flex: 1; }
.detail-tasks { margin-top: 24px; }
.new-item-form { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 9px; margin-top: 16px; align-items: start; }
.new-item-form textarea { min-height: 42px; height: 42px; resize: vertical; }
.work-item { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(110px, 140px); gap: 12px; align-items: center; border-top: 1px solid #3b2f28; padding: 13px 0; }
.work-item p { color: #c7b9ae; margin: 4px 0 0; white-space: pre-wrap; }
.work-status { color: #ffb77c; white-space: nowrap; font-size: 12px; }
.work-item:has(> select) { grid-template-columns: minmax(0, 1fr) auto minmax(110px, 140px); }
.work-item:not(:has(> select)) { grid-template-columns: minmax(0, 1fr) auto; }
.empty-copy { color: #c5b6ab; line-height: 1.6; }
.home-projects { display: grid; gap: 6px; margin-top: 16px; }
.home-projects button { display: flex; justify-content: space-between; border: 1px solid #4e3828; border-radius: 9px; padding: 12px; color: #fff; background: #201810; text-align: left; }
.home-projects button:hover { border-color: #ff7a1a; }
.home-projects span { color: #ff7a1a; }
.project-dialog { width: min(520px, calc(100% - 28px)); max-height: calc(100vh - 28px); overflow: auto; background: #141414; color: #fffaf5; border: 1px solid #744321; border-radius: 18px; padding: 26px; box-shadow: 0 30px 100px #000; }
.project-dialog::backdrop { background: #000b; backdrop-filter: blur(5px); }
.project-dialog h2 { font-size: 24px; margin: 8px 0 5px; }
.project-dialog p { color: #c4b7ad; margin: 0 0 18px; }
.project-dialog label { display: flex; flex-direction: column; gap: 7px; margin: 13px 0; color: #f5ded0; font-weight: 600; }
.project-dialog input, .project-dialog textarea { width: 100%; border: 1px solid #604735; border-radius: 8px; background: #0c0c0c; color: #fff; padding: 10px 12px; }
.project-dialog textarea { min-height: 92px; resize: vertical; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; }
.dialog-head button { background: transparent; border: 0; color: #fff; font-size: 26px; }
.dialog-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: #3a210f; color: #ff9b53; font-size: 24px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
#projectDialogFeedback { min-height: 18px; margin: 10px 0 0; color: #ff9f72; }
@media (max-width: 1050px) {
  #page-home .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .access-layout, .project-workspace { grid-template-columns: minmax(230px, 280px) minmax(0, 1fr); }
  .detail-form, .new-item-form { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .progress-live-grid { grid-template-columns: 1fr; }
  #page-home .kpi-grid { grid-template-columns: 1fr; }
  .app { grid-template-columns: 1fr; }
  .sidebar { width: 264px; }
  .page { padding: 20px 15px 35px; }
  .access-layout, .project-workspace { grid-template-columns: 1fr; }
  .access-people, .project-tree-panel { position: static; max-height: none; }
  .access-fields { grid-template-columns: 1fr; }
  .grant-row { grid-template-columns: minmax(0, 1fr) 55px 55px; gap: 7px; }
  .access-form-head, .detail-head { flex-direction: column; }
  .new-folder-form > div, .access-form-footer { align-items: stretch; flex-direction: column; }
  .work-item { grid-template-columns: 1fr !important; }
}
