:root {
  color-scheme: light;
  --bg: #f3f5fa;
  --surface: #fff;
  --surface-2: #f7f8fc;
  --text: #151827;
  --muted: #788096;
  --line: #e7e9f1;
  --primary: #6757e8;
  --primary-soft: #eeebff;
  --cyan: #44bed0;
  --sidebar: #171829;
  --shadow: 0 12px 36px rgba(35, 39, 67, .07);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e101a;
  --surface: #171a27;
  --surface-2: #202331;
  --text: #f4f4f8;
  --muted: #9da3b7;
  --line: #292d3e;
  --primary: #8b7cf6;
  --primary-soft: #282441;
  --cyan: #51c8d9;
  --sidebar: #11131e;
  --shadow: 0 14px 40px rgba(0, 0, 0, .2);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; transition: background .2s, color .2s; }
button, input, select { font: inherit; }
button { color: inherit; }
svg { width: 20px; height: 20px; fill: currentColor; }

.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 10; display: flex; width: 230px; flex-direction: column; padding: 30px 18px 22px; color: #aeb1c2; background: var(--sidebar); }
.brand { display: flex; align-items: center; gap: 11px; margin: 0 12px 42px; color: #fff; font-size: 23px; font-weight: 750; letter-spacing: -.8px; text-decoration: none; }
.brand-mark { display: flex; height: 27px; align-items: end; gap: 3px; }
.brand-mark i { display: block; width: 5px; border-radius: 4px; background: linear-gradient(#7b6cf6, #5fe0df); transform: skew(-8deg); }
.brand-mark i:nth-child(1) { height: 15px; }.brand-mark i:nth-child(2) { height: 25px; }.brand-mark i:nth-child(3) { height: 20px; }
nav { display: grid; gap: 8px; }
.nav-item { display: flex; width: 100%; align-items: center; gap: 13px; padding: 12px 14px; border: 0; border-radius: 10px; color: inherit; background: transparent; cursor: pointer; font-weight: 600; text-decoration: none; text-align: left; }
.nav-item svg { width: 19px; }
.nav-item:hover, .nav-item.active { color: #fff; background: rgba(255,255,255,.08); }
.nav-item.active { box-shadow: inset 3px 0 #8275f5; background: linear-gradient(90deg, rgba(114,96,239,.25), rgba(114,96,239,.07)); }
.sidebar-bottom { display: grid; gap: 12px; margin-top: auto; }
.storage-card { display: flex; align-items: flex-start; gap: 10px; padding: 13px; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; background: rgba(255,255,255,.04); }
.storage-card strong, .storage-card small { display: block; }.storage-card strong { color: #eeeef5; font-size: 12px; }.storage-card small { margin-top: 3px; font-size: 11px; }
.status-dot { width: 8px; height: 8px; flex: 0 0 auto; margin-top: 5px; border-radius: 50%; background: #43d49d; box-shadow: 0 0 0 4px rgba(67,212,157,.12); }
.language-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 3px; border: 1px solid rgba(255,255,255,.08); border-radius: 9px; background: rgba(255,255,255,.04); }.language-switch button { padding: 6px 0; border: 0; border-radius: 6px; color: #8f93a8; background: transparent; cursor: pointer; font-size: 10px; font-weight: 800; }.language-switch button:hover { color: #fff; }.language-switch button.active { color: #fff; background: rgba(123,108,246,.3); }
.theme-button { display: flex; align-items: center; gap: 10px; padding: 10px 13px; border: 0; color: inherit; background: transparent; cursor: pointer; }.theme-button:hover { color: #fff; }.theme-button .moon { display: none; }[data-theme="dark"] .theme-button .sun { display: none; }[data-theme="dark"] .theme-button .moon { display: block; }
.logout-button { width: 100%; }.logout-button:hover { color: #ff9dab; }

main { min-width: 0; margin-left: 230px; padding: 32px 38px 54px; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 25px; }
.eyebrow { margin: 0 0 3px; color: var(--primary); font-size: 10px; font-weight: 800; letter-spacing: 1.8px; }
h1 { margin: 0; font-size: 28px; line-height: 1.2; letter-spacing: -.8px; }
.header-actions { display: flex; gap: 10px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 41px; padding: 0 16px; border: 1px solid transparent; border-radius: 10px; cursor: pointer; font-weight: 700; transition: transform .15s, box-shadow .15s; }
.button:hover { transform: translateY(-1px); }.button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.button.primary { color: #fff; background: linear-gradient(135deg, #7263ed, #5c4bd7); box-shadow: 0 8px 20px rgba(103,87,232,.22); }

.filter-card { padding: 17px 20px 20px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow); }
.periods { display: flex; gap: 4px; margin-bottom: 17px; border-bottom: 1px solid var(--line); }
.period { position: relative; padding: 3px 16px 13px; border: 0; color: var(--muted); background: none; cursor: pointer; font-size: 13px; font-weight: 650; }
.period.active { color: var(--primary); }.period.active::after { position: absolute; right: 11px; bottom: -1px; left: 11px; height: 2px; border-radius: 2px; background: var(--primary); content: ""; }
.filters { display: grid; grid-template-columns: 145px 145px minmax(180px, 1fr) minmax(180px, 1fr) minmax(180px, 1fr); gap: 12px; }
label > span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .5px; text-transform: uppercase; }
input, select { width: 100%; height: 39px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; outline: 0; color: var(--text); background: var(--surface-2); }
input:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent); }
.search-field { position: relative; }.search-field input { padding-right: 34px; }.search-field svg { position: absolute; right: 10px; bottom: 9px; width: 18px; color: var(--muted); }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin: 20px 0; }
.kpi { display: flex; min-width: 0; align-items: center; gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow); }
.kpi.featured { color: #fff; border-color: transparent; background: linear-gradient(135deg, #7566ec, #5443d0); box-shadow: 0 12px 30px rgba(87,70,211,.2); }
.kpi-icon { display: grid; width: 44px; height: 44px; flex: 0 0 auto; place-items: center; border-radius: 12px; color: var(--primary); background: var(--primary-soft); font-size: 29px; }.kpi-icon svg { width: 22px; }.featured .kpi-icon { color: #fff; background: rgba(255,255,255,.14); }.kpi-icon.team { color: #bd6eba; background: #faedf9; }.kpi-icon.average { color: #2a9db2; background: #e8f8fa; }[data-theme="dark"] .kpi-icon.team,[data-theme="dark"] .kpi-icon.average { background: var(--surface-2); }
.kpi small { display: block; color: var(--muted); font-size: 11px; font-weight: 650; }.featured small { color: rgba(255,255,255,.75); }
.kpi strong { display: block; margin: 2px 0 1px; overflow: hidden; font-size: clamp(21px, 2vw, 27px); letter-spacing: -.6px; text-overflow: ellipsis; white-space: nowrap; }.kpi p { margin: 0; color: var(--muted); font-size: 10px; }.featured p { color: rgba(255,255,255,.65); }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, .8fr); gap: 20px; margin-bottom: 20px; }
.panel { border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 10px; }.panel-heading h2 { margin: 0 0 3px; font-size: 15px; }.panel-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.legend { color: var(--muted); font-size: 11px; }.legend i { display: inline-block; width: 7px; height: 7px; margin-right: 4px; border-radius: 50%; background: var(--primary); }
.count-badge { display: grid; min-width: 29px; height: 25px; place-items: center; border-radius: 8px; color: var(--primary); background: var(--primary-soft); font-size: 11px; font-weight: 800; }
.chart { display: flex; height: 245px; align-items: end; gap: clamp(6px, 1vw, 14px); padding: 30px 22px 20px; overflow-x: auto; border-radius: 0 0 15px 15px; background: linear-gradient(to top, color-mix(in srgb, var(--line) 35%, transparent) 1px, transparent 1px); background-size: 100% 25%; }
.bar-item { display: flex; min-width: 28px; height: 100%; flex: 1; flex-direction: column; justify-content: end; align-items: center; gap: 8px; }.bar { position: relative; width: min(68%, 36px); min-height: 3px; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, #8678f5, #6050dc); cursor: help; transition: filter .15s; }.bar:hover { filter: brightness(1.12); }.bar::before { position: absolute; bottom: calc(100% + 5px); left: 50%; padding: 3px 6px; border-radius: 5px; color: #fff; background: #252638; content: attr(data-value); font-size: 9px; opacity: 0; pointer-events: none; transform: translateX(-50%); white-space: nowrap; }.bar:hover::before { opacity: 1; }.bar-item span { color: var(--muted); font-size: 9px; white-space: nowrap; }
.rank-list { padding: 5px 22px 18px; }.rank { padding: 11px 0; border-bottom: 1px solid var(--line); }.rank:last-child { border: 0; }.rank-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }.rank-name { overflow: hidden; font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }.rank-time { flex: 0 0 auto; font-size: 11px; font-weight: 750; }.progress { height: 5px; overflow: hidden; border-radius: 5px; background: var(--surface-2); }.progress i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--primary), var(--cyan)); }

.details-panel { overflow: hidden; }.details-panel .panel-heading h2 { font-size: 17px; }.details-panel .panel-heading p { font-size: 12px; }.table-heading { padding-bottom: 16px; }.table-tabs { display: flex; padding: 3px; border-radius: 9px; background: var(--surface-2); }.table-tabs button { padding: 7px 12px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; cursor: pointer; font-size: 12px; font-weight: 650; }.table-tabs button.active { color: var(--text); background: var(--surface); box-shadow: 0 2px 8px rgba(30,35,60,.08); }
.project-breakdown { display: grid; gap: 12px; padding: 4px 22px 22px; }.project-group { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }.project-group summary { display: grid; grid-template-columns: minmax(180px, 1.2fr) minmax(140px, 1fr) 95px 18px; gap: 18px; align-items: center; padding: 16px 17px; cursor: pointer; list-style: none; }.project-group summary::-webkit-details-marker { display: none; }.project-title { display: flex; min-width: 0; align-items: center; gap: 10px; font-size: 14px; font-weight: 750; }.project-title i { display: grid; width: 31px; height: 31px; flex: 0 0 auto; place-items: center; border-radius: 8px; color: var(--primary); background: var(--primary-soft); font-size: 10px; font-style: normal; }.project-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.project-total { font-size: 13px; font-weight: 800; text-align: right; }.chevron { color: var(--muted); transition: transform .2s; }.project-group[open] .chevron { transform: rotate(180deg); }.project-body { border-top: 1px solid var(--line); }.employee-row { display: grid; grid-template-columns: minmax(180px, 1.2fr) minmax(140px, 1fr) 95px 18px; gap: 18px; align-items: center; padding: 13px 17px 13px 35px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); }.employee-row .person { font-size: 13px; }.mini-progress { height: 7px; overflow: hidden; border-radius: 6px; background: var(--surface-2); }.mini-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--cyan)); }.employee-time { font-size: 12px; font-weight: 750; text-align: right; }.task-row { display: grid; grid-template-columns: minmax(180px, 1.2fr) minmax(140px, 1fr) 95px 18px; gap: 18px; align-items: center; padding: 11px 17px 11px 73px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }.task-row:last-child { border-bottom: 0; }.task-row a { overflow: hidden; color: var(--text); text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }.task-row a:hover { color: var(--primary); }.task-row .mini-progress i { background: var(--cyan); }.task-row .employee-time { color: var(--text); }
.table-wrap { overflow: auto; border-top: 1px solid var(--line); }table { width: 100%; border-collapse: collapse; }th, td { padding: 12px 17px; border-bottom: 1px solid var(--line); text-align: left; }th { color: var(--muted); background: var(--surface-2); font-size: 9px; letter-spacing: .55px; text-transform: uppercase; }td { font-size: 12px; }tbody tr:last-child td { border-bottom: 0; }tbody tr:hover { background: color-mix(in srgb, var(--primary) 3%, transparent); }.person { display: flex; align-items: center; gap: 9px; font-weight: 650; }.avatar { display: grid; width: 28px; height: 28px; flex: 0 0 auto; place-items: center; border-radius: 9px; color: #fff; background: var(--avatar); font-size: 9px; font-weight: 800; }.task-cell { max-width: 330px; }.task-cell span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.task-cell a { color: var(--primary); font-size: 10px; text-decoration: none; }.time-cell { font-weight: 750; white-space: nowrap; }.empty { padding: 40px !important; color: var(--muted); text-align: center; }

dialog { width: min(520px, calc(100% - 30px)); padding: 30px; border: 1px solid var(--line); border-radius: 20px; color: var(--text); background: var(--surface); box-shadow: 0 30px 80px rgba(12,13,25,.3); text-align: center; }dialog::backdrop { background: rgba(12,13,25,.55); backdrop-filter: blur(4px); }.dialog-close { position: absolute; top: 13px; right: 15px; border: 0; color: var(--muted); background: transparent; cursor: pointer; font-size: 25px; }.upload-symbol { display: grid; width: 52px; height: 52px; margin: 0 auto 14px; place-items: center; border-radius: 15px; color: var(--primary); background: var(--primary-soft); }dialog h2 { margin: 0 0 6px; font-size: 20px; }dialog > p { margin: 0 auto 20px; color: var(--muted); font-size: 12px; }.dropzone { display: grid; min-height: 145px; place-content: center; border: 1.5px dashed color-mix(in srgb, var(--primary) 50%, var(--line)); border-radius: 14px; background: var(--surface-2); cursor: pointer; }.dropzone.dragging { border-color: var(--primary); background: var(--primary-soft); }.dropzone input { display: none; }.dropzone strong { margin-bottom: 4px; }.dropzone span { color: var(--muted); font-size: 11px; }.file-list { max-height: 110px; margin: 12px 0; overflow: auto; text-align: left; }.file-row { display: flex; justify-content: space-between; padding: 7px 9px; border-bottom: 1px solid var(--line); font-size: 11px; }.file-row span:last-child { color: var(--muted); }.import-submit { width: 100%; margin-top: 4px; }
.toast { position: fixed; right: 25px; bottom: 25px; z-index: 30; max-width: 390px; padding: 13px 17px; border-radius: 11px; color: #fff; background: #252638; box-shadow: 0 12px 30px rgba(0,0,0,.2); opacity: 0; pointer-events: none; transform: translateY(12px); transition: .2s; }.toast.show { opacity: 1; transform: translateY(0); }.toast.error { background: #a83f55; }
.loading { opacity: .55; pointer-events: none; }

.login-page { display: grid; min-height: 100vh; margin: 0; place-items: center; padding: 24px; background: radial-gradient(circle at 25% 15%, #ece9ff 0, transparent 30%), radial-gradient(circle at 80% 90%, #dcf7f8 0, transparent 28%), var(--bg); }.login-card { width: min(420px, 100%); margin: 0; padding: 38px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.92); box-shadow: 0 30px 80px rgba(55,50,105,.14); backdrop-filter: blur(18px); }.login-brand { margin: 0 0 42px; color: var(--text); }.login-card h1 { margin-bottom: 8px; }.login-hint { margin: 0 0 25px; color: var(--muted); }.login-form { display: grid; gap: 17px; }.login-form .button { margin-top: 4px; }.login-error { margin: -7px 0 18px; padding: 10px 12px; border: 1px solid #f1bdc5; border-radius: 9px; color: #9d3043; background: #fff0f2; font-size: 12px; }.login-footer { display: block; margin-top: 25px; color: var(--muted); text-align: center; }

@media (max-width: 1050px) { .filters { grid-template-columns: repeat(2, 1fr); }.search-field { grid-column: span 2; }.kpi-grid { grid-template-columns: repeat(2, 1fr); }.content-grid { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .sidebar { position: static; width: 100%; height: auto; padding: 16px; }.brand { margin: 0 0 15px; }.sidebar nav { grid-template-columns: repeat(3, 1fr); }.nav-item { justify-content: center; padding: 10px 6px; font-size: 11px; }.sidebar-bottom { display: none; }main { margin: 0; padding: 22px 15px 40px; }.topbar { align-items: flex-end; }.button { padding: 0 12px; }.filter-card { padding: 14px; }.filters { grid-template-columns: 1fr 1fr; }.filters label:nth-child(3), .filters label:nth-child(4), .search-field { grid-column: span 2; }.period { flex: 1; padding-inline: 5px; }.kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }.kpi { padding: 15px; }.kpi-icon { display: none; }.panel-heading { padding-inline: 16px; }.chart { padding-inline: 16px; }.rank-list { padding-inline: 16px; }.project-breakdown { padding-inline: 12px; }.project-group summary,.employee-row,.task-row { grid-template-columns: minmax(150px, 1fr) 75px 15px; gap: 8px; }.project-group summary .mini-progress,.employee-row .mini-progress,.task-row .mini-progress { display: none; }.employee-row { padding-left: 25px; }.task-row { padding-left: 61px; }.table-tabs { overflow-x: auto; }.table-tabs button { white-space: nowrap; } }
@media (max-width: 430px) { .kpi-grid { grid-template-columns: 1fr; }.header-actions .button svg { display: none; }h1 { font-size: 24px; } }
