@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  --bg: #080c14; --bg2: #0f1520; --card: #151d2e; --card-h: #1a2540; --input: #0b1018;
  --border: #1c2a3f; --border-f: #3b82f6;
  --text: #e4eaf3; --text-sec: #7d8fa8; --text-muted: #4a5b72;
  --accent: #3b82f6; --accent-h: #2563eb; --glow: rgba(59,130,246,0.12);
  --green: #22c55e; --orange: #f59e0b; --red: #ef4444; --info: #0ea5e9; --purple: #8b5cf6;
  --font: 'DM Sans', -apple-system, sans-serif; --mono: 'JetBrains Mono', monospace;
}
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; overflow: hidden; height: 100vh; }
a { color: var(--accent); text-decoration: none; }
::-webkit-scrollbar { width: 5px; height: 5px; } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Layout ──────────────────────────── */
.layout { display: flex; height: 100vh; }
.sidebar { width: 228px; background: var(--bg2); border-right: 1px solid var(--border); display: flex; flex-direction: column; flex-shrink: 0; }
.sb-logo { height: 54px; display: flex; align-items: center; padding: 0 16px; border-bottom: 1px solid var(--border); gap: 9px; }
.logo-icon { width: 28px; height: 28px; background: linear-gradient(135deg, var(--accent), var(--purple)); border-radius: 7px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11px; color: #fff; flex-shrink: 0; }
.logo-text { font-weight: 700; font-size: 15px; letter-spacing: -0.3px; }
.logo-text em { font-style: normal; color: var(--accent); }
.sb-nav { flex: 1; padding: 10px 6px; overflow-y: auto; }
.nav-sec { margin-bottom: 16px; }
.nav-sec-title { font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.3px; color: var(--text-muted); padding: 0 10px; margin-bottom: 3px; }
.ni { display: flex; align-items: center; padding: 7px 10px; border-radius: 6px; cursor: pointer; color: var(--text-sec); gap: 8px; font-size: 13px; font-weight: 500; transition: all .15s; margin-bottom: 1px; user-select: none; }
.ni:hover { background: var(--card); color: var(--text); }
.ni.active { background: var(--glow); color: var(--accent); }
.ni svg { width: 17px; height: 17px; flex-shrink: 0; }
.sb-footer { padding: 10px 14px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.sb-user-info { flex: 1; min-width: 0; }
.sb-user-name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user-role { font-size: 10px; color: var(--text-muted); text-transform: capitalize; }
.sb-footer svg { width: 16px; height: 16px; }

.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar { height: 54px; background: var(--bg2); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; flex-shrink: 0; }
.topbar h1 { font-size: 15px; font-weight: 600; }
.topbar-right { display: flex; gap: 8px; }
.pg-content { flex: 1; overflow-y: auto; padding: 20px 24px; }

/* ── Avatars ─────────────────────────── */
.avatar-sm { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: #fff; flex-shrink: 0; }
.avatar-xs { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; color: #fff; flex-shrink: 0; border: 2px solid var(--card); }
.avatar-stack { display: flex; }
.avatar-stack .avatar-xs { margin-left: -8px; }
.avatar-stack .avatar-xs:first-child { margin-left: 0; }
.avatar-more { background: var(--border) !important; font-size: 9px; color: var(--text-sec) !important; }

/* ── Cards ───────────────────────────── */
.card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 18px; }
.card.no-pad { padding: 0; }
.card-hd { font-size: 14px; font-weight: 600; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.card-hd svg { width: 16px; height: 16px; }

/* ── Stats ───────────────────────────── */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; display: flex; align-items: center; gap: 12px; transition: border-color .15s; }
.stat-card:hover { border-color: var(--accent); }
.stat-ic { width: 36px; height: 36px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-ic svg { width: 18px; height: 18px; }
.stat-ic.blue { background: rgba(59,130,246,.12); color: var(--accent); }
.stat-ic.green { background: rgba(34,197,94,.12); color: var(--green); }
.stat-ic.orange { background: rgba(245,158,11,.12); color: var(--orange); }
.stat-ic.red { background: rgba(239,68,68,.12); color: var(--red); }
.stat-ic.purple { background: rgba(139,92,246,.12); color: var(--purple); }
.stat-val { font-size: 22px; font-weight: 700; line-height: 1.1; }
.stat-lbl { color: var(--text-muted); font-size: 11px; font-weight: 500; }

/* ── Buttons ─────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 5px; padding: 8px 15px; border-radius: 6px; font-size: 13px; font-weight: 600; font-family: var(--font); border: none; cursor: pointer; transition: all .15s; white-space: nowrap; }
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--accent); color: #fff; } .btn-primary:hover { background: var(--accent-h); }
.btn-secondary { background: var(--card); color: var(--text); border: 1px solid var(--border); } .btn-secondary:hover { background: var(--card-h); }
.btn-danger { background: rgba(239,68,68,.12); color: var(--red); } .btn-danger:hover { background: rgba(239,68,68,.2); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-xs { padding: 3px 8px; font-size: 11px; }
.btn-full { width: 100%; justify-content: center; padding: 11px; }
.btn-icon { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px; border-radius: 4px; display: flex; align-items: center; }
.btn-icon:hover { background: var(--card-h); color: var(--text); }
.btn-icon svg { width: 16px; height: 16px; }
.view-btn { background: var(--input); border: 1px solid var(--border); color: var(--text-muted); cursor: pointer; padding: 5px 8px; border-radius: 5px; display: flex; align-items: center; }
.view-btn svg { width: 16px; height: 16px; }
.view-btn.active { background: var(--card); color: var(--accent); border-color: var(--accent); }

.clickable { cursor: pointer; }

/* ── Forms ───────────────────────────── */
.fg { margin-bottom: 14px; }
.fg label { display: block; font-size: 11px; font-weight: 600; color: var(--text-sec); margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.4px; }
.fc { width: 100%; padding: 8px 11px; background: var(--input); border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-family: var(--font); font-size: 13px; transition: border-color .15s; outline: none; }
.fc:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); }
select.fc { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234a5b72' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }
textarea.fc { resize: vertical; min-height: 70px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fc-color { height: 38px; padding: 3px; cursor: pointer; }
.color-picker { display: flex; gap: 6px; flex-wrap: wrap; }
.color-dot { width: 26px; height: 26px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: all .15s; }
.color-dot:hover { transform: scale(1.15); }
.color-dot.selected { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }

/* ── Tables ──────────────────────────── */
.tbl { width: 100%; border-collapse: collapse; }
.tbl thead th { text-align: left; padding: 10px 14px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.7px; color: var(--text-muted); border-bottom: 1px solid var(--border); background: var(--bg2); }
.tbl tbody td { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: middle; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover { background: var(--card-h); }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr.clickable { cursor: pointer; }
.mono { font-family: var(--mono); font-size: 12px !important; color: var(--text-muted); }
.fw-600 { font-weight: 600; }

/* ── Project table specifics ─────────── */
.proj-code { display: inline-block; font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--text-sec); background: var(--input); padding: 2px 8px; border-radius: 4px; letter-spacing: 0.3px; }
.proj-name-cell { display: flex; align-items: center; gap: 8px; }
.visibility-badge { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 4px; }
.visibility-badge.public { background: rgba(34,197,94,.12); color: var(--green); }
.visibility-badge.private { background: rgba(90,106,128,.12); color: var(--text-muted); }
.client-cell { line-height: 1.3; }
.client-name { font-size: 13px; }
.client-contact { font-size: 11px; color: var(--text-muted); }

/* ── Progress bars ───────────────────── */
.progress-wrap { margin-bottom: 6px; }
.progress-label { font-size: 11px; font-weight: 600; margin-bottom: 3px; }
.progress-bar { width: 100%; height: 5px; background: var(--input); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; transition: width .3s ease; }

/* ── Badges ──────────────────────────── */
.badge-st { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 100px; font-size: 11px; font-weight: 600; gap: 5px; white-space: nowrap; }
.badge-st::before { content: ''; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.badge-st.open, .badge-st.todo { background: rgba(59,130,246,.12); color: var(--accent); } .badge-st.open::before, .badge-st.todo::before { background: var(--accent); }
.badge-st.in_progress, .badge-st.active { background: rgba(245,158,11,.12); color: var(--orange); } .badge-st.in_progress::before, .badge-st.active::before { background: var(--orange); }
.badge-st.review, .badge-st.waiting { background: rgba(139,92,246,.12); color: var(--purple); } .badge-st.review::before, .badge-st.waiting::before { background: var(--purple); }
.badge-st.done, .badge-st.resolved, .badge-st.approved, .badge-st.completed { background: rgba(34,197,94,.12); color: var(--green); } .badge-st.done::before, .badge-st.resolved::before, .badge-st.approved::before, .badge-st.completed::before { background: var(--green); }
.badge-st.closed, .badge-st.archived, .badge-st.denied, .badge-st.cancelled { background: rgba(90,106,128,.12); color: var(--text-muted); } .badge-st.closed::before, .badge-st.archived::before, .badge-st.denied::before { background: var(--text-muted); }
.badge-st.on_hold, .badge-st.pending, .badge-st.not_started { background: rgba(14,165,233,.12); color: var(--info); } .badge-st.on_hold::before, .badge-st.pending::before, .badge-st.not_started::before { background: var(--info); }
.badge-st.full_time { background: rgba(59,130,246,.12); color: var(--accent); } .badge-st.full_time::before { background: var(--accent); }
.badge-st.part_time { background: rgba(139,92,246,.12); color: var(--purple); } .badge-st.part_time::before { background: var(--purple); }
.badge-st.contractor { background: rgba(245,158,11,.12); color: var(--orange); } .badge-st.contractor::before { background: var(--orange); }

.badge-pr { display: inline-flex; padding: 2px 7px; border-radius: 4px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.badge-pr.critical { background: rgba(239,68,68,.18); color: var(--red); }
.badge-pr.high { background: rgba(245,158,11,.18); color: var(--orange); }
.badge-pr.medium { background: rgba(59,130,246,.12); color: var(--accent); }
.badge-pr.low { background: rgba(90,106,128,.12); color: var(--text-muted); }

.role-badge { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 100px; text-transform: capitalize; }
.role-badge.admin { background: rgba(239,68,68,.12); color: var(--red); }
.role-badge.manager { background: rgba(139,92,246,.12); color: var(--purple); }
.role-badge.member { background: rgba(59,130,246,.12); color: var(--accent); }

/* ── Toolbar ─────────────────────────── */
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.search-box { position: relative; flex: 1; min-width: 200px; }
.search-box input { width: 100%; padding: 8px 12px 8px 34px; background: var(--card); border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-family: var(--font); font-size: 13px; outline: none; }
.search-box input:focus { border-color: var(--accent); }
.search-box svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-muted); }
.filter-sel { padding: 8px 28px 8px 10px; background: var(--card); border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-family: var(--font); font-size: 13px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234a5b72' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; outline: none; }
.filter-sel:focus { border-color: var(--accent); }

/* ── Modal ───────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 1000; animation: fadeIn .15s; }
.modal { background: var(--card); border: 1px solid var(--border); border-radius: 12px; width: 90%; max-width: 640px; max-height: 85vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.4); animation: slideUp .2s ease; }
.modal-hd { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.modal-hd h2 { font-size: 15px; font-weight: 600; }
.modal-close { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; border-radius: 5px; border: none; background: transparent; color: var(--text-muted); cursor: pointer; font-size: 17px; }
.modal-close:hover { background: var(--input); color: var(--text); }
.modal-bd { padding: 18px 20px; }
.modal-ft { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--border); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ── Kanban ──────────────────────────── */
.kanban { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 16px; min-height: 400px; }
.kb-col { min-width: 270px; width: 270px; background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; display: flex; flex-direction: column; }
.kb-col-hd { padding: 11px 13px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 600; }
.kb-count { background: var(--input); padding: 2px 7px; border-radius: 8px; font-size: 11px; color: var(--text-muted); }
.kb-cards { flex: 1; padding: 7px; overflow-y: auto; display: flex; flex-direction: column; gap: 7px; }
.kb-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 7px;
  padding: 11px; cursor: grab; transition: all .15s; position: relative;
}
.kb-card:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.kb-card:active { cursor: grabbing; }

/* Drag handle */
.kb-card-drag-handle {
  position: absolute; top: 8px; right: 8px;
  font-size: 12px; color: var(--text-muted); opacity: 0;
  transition: opacity .15s; cursor: grab; user-select: none;
  line-height: 1;
}
.kb-card:hover .kb-card-drag-handle { opacity: .6; }
.kb-card:hover .kb-card-drag-handle:hover { opacity: 1; }

/* Card being dragged */
.kb-card-dragging {
  opacity: .35; transform: rotate(2deg) scale(.97);
  border-color: var(--accent); box-shadow: 0 4px 16px rgba(59,130,246,.25);
}

/* Drop zone active highlight */
.kb-drop-active {
  background: rgba(59,130,246,.06);
  border: 2px dashed var(--accent) !important;
  border-radius: 8px;
  transition: all .15s;
}

/* Empty column drop target */
.kb-empty-drop {
  color: var(--text-muted); font-size: 12px; text-align: center;
  padding: 28px 12px; border: 2px dashed var(--border); border-radius: 6px;
  transition: all .15s;
}
.kb-drop-active .kb-empty-drop {
  border-color: var(--accent); color: var(--accent); background: rgba(59,130,246,.05);
}
.kb-card-title { font-size: 13px; font-weight: 500; margin-bottom: 7px; }
.kb-card-desc { font-size: 11px; color: var(--text-sec); line-height: 1.5; margin-bottom: 7px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.kb-card-meta { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--text-muted); }
.kb-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 7px; gap: 8px; }
.kb-card-due { font-size: 10px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.kb-card-due::before { content: ''; display: inline-block; width: 10px; height: 10px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475a70' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E"); background-size: contain; background-repeat: no-repeat; }
.kb-card-updated { font-size: 9px; color: var(--text-muted); opacity: .7; margin-left: auto; white-space: nowrap; }

/* Edit History in Modal */
.edit-note-section { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.edit-note-section label { display: block; font-size: 12px; font-weight: 600; color: var(--accent); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.4px; }
.task-meta-line { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); margin-top: 12px; padding: 8px 0; border-top: 1px solid var(--border); }
.edit-history { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 14px; max-height: 300px; overflow-y: auto; }
.edit-history-title { font-size: 12px; font-weight: 600; color: var(--text-sec); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
.edit-history-entry { padding: 10px 0; border-bottom: 1px solid var(--border); }
.edit-history-entry:last-child { border-bottom: none; }
.edit-history-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.edit-history-who { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.edit-history-when { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.edit-history-content { padding-left: 33px; }
.edit-history-changes { font-size: 11px; color: var(--accent); background: rgba(59,130,246,.06); padding: 3px 8px; border-radius: 4px; margin-bottom: 4px; display: inline-block; font-family: var(--mono); }
.edit-history-note { font-size: 13px; color: var(--text-sec); line-height: 1.6; }
.proj-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }

/* Activity Log & Action */
/* ── Detail layout ───────────────────── */
.detail-grid { display: grid; grid-template-columns: 1fr 300px; gap: 20px; }
.detail-main { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.detail-side { display: flex; flex-direction: column; gap: 14px; }
.df { margin-bottom: 12px; }
.df-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 3px; }
.df-val { font-size: 13px; }

/* ── Comments ────────────────────────── */
.comment { display: flex; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.comment:last-of-type { border-bottom: none; }
.comment-body { flex: 1; min-width: 0; }
.comment-hdr { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.comment-input { display: flex; gap: 8px; margin-top: 14px; }

/* ── Profile ─────────────────────────── */
.profile-layout { display: grid; grid-template-columns: 260px 1fr; gap: 24px; }
.profile-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 30px; text-align: center; height: fit-content; }
.profile-avatar { width: 72px; height: 72px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 700; color: #fff; margin: 0 auto 14px; }
.profile-card h2 { font-size: 17px; margin-bottom: 4px; }
.profile-forms { display: flex; flex-direction: column; gap: 0; }

/* ── Activity ────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-2-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.activity-feed { display: flex; flex-direction: column; gap: 10px; }
.af-item { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; }
.af-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border); margin-top: 5px; flex-shrink: 0; }
.af-text { flex: 1; color: var(--text-sec); }
.af-text strong { color: var(--text); }
.af-time { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

/* ── Login ───────────────────────────── */
.login-page { height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.login-card { width: 100%; max-width: 380px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 36px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.logo-section { text-align: center; margin-bottom: 28px; }
.logo-icon-lg { width: 50px; height: 50px; margin: 0 auto 12px; background: linear-gradient(135deg, var(--accent), var(--purple)); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 20px; color: #fff; }
.login-card h1 { font-size: 19px; margin-bottom: 3px; }
.login-card .subtitle { color: var(--text-muted); font-size: 12px; }
.error-msg { background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.3); color: var(--red); padding: 8px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; }
.success-msg { background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.3); color: var(--green); padding: 10px 14px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; line-height: 1.6; }
.forgot-link { color: var(--text-muted); font-size: 13px; transition: color .15s; }
.forgot-link:hover { color: var(--accent); text-decoration: none; }
.security-q-display { font-size: 14px; font-weight: 600; color: var(--text); padding: 10px 12px; background: var(--input); border: 1px solid var(--border); border-radius: 6px; }

/* ── Utility ─────────────────────────── */
.text-muted { color: var(--text-muted); } .text-sec { color: var(--text-sec); }
.text-success { color: var(--green); }
.text-center { text-align: center; }
.ts-11 { font-size: 11px; } .ts-12 { font-size: 12px; } .ts-13 { font-size: 13px; }
.loading { color: var(--text-muted); padding: 40px; text-align: center; }
.empty { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty h3 { font-size: 15px; margin-bottom: 6px; color: var(--text-sec); }

/* ── Action Menu Dropdown ─────────────── */
.action-menu-wrap { position: relative; }
.action-menu {
  display: none; position: absolute; right: 0; top: 100%; margin-top: 4px;
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  min-width: 180px; padding: 6px 0; z-index: 50;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.action-menu.open { display: block; }
.action-menu-title { padding: 6px 14px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; color: var(--text-muted); }
.action-menu-item { padding: 7px 14px; cursor: pointer; transition: background .12s; display: flex; align-items: center; }
.action-menu-item:hover { background: var(--card-h); }

/* ── Leave Type Badges ───────────────── */
.leave-type-badge {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 100px;
  font-size: 11px; font-weight: 600; text-transform: capitalize; white-space: nowrap;
}
.leave-type-badge.vacation { background: rgba(59,130,246,.12); color: var(--accent); }
.leave-type-badge.sick { background: rgba(239,68,68,.12); color: var(--red); }
.leave-type-badge.pto { background: rgba(139,92,246,.12); color: var(--purple); }
.leave-type-badge.personal { background: rgba(245,158,11,.12); color: var(--orange); }
.leave-type-badge.bereavement { background: rgba(90,106,128,.15); color: var(--text-sec); }
.leave-type-badge.maternity { background: rgba(236,72,153,.12); color: #ec4899; }
.leave-type-badge.unpaid { background: rgba(90,106,128,.12); color: var(--text-muted); }

/* ── Balance Cards ────────────────────── */
.balance-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 8px;
  padding: 14px 16px; min-width: 180px; flex: 1;
}
.balance-type { margin-bottom: 8px; }
.balance-nums { margin-bottom: 8px; }
.balance-avail { font-size: 22px; font-weight: 700; line-height: 1.1; }
.balance-unit { font-size: 12px; font-weight: 500; color: var(--text-muted); margin-left: 3px; }
.balance-detail { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.balance-bar { width: 100%; height: 4px; background: var(--input); border-radius: 3px; overflow: hidden; margin-bottom: 6px; }
.balance-fill { height: 100%; border-radius: 3px; transition: width .3s; }
.balance-policy { font-size: 10px; color: var(--text-muted); }

/* ── Action Menu Extras ──────────────── */
.action-menu-divider { height: 1px; background: var(--border); margin: 4px 0; }
.badge-st.archived { background: rgba(90,106,128,.12); color: var(--text-muted); }
.badge-st.archived::before { background: var(--text-muted); }

/* ── Activity Log ────────────────────── */
.activity-action {
  display: inline-block; font-size: 12px; font-weight: 500;
  color: var(--accent); background: rgba(59,130,246,.08);
  padding: 2px 8px; border-radius: 4px; white-space: nowrap;
}
.activity-log-table { max-height: 400px; overflow-y: auto; }

@media (max-width: 1024px) { .detail-grid { grid-template-columns: 1fr; } .profile-layout { grid-template-columns: 1fr; } }
@media (max-width: 768px) { .sidebar { display: none; } .form-row { grid-template-columns: 1fr; } .stats-row { grid-template-columns: 1fr 1fr; } .grid-2 { grid-template-columns: 1fr; } }
