/* ============================================================
   浼佷簯鍗忓悓 路 鍛樺伐绠＄悊鍔炲叕绯荤粺
   浼佷笟寰俊椋庢牸 UI 路 鏃犵涓夋柟渚濊禆
   ============================================================ */

:root {
    --primary: #2F6BFF;
    --primary-600: #245BE0;
    --primary-700: #1C4AC2;
    --primary-50: #EEF4FF;
    --primary-100: #DCE8FF;
    --green: #07C160;
    --green-50: #E9FBF1;
    --orange: #FF8F1F;
    --orange-50: #FFF5E8;
    --red: #F04438;
    --red-50: #FEF0EF;
    --violet: #8B5CF6;
    --violet-50: #F3EEFF;
    --teal: #00A6A6;
    --teal-50: #E8FAFA;
    --pink: #E91E63;

    --text: #1D2129;
    --text-2: #4E5969;
    --text-3: #86909C;
    --text-4: #A9B0BC;
    --line: #E9EDF4;
    --line-2: #F0F3F8;
    --bg: #F5F7FB;
    --card: #FFFFFF;

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 22px;

    --shadow-xs: 0 1px 2px rgba(22, 40, 72, .04);
    --shadow-sm: 0 2px 8px rgba(22, 40, 72, .05);
    --shadow: 0 8px 24px rgba(22, 40, 72, .07);
    --shadow-lg: 0 20px 50px rgba(15, 37, 81, .14);

    --sidebar-w: 248px;
    --topbar-h: 68px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-600); }
