:root {
  --navy: #102a43;
  --navy-2: #163b5c;
  --primary: #176b87;
  --primary-light: #e8f5f8;
  --accent: #00a896;
  --bg: #f3f6f9;
  --card: #ffffff;
  --text: #1d2a35;
  --muted: #6b7b88;
  --line: #e3eaf0;
  --danger: #d94f4f;
  --warning: #e79a23;
  --success: #1f9d75;
  --shadow: 0 8px 28px rgba(26, 52, 72, .07);
  --radius: 16px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--text); background: var(--bg); font-family: Tahoma, "Segoe UI", Arial, sans-serif; font-size: 14px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.sidebar { position: fixed; top: 0; right: 0; bottom: 0; width: 260px; color: #d9e8f2; background: linear-gradient(180deg, #102a43 0%, #0b2236 100%); z-index: 20; display: flex; flex-direction: column; box-shadow: -8px 0 30px rgba(11, 34, 54, .08); }
.brand { display: flex; align-items: center; gap: 12px; min-height: 86px; padding: 18px 24px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: #fff; background: linear-gradient(135deg, #00a896, #18b7cb); font-weight: 800; letter-spacing: 1px; box-shadow: 0 7px 18px rgba(0,168,150,.25); }
.brand-mark.large { width: 58px; height: 58px; font-size: 18px; margin: 0 auto 18px; }
.brand strong, .brand small { display: block; }
.brand strong { color: #fff; font-size: 16px; margin-bottom: 5px; }
.brand small { color: #93afc2; font-size: 11px; }
.sidebar nav { padding: 22px 14px; flex: 1; }
.sidebar nav a { display: flex; align-items: center; gap: 12px; padding: 13px 15px; margin: 5px 0; border-radius: 11px; transition: .2s ease; }
.sidebar nav a span { width: 24px; text-align: center; font-size: 17px; }
.sidebar nav a:hover { color: #fff; background: rgba(255,255,255,.06); transform: translateX(-2px); }
.sidebar nav a.active { color: #fff; background: linear-gradient(90deg, rgba(0,168,150,.3), rgba(24,183,203,.13)); border-right: 3px solid #31d5bd; }
.sidebar-foot { padding: 18px 24px; color: #8eabba; font-size: 11px; border-top: 1px solid rgba(255,255,255,.07); line-height: 1.8; }
.sidebar-foot span { color: #66879c; }

.main-shell { margin-right: 260px; min-height: 100vh; }
.topbar { height: 86px; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); padding: 0 32px; display: flex; align-items: center; gap: 16px; position: sticky; top: 0; z-index: 10; }
.topbar h1 { font-size: 20px; margin: 0 0 5px; }
.topbar p { margin: 0; color: var(--muted); font-size: 12px; }
.menu-toggle { display: none; border: 0; background: transparent; font-size: 22px; }
.user-area { margin-right: auto; display: flex; align-items: center; gap: 10px; }
.user-area strong, .user-area small { display: block; }
.user-area strong { font-size: 12px; }
.user-area small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.user-badge { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--primary); font-weight: 700; }
.icon-btn { width: 35px; height: 35px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--muted); }
.content { padding: 28px 32px 52px; max-width: 1680px; margin: auto; }

.messages { margin-bottom: 18px; }
.message { padding: 13px 16px; border-radius: 11px; background: #eaf4fb; border: 1px solid #cfe5f4; }
.message.success { color: #126e53; background: #eaf8f3; border-color: #c3eadc; }
.message.error { color: #9f3434; background: #fff0f0; border-color: #f3caca; }

.metric-grid { display: grid; grid-template-columns: repeat(6, minmax(155px, 1fr)); gap: 16px; margin-bottom: 22px; }
.metric-card { position: relative; overflow: hidden; display: flex; align-items: center; gap: 13px; min-height: 118px; padding: 18px; border-radius: var(--radius); background: var(--card); border: 1px solid rgba(227,234,240,.85); box-shadow: var(--shadow); transition: .2s ease; }
.metric-card:hover { transform: translateY(-3px); box-shadow: 0 13px 30px rgba(26,52,72,.11); }
.metric-card:after { content: ""; position: absolute; width: 70px; height: 70px; border-radius: 50%; left: -30px; bottom: -35px; background: currentColor; opacity: .05; }
.metric-icon { width: 43px; height: 43px; flex: 0 0 43px; display: grid; place-items: center; border-radius: 12px; font-size: 21px; background: #eff6f9; }
.metric-card small, .metric-card em { display: block; color: var(--muted); font-style: normal; font-size: 10px; }
.metric-card strong { display: block; margin: 4px 0; font-size: 25px; }
.metric-card.blue .metric-icon { background: #e8f3ff; } .metric-card.violet .metric-icon { background: #f0ebff; }
.metric-card.orange .metric-icon { background: #fff1df; } .metric-card.green .metric-icon { background: #e4f7f0; }
.metric-card.cyan .metric-icon { background: #e3f7fa; } .metric-card.rose .metric-icon { background: #ffebf0; }

.dashboard-grid { display: grid; gap: 20px; margin-bottom: 20px; }
.dashboard-grid.two-one { grid-template-columns: 2fr 1fr; }
.dashboard-grid.one-two { grid-template-columns: 1fr 2fr; }
.dashboard-grid.equal { grid-template-columns: 1fr 1fr; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 21px; margin-bottom: 20px; }
.panel-head { min-height: 42px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.panel-head h2 { margin: 0 0 6px; font-size: 15px; }
.panel-head p { margin: 0; color: var(--muted); font-size: 11px; }
.panel-head > a:not(.btn) { color: var(--primary); font-size: 11px; }

.project-progress-list { display: grid; gap: 15px; }
.project-progress { padding: 3px 0; }
.progress-title { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 8px; }
.progress-title strong, .progress-title small { display: block; }
.progress-title strong { font-size: 12px; margin-bottom: 5px; }
.progress-title small { color: var(--muted); font-size: 10px; }
.progress-title b { color: var(--primary); font-size: 12px; }
.progress-title.small { margin: 18px 0 7px; }
.progress-track { height: 7px; border-radius: 10px; background: #edf2f5; overflow: hidden; }
.progress-track span { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #25b7cf); }
.progress-track.slim { height: 5px; margin-right: 46px; }
.category-list { display: grid; gap: 10px; }
.category-list > a { display: flex; align-items: center; gap: 12px; padding: 9px; border-radius: 12px; transition: .2s; }
.category-list > a:hover { background: var(--primary-light); }
.category-list strong, .category-list small { display: block; }
.category-list strong { font-size: 12px; margin-bottom: 5px; }
.category-list small { color: var(--muted); font-size: 10px; }
.category-ring { --value: 0; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--value) * 1%), #edf2f5 0); position: relative; flex: 0 0 46px; }
.category-ring:after { content: ""; position: absolute; inset: 5px; background: #fff; border-radius: 50%; }
.category-ring span { position: relative; z-index: 1; font-size: 9px; font-weight: 700; }
.activity-feed { display: grid; }
.activity-feed > a, .feed-row { display: flex; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--line); }
.activity-feed > a:last-child, .feed-row:last-child { border-bottom: 0; }
.feed-icon { width: 33px; height: 33px; flex: 0 0 33px; display: grid; place-items: center; border-radius: 10px; background: var(--primary-light); }
.feed-icon.shield { color: var(--accent); background: #e8f7f3; }
.activity-feed strong, .activity-feed p, .activity-feed small { display: block; margin: 0; }
.activity-feed strong { font-size: 11px; margin-bottom: 5px; }
.activity-feed p { color: #465765; font-size: 11px; line-height: 1.7; }
.activity-feed small { color: var(--muted); font-size: 9px; margin-top: 4px; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; background: #fff; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; box-shadow: var(--shadow); }
.filter-bar select, .filter-bar input, .login-form input, .note-form textarea { border: 1px solid #dbe4ea; background: #fff; color: var(--text); border-radius: 10px; outline: none; transition: .2s; }
.filter-bar select { min-width: 165px; padding: 10px 12px; }
.search-box { min-width: 260px; flex: 1; position: relative; }
.search-box span { position: absolute; right: 12px; top: 10px; }
.search-box input { width: 100%; padding: 10px 39px 10px 12px; }
.filter-bar input:focus, .filter-bar select:focus, .login-form input:focus, .note-form textarea:focus { border-color: #62aebf; box-shadow: 0 0 0 3px rgba(23,107,135,.08); }
.btn { display: inline-flex; justify-content: center; align-items: center; padding: 10px 16px; border: 1px solid transparent; border-radius: 10px; font-weight: 600; font-size: 11px; }
.btn.primary { color: #fff; background: linear-gradient(135deg, var(--primary), #138e9c); }
.btn.ghost { color: var(--primary); background: #fff; border-color: #cfe0e7; }
.btn.danger { color: #fff; background: linear-gradient(135deg, #c84b4b, #e06d55); }
.btn.wide { width: 100%; padding: 13px; }
.result-meta { color: var(--muted); font-size: 11px; margin: 12px 4px 16px; }
.unit-chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 16px; }
.unit-chips a { white-space: nowrap; padding: 8px 12px; background: #fff; border: 1px solid var(--line); border-radius: 20px; font-size: 10px; }
.unit-chips a.selected { color: #fff; background: var(--primary); border-color: var(--primary); }
.unit-chips b { margin-right: 5px; }

.project-card-grid { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 17px; }
.project-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 19px; box-shadow: var(--shadow); transition: .2s; }
.project-card:hover { transform: translateY(-3px); border-color: #bad8e1; }
.project-card-head, .mission-top, .mission-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.project-code, .report-code { color: var(--primary); font-size: 10px; font-weight: 700; letter-spacing: .3px; }
.project-card h3 { font-size: 14px; margin: 17px 0 8px; }
.project-card > p { color: var(--muted); font-size: 10px; margin: 0 0 17px; }
.project-stats { display: grid; grid-template-columns: repeat(3, 1fr); padding: 11px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.project-stats span { text-align: center; color: var(--muted); font-size: 9px; border-left: 1px solid var(--line); }
.project-stats span:last-child { border-left: 0; }
.project-stats b { display: block; color: var(--text); font-size: 15px; margin-bottom: 3px; }
.project-status { display: flex; justify-content: space-between; gap: 8px; margin-top: 16px; font-size: 10px; }
.project-status span { color: var(--muted); }
.project-status strong { text-align: left; max-width: 65%; }
.badge { display: inline-flex; align-items: center; justify-content: center; padding: 5px 8px; border-radius: 20px; font-size: 9px; font-weight: 600; }
.badge.urgent { color: #a33c21; background: #fff0e8; }
.badge.neutral, .badge.status { color: #4f6574; background: #eef3f6; }
.badge.success { color: #137154; background: #e6f7f1; }
.badge.warning { color: #9b6615; background: #fff3df; }

.breadcrumb { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; margin-bottom: 14px; }
.breadcrumb a { color: var(--primary); }
.project-hero, .employee-hero, .mission-hero { display: flex; justify-content: space-between; align-items: stretch; gap: 28px; background: linear-gradient(120deg, #fff, #f8fbfc); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 20px; }
.project-hero > div:first-child { flex: 1; }
.project-hero h2, .mission-hero h2 { font-size: 20px; margin: 15px 0 10px; }
.project-hero p, .mission-hero p { color: #536674; line-height: 1.9; margin: 0; }
.hero-status { width: 255px; padding: 16px; border-radius: 13px; background: #f0f7f9; display: grid; align-content: center; gap: 6px; }
.hero-status small { color: var(--muted); font-size: 9px; margin-top: 5px; }
.hero-status strong { font-size: 11px; line-height: 1.8; }
.info-panel dl, .employee-hero dl { margin: 0; display: grid; grid-template-columns: 115px 1fr; gap: 11px; }
.info-panel dt, .employee-hero dt { color: var(--muted); font-size: 10px; }
.info-panel dd, .employee-hero dd { margin: 0; font-size: 11px; line-height: 1.7; }
.activity-list { display: grid; }
.activity-list > a { padding: 12px 5px; border-bottom: 1px solid var(--line); }
.activity-list > a:last-child { border-bottom: 0; }
.activity-title { display: flex; align-items: center; gap: 11px; }
.activity-title > div { flex: 1; }
.activity-title strong, .activity-title small { display: block; }
.activity-title strong { font-size: 11px; margin-bottom: 5px; }
.activity-title small { color: var(--muted); font-size: 9px; }
.activity-title b { color: var(--primary); font-size: 10px; }
.list-index { width: 34px; height: 34px; display: grid; place-items: center; background: var(--primary-light); color: var(--primary); border-radius: 9px; font-weight: 700; }

.table-panel { padding: 0; overflow: hidden; }
.table-panel .panel-head { padding: 20px 21px 0; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 780px; }
th { color: #617381; background: #f7f9fb; padding: 12px 14px; text-align: right; font-size: 9px; font-weight: 600; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
td { padding: 13px 14px; border-bottom: 1px solid #edf1f4; vertical-align: middle; font-size: 10px; line-height: 1.7; }
tbody tr:hover { background: #fbfdfe; }
tr.urgent-row { background: #fffaf6; }
.table-title { display: block; color: var(--text); font-weight: 600; max-width: 300px; }
.table-title small, .block { display: block; color: var(--muted); font-size: 9px; margin-top: 4px; font-weight: 400; }
.count-pill { display: inline-flex; min-width: 29px; justify-content: center; padding: 4px 7px; border-radius: 15px; background: #edf4f7; color: var(--primary); font-weight: 700; }
.person-cell { display: flex; align-items: center; gap: 10px; }
.person-cell > span { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: linear-gradient(135deg, #176b87, #00a896); font-weight: 700; }
.person-cell strong, .person-cell small { display: block; }

.detail-strip { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px; overflow: hidden; }
.detail-strip > div { padding: 17px 20px; border-left: 1px solid var(--line); }
.detail-strip > div:last-child { border-left: 0; }
.detail-strip small, .detail-strip strong { display: block; }
.detail-strip small { color: var(--muted); font-size: 9px; margin-bottom: 7px; }
.detail-strip strong { font-size: 11px; line-height: 1.6; }
.people-list { display: grid; }
.people-list > a, .people-list > div { display: flex; align-items: center; gap: 11px; padding: 11px 3px; border-bottom: 1px solid var(--line); }
.people-list > *:last-child { border-bottom: 0; }
.people-list > * > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #eef5f7; }
.people-list strong, .people-list small { display: block; }
.people-list strong { font-size: 11px; margin-bottom: 5px; }
.people-list small { color: var(--muted); font-size: 9px; }
.report-list { display: grid; }
.report-list > a { display: flex; justify-content: space-between; gap: 15px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.report-list > a:last-child { border-bottom: 0; }
.report-list strong { display: block; font-size: 11px; margin: 6px 0; }
.report-list p { margin: 5px 0 0; color: #526572; line-height: 1.8; font-size: 10px; }
.report-meta { min-width: 85px; text-align: left; color: var(--muted); }
.report-meta span, .report-meta small { display: block; font-size: 9px; margin-bottom: 8px; }
.notes-panel { margin-top: 20px; }
.note-form { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 20px; }
.note-form textarea { flex: 1; resize: vertical; padding: 12px; }
.note-list { display: grid; gap: 10px; }
.note-list article { padding: 13px 15px; border-radius: 11px; background: #f8fafb; border-right: 3px solid var(--accent); }
.note-list article > div { display: flex; justify-content: space-between; gap: 10px; }
.note-list strong { font-size: 10px; }
.note-list small { color: var(--muted); font-size: 9px; }
.note-list p { margin: 9px 0 0; line-height: 1.9; font-size: 11px; }
.management-panel { margin-top: 20px; }
.management-forms { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.management-forms form { padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: #fafcfd; }
.management-forms h3 { margin: 0 0 15px; font-size: 12px; }
.management-forms label { display: block; color: var(--muted); font-size: 9px; margin: 9px 0 6px; }
.management-forms input, .management-forms textarea { width: 100%; padding: 10px 11px; border: 1px solid #dbe4ea; background: #fff; border-radius: 9px; outline: none; resize: vertical; }
.management-forms input:focus, .management-forms textarea:focus { border-color: #62aebf; box-shadow: 0 0 0 3px rgba(23,107,135,.08); }
.management-forms .btn { margin-top: 12px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-hint { color: var(--muted); font-size: 9px; line-height: 1.8; min-height: 33px; }

.employee-hero { align-items: center; }
.employee-avatar { width: 68px; height: 68px; flex: 0 0 68px; display: grid; place-items: center; border-radius: 20px; color: #fff; background: linear-gradient(135deg, #176b87, #00a896); font-size: 26px; font-weight: 700; }
.employee-hero > div:nth-child(2) { flex: 1; }
.employee-hero h2 { margin: 0 0 8px; }
.employee-hero p { margin: 0; color: var(--muted); }
.employee-hero dl { width: 360px; padding-right: 25px; border-right: 1px solid var(--line); }
.report-body .report-text { padding: 18px; background: #f8fafb; border-radius: 12px; min-height: 150px; font-size: 12px; line-height: 2.1; }
.attachment-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.attachment-grid > a { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; transition: .2s; }
.attachment-grid > a:hover { border-color: #9dcbd5; background: #fbfefe; }
.attachment-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; background: var(--primary-light); font-size: 18px; }
.attachment-grid > a div { flex: 1; min-width: 0; }
.attachment-grid strong, .attachment-grid small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-grid strong { font-size: 10px; margin-bottom: 6px; }
.attachment-grid small { color: var(--muted); font-size: 8px; }
.attachment-grid b { color: var(--primary); font-size: 9px; }

.mission-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; }
.mission-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 19px; box-shadow: var(--shadow); transition: .2s; }
.mission-card:hover { transform: translateY(-3px); border-color: #bad8e1; }
.mission-type { color: var(--primary); font-size: 10px; font-weight: 700; }
.mission-card h3 { margin: 17px 0 8px; font-size: 14px; }
.mission-card > p { color: var(--muted); font-size: 10px; }
.mission-card dl { display: grid; gap: 9px; padding: 13px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mission-card dl div { display: flex; justify-content: space-between; gap: 8px; }
.mission-card dt { color: var(--muted); font-size: 9px; }
.mission-card dd { margin: 0; font-size: 10px; text-align: left; }
.mission-foot { margin-top: 13px; color: var(--muted); font-size: 9px; }
.mission-hero { align-items: center; background: linear-gradient(120deg, #fff, #eef9f7); }
.mission-hero > div:first-child { flex: 1; }
.review-stamp { display: block; color: var(--success); border: 2px solid #5db99d; border-radius: 12px; padding: 10px 16px; text-align: center; font-weight: 700; transform: rotate(-2deg); }
.review-stamp small { font-size: 8px; }
.event-name { color: #215b74; background: #eaf3f7; border-radius: 6px; padding: 4px 7px; font-family: Consolas, monospace; font-size: 9px; }
.details-json { display: block; direction: ltr; text-align: left; color: #526572; background: transparent; white-space: normal; max-width: 470px; font-size: 9px; }
.empty { padding: 25px 10px; color: var(--muted); text-align: center; font-size: 11px; }
.empty.full { grid-column: 1 / -1; background: #fff; border: 1px dashed #cad6dd; border-radius: var(--radius); }

.login-page { display: grid; place-items: center; min-height: 100vh; overflow: hidden; position: relative; background: radial-gradient(circle at 20% 10%, #e1f4f2, transparent 35%), linear-gradient(135deg, #f5f8fa, #eaf0f4); }
.login-decoration { position: fixed; width: 360px; height: 360px; border-radius: 50%; filter: blur(1px); opacity: .18; }
.login-decoration.one { top: -180px; right: -100px; background: var(--accent); }
.login-decoration.two { bottom: -190px; left: -80px; background: var(--primary); }
.login-card { position: relative; z-index: 1; width: min(430px, calc(100% - 30px)); background: rgba(255,255,255,.96); border: 1px solid rgba(255,255,255,.8); border-radius: 22px; box-shadow: 0 24px 70px rgba(16,42,67,.15); padding: 35px; }
.login-brand { text-align: center; margin-bottom: 24px; }
.login-brand h1 { font-size: 19px; margin: 0 0 10px; }
.login-brand p { color: var(--muted); margin: 0; line-height: 1.8; font-size: 10px; }
.login-form { display: grid; gap: 9px; }
.login-form label { color: #4c5f6d; font-size: 10px; margin-top: 5px; }
.login-form input { width: 100%; padding: 12px; direction: ltr; text-align: left; }
.login-form .btn { margin-top: 12px; }
.security-note { margin-top: 22px; padding-top: 17px; border-top: 1px solid var(--line); color: var(--muted); text-align: center; font-size: 9px; }

@media (max-width: 1350px) {
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .project-card-grid, .mission-card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 980px) {
  .sidebar { transform: translateX(105%); transition: .25s ease; }
  .nav-open .sidebar { transform: translateX(0); }
  .main-shell { margin-right: 0; }
  .menu-toggle { display: block; }
  .dashboard-grid.two-one, .dashboard-grid.one-two, .dashboard-grid.equal { grid-template-columns: 1fr; }
  .attachment-grid { grid-template-columns: repeat(2, 1fr); }
  .employee-hero { flex-wrap: wrap; }
  .employee-hero dl { width: 100%; border-right: 0; border-top: 1px solid var(--line); padding: 18px 0 0; }
}
@media (max-width: 650px) {
  .topbar { padding: 0 15px; }
  .topbar p, .user-area > div:not(.user-badge) { display: none; }
  .content { padding: 18px 12px 40px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .metric-card { min-height: 100px; padding: 13px; }
  .metric-card strong { font-size: 20px; }
  .metric-icon { width: 36px; height: 36px; flex-basis: 36px; }
  .project-card-grid, .mission-card-grid, .attachment-grid { grid-template-columns: 1fr; }
  .filter-bar { display: grid; }
  .search-box { min-width: 0; }
  .filter-bar select { width: 100%; }
  .project-hero, .mission-hero { display: block; }
  .hero-status { width: 100%; margin-top: 18px; }
  .detail-strip { grid-template-columns: repeat(2, 1fr); }
  .detail-strip > div:nth-child(2) { border-left: 0; }
  .detail-strip > div { border-bottom: 1px solid var(--line); }
  .note-form { display: grid; }
  .management-forms { grid-template-columns: 1fr; }
}

/* Panel workspace v1.3: consistent focus, forms, threads and data tables. */
:root { --primary:#16736e; --accent:#229a87; --bg:#f3f6f5; --line:#dfe7e5; --radius:12px; }
body { font-size:14px; line-height:1.75; }
.sidebar { background:#133a40; }
.sidebar nav { overflow-y:auto; padding-top:12px; }
.sidebar nav a { padding:10px 14px; margin:3px 0; }
.sidebar nav a.active { background:#245159; border-right-color:#8cd5b7; }
.brand-mark { background:#d5efdd; color:#123c46; box-shadow:none; }
.topbar { height:auto; min-height:86px; }
.work-toolbar { display:flex; align-items:center; justify-content:space-between; gap:20px; margin:0 0 20px; flex-wrap:wrap; }
.work-toolbar h2,.work-toolbar p { margin:0; }
.work-toolbar p { color:var(--muted); margin-top:5px; }
.eyebrow { font-size:12px; font-weight:bold; color:var(--primary); }
.toolbar-actions { display:flex; gap:10px; flex-wrap:wrap; }
.btn { min-height:42px; background:#f6f9f8; border-color:var(--line); color:var(--text); }
.btn.primary { background:var(--primary); color:white; border-color:var(--primary); }
.btn:hover { filter:brightness(.96); }
a:focus-visible,button:focus-visible,summary:focus-visible { outline:3px solid #eab54d; outline-offset:3px; }
.tabs { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:24px; border-bottom:1px solid var(--line); padding-bottom:12px; }
.tabs a { padding:9px 14px; border-radius:8px; color:var(--muted); }
.tabs a.selected { color:var(--primary); background:#e0efe9; font-weight:bold; }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.form-field { display:flex; flex-direction:column; gap:7px; }
.form-field label,.edit-form label { display:block; font-size:13px; font-weight:bold; margin-bottom:6px; }
.edit-form input:not([type=hidden]),.edit-form select,.edit-form textarea { border:1px solid #c5d4cf; border-radius:8px; background:#fff; padding:11px 13px; width:100%; color:#203d40; }
.edit-form input:disabled { background:#eff3f1; }
.edit-form :is(input,select,textarea):focus { outline:2px solid #16736e; outline-offset:2px; }
.edit-form textarea { resize:vertical; min-height:110px; }
.form-field small,.hint { color:#607773; font-size:12px; line-height:1.9; }
.errorlist { color:#a02532; background:#fff2f3; padding:10px 28px; border-radius:8px; white-space:pre-line; }
.steps { display:flex; justify-content:space-between; gap:10px; margin-bottom:24px; }
.steps span { padding:12px 20px; border-bottom:2px solid var(--line); flex:1; color:var(--muted); }
.steps .selected { color:var(--primary); border-color:var(--primary); font-weight:bold; }
.download-actions { display:grid; gap:15px; margin-top:25px; }
.change-row { border-top:1px solid var(--line); padding:14px 0; }
.change-row summary { cursor:pointer; }
.text-link { color:var(--primary); font-weight:bold; }
.table-wrap { overflow-x:auto; }
.table-wrap table { width:100%; border-collapse:collapse; }
.table-wrap th { text-align:right; font-size:12px; color:#4e6964; background:#f2f6f4; }
.table-wrap td,.table-wrap th { padding:13px 12px; border-bottom:1px solid var(--line); vertical-align:top; }
.table-wrap td { font-size:13px; overflow-wrap:anywhere; }
.pagination { display:flex; justify-content:center; align-items:center; gap:20px; margin-top:20px; font-size:12px; }
.conversation-row { display:flex; align-items:center; gap:16px; padding:22px 4px; border-bottom:1px solid var(--line); }
.conversation-row:hover { background:#f7faf8; }
.conversation-row>div:nth-child(2) { flex:1; min-width:0; }
.conversation-row p { margin:6px 0; color:#57706b; overflow-wrap:anywhere; }
.conversation-row small { color:var(--muted); }
.avatar { width:46px; height:46px; flex:0 0 46px; border-radius:14px; background:#e0efe7; color:#205548; display:grid; place-items:center; font-size:19px; font-weight:bold; }
.post-list { display:flex; flex-direction:column; gap:18px; padding:10px 0 25px; }
.post { padding:18px 20px; max-width:85%; border:1px solid var(--line); border-radius:12px; }
.post.employee { align-self:flex-start; background:#f7f9f8; }
.post.manager { align-self:flex-end; background:#edf7f0; border-color:#d6e9dc; }
.post-meta { display:flex; justify-content:space-between; gap:30px; font-size:12px; margin-bottom:10px; }
.post-meta time { direction:ltr; color:#667b75; font-size:11px; }
.post-body { white-space:normal; overflow-wrap:anywhere; }
.delivery-status { color:#61796f; font-size:10px; margin-top:13px; }
.comment-form { border-top:1px solid var(--line); padding-top:18px; }
@media(max-width:650px) { .form-grid{grid-template-columns:1fr;} .steps span{padding:9px 5px;font-size:11px;} .post{max-width:100%;} .post-meta{flex-wrap:wrap;gap:4px;} .toolbar-actions{width:100%;} .table-wrap{margin:0 -8px;} .topbar h1{font-size:16px;} }
@media(prefers-reduced-motion:reduce) { * { transition:none!important; animation:none!important; } }
