:root {
  --navy: #10131b;
  --navy-2: #171b26;
  --blue: #1b49e8;
  --blue-dark: #1237b3;
  --blue-soft: #eaf0ff;
  --orange: #f2a33a;
  --green: #21a676;
  --red: #e2574c;
  --ink: #171923;
  --muted: #727787;
  --line: #e7e9ef;
  --surface: #fff;
  --canvas: #f5f6f8;
  --radius: 16px;
  --shadow: 0 12px 40px rgba(17, 22, 39, .08);
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body { margin: 0; min-height: 100vh; color: var(--ink); font-family: "DM Sans", sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.eyebrow { margin: 0 0 8px; color: var(--blue); font: 700 11px/1.2 "Manrope", sans-serif; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow.light { color: #94abff; }
.muted { color: var(--muted); }

/* Successful login transition */
.loading-screen { position: fixed; z-index: 200; inset: 0; display: grid; place-items: center; overflow: hidden; padding: 24px; color: #fff; background: var(--navy); transition: opacity .35s ease, visibility .35s ease; }
.loading-screen::before, .loading-screen::after { position: absolute; content: ""; border-radius: 50%; }
.loading-screen::before { width: 560px; height: 560px; right: -170px; bottom: -240px; border: 1px solid rgba(84,119,255,.28); box-shadow: 0 0 0 90px rgba(40,74,210,.055), 0 0 0 180px rgba(40,74,210,.035); }
.loading-screen::after { width: 340px; height: 340px; left: -190px; top: -170px; background: radial-gradient(circle, rgba(42,79,230,.22), transparent 68%); }
.loading-screen.leaving { opacity: 0; visibility: hidden; }
.loading-card { position: relative; z-index: 1; width: min(100%, 430px); text-align: center; animation: loading-rise .5s ease both; }
.loading-logo { width: 220px; height: 78px; margin: 0 auto 38px; overflow: hidden; }
.loading-logo img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0) invert(1); }
.loading-mark { display: flex; height: 28px; align-items: end; justify-content: center; gap: 5px; margin-bottom: 25px; }
.loading-mark span { width: 5px; border-radius: 5px; background: #6685ff; animation: loading-bars .85s ease-in-out infinite alternate; }
.loading-mark span:nth-child(1) { height: 12px; }
.loading-mark span:nth-child(2) { height: 24px; animation-delay: .16s; }
.loading-mark span:nth-child(3) { height: 17px; animation-delay: .32s; }
.loading-card h1 { margin: 0 0 10px; font: 800 31px/1.2 "Manrope", sans-serif; letter-spacing: -.04em; }
.loading-card > p:not(.eyebrow) { margin: 0; color: #a7adbb; font-size: 13px; }
.loading-track { position: relative; width: 240px; height: 3px; margin: 30px auto 18px; overflow: hidden; border-radius: 9px; background: rgba(255,255,255,.1); }
.loading-track span { position: absolute; width: 45%; height: 100%; left: -45%; border-radius: inherit; background: linear-gradient(90deg, #3157ee, #7893ff); animation: loading-track 1.1s ease-in-out infinite; }
.loading-card small { color: #5f6675; font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
@keyframes loading-bars { to { height: 7px; opacity: .45; } }
@keyframes loading-track { 0% { left: -45%; } 100% { left: 100%; } }
@keyframes loading-rise { from { opacity: 0; transform: translateY(10px); } }

/* Authentication */
.auth-screen { display: grid; min-height: 100vh; grid-template-columns: minmax(460px, 1.12fr) minmax(440px, .88fr); }
.auth-brand { position: relative; display: flex; flex-direction: column; overflow: hidden; padding: 54px 7vw 48px; color: #fff; background: var(--navy); }
.auth-brand::before { position: absolute; width: 520px; height: 520px; content: ""; right: -170px; bottom: -140px; border: 1px solid rgba(75,110,255,.35); border-radius: 50%; box-shadow: 0 0 0 75px rgba(40,74,210,.07), 0 0 0 150px rgba(40,74,210,.045); }
.auth-brand::after { position: absolute; inset: 0; content: ""; opacity: .2; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(to bottom, transparent, #000); }
.auth-logo { position: relative; z-index: 1; width: 245px; height: 85px; object-fit: cover; object-position: center; filter: brightness(0) invert(1); }
.auth-copy { position: relative; z-index: 1; max-width: 650px; margin: auto 0; }
.auth-copy h1 { margin: 0 0 28px; font: 800 clamp(48px, 5vw, 78px)/1.02 "Manrope", sans-serif; letter-spacing: -.055em; }
.auth-copy h1 span { color: #5579ff; }
.auth-copy > p:last-child { max-width: 510px; margin: 0; color: #b8bdc9; font-size: 17px; line-height: 1.7; }
.auth-proof { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; color: #8f96a8; font-size: 12px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #50d59a; box-shadow: 0 0 0 5px rgba(80,213,154,.12); }
.auth-panel { display: grid; place-items: center; padding: 48px; background: #fff; }
.auth-form { width: min(100%, 420px); }
.auth-form h2 { margin: 0 0 8px; font: 800 36px/1.2 "Manrope", sans-serif; letter-spacing: -.04em; }
.auth-form > .muted { margin: 0 0 34px; font-size: 14px; }
.auth-form > label { display: block; margin: 0 0 20px; color: #363a48; font-size: 13px; font-weight: 700; }
.auth-form input { width: 100%; height: 52px; margin-top: 8px; padding: 0 16px; border: 1px solid #dfe2e8; border-radius: 10px; outline: none; background: #fafbfc; transition: .2s; }
.auth-form input:focus, .form-control:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(27,73,232,.1); background: #fff; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 48px; }
.password-toggle { position: absolute; right: 6px; bottom: 5px; border: 0; }
.form-row { display: flex; align-items: center; justify-content: space-between; margin: -2px 0 24px; font-size: 12px; }
.check { display: flex; align-items: center; gap: 7px; color: var(--muted); }
.check input { width: 15px; height: 15px; margin: 0; accent-color: var(--blue); }
.link-button { padding: 0; color: var(--blue); border: 0; background: none; font-weight: 700; }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 16px; min-height: 46px; padding: 0 20px; color: #fff; border: 0; border-radius: 9px; background: var(--blue); font-weight: 700; box-shadow: 0 8px 18px rgba(27,73,232,.2); transition: .2s; }
.primary-button:hover { transform: translateY(-1px); background: var(--blue-dark); }
.primary-button.danger-button { background: #bd3e35; box-shadow: 0 8px 18px rgba(189,62,53,.2); }
.primary-button.danger-button:hover { background: #a8322a; }
.secondary-button.danger { color: #a8322a; border-color: #efc4c0; background: #fff7f6; }
.secondary-button.danger:hover { background: #ffecea; }
.auth-submit { width: 100%; height: 54px; justify-content: space-between; padding: 0 20px; }
.demo-access { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 24px 0 0; padding: 17px; border-radius: 12px; background: #f5f7fc; }
.demo-access > span { grid-column: 1/-1; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.demo-access button { padding: 9px; color: var(--blue); border: 1px solid #dae2ff; border-radius: 7px; background: #fff; font-size: 12px; font-weight: 700; }
.auth-help { margin: 25px 0 0; color: #9297a4; font-size: 12px; text-align: center; }
.mobile-brand { display: none; }

/* App shell */
.app-shell { display: flex; min-height: 100vh; background: var(--canvas); }
.sidebar { position: fixed; z-index: 20; display: flex; width: 244px; height: 100vh; flex-direction: column; padding: 22px 14px 18px; color: #bbc0cd; background: var(--navy); }
.sidebar-brand { display: block; height: 58px; margin: 0 8px 22px; overflow: hidden; }
.sidebar-brand img { width: 178px; height: 62px; object-fit: cover; filter: brightness(0) invert(1); }
.main-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-label { margin: 16px 12px 8px; color: #606676; font-size: 9px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.nav-item { display: flex; align-items: center; width: 100%; gap: 12px; min-height: 44px; padding: 0 13px; color: #9298a7; border: 0; border-radius: 8px; background: none; font-size: 13px; font-weight: 600; text-align: left; transition: .16s; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.05); }
.nav-item.active { color: #fff; background: var(--blue); box-shadow: 0 5px 17px rgba(27,73,232,.22); }
.nav-icon { display: grid; width: 20px; place-items: center; font-size: 16px; }
.sidebar-bottom { margin-top: auto; }
.support-card { display: flex; align-items: center; gap: 10px; margin: 0 4px 10px; padding: 12px; border: 1px solid #292d38; border-radius: 10px; }
.support-card > span { display: grid; width: 25px; height: 25px; place-items: center; flex: 0 0 auto; border-radius: 50%; background: #252b38; font-weight: 700; }
.support-card strong, .support-card small { display: block; }
.support-card strong { color: #d8dbe2; font-size: 11px; }
.support-card small { margin-top: 2px; color: #6f7584; font-size: 9px; }
.sign-out { color: #777d8b; }
.app-main { width: calc(100% - 244px); min-height: 100vh; margin-left: 244px; }
.topbar { display: flex; min-height: 88px; align-items: center; justify-content: space-between; padding: 16px 34px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.9); backdrop-filter: blur(12px); }
.topbar h1 { margin: 0; font: 800 23px/1.2 "Manrope", sans-serif; letter-spacing: -.03em; }
.topbar .eyebrow { margin-bottom: 5px; color: #8d92a0; font-size: 9px; }
.topbar-actions { display: flex; align-items: center; gap: 20px; }
.icon-button { display: grid; width: 40px; height: 40px; place-items: center; color: #5f6472; border: 1px solid #e5e7ec; border-radius: 9px; background: #fff; }
.notification-button { position: relative; font-size: 23px; }
.notification-button i { position: absolute; top: 8px; right: 8px; width: 6px; height: 6px; border: 1px solid white; border-radius: 50%; background: var(--orange); }
.profile-menu { display: flex; align-items: center; gap: 10px; min-width: 190px; padding: 0; color: inherit; border: 0; background: none; text-align: left; }
.avatar { display: grid; width: 38px; height: 38px; place-items: center; color: #fff; border-radius: 10px; background: var(--blue); font-size: 12px; font-weight: 800; }
.profile-menu strong, .profile-menu small { display: block; }
.profile-menu strong { font-size: 12px; }
.profile-menu small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.profile-menu > span { margin-left: auto; color: #989dab; }
.page-content { padding: 28px 34px 48px; }
.mobile-menu { display: none; }

/* Components */
.page-intro { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.page-intro h2 { margin: 0; font: 800 26px/1.25 "Manrope", sans-serif; letter-spacing: -.035em; }
.page-intro p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.button-row { display: flex; gap: 9px; }
.secondary-button { display: inline-flex; min-height: 43px; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; color: #454a59; border: 1px solid #dfe2e8; border-radius: 9px; background: #fff; font-size: 12px; font-weight: 700; }
.secondary-button:hover { border-color: #bdc3d0; background: #fafafa; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card { position: relative; overflow: hidden; min-height: 137px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.stat-card::after { position: absolute; width: 58px; height: 58px; content: ""; right: -19px; bottom: -19px; border: 12px solid var(--tone, #eaf0ff); border-radius: 50%; }
.stat-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; font-weight: 600; }
.stat-icon { display: grid; width: 31px; height: 31px; place-items: center; color: var(--stat-color, var(--blue)); border-radius: 8px; background: var(--tone, var(--blue-soft)); font-size: 14px; }
.stat-value { margin-top: 14px; font: 800 28px/1 "Manrope", sans-serif; letter-spacing: -.04em; }
.stat-meta { margin-top: 10px; color: #9398a4; font-size: 10px; }
.trend-up { color: var(--green); font-weight: 700; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(290px, .85fr); gap: 20px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 3px 14px rgba(20,24,38,.025); }
.card-header { display: flex; min-height: 66px; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #edf0f3; }
.card-header h3 { margin: 0; font: 800 14px "Manrope", sans-serif; }
.card-header p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.text-button { padding: 6px; color: var(--blue); border: 0; background: none; font-size: 11px; font-weight: 700; }
.project-list { padding: 0 20px; }
.project-row { display: grid; grid-template-columns: minmax(190px, 1.4fr) minmax(130px, 1fr) 72px 92px; align-items: center; gap: 16px; min-height: 79px; border-bottom: 1px solid #edf0f3; }
.project-row:last-child { border-bottom: 0; }
.project-name { display: flex; align-items: center; gap: 11px; }
.project-mark { display: grid; width: 35px; height: 35px; place-items: center; flex: 0 0 auto; color: var(--blue); border-radius: 8px; background: var(--blue-soft); font-size: 15px; }
.project-name strong, .project-name small { display: block; }
.project-name strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.project-name small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.progress-track { height: 6px; overflow: hidden; border-radius: 8px; background: #edf0f4; }
.progress-track > span { display: block; height: 100%; border-radius: inherit; background: var(--blue); }
.progress-value { margin-top: 6px; color: var(--muted); font-size: 9px; }
.status-pill { display: inline-flex; width: max-content; align-items: center; gap: 5px; padding: 5px 8px; color: #1d8562; border-radius: 999px; background: #e6f6f0; font-size: 9px; font-weight: 700; }
.status-pill.warning { color: #a66a17; background: #fff3df; }
.status-pill.blue { color: #3455c5; background: #eaf0ff; }
.status-pill.gray { color: #6d7280; background: #f0f1f4; }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.activity-list { padding: 5px 20px 10px; }
.activity-item { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 13px 0; }
.activity-icon { display: grid; width: 28px; height: 28px; place-items: center; color: var(--blue); border-radius: 50%; background: var(--blue-soft); font-size: 11px; }
.activity-item p { margin: 0; color: #464b58; font-size: 10px; line-height: 1.45; }
.activity-item p strong { color: #20232d; }
.activity-item time { display: block; margin-top: 4px; color: #a0a4ae; font-size: 9px; }
.quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }
.quick-action { display: flex; min-height: 76px; align-items: center; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: left; }
.quick-action:hover { border-color: #cbd5fb; box-shadow: var(--shadow); }
.quick-action span { display: grid; width: 34px; height: 34px; place-items: center; flex: 0 0 auto; color: var(--blue); border-radius: 8px; background: var(--blue-soft); }
.quick-action strong { display: block; font-size: 11px; }
.quick-action small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }

/* Data pages */
.filter-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.search-box { position: relative; flex: 1; max-width: 370px; }
.search-box input { width: 100%; height: 42px; padding: 0 15px 0 38px; border: 1px solid var(--line); border-radius: 9px; outline: none; background: #fff; }
.search-box span { position: absolute; top: 11px; left: 14px; color: #9297a4; }
.filter-bar select { height: 42px; padding: 0 34px 0 13px; color: #555a67; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 11px; }
.performance-filters { flex-wrap: wrap; }
.team-filters { flex-wrap: wrap; }
.performance-filters .search-box { min-width: 270px; }
.date-filter { display: flex; height: 42px; align-items: center; gap: 7px; padding: 0 8px 0 11px; color: #858a96; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 9px; font-weight: 700; text-transform: uppercase; }
.date-filter input { width: 116px; color: #555a67; border: 0; outline: none; background: transparent; font-size: 10px; }
.data-card { overflow: hidden; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 13px 18px; color: #8c919f; background: #fafbfc; font-size: 9px; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
.data-table td { padding: 16px 18px; border-top: 1px solid #edf0f3; font-size: 11px; }
.data-table tbody tr:hover { background: #fbfcff; }
.person { display: flex; align-items: center; gap: 10px; }
.person-avatar { display: grid; width: 32px; height: 32px; place-items: center; color: #fff; border-radius: 9px; background: #67748d; font-size: 10px; font-weight: 800; }
.person strong, .person small { display: block; }
.person small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.rating { color: #e89623; font-weight: 800; }
.row-actions { display: flex; gap: 5px; }
.mini-button { padding: 6px 9px; color: #5b6070; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 9px; font-weight: 700; }
.mini-button.danger { color: #b64b43; border-color: #f0d2cf; }
.mini-button.danger:hover { background: #fff0ee; }
.project-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.project-card { overflow: hidden; }
.project-cover { position: relative; height: 86px; padding: 15px; color: #fff; background: linear-gradient(135deg, #171c2a, #24377c); }
.project-cover::after { position: absolute; width: 120px; height: 120px; content: ""; right: -20px; top: -65px; border: 18px solid rgba(91,123,255,.18); border-radius: 50%; }
.project-cover .status-pill { position: relative; z-index: 1; }
.project-body { padding: 17px; }
.project-body h3 { margin: 0; font: 800 14px "Manrope", sans-serif; }
.project-body > p { min-height: 32px; margin: 5px 0 14px; color: var(--muted); font-size: 10px; }
.project-details { display: flex; justify-content: space-between; margin: 13px 0; color: #777c89; font-size: 9px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature-card { position: relative; min-height: 190px; padding: 21px; transition: .2s; }
.feature-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.feature-icon { display: grid; width: 43px; height: 43px; place-items: center; margin-bottom: 22px; color: var(--blue); border-radius: 11px; background: var(--blue-soft); font-size: 19px; }
.feature-card h3 { margin: 0 0 7px; font: 800 14px "Manrope", sans-serif; }
.feature-card p { margin: 0 0 16px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.tool-usage { display: block; margin: 12px 0 44px; color: #8b909c; font-size: 9px; }
.feature-actions { position: absolute; right: 15px; bottom: 15px; left: 15px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.feature-actions .text-button { position: static; }
.feature-actions .mini-button:disabled { cursor: not-allowed; opacity: .45; }
.project-toolbox { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.project-toolbox > strong { width: 100%; margin-bottom: 3px; font-size: 12px; }
.project-toolbox > p { margin: 0; font-size: 10px; }
.previous-employees, .employee-assignment-history, .employee-performance-history { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.section-heading strong, .section-heading small { display: block; }
.section-heading strong { font-size: 12px; }
.section-heading small { margin-top: 4px; color: var(--muted); font-size: 9px; font-weight: 400; }
.section-heading > span { display: grid; min-width: 26px; height: 26px; place-items: center; color: var(--blue); border-radius: 7px; background: var(--blue-soft); font-size: 10px; font-weight: 800; }
.previous-employee-row { display: grid; grid-template-columns: minmax(150px,1fr) auto auto; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid #edf0f3; }
.previous-metrics { display: flex; gap: 12px; color: var(--muted); font-size: 8px; }
.previous-metrics span, .previous-metrics strong { display: block; text-align: center; }
.previous-metrics strong { margin-bottom: 3px; color: #333845; font-size: 10px; }
.previous-empty { margin: 0; padding: 14px 0; font-size: 10px; }
.performance-history-row { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 15px; padding: 11px 0; border: 0; border-top: 1px solid #edf0f3; background: transparent; text-align: left; }
.performance-history-row:hover { color: var(--blue); }
.performance-history-row span:last-child { text-align: right; }
.performance-history-row strong, .performance-history-row small { display: block; }
.performance-history-row strong { font-size: 10px; }
.performance-history-row small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.assignment-history-row { display: grid; grid-template-columns: 58px minmax(150px,1fr) auto; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid #edf0f3; }
.assignment-history-row strong, .assignment-history-row small { display: block; }
.assignment-history-row strong { font-size: 10px; }
.assignment-history-row small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.assignment-state { padding: 5px 7px; color: #737987; border-radius: 6px; background: #f0f1f3; font-size: 8px; font-weight: 800; text-align: center; text-transform: uppercase; }
.assignment-state.current { color: #147452; background: #e7f7f1; }
.readonly-badge { display: inline-flex; min-height: 36px; align-items: center; padding: 0 13px; color: #6d7280; border: 1px solid #dfe2e8; border-radius: 8px; background: #f5f6f8; font-size: 10px; font-weight: 700; }
.readonly-notice { margin-top: 20px; padding: 14px 16px; color: #626875; border: 1px solid #dfe2e8; border-radius: 10px; background: #f7f8fa; font-size: 11px; }
.company-property-notice { margin-top: 18px; padding: 20px; border-left: 3px solid var(--blue); }
.company-property-notice strong { font-size: 12px; }
.company-property-notice p { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.policy-inline { padding: 12px; color: #415078; border-radius: 8px; background: var(--blue-soft); font-weight: 500; line-height: 1.55; }
.access-actions { flex-wrap: wrap; }
.tool-chip { position: relative; display: inline-flex; }
.tool-chip .secondary-button { padding-right: 32px; }
.chip-remove { position: absolute; top: 50%; right: 7px; width: 20px; height: 20px; padding: 0; color: #8a8f9b; border: 0; border-radius: 5px; background: #f1f2f5; transform: translateY(-50%); }
.chip-remove:hover { color: #b63b32; background: #ffe9e7; }
.project-summary { grid-template-columns: repeat(3, 1fr); }
.empty-state { padding: 60px 20px; color: var(--muted); text-align: center; }
.empty-state span { display: grid; width: 55px; height: 55px; margin: auto auto 14px; place-items: center; border-radius: 50%; background: var(--blue-soft); font-size: 22px; }

/* Modal */
.modal-backdrop { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(11,14,21,.62); backdrop-filter: blur(4px); animation: fade .15s ease; }
.modal { width: min(100%, 560px); max-height: calc(100vh - 40px); overflow: auto; border-radius: 16px; background: #fff; box-shadow: 0 30px 80px rgba(0,0,0,.25); animation: rise .2s ease; }
.modal-header { display: flex; align-items: start; justify-content: space-between; padding: 22px 24px 16px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0; font: 800 20px "Manrope", sans-serif; }
.modal-header p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.modal-close { width: 31px; height: 31px; color: #747987; border: 0; border-radius: 8px; background: #f1f2f5; }
.modal-form { padding: 21px 24px 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: block; color: #484c59; font-size: 11px; font-weight: 700; }
.field.full { grid-column: 1/-1; }
.form-control { width: 100%; min-height: 43px; margin-top: 7px; padding: 10px 12px; border: 1px solid #dde0e7; border-radius: 8px; outline: none; background: #fbfbfc; font-size: 12px; }
textarea.form-control { min-height: 88px; resize: vertical; }
.range-line { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.range-line input { flex: 1; accent-color: var(--blue); }
.range-output { display: grid; width: 42px; height: 34px; place-items: center; color: var(--blue); border-radius: 7px; background: var(--blue-soft); font-weight: 800; }
.member-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; max-height: 170px; margin-top: 7px; padding: 9px; overflow-y: auto; border: 1px solid #dde0e7; border-radius: 8px; background: #fbfbfc; }
.member-picker label { display: grid; grid-template-columns: 18px 1fr; align-items: center; padding: 8px; border-radius: 7px; background: #fff; font-size: 11px; font-weight: 600; }
.member-picker label:hover { background: var(--blue-soft); }
.member-picker input { grid-row: 1 / 3; accent-color: var(--blue); }
.member-picker small { color: var(--muted); font-size: 8px; font-weight: 400; }
.picker-empty { grid-column: 1/-1; padding: 14px; color: #717786; text-align: center; }
.picker-empty strong, .picker-empty small { display: block; }
.picker-empty strong { margin-bottom: 4px; color: #454a57; font-size: 11px; }
.picker-empty small { font-size: 9px; line-height: 1.45; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 23px; }
.form-error { margin-top: 16px; padding: 11px 13px; color: #a23b34; border: 1px solid #f0c7c3; border-radius: 8px; background: #fff1ef; font-size: 11px; line-height: 1.45; }
.primary-button:disabled, .secondary-button:disabled { cursor: not-allowed; opacity: .55; transform: none; }
.toast-root { position: fixed; z-index: 100; right: 20px; bottom: 20px; display: grid; gap: 10px; }
.toast { display: flex; max-width: 360px; align-items: center; gap: 10px; padding: 13px 16px; color: #fff; border-radius: 10px; background: #171b24; box-shadow: 0 12px 35px rgba(0,0,0,.2); font-size: 11px; animation: rise .2s ease; }
.toast.success::before { content: "✓"; color: #6be0ad; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1050px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .project-cards, .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 800px) {
  .auth-screen { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-panel { min-height: 100vh; padding: 28px; }
  .mobile-brand { display: block; width: 190px; height: 70px; margin-bottom: 35px; overflow: hidden; }
  .mobile-brand img { width: 100%; height: 100%; object-fit: cover; }
  .sidebar { transform: translateX(-100%); transition: .25s ease; }
  .sidebar.open { transform: none; }
  .sidebar-scrim { position: fixed; z-index: 15; inset: 0; display: none; background: rgba(0,0,0,.4); }
  .sidebar-scrim.open { display: block; }
  .app-main { width: 100%; margin: 0; }
  .mobile-menu { display: block; margin-right: 12px; border: 0; background: none; font-size: 20px; }
  .topbar { justify-content: flex-start; padding: 14px 18px; }
  .topbar-actions { margin-left: auto; }
  .profile-menu > div:nth-child(2), .profile-menu > span { display: none; }
  .profile-menu { min-width: auto; }
  .page-content { padding: 22px 18px 40px; }
  .content-grid { grid-template-columns: 1fr; }
  .project-row { grid-template-columns: minmax(150px, 1fr) minmax(100px, .7fr) 70px; }
  .project-row > :last-child { display: none; }
}
@media (max-width: 580px) {
  .topbar h1 { font-size: 17px; }
  .notification-button { display: none; }
  .stats-grid, .project-cards, .feature-grid, .quick-actions { grid-template-columns: 1fr; }
  .page-intro { align-items: stretch; flex-direction: column; }
  .page-intro .primary-button { width: 100%; }
  .project-row { grid-template-columns: 1fr 82px; }
  .project-row > :nth-child(2) { display: none; }
  .data-card { overflow-x: auto; }
  .data-table { min-width: 650px; }
  .filter-bar { align-items: stretch; flex-direction: column; }
  .search-box { max-width: none; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .member-picker { grid-template-columns: 1fr; }
  .project-summary { grid-template-columns: 1fr; }
  .previous-employee-row { grid-template-columns: 1fr auto; }
  .previous-metrics { grid-column: 1/-1; justify-content: flex-start; }
}