img { max-width: 100%; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, h5, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
code, pre { font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; }
[hidden] { display: none !important; }
::selection { background: var(--primary-100); color: var(--primary-700); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #D5DCE8; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #C0C9D8; }
::-webkit-scrollbar-track { background: transparent; }

.muted { color: var(--text-3); }
.small { font-size: 12px; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.flex { display: flex; }
.flex-1 { flex: 1; min-width: 0; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.w-full { width: 100%; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }

.icon {
    width: 20px; height: 20px; flex: none;
    display: inline-block; vertical-align: -4px;
}
.icon.sm { width: 16px; height: 16px; }
.icon.lg { width: 24px; height: 24px; }

/* ---------------- Buttons ---------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    height: 38px; padding: 0 16px;
    border: 1px solid transparent; border-radius: 9px;
    background: #fff; color: var(--text-2);
    font-size: 13px; font-weight: 600; white-space: nowrap;
    transition: all .18s ease;
    user-select: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn .icon { width: 17px; height: 17px; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 14px rgba(47, 107, 255, .24); }
.btn-primary:hover { background: var(--primary-600); color: #fff; box-shadow: 0 8px 18px rgba(47, 107, 255, .3); }
.btn-secondary { background: #fff; border-color: var(--line); color: var(--text-2); box-shadow: var(--shadow-xs); }
.btn-secondary:hover { border-color: #D4DDEB; background: #FBFCFE; color: var(--text); }
.btn-soft { background: var(--primary-50); color: var(--primary); }
.btn-soft:hover { background: var(--primary-100); color: var(--primary-700); }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: #06AD57; color: #fff; }
.btn-danger { background: var(--red-50); color: var(--red); }
.btn-danger:hover { background: #FDE2DF; color: #D92D20; }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--line-2); color: var(--text); }
.btn-link { background: none; border: none; padding: 0; height: auto; color: var(--primary); font-weight: 600; }
.btn-link:hover { transform: none; color: var(--primary-600); }
.btn-sm { height: 31px; padding: 0 11px; font-size: 12px; border-radius: 7px; }
.btn-lg { height: 46px; padding: 0 26px; font-size: 15px; border-radius: 11px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
.btn-icon { width: 38px; padding: 0; }

.icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; flex: none;
    background: transparent; border: 1px solid transparent; border-radius: 10px;
    color: var(--text-2); transition: all .18s ease; position: relative;
}
.icon-btn:hover { background: var(--line-2); color: var(--text); }
.icon-btn.tiny { width: 32px; height: 32px; border-radius: 8px; color: var(--text-3); }
.icon-btn.tiny .icon { width: 17px; height: 17px; }
.icon-btn.bordered { border-color: var(--line); background: #fff; }

.text-btn { border: none; background: none; color: var(--primary); font-size: 12px; font-weight: 600; padding: 0; }
.text-btn:hover { color: var(--primary-700); }

/* ---------------- Pills / badges ---------------- */
.pill {
    display: inline-flex; align-items: center; gap: 4px;
    height: 22px; padding: 0 8px; border-radius: 99px;
    font-size: 11px; font-weight: 600; line-height: 1;
    background: var(--line-2); color: var(--text-3); white-space: nowrap;
}
.pill.green { background: var(--green-50); color: #059748; }
.pill.blue { background: var(--primary-50); color: var(--primary); }
.pill.orange { background: var(--orange-50); color: #D97706; }
.pill.red { background: var(--red-50); color: #D92D20; }
.pill.violet { background: var(--violet-50); color: #7C3AED; }
.pill.gray { background: #F2F4F8; color: #667085; }
.pill.teal { background: var(--teal-50); color: #0F8C8C; }
.pill-lg { height: 26px; padding: 0 10px; font-size: 12px; }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------------- Avatars ---------------- */
.avatar {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; flex: none; border-radius: 12px;
    background: var(--avatar-color, #2F6BFF);
    background: linear-gradient(135deg, var(--avatar-color, #2F6BFF), color-mix(in srgb, var(--avatar-color, #2F6BFF) 72%, #1B2A4A));
    color: #fff; font-size: 15px; font-weight: 600; letter-spacing: .2px;
    box-shadow: 0 2px 6px color-mix(in srgb, var(--avatar-color, #2F6BFF) 28%, transparent);
    overflow: hidden;
}
.avatar-xs { width: 24px; height: 24px; border-radius: 7px; font-size: 11px; }
.avatar-sm { width: 32px; height: 32px; border-radius: 9px; font-size: 13px; }
.avatar-md { width: 38px; height: 38px; border-radius: 11px; }
.avatar-lg { width: 52px; height: 52px; border-radius: 15px; font-size: 20px; }
.avatar-xl { width: 76px; height: 76px; border-radius: 21px; font-size: 28px; }
.avatar-xl.avatar {
    box-shadow: 0 8px 20px color-mix(in srgb, var(--avatar-color, #2F6BFF) 32%, transparent);
}
.avatar-img { object-fit: cover; }
.avatar-stack { display: flex; align-items: center; }
.avatar-stack span {
    width: 30px; height: 30px; border-radius: 50%; margin-left: -7px;
    background: var(--c, #2F6BFF); color: #fff; font-size: 11px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 2px solid #fff; font-weight: 600;
}
.avatar-stack span:first-child { margin-left: 0; }

/* ---------------- Forms ---------------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field-label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field-label em { color: var(--red); font-style: normal; }
.field-hint { font-size: 11.5px; color: var(--text-3); line-height: 1.5; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > .icon { position: absolute; left: 12px; color: var(--text-3); width: 18px; height: 18px; pointer-events: none; }
.input-wrap input { padding-left: 38px; }
.input, .select, .textarea, .form-control {
    width: 100%; height: 40px; padding: 0 12px;
    border: 1px solid var(--line); border-radius: 9px;
    background: #fff; color: var(--text); font-size: 13.5px;
    outline: none; transition: border-color .18s, box-shadow .18s;
}
.textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.65; }
.select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2386909C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 11px center; padding-right: 34px;
}
.input:focus, .select:focus, .textarea:focus, .form-control:focus {
    border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47, 107, 255, .12);
}
.input::placeholder, .textarea::placeholder { color: #B4BCC9; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid .span-2 { grid-column: span 2; }
.form-section { padding: 4px 0 18px; }
.form-section-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 700; color: var(--text);
    margin: 4px 0 14px;
}
.form-section-title::before { content: ""; width: 4px; height: 14px; background: var(--primary); border-radius: 3px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); margin-top: 6px; }
.checkline { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.checkline input { width: 15px; height: 15px; accent-color: var(--primary); }
.radio-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.radio-card { position: relative; }
.radio-card input { position: absolute; opacity: 0; }
.radio-card span {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 12px 8px; border: 1.5px solid var(--line); border-radius: 10px;
    font-size: 12px; font-weight: 600; color: var(--text-2); cursor: pointer; transition: .18s;
}
.radio-card span .icon { width: 20px; height: 20px; color: var(--text-3); }
.radio-card input:checked + span { border-color: var(--primary); background: var(--primary-50); color: var(--primary); }
.radio-card input:checked + span .icon { color: var(--primary); }

.pwd-toggle {
    position: absolute; right: 8px; border: none; background: none;
    font-size: 12px; color: var(--text-3); padding: 4px 6px;
}
.pwd-toggle:hover { color: var(--primary); }

/* ---------------- Alerts ---------------- */
.alert { padding: 11px 14px; border-radius: 9px; font-size: 12.5px; line-height: 1.6; margin-bottom: 14px; border: 1px solid transparent; }
.alert-error { background: var(--red-50); color: #B42318; border-color: #FCD9D6; }
.alert-success { background: var(--green-50); color: #027A48; border-color: #C6F1DB; }
.alert-info { background: var(--primary-50); color: var(--primary-700); border-color: var(--primary-100); }
.alert-warning { background: var(--orange-50); color: #B54708; border-color: #FDE3C2; }

/* ============================================================
   Auth / Login
   ============================================================ */
.auth-body { min-height: 100vh; background: #F5F7FB; overflow-x: hidden; }
.auth-bg { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.auth-bg .auth-orb { position: absolute; border-radius: 50%; filter: blur(10px); opacity: .55; }
.auth-bg .o1 { width: 520px; height: 520px; background: radial-gradient(circle, #DCE8FF, transparent 68%); top: -160px; left: 34%; }
.auth-bg .o2 { width: 460px; height: 460px; background: radial-gradient(circle, #D8F8E8, transparent 68%); bottom: -180px; right: -120px; }
.auth-bg .o3 { width: 380px; height: 380px; background: radial-gradient(circle, #EDE4FF, transparent 68%); top: 40%; left: -140px; }
.auth-grid {
    position: absolute; inset: 0;
    background-image: linear-gradient(rgba(47,107,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(47,107,255,.035) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.5), transparent 80%);
}
.login-shell { position: relative; display: grid; grid-template-columns: minmax(520px, 1.08fr) minmax(440px, .92fr); min-height: 100vh; }
.login-visual {
    position: relative; overflow: hidden;
    padding: 46px 6vw 34px;
    display: flex; flex-direction: column;
    background:
        radial-gradient(900px 600px at 70% 20%, rgba(255,255,255,.18), transparent 60%),
        linear-gradient(135deg, #1749D6 0%, #2F6BFF 48%, #3D7BFF 100%);
    color: #fff;
}
.login-visual::before {
    content: ""; position: absolute; width: 560px; height: 560px; border-radius: 50%;
    border: 1px solid rgba(255,255,255,.13); right: -190px; top: -160px;
}
.login-visual::after {
    content: ""; position: absolute; width: 760px; height: 760px; border-radius: 50%;
    border: 1px solid rgba(255,255,255,.08); right: -280px; top: -260px;
}
.brand-lockup { display: flex; align-items: center; gap: 12px; position: relative; z-index: 2; }
.brand-lockup .brand-mark { width: 44px; height: 44px; border-radius: 13px; font-size: 22px; }
.brand-lockup strong { display: block; font-size: 17px; letter-spacing: .5px; }
.brand-lockup small { display: block; font-size: 11px; opacity: .72; margin-top: 1px; letter-spacing: .6px; }
.brand-lockup-light .brand-mark { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.26); box-shadow: none; }
.brand-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; flex: none; border-radius: 11px;
    background: linear-gradient(145deg, #3C78FF, #1F55E8); color: #fff;
    font-size: 19px; font-weight: 700; box-shadow: 0 6px 14px rgba(47,107,255,.3);
}
.visual-copy { margin-top: clamp(52px, 9vh, 100px); position: relative; z-index: 2; }
.eyebrow {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 5px 11px; border-radius: 99px;
    background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.18);
    font-size: 11.5px; letter-spacing: 1.2px; margin-bottom: 20px;
}
.visual-copy h1 { font-size: clamp(38px, 4.1vw, 56px); line-height: 1.24; letter-spacing: 1px; font-weight: 700; }
.visual-copy p { margin-top: 18px; font-size: 14.5px; line-height: 1.9; color: rgba(255,255,255,.82); }
.visual-board { margin-top: auto; padding-top: 44px; position: relative; z-index: 2; max-width: 650px; }
.mock-window {
    width: min(100%, 610px); border-radius: 16px; overflow: hidden;
    background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22);
    box-shadow: 0 30px 60px rgba(9, 30, 80, .24);
    backdrop-filter: blur(12px);
}
.mock-top { display: flex; align-items: center; gap: 7px; height: 44px; padding: 0 15px; background: rgba(255,255,255,.12); border-bottom: 1px solid rgba(255,255,255,.1); }
.mock-dot { width: 8px; height: 8px; border-radius: 50%; }
.mock-dot.red { background: #FF7A75; } .mock-dot.yellow { background: #FFC44D; } .mock-dot.green { background: #4ADE80; }
.mock-search { margin-left: 8px; width: 200px; height: 24px; border-radius: 7px; background: rgba(255,255,255,.14); font-size: 10px; color: rgba(255,255,255,.65); display: flex; align-items: center; padding: 0 10px; }
.mock-body { display: flex; min-height: 236px; }
.mock-side { width: 52px; padding: 16px 0; display: flex; flex-direction: column; align-items: center; gap: 15px; border-right: 1px solid rgba(255,255,255,.1); }
.mock-side span { width: 18px; height: 18px; border-radius: 5px; background: rgba(255,255,255,.18); }
.mock-side span.active { background: rgba(255,255,255,.8); }
.mock-main { flex: 1; padding: 18px 20px; min-width: 0; }
.mock-hello { display: flex; align-items: center; justify-content: space-between; }
.mock-hello i { display: block; height: 7px; border-radius: 4px; background: rgba(255,255,255,.6); margin-bottom: 6px; }
.mock-hello i:first-child { width: 100px; }
.mock-hello i:last-child { width: 140px; background: rgba(255,255,255,.3); }
.mock-avatar { width: 32px; height: 32px; border-radius: 10px; background: rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; font-size: 12px; }
.mock-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 18px; }
.mock-stats div { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.1); border-radius: 9px; padding: 10px; }
.mock-stats b { display: block; font-size: 18px; }
.mock-stats small { font-size: 9px; opacity: .62; }
.mock-rows { margin-top: 15px; display: flex; flex-direction: column; gap: 7px; }
.mock-rows div { display: flex; align-items: center; gap: 8px; padding: 7px 9px; background: rgba(255,255,255,.08); border-radius: 8px; }
.m-avatar { width: 20px; height: 20px; border-radius: 6px; flex: none; }
.m-avatar.c1 { background: #7CC4FF; } .m-avatar.c2 { background: #7EE2B8; } .m-avatar.c3 { background: #C4B5FD; }
.mock-rows i { display: block; width: 100px; height: 5px; border-radius: 4px; background: rgba(255,255,255,.34); }
.mock-rows em { display: block; width: 52px; height: 5px; border-radius: 4px; background: rgba(255,255,255,.18); margin-left: auto; }
.float-card {
    position: absolute; display: flex; align-items: center; gap: 9px;
    padding: 10px 13px; background: #fff; color: var(--text); border-radius: 12px;
    box-shadow: 0 16px 34px rgba(9,30,80,.2); z-index: 3;
    animation: floaty 5.5s ease-in-out infinite;
}
.float-card b { display: block; font-size: 11.5px; }
.float-card small { display: block; font-size: 9.5px; color: var(--text-3); margin-top: 2px; }
.float-card .float-icon { width: 28px; height: 28px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 13px; background: var(--green-50); color: var(--green); }
.float-approve { top: -22px; right: 4px; }
.float-checkin { bottom: 38px; right: -18px; animation-delay: -1.8s; }
.float-checkin .float-icon { background: var(--primary-50); color: var(--primary); }
.float-team { bottom: -22px; left: 28px; animation-delay: -3.2s; }
.float-team small { color: var(--text-2); }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.visual-foot { margin-top: 42px; font-size: 11px; color: rgba(255,255,255,.52); letter-spacing: .4px; position: relative; z-index: 2; }

.login-panel { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 6vw; }
.login-card { width: min(100%, 430px); }
.login-card-head { margin-bottom: 26px; }
.login-card-head h2 { font-size: 29px; letter-spacing: .3px; }
.login-card-head p { color: var(--text-3); font-size: 13px; margin-top: 7px; }
.mobile-brand { display: none; }
.login-form { display: flex; flex-direction: column; gap: 17px; }
.login-form .input, .login-form .input-wrap input { height: 46px; border-radius: 10px; }
.login-form .input-wrap input { padding-left: 42px; }
.login-row { display: flex; align-items: center; justify-content: space-between; margin-top: -2px; }
.btn-login { height: 48px; border-radius: 10px; font-size: 15px; letter-spacing: 5px; margin-top: 2px; }
.demo-login { margin-top: 26px; padding-top: 20px; border-top: 1px dashed var(--line); }
.demo-login-head { display: flex; align-items: center; gap: 12px; margin-bottom: 13px; }
.demo-login-head span { font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
.demo-login-head i { height: 1px; background: var(--line); flex: 1; }
.demo-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.demo-chip {
    display: flex; align-items: center; gap: 9px; text-align: left;
    padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px;
    background: #fff; transition: all .18s;
}
.demo-chip:hover { border-color: var(--primary); background: var(--primary-50); transform: translateY(-1px); }
.demo-avatar { width: 28px; height: 28px; border-radius: 8px; background: var(--c); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; flex: none; }
.demo-chip b { display: block; font-size: 11.5px; font-weight: 600; }
.demo-chip small { display: block; font-size: 10px; color: var(--text-3); margin-top: 1px; }
.login-legal { margin-top: 26px; text-align: center; font-size: 10.5px; color: var(--text-4); }
.login-footer { margin-top: 34px; font-size: 10.5px; color: var(--text-4); }

/* ---------------- Install ---------------- */
.install-body { display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.install-shell { position: relative; width: min(100%, 760px); z-index: 2; }
.install-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.install-head .brand-lockup strong { color: var(--text); }
.install-head .brand-lockup small { color: var(--text-3); }
.install-step { font-size: 12px; color: var(--text-3); background: #fff; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); }
.install-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 34px 38px; }
.install-title h1 { font-size: 25px; }
.install-title p { color: var(--text-3); font-size: 13px; margin-top: 7px; }
.install-title code { background: var(--line-2); padding: 2px 6px; border-radius: 5px; font-size: 11.5px; }
.install-mode { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 15px; background: #FAFBFD; border: 1px solid var(--line); border-radius: 11px; margin: 22px 0; }
.install-mode .mode-label { display: block; font-size: 10.5px; color: var(--text-3); margin-bottom: 2px; }
.install-mode strong { font-size: 13px; }
.install-mode code { font-size: 11px; color: var(--text-3); }
.req-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 24px; margin-bottom: 22px; }
.req-item { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--line-2); font-size: 12px; }
.req-item span { color: var(--text-2); }
.req-item em { margin-left: auto; font-style: normal; color: var(--text-3); font-size: 11px; }
.req-ok { width: 18px; height: 18px; flex: none; border-radius: 50%; background: var(--green-50); color: var(--green); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.req-bad { width: 18px; height: 18px; flex: none; border-radius: 50%; background: var(--red-50); color: var(--red); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.install-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.install-actions .btn { width: 100%; }
.install-actions .muted { text-align: center; font-size: 10.5px; }
.install-tips { display: flex; gap: 8px; margin-top: 24px; padding: 11px 13px; background: var(--primary-50); border-radius: 9px; font-size: 11px; color: var(--primary-700); line-height: 1.65; }
.install-tips span { flex: none; }
.install-tips p { margin: 0; }
.install-foot { text-align: center; margin-top: 22px; font-size: 10.5px; color: var(--text-4); }
.success-card { text-align: center; }
.success-icon { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; background: var(--green-50); color: var(--green); display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700; }
.success-card h1 { font-size: 26px; }
.success-card > p { color: var(--text-3); font-size: 13px; margin-top: 7px; }
.demo-account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 24px 0; text-align: left; }
.demo-account-grid div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; background: #FAFBFD; font-size: 12px; }
.demo-account-grid b { color: var(--text-2); }
.demo-account-grid code { color: var(--primary); font-size: 11.5px; }
.install-note { text-align: left; background: var(--orange-50); color: #8A4B08; border: 1px solid #FDE3C2; padding: 12px 14px; border-radius: 9px; font-size: 11.5px; line-height: 1.7; margin-bottom: 22px; }
.install-note code { background: rgba(255,255,255,.6); padding: 1px 5px; border-radius: 4px; }

/* ============================================================
   App shell
   ============================================================ */
.app-body { background: var(--bg); overflow-x: hidden; }
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    position: fixed; z-index: 40; inset: 0 auto 0 0;
    width: var(--sidebar-w); display: flex; flex-direction: column;
    background: #fff; border-right: 1px solid var(--line);
    transition: transform .25s ease;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; height: 72px; padding: 0 18px; border-bottom: 1px solid var(--line-2); }
.sidebar-brand .brand-mark { width: 36px; height: 36px; border-radius: 10px; font-size: 18px; }
.brand-text { min-width: 0; }
.brand-text strong { display: block; font-size: 16px; letter-spacing: .3px; color: var(--text); }
.brand-text small { display: block; font-size: 9.5px; color: var(--text-3); letter-spacing: .5px; margin-top: 1px; }
.sidebar-close { display: none; margin-left: auto; border: none; background: none; color: var(--text-3); }
.sidebar-company { display: flex; align-items: center; gap: 9px; margin: 14px 14px 4px; padding: 9px 10px; background: #FAFBFD; border: 1px solid var(--line-2); border-radius: 9px; }
.company-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-50); flex: none; }
.sidebar-company b { display: block; font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-company small { display: block; font-size: 9px; color: var(--text-3); }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 8px 11px 16px; }
.nav-group { margin-top: 14px; }
.nav-group:first-child { margin-top: 4px; }
.nav-group-title { padding: 0 10px 6px; font-size: 9.5px; font-weight: 600; color: var(--text-4); letter-spacing: 1px; }
.nav-item {
    display: flex; align-items: center; gap: 10px; position: relative;
    height: 40px; padding: 0 10px; margin: 1px 0; border-radius: 9px;
    color: var(--text-2); font-size: 13px; font-weight: 500; transition: all .16s;
}
.nav-item:hover { background: #F5F8FE; color: var(--primary); }
.nav-item.active { background: var(--primary-50); color: var(--primary); font-weight: 600; }
.nav-item.active::before { content: ""; position: absolute; left: -11px; top: 11px; bottom: 11px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); }
.nav-icon { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; color: var(--text-3); }
.nav-icon .icon { width: 18px; height: 18px; }
.nav-item.active .nav-icon, .nav-item:hover .nav-icon { color: var(--primary); }
.nav-badge { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 9.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.nav-item.active .nav-badge { background: var(--primary); }
.sidebar-user { display: flex; align-items: center; gap: 7px; padding: 12px 13px; border-top: 1px solid var(--line-2); }
.sidebar-user-main { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; color: var(--text); }
.sidebar-user-main:hover { color: var(--text); }
.su-info { min-width: 0; }
.su-info b { display: block; font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.su-info small { display: block; font-size: 9px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.sidebar-foot { display: flex; align-items: center; gap: 5px; padding: 8px 18px 11px; font-size: 9px; color: var(--text-4); }
.sidebar-foot em { margin-left: auto; font-style: normal; }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.sidebar-backdrop { display: none; }

.app-main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); display: flex; flex-direction: column; }
.topbar {
    position: sticky; top: 0; z-index: 30; height: var(--topbar-h);
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    padding: 0 28px; background: rgba(255,255,255,.88); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.topbar-left { display: flex; align-items: center; gap: 18px; min-width: 0; flex: 1; }
.breadcrumb { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
.breadcrumb .icon { width: 12px; height: 12px; color: var(--text-4); }
.breadcrumb b { color: var(--text-2); font-weight: 600; }
.menu-toggle { display: none; }
.global-search {
    display: flex; align-items: center; gap: 8px; width: min(320px, 32vw); height: 36px;
    padding: 0 10px; background: #F4F6FA; border: 1px solid transparent; border-radius: 9px;
    transition: .18s; margin-left: 4px;
}
.global-search:focus-within { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,107,255,.1); }
.global-search .icon { width: 16px; height: 16px; color: var(--text-3); }
.global-search input { border: none; background: none; outline: none; flex: 1; min-width: 0; font-size: 12px; }
.global-search input::placeholder { color: var(--text-4); }
.global-search kbd { font-size: 9px; color: var(--text-3); background: #fff; border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; font-family: inherit; }
.topbar-right { display: flex; align-items: center; gap: 6px; }
.topbar-date { text-align: right; margin-right: 10px; line-height: 1.2; }
.topbar-date b { display: block; font-size: 11.5px; font-weight: 600; }
.topbar-date span { font-size: 9.5px; color: var(--text-3); }
.notify-btn .dot-badge { position: absolute; top: 5px; right: 5px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 8px; background: var(--red); color: #fff; font-size: 8.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 1.5px solid #fff; }
.user-trigger { display: flex; align-items: center; gap: 7px; border: none; background: none; padding: 4px 5px 4px 4px; border-radius: 10px; transition: .16s; }
.user-trigger:hover { background: var(--line-2); }
.user-trigger-name { font-size: 12px; font-weight: 600; color: var(--text); max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-trigger .chev { width: 14px; height: 14px; color: var(--text-3); }

.dropdown { position: relative; }
.dropdown-panel {
    position: absolute; right: 0; top: calc(100% + 9px); z-index: 60;
    background: #fff; border: 1px solid var(--line); border-radius: 13px;
    box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(-5px);
    transition: all .16s ease;
}
.dropdown.open .dropdown-panel { opacity: 1; visibility: visible; transform: translateY(0); }
.notify-panel { width: 372px; overflow: hidden; }
.dropdown-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; border-bottom: 1px solid var(--line-2); }
.dropdown-head b { font-size: 13px; }
.notify-list { max-height: 370px; overflow-y: auto; }
.notify-item { display: flex; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--line-2); color: var(--text); transition: background .15s; position: relative; }
.notify-item:hover { background: #FAFBFE; color: var(--text); }
.notify-item.is-read { opacity: .68; }
.notify-icon { width: 32px; height: 32px; flex: none; border-radius: 9px; background: var(--primary-50); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.notify-icon .icon { width: 16px; height: 16px; }
.notify-icon.approval { background: var(--orange-50); color: var(--orange); }
.notify-icon.task { background: var(--green-50); color: var(--green); }
.notify-body { min-width: 0; flex: 1; }
.notify-body b { display: block; font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notify-body small { display: block; font-size: 10.5px; color: var(--text-3); line-height: 1.5; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notify-body em { display: block; font-style: normal; font-size: 9px; color: var(--text-4); margin-top: 3px; }
.unread-pin { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); position: absolute; right: 10px; top: 17px; }
.dropdown-all { display: flex; align-items: center; justify-content: center; gap: 5px; height: 40px; font-size: 11px; font-weight: 600; border-top: 1px solid var(--line-2); }
.dropdown-all .icon { width: 13px; height: 13px; }
.empty-mini { padding: 30px; text-align: center; color: var(--text-3); font-size: 12px; }
.user-panel { width: 238px; padding: 8px; }
.user-panel-head { display: flex; gap: 11px; padding: 10px; border-bottom: 1px solid var(--line-2); margin-bottom: 5px; }
.user-panel-head b { display: block; font-size: 13px; }
.user-panel-head small { display: block; font-size: 10px; color: var(--text-3); margin: 1px 0 5px; }
.user-panel > a { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 8px; color: var(--text-2); font-size: 12px; }
.user-panel > a:hover { background: var(--line-2); color: var(--text); }
.user-panel > a .icon { width: 16px; height: 16px; color: var(--text-3); }
.dropdown-sep { height: 1px; background: var(--line-2); margin: 5px 0; }

.page-wrap { flex: 1; min-width: 0; width: 100%; max-width: 1560px; margin: 0 auto; padding: 24px 28px 40px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.page-head h1 { font-size: 22px; letter-spacing: .2px; line-height: 1.3; }
.page-head p { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.page-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.page-content { min-height: 200px; }

/* ---------------- Toasts ---------------- */
.toast-stack { position: fixed; z-index: 200; right: 24px; top: 84px; display: flex; flex-direction: column; gap: 8px; width: min(360px, calc(100vw - 40px)); }
.toast {
    display: flex; align-items: center; gap: 9px; padding: 11px 12px;
    background: #fff; border: 1px solid var(--line); border-radius: 11px;
    box-shadow: var(--shadow); font-size: 12px; color: var(--text-2);
    animation: toastIn .25s ease;
}
.toast-icon { width: 24px; height: 24px; border-radius: 50%; background: var(--green-50); color: var(--green); display: flex; align-items: center; justify-content: center; flex: none; }
.toast-icon .icon { width: 14px; height: 14px; }
.toast-error .toast-icon { background: var(--red-50); color: var(--red); }
.toast-info .toast-icon { background: var(--primary-50); color: var(--primary); }
.toast-close { margin-left: auto; border: none; background: none; color: var(--text-4); padding: 2px; }
.toast-close .icon { width: 14px; height: 14px; }
.toast.hide { opacity: 0; transform: translateX(20px); transition: .2s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ============================================================
   Shared components
   ============================================================ */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line-2); }
.card-head h3 { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.card-head p { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.card-head .icon { color: var(--text-3); }
.card-body { padding: 18px; }
.card-body.tight { padding: 8px 0; }
.card-foot { padding: 10px 18px; border-top: 1px solid var(--line-2); }
.card-hover { transition: .18s; }
.card-hover:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: #DCE4F0; }
.card-head .more { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; color: var(--text-3); white-space: nowrap; }
.card-head .more:hover { color: var(--primary); }
.card-head .more .icon { width: 12px; height: 12px; }
.pill-list { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* 閫氱敤灏忛儴浠?*/
.color-swatches { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 40px; }
.color-swatch { position: relative; width: 24px; height: 24px; cursor: pointer; display: inline-flex; }
.color-swatch input { position: absolute; opacity: 0; }
.color-swatch span { width: 24px; height: 24px; border-radius: 8px; background: var(--c); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); transition: .15s; }
.color-swatch input:checked + span { box-shadow: 0 0 0 2px var(--c), 0 0 0 4px #fff; transform: scale(1.04); }
.stats-mini { display: flex; gap: 0; margin-top: 16px; padding: 13px 0; background: #FAFBFD; border: 1px solid var(--line-2); border-radius: 10px; }
.stats-mini > div { flex: 1; text-align: center; border-right: 1px solid var(--line); }
.stats-mini > div:last-child { border-right: none; }
.stats-mini b { display: block; font-size: 19px; line-height: 1.2; }
.stats-mini span { font-size: 9.5px; color: var(--text-3); }
.file-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 26px 18px; border: 1.5px dashed #C9D7EF; border-radius: 12px; background: #FAFCFF; cursor: pointer; text-align: center; transition: .18s; }
.file-drop:hover { border-color: var(--primary); background: var(--primary-50); }
.file-drop .icon { width: 30px; height: 30px; color: var(--primary); margin-bottom: 3px; }
.file-drop b { font-size: 12.5px; color: var(--text-2); }
.file-drop small { font-size: 9.5px; color: var(--text-3); line-height: 1.5; }
.attendee-grid { display: flex; flex-wrap: wrap; gap: 6px; max-height: 150px; overflow-y: auto; padding: 9px; border: 1px solid var(--line); border-radius: 9px; }
.attendee-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px 4px 4px; border: 1px solid var(--line); border-radius: 99px; font-size: 10px; cursor: pointer; background: #fff; }
.attendee-chip:hover { border-color: var(--primary); }
.attendee-chip input { width: 12px; height: 12px; accent-color: var(--primary); }
.attendee-chip .avatar { width: 20px; height: 20px; border-radius: 6px; font-size: 8px; }
.attendee-list { display: flex; flex-direction: column; gap: 8px; max-height: 200px; overflow-y: auto; }
.attendee-line { display: flex; align-items: center; gap: 9px; padding: 6px 0; border-bottom: 1px dashed var(--line-2); }
.attendee-line:last-child { border-bottom: none; }
.attendee-line > span b { display: block; font-size: 11px; }
.attendee-line > span small { display: block; font-size: 9px; color: var(--text-3); }
.chat-back { display: none; }
.rank-no .icon { width: 11px; height: 11px; }
.a-icon.orange { background: var(--orange-50); color: var(--orange); }
.a-icon.green { background: var(--green-50); color: var(--green); }
.a-icon.violet { background: var(--violet-50); color: var(--violet); }
.a-icon.teal { background: var(--teal-50); color: var(--teal); }
.profile-tags .pill .icon { width: 12px; height: 12px; }
.info-line .icon { flex: none; }
.upload-zone { cursor: pointer; }
.upload-zone .btn { pointer-events: none; }
.notification-page-item { color: var(--text); }
.notification-page-item:hover { color: var(--text); background: #FAFBFE; }


.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head h2 { font-size: 15px; font-weight: 700; }
.section-head .more { font-size: 11px; color: var(--text-3); display: flex; align-items: center; gap: 3px; }
.section-head .more:hover { color: var(--primary); }
.section-head .more .icon { width: 13px; height: 13px; }

.empty-state { text-align: center; padding: 48px 20px; color: var(--text-3); }
.empty-state .empty-emoji { display: block; font-size: 34px; margin-bottom: 10px; filter: grayscale(.2); }
.empty-state h3 { font-size: 14px; color: var(--text-2); margin-bottom: 4px; }
.empty-state p { font-size: 12px; margin-bottom: 16px; }
.empty-state.big { padding: 100px 20px; }
.empty-state .btn { margin-top: 6px; }
.empty-mini { color: var(--text-3); font-size: 12px; text-align: center; padding: 24px; }

/* Tables */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.data-table th {
    text-align: left; font-weight: 600; font-size: 10.5px; color: var(--text-3);
    letter-spacing: .3px; padding: 10px 14px; background: #FAFBFD;
    border-bottom: 1px solid var(--line); white-space: nowrap;
}
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background .15s; }
.data-table tbody tr:hover { background: #FAFBFE; }
.data-table .cell-person { display: flex; align-items: center; gap: 9px; min-width: 150px; }
.data-table .cell-person b { display: block; font-size: 12.5px; font-weight: 600; }
.data-table .cell-person small { display: block; font-size: 10px; color: var(--text-3); }
.data-table .row-actions { display: flex; align-items: center; gap: 3px; justify-content: flex-end; }
.data-table .row-actions .icon-btn { width: 30px; height: 30px; }
.data-table .row-actions .icon { width: 15px; height: 15px; }
.data-table .muted { font-size: 11px; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar .input, .toolbar .select { height: 35px; font-size: 12px; }
.toolbar .search-input { width: 220px; }
.filter-chip {
    display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 11px;
    border: 1px solid var(--line); border-radius: 7px; background: #fff;
    font-size: 11.5px; color: var(--text-2); white-space: nowrap; transition: .16s;
}
.filter-chip:hover { border-color: #C9D5E8; color: var(--text); }
.filter-chip.active { background: var(--primary-50); border-color: var(--primary-100); color: var(--primary); font-weight: 600; }
.filter-chip .count { font-size: 9.5px; background: rgba(0,0,0,.05); padding: 0 5px; border-radius: 6px; }

.tabs { display: flex; align-items: center; gap: 3px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tab {
    position: relative; border: none; background: none; padding: 10px 15px;
    font-size: 12.5px; color: var(--text-3); white-space: nowrap; font-weight: 500;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); font-weight: 600; }
.tab.active::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--primary); }
.tab .count { margin-left: 4px; font-size: 9px; background: var(--line-2); padding: 1px 5px; border-radius: 6px; color: var(--text-3); }

.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 4px; padding: 14px 0 0; }
.page-item {
    min-width: 30px; height: 30px; padding: 0 7px; border-radius: 7px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11.5px; color: var(--text-2); border: 1px solid var(--line); background: #fff;
}
.page-item:hover { border-color: var(--primary); color: var(--primary); }
.page-item.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.page-item.disabled { color: var(--text-4); background: #FAFBFD; }
.page-dots { color: var(--text-3); padding: 0 2px; font-size: 11px; }
.table-meta { display: flex; align-items: center; justify-content: space-between; padding: 12px 0 0; color: var(--text-3); font-size: 10.5px; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 150; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(16, 30, 58, .44); backdrop-filter: blur(2px); animation: fadeIn .18s; }
.modal-card {
    position: relative; z-index: 1; width: min(100%, 560px); max-height: calc(100vh - 48px);
    background: #fff; border-radius: 17px; box-shadow: var(--shadow-lg);
    display: flex; flex-direction: column; animation: modalIn .22s ease;
}
.modal-card.wide { width: min(100%, 760px); }
.modal-card.xwide { width: min(100%, 940px); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 20px 22px 14px; border-bottom: 1px solid var(--line-2); }
.modal-head h2 { font-size: 17px; }
.modal-head p { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.modal-head .icon-btn { margin: -5px -7px 0 0; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding: 14px 22px 18px; border-top: 1px solid var(--line-2); }
.modal-foot .left { margin-right: auto; }
.modal-layer { position: fixed; inset: 0; z-index: 150; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal-host { position: relative; z-index: 1; width: min(100%, 560px); }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Detail lists */
.detail-list { display: flex; flex-direction: column; }
.detail-row { display: grid; grid-template-columns: 100px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line-2); font-size: 12.5px; }
.detail-row:last-child { border-bottom: none; }
.detail-row dt { color: var(--text-3); }
.detail-row dd { margin: 0; color: var(--text); word-break: break-word; }
.info-line { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--text-2); }
.info-line .icon { width: 14px; height: 14px; color: var(--text-3); }

/* Timeline */
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 4px; bottom: 4px; width: 1px; background: var(--line); }
.timeline-item { position: relative; padding: 0 0 16px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot { position: absolute; left: -18px; top: 3px; width: 9px; height: 9px; border-radius: 50%; background: #fff; border: 2px solid var(--text-4); }
.timeline-item.done .timeline-dot { border-color: var(--green); background: var(--green); }
.timeline-item.current .timeline-dot { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-50); }
.timeline-item b { display: block; font-size: 12px; }
.timeline-item small { display: block; font-size: 10.5px; color: var(--text-3); margin-top: 1px; }
.timeline-item p { font-size: 11.5px; color: var(--text-2); margin-top: 5px; background: #FAFBFD; padding: 7px 9px; border-radius: 7px; }

/* Progress */
.progress { height: 6px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), #6C9BFF); }
.progress.green span { background: linear-gradient(90deg, var(--green), #46D88F); }
.progress.orange span { background: linear-gradient(90deg, var(--orange), #FFB65C); }
.progress.red span { background: linear-gradient(90deg, var(--red), #FF7A70); }

/* ============================================================
   Dashboard
   ============================================================ */
.hero-card {
    position: relative; overflow: hidden; border-radius: var(--radius-xl);
    padding: 26px 30px; color: #fff; margin-bottom: 18px;
    background:
        radial-gradient(700px 360px at 80% 20%, rgba(255,255,255,.16), transparent 62%),
        linear-gradient(120deg, #1F54E0 0%, #2F6BFF 55%, #4A83FF 100%);
    box-shadow: 0 16px 36px rgba(47, 107, 255, .2);
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.hero-card::before { content: ""; position: absolute; width: 340px; height: 340px; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; right: -90px; top: -140px; }
.hero-card::after { content: ""; position: absolute; width: 240px; height: 240px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; right: 10px; bottom: -150px; }
.hero-main { position: relative; z-index: 1; min-width: 0; }
.hero-greet { display: flex; align-items: center; gap: 7px; font-size: 11px; color: rgba(255,255,255,.7); letter-spacing: .5px; flex-wrap: wrap; }
.hero-greet .weather { display: inline-flex; align-items: center; gap: 4px; }
.hero-main h2 { font-size: 27px; margin-top: 8px; letter-spacing: .3px; }
.hero-main h2 span { color: #FFE28A; }
.hero-main p { margin-top: 8px; font-size: 12px; color: rgba(255,255,255,.7); }
.hero-quick { display: flex; align-items: center; gap: 8px; margin-top: 17px; flex-wrap: wrap; }
.hero-quick .btn { height: 34px; font-size: 11.5px; border-radius: 8px; }
.hero-quick .btn-white { background: #fff; color: var(--primary-700); box-shadow: 0 4px 12px rgba(0,30,90,.12); }
.hero-quick .btn-white:hover { background: #F7FAFF; color: var(--primary-700); }
.hero-quick .btn-glass { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); color: #fff; }
.hero-quick .btn-glass:hover { background: rgba(255,255,255,.22); color: #fff; }
.hero-side { position: relative; z-index: 1; display: flex; align-items: center; gap: 20px; flex: none; }
.checkin-ring { width: 104px; height: 104px; position: relative; display: flex; align-items: center; justify-content: center; }
.checkin-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.checkin-ring .ring-bg { fill: none; stroke: rgba(255,255,255,.18); stroke-width: 7; }
.checkin-ring .ring-fg { fill: none; stroke: #fff; stroke-width: 7; stroke-linecap: round; stroke-dasharray: 264; stroke-dashoffset: calc(264 - (264 * var(--p, 0) / 100)); transition: stroke-dashoffset .8s ease; }
.checkin-ring div { text-align: center; }
.checkin-ring b { display: block; font-size: 20px; line-height: 1.2; }
.checkin-ring small { display: block; font-size: 9px; color: rgba(255,255,255,.66); margin-top: 2px; }
.hero-checkin-info { min-width: 130px; }
.hero-checkin-info .status-line { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.hero-checkin-info .status-line i { width: 6px; height: 6px; border-radius: 50%; background: #7CFFB2; box-shadow: 0 0 0 3px rgba(124,255,178,.18); }
.hero-checkin-info small { display: block; font-size: 9.5px; color: rgba(255,255,255,.6); margin-top: 6px; line-height: 1.6; }
.hero-checkin-info .btn { margin-top: 10px; height: 31px; font-size: 11px; background: #fff; color: var(--primary-700); border: none; }
.hero-checkin-info .btn:hover { background: #F4F8FF; color: var(--primary-700); }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 17px; box-shadow: var(--shadow-xs); position: relative; overflow: hidden; transition: .18s; }
.stat-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.stat-top { display: flex; align-items: center; justify-content: space-between; }
.stat-icon { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--primary-50); color: var(--primary); }
.stat-icon .icon { width: 18px; height: 18px; }
.stat-icon.green { background: var(--green-50); color: var(--green); }
.stat-icon.orange { background: var(--orange-50); color: var(--orange); }
.stat-icon.violet { background: var(--violet-50); color: var(--violet); }
.stat-trend { font-size: 9.5px; color: var(--green); background: var(--green-50); border-radius: 6px; padding: 2px 6px; font-weight: 600; }
.stat-trend.down { color: var(--red); background: var(--red-50); }
.stat-trend.flat { color: var(--text-3); background: var(--line-2); }
.stat-value { display: flex; align-items: baseline; gap: 3px; margin-top: 12px; }
.stat-value b { font-size: 26px; line-height: 1; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.stat-value span { font-size: 10.5px; color: var(--text-3); }
.stat-label { font-size: 10.5px; color: var(--text-3); margin-top: 6px; }
.stat-foot { display: flex; align-items: center; gap: 5px; margin-top: 9px; font-size: 9.5px; color: var(--text-3); }
.stat-foot .mini-bar { flex: 1; height: 4px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.stat-foot .mini-bar i { display: block; height: 100%; border-radius: 3px; background: var(--primary); }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.dash-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.announce-list { display: flex; flex-direction: column; }
.announce-row { display: flex; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line-2); transition: background .15s; }
.announce-row:last-child { border-bottom: none; }
.announce-row:hover { background: #FAFBFE; }
.announce-type { width: 34px; height: 34px; border-radius: 10px; flex: none; background: var(--primary-50); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.announce-type .icon { width: 17px; height: 17px; }
.announce-type.orange { background: var(--orange-50); color: var(--orange); }
.announce-type.green { background: var(--green-50); color: var(--green); }
.announce-type.violet { background: var(--violet-50); color: var(--violet); }
.announce-body { min-width: 0; flex: 1; }
.announce-body b { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.announce-body b .pin { font-size: 8px; background: var(--red-50); color: var(--red); border-radius: 4px; padding: 1px 4px; font-weight: 600; }
.announce-body small { display: block; font-size: 10.5px; color: var(--text-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.announce-meta { font-size: 9px; color: var(--text-4); display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.unread-mark { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); flex: none; }

.todo-list { display: flex; flex-direction: column; }
.todo-row { display: flex; align-items: center; gap: 10px; padding: 11px 18px; border-bottom: 1px solid var(--line-2); }
.todo-row:last-child { border-bottom: none; }
.todo-check { width: 18px; height: 18px; border: 1.5px solid #CBD4E1; border-radius: 6px; flex: none; background: #fff; display: flex; align-items: center; justify-content: center; color: transparent; }
.todo-check:hover { border-color: var(--primary); color: var(--primary); }
.todo-check .icon { width: 12px; height: 12px; }
.todo-body { min-width: 0; flex: 1; }
.todo-body b { display: block; font-size: 11.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.todo-body small { display: block; font-size: 9.5px; color: var(--text-3); margin-top: 1px; }
.todo-pri { width: 6px; height: 6px; border-radius: 50%; background: var(--text-4); flex: none; }
.todo-pri.high { background: var(--orange); } .todo-pri.urgent { background: var(--red); } .todo-pri.low { background: var(--green); }

.person-mini-list { display: flex; flex-direction: column; }
.person-mini { display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-bottom: 1px solid var(--line-2); }
.person-mini:last-child { border-bottom: none; }
.person-mini-info { flex: 1; min-width: 0; }
.person-mini-info b { display: block; font-size: 11.5px; }
.person-mini-info small { display: block; font-size: 9.5px; color: var(--text-3); }
.person-mini .date { font-size: 9.5px; color: var(--text-3); background: var(--line-2); padding: 2px 6px; border-radius: 5px; }

.dept-bars { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.dept-bar-row { display: flex; align-items: center; gap: 10px; }
.dept-bar-row .name { width: 62px; font-size: 10.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dept-bar-row .bar { flex: 1; height: 7px; background: var(--line-2); border-radius: 4px; overflow: hidden; }
.dept-bar-row .bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--primary), #6C9BFF); }
.dept-bar-row .num { width: 24px; text-align: right; font-size: 10px; color: var(--text-3); font-variant-numeric: tabular-nums; }

.quick-apps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; padding: 14px 12px 16px; }
.quick-app { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 9px 3px; border-radius: 10px; color: var(--text-2); font-size: 10px; transition: .16s; }
.quick-app:hover { background: #FAFBFE; color: var(--text); }
.quick-app .qa-icon { width: 36px; height: 36px; border-radius: 11px; display: flex; align-items: center; justify-content: center; background: var(--primary-50); color: var(--primary); }
.quick-app .qa-icon .icon { width: 19px; height: 19px; }
.quick-app .qa-icon.green { background: var(--green-50); color: var(--green); }
.quick-app .qa-icon.orange { background: var(--orange-50); color: var(--orange); }
.quick-app .qa-icon.violet { background: var(--violet-50); color: var(--violet); }
.quick-app .qa-icon.teal { background: var(--teal-50); color: var(--teal); }

.activity-list { padding: 6px 18px 14px; }
.activity-item { display: flex; gap: 10px; padding: 9px 0; position: relative; }
.activity-item:not(:last-child)::before { content: ""; position: absolute; left: 14px; top: 34px; bottom: -4px; width: 1px; background: var(--line); }
.activity-item .avatar { z-index: 1; }
.activity-body { min-width: 0; flex: 1; }
.activity-body p { font-size: 10.5px; color: var(--text-2); line-height: 1.55; }
.activity-body p b { font-weight: 600; color: var(--text); }
.activity-body time { font-size: 9px; color: var(--text-4); display: block; margin-top: 2px; }

.mini-calendar { padding: 6px 16px 16px; }
.mini-calendar-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px 10px; }
.mini-calendar-head b { font-size: 12px; }
.mini-calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.mini-calendar-grid .wd { font-size: 9px; color: var(--text-4); padding: 3px 0; }
.mini-calendar-grid .day { height: 27px; display: flex; align-items: center; justify-content: center; font-size: 10px; color: var(--text-2); border-radius: 7px; position: relative; }
.mini-calendar-grid .day.other { color: var(--text-4); }
.mini-calendar-grid .day.today { background: var(--primary); color: #fff; font-weight: 600; }
.mini-calendar-grid .day.has-event::after { content: ""; position: absolute; bottom: 3px; width: 3px; height: 3px; border-radius: 50%; background: var(--orange); }
.mini-calendar-grid .day.today.has-event::after { background: #fff; }

.event-mini { display: flex; gap: 9px; padding: 10px 18px; border-bottom: 1px solid var(--line-2); align-items: flex-start; }
.event-mini:last-child { border-bottom: none; }
.event-time { width: 42px; flex: none; text-align: center; }
.event-time b { display: block; font-size: 11px; color: var(--text); }
.event-time small { display: block; font-size: 8.5px; color: var(--text-3); }
.event-dot { width: 6px; height: 6px; border-radius: 2px; margin-top: 5px; background: var(--event-color, var(--primary)); flex: none; }
.event-info { min-width: 0; }
.event-info b { display: block; font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event-info small { display: block; font-size: 9px; color: var(--text-3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============================================================
   Contacts / Directory
   ============================================================ */
.directory-layout { display: grid; grid-template-columns: 238px minmax(0, 1fr); gap: 18px; align-items: start; }
.dept-panel { padding: 8px; position: sticky; top: calc(var(--topbar-h) + 20px); }
.dept-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 8px; }
.dept-panel-head b { font-size: 11px; color: var(--text-3); letter-spacing: .4px; }
.dept-menu { display: flex; flex-direction: column; gap: 1px; }
.dept-menu-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; font-size: 11.5px; color: var(--text-2); }
.dept-menu-item:hover { background: #F7F9FD; color: var(--text); }
.dept-menu-item.active { background: var(--primary-50); color: var(--primary); font-weight: 600; }
.dept-menu-item .icon { width: 15px; height: 15px; color: var(--text-3); }
.dept-menu-item.active .icon { color: var(--primary); }
.dept-menu-item .count { margin-left: auto; font-size: 9px; color: var(--text-4); }
.dept-menu-sub { padding-left: 16px; }
.directory-main { min-width: 0; }
.directory-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.directory-title { display: flex; align-items: baseline; gap: 8px; }
.directory-title h2 { font-size: 15px; }
.directory-title span { font-size: 10.5px; color: var(--text-3); }
.directory-search { position: relative; width: 240px; }
.directory-search input { height: 34px; padding-left: 34px; font-size: 12px; }
.directory-search .icon { position: absolute; left: 11px; top: 9px; width: 16px; height: 16px; color: var(--text-3); }

.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.person-card { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 16px; position: relative; transition: .18s; cursor: pointer; }
.person-card:hover { border-color: #D3DFF2; box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.person-card-top { display: flex; align-items: flex-start; gap: 11px; }
.person-card-info { min-width: 0; flex: 1; }
.person-card-info b { display: flex; align-items: center; gap: 5px; font-size: 13px; }
.person-card-info small { display: block; font-size: 10px; color: var(--text-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-card-tag { margin-top: 5px; }
.person-card-contact { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line-2); display: flex; flex-direction: column; gap: 4px; }
.person-card-contact span { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-card-contact .icon { width: 12px; height: 12px; flex: none; }
.person-card-actions { display: flex; gap: 4px; margin-left: auto; }
.person-card-actions .icon-btn { width: 26px; height: 26px; border-radius: 7px; }
.person-card-actions .icon { width: 14px; height: 14px; }
.person-card:hover .person-card-actions { opacity: 1; }

.contact-modal-head { display: flex; gap: 15px; align-items: center; padding-bottom: 16px; border-bottom: 1px solid var(--line-2); }
.contact-modal-head h2 { font-size: 18px; }
.contact-modal-head p { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.contact-actions { display: flex; gap: 8px; margin-top: 15px; }
.contact-actions .btn { flex: 1; }
.contact-details { margin-top: 6px; }

/* ============================================================
   Employees
   ============================================================ */
.list-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-xs); }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line-2); }
.list-head h3 { font-size: 13px; }
.list-head small { font-size: 10.5px; color: var(--text-3); }
.list-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line-2); }

.employee-table .cell-person { min-width: 180px; }
.employee-table td { padding-top: 10px; padding-bottom: 10px; }
.employee-table .employee-no { font-size: 9.5px; color: var(--text-4); font-family: monospace; }
.employee-table .contact-col { font-size: 10.5px; color: var(--text-2); line-height: 1.65; }
.employee-table .contact-col span { display: block; }
.employee-table .actions-col { width: 110px; }

.employee-hero { display: flex; align-items: center; gap: 16px; }
.employee-hero h2 { font-size: 19px; }
.employee-hero p { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.employee-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.employee-tabs .tab { font-size: 12px; }
.profile-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 26px; }

/* ============================================================
   Departments / Org
   ============================================================ */
.org-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.org-stat { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 14px 16px; }
.org-stat span { font-size: 10.5px; color: var(--text-3); }
.org-stat b { display: block; font-size: 22px; margin-top: 4px; }
.org-stat small { font-size: 9.5px; color: var(--text-3); }
.org-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.org-tree { padding: 10px; }
.org-node { position: relative; }
.org-node-head {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin: 2px 0;
    border: 1px solid transparent; border-radius: 10px; transition: .16s;
}
.org-node-head:hover { background: #FAFBFE; border-color: var(--line-2); }
.org-node-head .org-toggle { width: 20px; height: 20px; border: none; background: none; color: var(--text-3); display: flex; align-items: center; justify-content: center; }
.org-node-head .org-toggle .icon { width: 14px; height: 14px; transition: transform .18s; }
.org-node.collapsed .org-toggle .icon { transform: rotate(-90deg); }
.org-node.collapsed > .org-children { display: none; }
.org-icon { width: 30px; height: 30px; border-radius: 9px; background: var(--primary-50); color: var(--primary); display: flex; align-items: center; justify-content: center; flex: none; }
.org-icon .icon { width: 16px; height: 16px; }
.org-info { flex: 1; min-width: 0; }
.org-info b { display: block; font-size: 12.5px; }
.org-info small { display: block; font-size: 9.5px; color: var(--text-3); margin-top: 1px; }
.org-count { font-size: 9.5px; color: var(--text-3); background: var(--line-2); border-radius: 6px; padding: 2px 7px; }
.org-actions { display: flex; gap: 2px; opacity: 0; transition: .15s; }
.org-node-head:hover .org-actions { opacity: 1; }
.org-actions .icon-btn { width: 27px; height: 27px; }
.org-actions .icon { width: 14px; height: 14px; }
.org-children { margin-left: 24px; padding-left: 13px; border-left: 1px dashed var(--line); }
.org-side { display: flex; flex-direction: column; gap: 14px; }

/* ============================================================
   Attendance
   ============================================================ */
.attendance-hero {
    display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; margin-bottom: 18px;
}
.clock-card {
    position: relative; overflow: hidden; border-radius: var(--radius-xl); padding: 26px 28px;
    background: linear-gradient(135deg, #15295C 0%, #1F3A7A 55%, #24509F 100%); color: #fff;
    box-shadow: 0 16px 34px rgba(21, 41, 92, .22);
}
.clock-card::after { content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%; border: 1px solid rgba(255,255,255,.1); right: -100px; top: -100px; }
.clock-card::before { content: ""; position: absolute; width: 200px; height: 200px; border-radius: 50%; border: 1px solid rgba(255,255,255,.06); right: 40px; bottom: -130px; }
.clock-top { display: flex; align-items: center; justify-content: space-between; }
.clock-top span { font-size: 11px; color: rgba(255,255,255,.62); }
.clock-live { font-size: 46px; font-weight: 300; letter-spacing: 2px; line-height: 1.1; margin-top: 8px; font-variant-numeric: tabular-nums; }
.clock-live small { font-size: 13px; color: rgba(255,255,255,.55); margin-left: 6px; letter-spacing: 0; }
.clock-date { font-size: 11.5px; color: rgba(255,255,255,.62); margin-top: 4px; }
.clock-status { display: flex; align-items: center; gap: 8px; margin-top: 18px; font-size: 11px; color: rgba(255,255,255,.7); }
.clock-status .dot { width: 6px; height: 6px; border-radius: 50%; background: #7CFFB2; box-shadow: 0 0 0 3px rgba(124,255,178,.15); }
.clock-actions { display: flex; gap: 8px; margin-top: 20px; position: relative; z-index: 1; }
.clock-actions .btn { height: 38px; font-size: 12px; border-radius: 9px; }
.clock-actions .btn-in { background: linear-gradient(135deg, #3C78FF, #2F6BFF); color: #fff; border: none; box-shadow: 0 6px 16px rgba(47,107,255,.34); }
.clock-actions .btn-out { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); color: #fff; }
.clock-actions .btn-out:hover { background: rgba(255,255,255,.2); color: #fff; }
.clock-actions .btn[disabled] { opacity: .42; }
.clock-loc { display: flex; align-items: center; gap: 5px; margin-top: 12px; font-size: 9.5px; color: rgba(255,255,255,.42); }
.clock-loc .icon { width: 12px; height: 12px; }
.clock-side { display: flex; flex-direction: column; gap: 14px; }
.attendance-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.att-stat { padding: 13px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.att-stat span { font-size: 9.5px; color: var(--text-3); }
.att-stat b { display: block; font-size: 21px; margin-top: 3px; }
.att-stat b small { font-size: 9px; color: var(--text-3); font-weight: 400; margin-left: 3px; }
.att-stat.green b { color: var(--green); }
.att-stat.orange b { color: var(--orange); }
.att-stat.blue b { color: var(--primary); }
.att-stat.red b { color: var(--red); }

.att-calendar { padding: 14px 16px 16px; }
.att-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.att-cal-grid .wd { font-size: 9.5px; color: var(--text-4); text-align: center; padding: 4px; }
.att-day { min-height: 58px; border: 1px solid var(--line-2); border-radius: 8px; padding: 5px 6px; position: relative; background: #fff; }
.att-day.other { opacity: .35; }
.att-day.today { border-color: var(--primary); background: var(--primary-50); }
.att-day .dnum { font-size: 10px; color: var(--text-2); font-weight: 500; }
.att-day .dstat { display: block; font-size: 8px; margin-top: 3px; font-weight: 600; }
.att-day .dtime { display: block; font-size: 7.5px; color: var(--text-3); margin-top: 1px; }
.att-day .dstat.normal { color: var(--green); } .att-day .dstat.late, .att-day .dstat.early { color: var(--orange); }
.att-day .dstat.absent { color: var(--red); } .att-day .dstat.leave { color: var(--primary); }
.att-day .dstat.weekend { color: var(--text-4); }
.att-day.weekend { background: #FAFBFD; }

.record-list { display: flex; flex-direction: column; }
.record-row { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--line-2); }
.record-row:last-child { border-bottom: none; }
.record-date { width: 70px; flex: none; }
.record-date b { display: block; font-size: 11.5px; }
.record-date small { display: block; font-size: 9px; color: var(--text-3); }
.record-times { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--text-2); }
.record-times span { padding: 2px 6px; background: #FAFBFD; border: 1px solid var(--line-2); border-radius: 5px; font-variant-numeric: tabular-nums; }
.record-note { flex: 1; min-width: 0; font-size: 10px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============================================================
   Approvals
   ============================================================ */
.approval-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.summary-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 13px; }
.summary-icon { width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; background: var(--orange-50); color: var(--orange); flex: none; }
.summary-icon .icon { width: 19px; height: 19px; }
.summary-icon.green { background: var(--green-50); color: var(--green); }
.summary-icon.red { background: var(--red-50); color: var(--red); }
.summary-icon.blue { background: var(--primary-50); color: var(--primary); }
.summary-card b { display: block; font-size: 20px; line-height: 1.2; }
.summary-card span { font-size: 10px; color: var(--text-3); }

.approval-list { display: flex; flex-direction: column; }
.approval-row { display: flex; align-items: center; gap: 13px; padding: 14px 17px; border-bottom: 1px solid var(--line-2); transition: background .15s; cursor: pointer; }
.approval-row:last-child { border-bottom: none; }
.approval-row:hover { background: #FAFBFE; }
.approval-type-icon { width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; flex: none; background: var(--primary-50); color: var(--primary); }
.approval-type-icon .icon { width: 19px; height: 19px; }
.approval-type-icon.leave { background: var(--green-50); color: var(--green); }
.approval-type-icon.expense { background: var(--orange-50); color: var(--orange); }
.approval-type-icon.trip { background: var(--violet-50); color: var(--violet); }
.approval-type-icon.purchase { background: var(--teal-50); color: var(--teal); }
.approval-type-icon.overtime { background: #FFF1F0; color: #D4380D; }
.approval-main { flex: 1; min-width: 0; }
.approval-main b { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.approval-main small { display: block; font-size: 10px; color: var(--text-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.approval-sub { display: flex; align-items: center; gap: 10px; margin-top: 4px; font-size: 9.5px; color: var(--text-4); }
.approval-sub span { display: inline-flex; align-items: center; gap: 3px; }
.approval-sub .icon { width: 11px; height: 11px; }
.approval-right { display: flex; align-items: center; gap: 12px; flex: none; }
.approval-amount { text-align: right; font-size: 12px; font-weight: 600; color: var(--text); }
.approval-amount small { display: block; font-size: 8.5px; color: var(--text-4); font-weight: 400; }
.approval-actions { display: flex; gap: 5px; }
.approval-actions .btn { height: 29px; padding: 0 10px; font-size: 10.5px; }

.approval-detail-head { display: flex; align-items: center; gap: 13px; padding-bottom: 16px; border-bottom: 1px solid var(--line-2); }
.approval-detail-head h2 { font-size: 17px; }
.approval-detail-head p { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.approval-reason { background: #FAFBFD; border: 1px solid var(--line-2); border-radius: 9px; padding: 12px 14px; font-size: 12px; color: var(--text-2); line-height: 1.75; white-space: pre-wrap; }
.approval-decide { display: flex; gap: 8px; align-items: center; margin-top: 16px; }
.approval-decide .textarea { min-height: 70px; }

/* ============================================================
   Announcements
   ============================================================ */
.announce-feature {
    position: relative; overflow: hidden; padding: 24px 28px; border-radius: var(--radius-lg);
    background: linear-gradient(120deg, #1E3A8A 0%, #2F6BFF 100%); color: #fff; margin-bottom: 18px;
}
.announce-feature::after { content: ""; position: absolute; width: 300px; height: 300px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; right: -80px; top: -130px; }
.announce-feature .feat-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 9.5px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.18); padding: 3px 8px; border-radius: 99px; }
.announce-feature h2 { font-size: 21px; margin-top: 10px; max-width: 720px; line-height: 1.45; position: relative; z-index: 1; }
.announce-feature p { font-size: 11px; color: rgba(255,255,255,.7); margin-top: 7px; }
.announce-feature .feat-foot { display: flex; align-items: center; gap: 15px; margin-top: 16px; font-size: 10px; color: rgba(255,255,255,.58); position: relative; z-index: 1; }
.announce-feature .feat-foot .btn { margin-left: auto; height: 32px; font-size: 11px; background: #fff; color: var(--primary-700); border: none; }
.announce-grid { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.announce-item { display: flex; gap: 13px; padding: 16px 18px; border-bottom: 1px solid var(--line-2); transition: background .15s; }
.announce-item:last-child { border-bottom: none; }
.announce-item:hover { background: #FAFBFE; }
.announce-item .a-icon { width: 38px; height: 38px; border-radius: 11px; background: var(--primary-50); color: var(--primary); display: flex; align-items: center; justify-content: center; flex: none; }
.announce-item .a-icon .icon { width: 18px; height: 18px; }
.announce-item .a-body { flex: 1; min-width: 0; }
.announce-item .a-body h3 { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.announce-item .a-body h3 .unread-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); flex: none; }
.announce-item .a-body p { font-size: 10.5px; color: var(--text-3); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.announce-item .a-meta { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 9px; color: var(--text-4); }
.announce-item .a-side { flex: none; text-align: right; }
.announce-item .a-side time { font-size: 9.5px; color: var(--text-3); }
.announce-detail h2 { font-size: 22px; line-height: 1.5; }
.announce-detail-meta { display: flex; align-items: center; gap: 12px; margin: 12px 0 18px; padding-bottom: 15px; border-bottom: 1px solid var(--line-2); font-size: 10.5px; color: var(--text-3); }
.announce-content { font-size: 13px; line-height: 2; color: var(--text-2); white-space: pre-wrap; }
.announce-content p { margin: 0 0 12px; }

/* ============================================================
   Tasks
   ============================================================ */
.task-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: start; }
.task-column { background: #F0F3F9; border-radius: 14px; padding: 11px; min-height: 220px; }
.task-col-head { display: flex; align-items: center; gap: 7px; padding: 3px 4px 10px; }
.task-col-head .col-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); }
.task-column.doing .col-dot { background: var(--primary); }
.task-column.done .col-dot { background: var(--green); }
.task-col-head b { font-size: 11.5px; }
.task-col-head .count { font-size: 9.5px; color: var(--text-3); background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: 1px 6px; }
.task-col-head .add-task { margin-left: auto; }
.task-col-head .add-task .icon-btn { width: 25px; height: 25px; }
.task-col-head .add-task .icon { width: 14px; height: 14px; }
.task-card { background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 12px 13px; margin-bottom: 8px; transition: .18s; cursor: pointer; position: relative; }
.task-card:hover { box-shadow: var(--shadow-sm); border-color: #D4DFEF; transform: translateY(-1px); }
.task-card.done { opacity: .7; }
.task-card.done .task-title { text-decoration: line-through; color: var(--text-3); }
.task-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.task-title { font-size: 12px; font-weight: 600; line-height: 1.55; flex: 1; }
.task-card p { font-size: 10px; color: var(--text-3); line-height: 1.6; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.task-card-foot { display: flex; align-items: center; gap: 7px; margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--line-2); }
.task-card-foot .due { font-size: 9px; color: var(--text-3); display: flex; align-items: center; gap: 3px; margin-left: auto; }
.task-card-foot .due.overdue { color: var(--red); font-weight: 600; }
.task-card-foot .due .icon { width: 11px; height: 11px; }
.task-card-foot .avatar { width: 22px; height: 22px; border-radius: 6px; font-size: 9px; }
.task-move { position: absolute; right: 8px; bottom: 8px; display: none; gap: 3px; }
.task-card:hover .task-move { display: flex; }
.task-move button { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line); background: #fff; color: var(--text-3); display: flex; align-items: center; justify-content: center; }
.task-move button:hover { color: var(--primary); border-color: var(--primary); }
.task-move .icon { width: 12px; height: 12px; }
.task-filter { display: flex; align-items: center; gap: 7px; margin-bottom: 14px; flex-wrap: wrap; }

/* ============================================================
   Calendar
   ============================================================ */
.calendar-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 18px; align-items: start; }
.calendar-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.calendar-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; border-bottom: 1px solid var(--line-2); }
.calendar-head h2 { font-size: 16px; }
.calendar-nav { display: flex; align-items: center; gap: 5px; }
.calendar-nav .icon-btn { width: 30px; height: 30px; border: 1px solid var(--line); }
.calendar-nav .icon { width: 14px; height: 14px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.calendar-wd { padding: 9px; text-align: center; font-size: 9.5px; color: var(--text-3); background: #FAFBFD; border-bottom: 1px solid var(--line-2); }
.calendar-cell { min-height: 108px; padding: 6px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); position: relative; }
.calendar-cell:nth-child(7n) { border-right: none; }
.calendar-cell.other { background: #FCFCFE; }
.calendar-cell.other .cal-date { color: var(--text-4); }
.calendar-cell.today { background: #F7FAFF; }
.calendar-cell.today .cal-date { background: var(--primary); color: #fff; }
.cal-date { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; font-size: 10px; font-weight: 500; }
.cal-events { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; }
.cal-event { display: flex; align-items: center; gap: 4px; font-size: 8.5px; padding: 2px 4px; border-radius: 4px; background: #F1F6FF; background: color-mix(in srgb, var(--event-color, #2F6BFF) 10%, #fff); color: var(--event-color, #2F6BFF); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.cal-event .dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; flex: none; }
.cal-more { font-size: 8px; color: var(--text-3); padding-left: 3px; }
.calendar-side { display: flex; flex-direction: column; gap: 14px; }

/* ============================================================
   Reports
   ============================================================ */
.report-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.report-list { display: flex; flex-direction: column; }
.report-item { padding: 16px 18px; border-bottom: 1px solid var(--line-2); transition: background .15s; }
.report-item:last-child { border-bottom: none; }
.report-item:hover { background: #FAFBFE; }
.report-item-top { display: flex; align-items: center; gap: 9px; }
.report-type-badge { font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 5px; background: var(--primary-50); color: var(--primary); }
.report-type-badge.weekly { background: var(--violet-50); color: var(--violet); }
.report-type-badge.monthly { background: var(--orange-50); color: var(--orange); }
.report-item h3 { font-size: 13px; font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.report-item p { font-size: 10.5px; color: var(--text-3); line-height: 1.65; margin-top: 5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.report-meta { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 9px; color: var(--text-4); }
.report-meta .author { display: flex; align-items: center; gap: 5px; color: var(--text-3); }
.report-meta .author .avatar { width: 18px; height: 18px; border-radius: 5px; font-size: 8px; }
.report-content { font-size: 12.5px; line-height: 1.85; color: var(--text-2); white-space: pre-wrap; }
.report-review { background: var(--green-50); border: 1px solid #C6F1DB; border-radius: 9px; padding: 11px 13px; margin-top: 14px; }
.report-review b { font-size: 10.5px; color: #027A48; display: flex; align-items: center; gap: 5px; }
.report-review p { font-size: 11.5px; color: #05603A; margin-top: 4px; line-height: 1.65; }

/* ============================================================
   Documents
   ============================================================ */
.upload-zone { border: 1.5px dashed #C9D7EF; border-radius: 13px; background: #FAFCFF; padding: 20px; display: flex; align-items: center; gap: 14px; transition: .18s; }
.upload-zone:hover, .upload-zone.drag { border-color: var(--primary); background: var(--primary-50); }
.upload-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--primary-50); color: var(--primary); display: flex; align-items: center; justify-content: center; flex: none; }
.upload-icon .icon { width: 21px; height: 21px; }
.upload-copy { flex: 1; min-width: 0; }
.upload-copy b { display: block; font-size: 12.5px; }
.upload-copy small { display: block; font-size: 10px; color: var(--text-3); margin-top: 2px; }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.doc-card { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 14px; transition: .18s; }
.doc-card:hover { box-shadow: var(--shadow-sm); border-color: #D4DFEF; transform: translateY(-1px); }
.doc-top { display: flex; align-items: flex-start; gap: 10px; }
.doc-icon { width: 40px; height: 40px; border-radius: 10px; background: #FFF1F0; color: #D4380D; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; flex: none; letter-spacing: .3px; }
.doc-icon.blue { background: var(--primary-50); color: var(--primary); }
.doc-icon.green { background: var(--green-50); color: var(--green); }
.doc-icon.orange { background: var(--orange-50); color: var(--orange); }
.doc-icon.violet { background: var(--violet-50); color: var(--violet); }
.doc-icon.gray { background: var(--line-2); color: var(--text-3); }
.doc-icon.pink { background: #FDF2F8; color: var(--pink); }
.doc-info { min-width: 0; flex: 1; }
.doc-info b { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-info small { display: block; font-size: 9.5px; color: var(--text-3); margin-top: 2px; }
.doc-meta { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 9px; border-top: 1px dashed var(--line-2); font-size: 9px; color: var(--text-4); }
.doc-meta .icon { width: 11px; height: 11px; }
.doc-meta .dl { margin-left: auto; color: var(--primary); display: flex; align-items: center; gap: 3px; }

/* ============================================================
   Analytics
   ============================================================ */
.analytics-grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 18px; margin-bottom: 18px; }
.chart-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; }
.chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.chart-head h3 { font-size: 13px; }
.chart-head p { font-size: 10px; color: var(--text-3); margin-top: 2px; }
.chart-legend { display: flex; gap: 10px; font-size: 9px; color: var(--text-3); flex-wrap: wrap; }
.chart-legend span { display: inline-flex; align-items: center; gap: 4px; }
.chart-legend i { width: 7px; height: 7px; border-radius: 2px; }
.bar-chart { display: flex; align-items: flex-end; gap: 12px; height: 200px; padding: 10px 2px 0; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.bar-col .bar-val { font-size: 9px; color: var(--text-3); }
.bar-col .bar-body { width: min(38px, 70%); border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #6C9BFF, #2F6BFF); min-height: 3px; transition: height .6s; }
.bar-col .bar-body.green { background: linear-gradient(180deg, #4ADE80, #07C160); }
.bar-col .bar-body.orange { background: linear-gradient(180deg, #FBBF24, #FF8F1F); }
.bar-col .bar-label { font-size: 9px; color: var(--text-3); white-space: nowrap; }
.donut-wrap { display: flex; align-items: center; gap: 22px; }
.donut { width: 142px; height: 142px; border-radius: 50%; position: relative; flex: none; background: conic-gradient(var(--segments)); }
.donut::after { content: ""; position: absolute; inset: 22px; border-radius: 50%; background: #fff; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 1; }
.donut-center b { font-size: 23px; }
.donut-center span { font-size: 9px; color: var(--text-3); }
.donut-legend { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.donut-legend div { display: flex; align-items: center; gap: 7px; font-size: 10.5px; color: var(--text-2); }
.donut-legend i { width: 8px; height: 8px; border-radius: 3px; }
.donut-legend .num { margin-left: auto; color: var(--text-3); font-size: 9.5px; }
.line-chart { width: 100%; height: 210px; }
.line-chart text { font-size: 9px; fill: var(--text-3); }
.line-chart .grid-line { stroke: #EEF2F8; stroke-width: 1; }
.line-chart .area { fill: url(#lineGradient); }
.line-chart .line { fill: none; stroke: var(--primary); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.line-chart .point { fill: #fff; stroke: var(--primary); stroke-width: 2; }
.ranking-list { display: flex; flex-direction: column; gap: 12px; }
.ranking-row { display: flex; align-items: center; gap: 10px; }
.rank-no { width: 19px; height: 19px; border-radius: 6px; background: var(--line-2); color: var(--text-3); font-size: 9px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.rank-no.top { background: var(--orange-50); color: var(--orange); }
.ranking-row .rk-info { flex: 1; min-width: 0; }
.ranking-row .rk-info b { display: block; font-size: 10.5px; }
.ranking-row .rk-info .progress { margin-top: 4px; height: 5px; }
.ranking-row .rk-num { font-size: 10px; color: var(--text-2); font-weight: 600; }

/* ============================================================
   Settings / Profile
   ============================================================ */
.settings-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 18px; align-items: start; }
.settings-nav { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 7px; position: sticky; top: calc(var(--topbar-h) + 20px); }
.settings-nav a, .settings-nav button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 10px; border: none; background: none; border-radius: 8px; font-size: 11.5px; color: var(--text-2); text-align: left; }
.settings-nav a:hover, .settings-nav button:hover { background: #FAFBFE; color: var(--text); }
.settings-nav .active { background: var(--primary-50); color: var(--primary); font-weight: 600; }
.settings-nav .icon { width: 15px; height: 15px; color: var(--text-3); }
.settings-nav .active .icon { color: var(--primary); }
.settings-section { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px 22px; margin-bottom: 16px; }
.settings-section-head { margin-bottom: 17px; padding-bottom: 12px; border-bottom: 1px solid var(--line-2); }
.settings-section-head h2 { font-size: 14px; }
.settings-section-head p { font-size: 10.5px; color: var(--text-3); margin-top: 3px; }

.profile-hero { position: relative; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px 26px; margin-bottom: 18px; display: flex; align-items: center; gap: 18px; }
.profile-hero::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 74px; background: linear-gradient(120deg, #EEF4FF, #F7FAFF); }
.profile-hero > * { position: relative; z-index: 1; }
.profile-main { flex: 1; min-width: 0; }
.profile-main h1 { font-size: 22px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.profile-main p { font-size: 11.5px; color: var(--text-3); margin-top: 4px; }
.profile-tags { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.profile-metrics { display: flex; gap: 26px; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line-2); }
.profile-metric b { display: block; font-size: 18px; line-height: 1.2; }
.profile-metric span { font-size: 9.5px; color: var(--text-3); }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.profile-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.profile-card-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.profile-card-head h2 { font-size: 13px; }
.profile-card-body { padding: 16px 18px; }

/* Notifications page */
.notification-page-list { display: flex; flex-direction: column; }
.notification-page-item { display: flex; gap: 13px; padding: 15px 18px; border-bottom: 1px solid var(--line-2); }
.notification-page-item:last-child { border-bottom: none; }
.notification-page-item.unread { background: #F8FAFF; }
.notification-page-item .n-body { flex: 1; min-width: 0; }
.notification-page-item h3 { font-size: 12.5px; }
.notification-page-item p { font-size: 11px; color: var(--text-3); margin-top: 3px; line-height: 1.6; }
.notification-page-item time { font-size: 9px; color: var(--text-4); margin-left: auto; flex: none; }

/* ============================================================
   Messages / Chat
   ============================================================ */
.chat-layout {
    display: grid; grid-template-columns: 300px minmax(0, 1fr);
    height: calc(100vh - var(--topbar-h) - 136px); min-height: 520px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
    overflow: hidden; box-shadow: var(--shadow-xs);
}
.chat-sidebar { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.chat-sidebar-head { padding: 14px 15px 10px; }
.chat-sidebar-head h2 { font-size: 14px; display: flex; align-items: center; gap: 6px; }
.chat-search { position: relative; margin-top: 10px; }
.chat-search input { height: 33px; padding-left: 32px; font-size: 11.5px; }
.chat-search .icon { position: absolute; left: 10px; top: 9px; width: 15px; height: 15px; color: var(--text-3); }
.chat-list { flex: 1; overflow-y: auto; padding: 0 7px 8px; }
.chat-person { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: var(--text); transition: .15s; position: relative; }
.chat-person:hover { background: #F7F9FD; color: var(--text); }
.chat-person.active { background: var(--primary-50); }
.chat-person-info { flex: 1; min-width: 0; }
.chat-person-info b { display: block; font-size: 11.5px; font-weight: 600; }
.chat-person-info small { display: block; font-size: 9px; color: var(--text-3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-person .chat-time { font-size: 8px; color: var(--text-4); align-self: flex-start; margin-top: 2px; }
.chat-person .chat-unread { position: absolute; right: 10px; bottom: 8px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px; background: var(--red); color: #fff; font-size: 8px; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.chat-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #F7F9FD; }
.chat-head { display: flex; align-items: center; gap: 10px; height: 62px; padding: 0 18px; background: #fff; border-bottom: 1px solid var(--line); flex: none; }
.chat-head-info { flex: 1; min-width: 0; }
.chat-head-info b { display: block; font-size: 12.5px; }
.chat-head-info small { display: block; font-size: 9px; color: var(--text-3); }
.chat-head .icon-btn { width: 32px; height: 32px; }
.chat-messages { flex: 1; overflow-y: auto; padding: 18px 22px; display: flex; flex-direction: column; gap: 14px; }
.chat-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text-3); font-size: 11.5px; gap: 8px; padding: 40px; text-align: center; }
.chat-empty .icon { width: 40px; height: 40px; color: #C9D5E8; }
.chat-day { text-align: center; font-size: 9px; color: var(--text-4); margin: 4px 0; }
.msg-row { display: flex; align-items: flex-end; gap: 8px; max-width: 78%; }
.msg-row.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg-row .avatar { width: 30px; height: 30px; border-radius: 9px; font-size: 11px; }
.msg-content { min-width: 0; }
.msg-bubble { background: #fff; border: 1px solid var(--line); border-radius: 3px 12px 12px 12px; padding: 8px 12px; font-size: 12px; line-height: 1.65; color: var(--text); word-break: break-word; white-space: pre-wrap; box-shadow: var(--shadow-xs); }
.msg-row.mine .msg-bubble { background: var(--primary); color: #fff; border-color: var(--primary); border-radius: 12px 3px 12px 12px; }
.msg-meta { font-size: 8.5px; color: var(--text-4); margin-top: 3px; display: flex; gap: 5px; }
.msg-row.mine .msg-meta { justify-content: flex-end; }
.chat-composer { flex: none; padding: 10px 16px 13px; background: #fff; border-top: 1px solid var(--line); }
.composer-tools { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; color: var(--text-3); }
.composer-tools .icon-btn { width: 28px; height: 28px; }
.composer-tools .icon { width: 16px; height: 16px; }
.composer-tools .tip { font-size: 8.5px; color: var(--text-4); margin-left: auto; }
.chat-form { display: flex; align-items: flex-end; gap: 8px; }
.chat-form textarea { flex: 1; min-height: 38px; max-height: 120px; height: 38px; resize: none; border: 1px solid var(--line); background: #F8FAFD; border-radius: 9px; padding: 9px 11px; outline: none; font-size: 12px; line-height: 1.6; }
.chat-form textarea:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(47,107,255,.1); }
.chat-form .btn { height: 38px; padding: 0 15px; font-size: 11.5px; }
.chat-placeholder { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #F7F9FD; color: var(--text-3); gap: 9px; }
.chat-placeholder .icon { width: 46px; height: 46px; color: #CBD7EA; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1240px) {
    .page-wrap { padding: 22px 22px 36px; }
    .topbar { padding: 0 22px; }
    .global-search { width: 250px; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .org-layout { grid-template-columns: minmax(0, 1fr) 270px; }
    .report-layout { grid-template-columns: minmax(0, 1fr) 270px; }
    .calendar-layout { grid-template-columns: minmax(0, 1fr) 260px; }
    .analytics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .login-shell { grid-template-columns: 1.02fr .98fr; }
    .visual-copy h1 { font-size: 42px; }
    .float-checkin { right: -4px; }
}

@media (max-width: 1080px) {
    :root { --sidebar-w: 224px; }
    .dash-grid { grid-template-columns: 1fr; }
    .attendance-hero { grid-template-columns: 1fr; }
    .attendance-stats { grid-template-columns: repeat(4, 1fr); }
    .clock-side { display: grid; grid-template-columns: 1.2fr .8fr; }
    .employee-table .contact-col { display: none; }
    .topbar-date { display: none; }
    .login-visual { padding: 38px 5vw 30px; }
}

@media (max-width: 960px) {
    .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-close { display: flex; }
    .sidebar-backdrop { display: none; position: fixed; inset: 0; z-index: 35; background: rgba(16,30,58,.4); }
    .sidebar-backdrop.show { display: block; }
    .app-main { margin-left: 0; }
    .menu-toggle { display: inline-flex; }
    .global-search { width: min(280px, 38vw); }
    .page-wrap { padding: 20px 18px 34px; }
    .topbar { padding: 0 18px; }
    .breadcrumb > span, .breadcrumb > .icon { display: none; }
    .quick-apps { grid-template-columns: repeat(5, 1fr); }
    .directory-layout { grid-template-columns: 200px minmax(0, 1fr); }
    .org-layout { grid-template-columns: 1fr; }
    .org-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .calendar-layout { grid-template-columns: 1fr; }
    .calendar-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-layout { grid-template-columns: 1fr; }
    .settings-layout { grid-template-columns: 160px minmax(0, 1fr); }
    .profile-grid { grid-template-columns: 1fr; }
    .chat-layout { grid-template-columns: 260px minmax(0, 1fr); }
    .login-shell { grid-template-columns: 1fr; }
    .login-visual { display: none; }
    .login-panel { min-height: 100vh; padding: 40px 24px; }
    .mobile-brand { display: block; font-size: 11px; color: var(--primary); font-weight: 700; letter-spacing: 1px; margin-bottom: 10px; }
    .login-card-head h2 { font-size: 27px; }
    .login-footer { margin-top: 26px; }
}

@media (max-width: 760px) {
    :root { --topbar-h: 60px; }
    .page-head { flex-direction: column; align-items: flex-start; gap: 12px; }
    .page-actions { width: 100%; justify-content: flex-start; }
    .page-actions .btn { flex: 1; }
    .topbar { gap: 8px; }
    .global-search { display: none; }
    .breadcrumb { font-size: 10.5px; }
    .topbar-right { gap: 2px; }
    .user-trigger-name, .user-trigger .chev { display: none; }
    .hero-card { flex-direction: column; align-items: flex-start; padding: 22px; gap: 18px; }
    .hero-side { width: 100%; justify-content: space-between; }
    .hero-main h2 { font-size: 23px; }
    .hero-checkin-info { min-width: auto; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .stat-card { padding: 13px 14px; }
    .stat-value b { font-size: 22px; }
    .quick-apps { grid-template-columns: repeat(5, 1fr); gap: 2px; }
    .quick-app { font-size: 9px; }
    .quick-app .qa-icon { width: 32px; height: 32px; }
    .directory-layout { grid-template-columns: 1fr; }
    .dept-panel { position: static; }
    .dept-menu { flex-direction: row; overflow-x: auto; padding-bottom: 2px; }
    .dept-menu-item { white-space: nowrap; }
    .dept-menu-sub { display: none; }
    .directory-bar { flex-direction: column; align-items: stretch; gap: 9px; }
    .directory-search { width: 100%; }
    .people-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .attendance-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .clock-side { grid-template-columns: 1fr; }
    .att-cal-grid .wd { font-size: 8px; }
    .att-day { min-height: 48px; padding: 4px; }
    .att-day .dtime { display: none; }
    .approval-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .approval-row { flex-wrap: wrap; }
    .approval-right { width: 100%; justify-content: space-between; padding-left: 51px; }
    .task-board { grid-template-columns: 1fr; }
    .task-column { min-height: 120px; }
    .org-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .org-side { grid-template-columns: 1fr; }
    .calendar-side { grid-template-columns: 1fr; }
    .calendar-cell { min-height: 78px; }
    .cal-event { font-size: 7.5px; }
    .analytics-grid { grid-template-columns: 1fr; }
    .settings-layout { grid-template-columns: 1fr; }
    .settings-nav { position: static; display: flex; gap: 3px; overflow-x: auto; }
    .settings-nav a, .settings-nav button { white-space: nowrap; width: auto; }
    .settings-section { padding: 16px; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .span-2 { grid-column: span 1; }
    .profile-hero { flex-direction: column; align-items: flex-start; padding: 20px; }
    .profile-metrics { width: 100%; justify-content: space-between; gap: 10px; }
    .chat-layout { grid-template-columns: 1fr; height: calc(100vh - 200px); }
    .chat-sidebar { display: none; }
    .chat-sidebar.mobile-show { display: flex; }
    .chat-main.mobile-hide { display: none; }
    .chat-back { display: inline-flex; }
    .msg-row { max-width: 90%; }
    .notify-panel { width: min(340px, calc(100vw - 24px)); }
    .modal { padding: 12px; }
    .modal-card { max-height: calc(100vh - 24px); }
    .modal-body { padding: 16px; }
    .modal-head { padding: 16px 16px 12px; }
    .modal-foot { padding: 12px 16px 15px; }
    .toast-stack { right: 12px; top: 70px; }
    .install-card { padding: 24px 20px; }
    .req-list { grid-template-columns: 1fr; }
    .demo-account-grid { grid-template-columns: 1fr; }
    .demo-chips { grid-template-columns: 1fr; }
    .profile-info-grid { grid-template-columns: 1fr; }
    .login-panel { padding: 30px 20px; }
    .list-foot { flex-direction: column; align-items: stretch; }
    .pagination { justify-content: center; }
}

@media (max-width: 520px) {
    .page-actions { flex-wrap: wrap; }
    .page-actions .btn { flex: 1 1 140px; min-width: 0; padding: 0 10px; }
    .hero-quick .btn { min-width: 0; padding: 0 10px; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero-quick { width: 100%; }
    .hero-quick .btn { flex: 1; }
    .hero-side { gap: 12px; }
    .checkin-ring { width: 86px; height: 86px; }
    .checkin-ring b { font-size: 17px; }
    .people-grid { grid-template-columns: 1fr; }
    .quick-apps { grid-template-columns: repeat(4, 1fr); }
    .quick-app:nth-child(5) { display: none; }
    .topbar { padding: 0 12px; }
    .page-wrap { padding: 16px 12px 30px; }
    .page-head h1 { font-size: 19px; }
    .calendar-cell { min-height: 64px; padding: 4px; }
    .cal-date { width: 18px; height: 18px; font-size: 9px; }
    .cal-event { display: none; }
    .calendar-cell .cal-more { display: block; font-size: 7px; }
    .approval-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .summary-card { padding: 11px; gap: 8px; }
    .summary-card b { font-size: 17px; }
    .summary-icon { width: 31px; height: 31px; }
    .record-note { display: none; }
    .org-summary { gap: 8px; }
    .org-stat { padding: 11px; }
    .org-stat b { font-size: 18px; }
    .donut-wrap { flex-direction: column; align-items: flex-start; }
    .float-card { display: none; }
    .visual-foot { margin-top: 30px; }
}

