/* IT Helpdesk Mầm Non – giao diện sáng, thân thiện, nút to */
:root {
	--bg: #f5f7fc;
	--surface: #ffffff;
	--surface-2: #f8fafd;
	--line: #e6eaf2;
	--ink: #1e2433;
	--ink-2: #4a5468;
	--muted: #7a8499;
	--primary: #4f8ef7;
	--primary-d: #2f6fe0;
	--primary-l: #e8f0ff;
	--green: #22b573;
	--green-l: #e3f7ee;
	--orange: #f59e0b;
	--orange-l: #fff4de;
	--red: #ef4444;
	--red-l: #fde8e8;
	--purple: #8b5cf6;
	--purple-l: #f0eaff;
	--teal: #14b8a6;
	--teal-l: #defaf6;
	--gray-l: #eef0f4;
	--yellow: #ffd23f;
	--radius: 18px;
	--radius-sm: 12px;
	--shadow: 0 1px 2px rgba(30, 36, 51, .04), 0 6px 20px rgba(30, 36, 51, .06);
	--sidebar: 260px;
	--font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--ink); background: var(--bg); }
a { color: var(--primary-d); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.3; }
h3 { font-size: 16px; }
code, .mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------ Layout */
.app { min-height: 100vh; }
.sidebar {
	position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: var(--surface);
	border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 40;
	transition: transform .25s ease;
}
.brand { display: flex; gap: 12px; align-items: center; padding: 20px 18px; color: var(--ink); text-decoration: none !important; }
.brand-logo { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; background: linear-gradient(135deg, #ffe9a8, #ffc9d6); }
.brand-text strong { display: block; font-size: 17px; }
.brand-text small { color: var(--muted); font-size: 12px; display: block; line-height: 1.3; }
.menu { flex: 1; overflow-y: auto; padding: 6px 12px; display: flex; flex-direction: column; gap: 2px; }
.menu a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; color: var(--ink-2); font-weight: 500; text-decoration: none; }
.menu a:hover { background: var(--surface-2); color: var(--ink); }
.menu a.active { background: var(--primary-l); color: var(--primary-d); font-weight: 700; }
.menu a.menu-cta { background: var(--primary); color: #fff; font-weight: 700; margin: 4px 0 8px; box-shadow: 0 6px 16px rgba(37, 99, 235, .35); }
.menu a.menu-cta:hover { background: var(--primary-d); }
.menu .mi { width: 24px; text-align: center; font-size: 18px; }
.menu .count { margin-left: auto; background: var(--red); color: #fff; font-style: normal; font-size: 12px; font-weight: 700; padding: 0 8px; border-radius: 99px; }
.side-user { display: flex; align-items: center; gap: 8px; padding: 14px; border-top: 1px solid var(--line); }
.side-user-link { display: flex; gap: 10px; align-items: center; flex: 1; color: var(--ink); text-decoration: none !important; min-width: 0; }
.side-user-link small { display: block; color: var(--muted); font-size: 12px; }
.side-user-link strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--purple-l); color: var(--purple); display: grid; place-items: center; font-weight: 800; flex: none; }
.logout { font-size: 20px; color: var(--muted); padding: 6px 8px; border-radius: 8px; text-decoration: none !important; }
.logout:hover { background: var(--red-l); color: var(--red); }

.main { margin-left: var(--sidebar); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 14px 28px; background: rgba(245, 247, 252, .9); backdrop-filter: blur(8px); }
.page-title { font-size: 22px; margin: 0; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; gap: 10px; align-items: center; }
.icon-btn { position: relative; border: 0; background: var(--surface); width: 44px; height: 44px; border-radius: 14px; display: inline-grid; place-items: center; font-size: 20px; cursor: pointer; box-shadow: var(--shadow); color: var(--ink); text-decoration: none !important; }
.icon-btn em, .bottom-nav em { position: absolute; top: -4px; right: -4px; background: var(--red); color: #fff; font-style: normal; font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; display: grid; place-items: center; }
.content { padding: 8px 28px 40px; max-width: 1280px; width: 100%; }
.backdrop { display: none; }
.bottom-nav { display: none; }
.only-mobile { display: none; }

/* ------------------------------------------------------------ Components */
.card { background: var(--surface); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 18px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.card-head h3 { margin: 0; }
.card-green { border-left: 6px solid var(--green); }
.card-red { border-left: 6px solid var(--red); }
.muted { color: var(--muted); }
.small, small { font-size: 13px; }
.center { text-align: center; }
.mt { margin-top: 14px; }
.txt-red { color: var(--red) !important; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); }
.crumbs { margin-bottom: 12px; }
.crumbs a { font-weight: 600; }
.prose { white-space: normal; line-height: 1.7; background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 14px; margin: 10px 0; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.form-wide { max-width: 980px; }
.form-narrow { max-width: 620px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: 12px; padding: 10px 18px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none !important; line-height: 1.2; min-height: 44px; transition: transform .05s, background .15s, box-shadow .15s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(37, 99, 235, .3); }
.btn-primary:hover { background: var(--primary-d); }
.btn-success { background: var(--green); color: #fff; box-shadow: 0 4px 12px rgba(34, 181, 115, .3); }
.btn-success:hover { background: #179a5f; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #d92f2f; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover, .btn-ghost.active { background: var(--surface-2); border-color: #cfd6e4; }
.btn-link-danger { background: none; border: 0; color: var(--red); padding: 4px 6px; min-height: 0; }
.btn-sm { padding: 6px 12px; min-height: 34px; font-size: 13px; border-radius: 10px; }
.btn-lg { padding: 14px 22px; font-size: 16px; min-height: 52px; }
.btn-xl { padding: 18px 24px; font-size: 18px; min-height: 62px; border-radius: 16px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn-row.center { justify-content: center; }
.btn-row form { margin: 0; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge-blue { background: var(--primary-l); color: #2558b8; }
.badge-green { background: var(--green-l); color: #137a4c; }
.badge-orange { background: var(--orange-l); color: #a1620a; }
.badge-red { background: var(--red-l); color: #b42323; }
.badge-purple { background: var(--purple-l); color: #6232c9; }
.badge-teal { background: var(--teal-l); color: #0c7c70; }
.badge-gray { background: var(--gray-l); color: #4f586b; }

.alert { position: relative; padding: 12px 40px 12px 16px; border-radius: var(--radius-sm); margin-bottom: 14px; font-weight: 500; }
.alert.big { font-size: 16px; padding: 16px 18px; }
.alert-success { background: var(--green-l); color: #0f6b42; }
.alert-error { background: var(--red-l); color: #a11d1d; }
.alert-warning { background: var(--orange-l); color: #8a520a; }
.alert-info { background: var(--primary-l); color: #1f4fa8; }
.alert-x { position: absolute; right: 8px; top: 8px; border: 0; background: none; font-size: 20px; cursor: pointer; color: inherit; opacity: .6; }

/* Form */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-weight: 600; font-size: 14px; color: var(--ink-2); }
.req { color: var(--red); font-style: normal; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=search], select, textarea {
	width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 14px; min-height: 48px; outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37, 99, 235, .15); }
.check { display: flex; gap: 10px; align-items: center; cursor: pointer; font-weight: 500; }
.check.inline { display: inline-flex; }
.check input { width: 20px; height: 20px; accent-color: var(--primary); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.grid-side { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 18px; align-items: start; }
.shake { animation: shake .4s; border-color: var(--red) !important; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px; }
.filters input[type=search] { flex: 2 1 220px; }
.filters select { flex: 1 1 160px; width: auto; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.inline-search { flex: 1 1 220px; max-width: 360px; }
form.inline { display: inline; }

.tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.scroll-x { overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 9px 16px; border-radius: 99px; background: var(--surface); color: var(--ink-2); font-weight: 600; white-space: nowrap; box-shadow: var(--shadow); text-decoration: none !important; font-size: 14px; }
.tabs a.active { background: var(--ink); color: #fff; }

/* Stats & KPI */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--surface); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); color: var(--ink); text-decoration: none !important; border-top: 5px solid var(--line); display: flex; flex-direction: column; transition: transform .15s; }
.stat:hover { transform: translateY(-2px); }
.stat b { font-size: 30px; line-height: 1.1; }
.stat span { color: var(--ink-2); font-weight: 500; font-size: 14px; }
.stat small { color: var(--muted); }
.stat.active { outline: 3px solid var(--ink); }
.stat-blue { border-top-color: var(--primary); } .stat-orange { border-top-color: var(--orange); } .stat-red { border-top-color: var(--red); }
.stat-teal { border-top-color: var(--teal); } .stat-purple { border-top-color: var(--purple); } .stat-green { border-top-color: var(--green); } .stat-gray { border-top-color: #aab2c2; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.kpis-6 { margin-bottom: 18px; }
@media (min-width: 1200px) { .kpis-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.nowrap { white-space: nowrap; }
.side-user-link > span:last-child { min-width: 0; }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 16px; border-radius: var(--radius-sm); background: var(--surface-2); }
.kpi.card { background: var(--surface); margin: 0; }
.kpi span { color: var(--ink-2); font-size: 13px; font-weight: 600; }
.kpi b { font-size: clamp(18px, 1.7vw, 26px); line-height: 1.2; white-space: nowrap; }
.kpi b em { font-style: normal; font-size: 18px; color: var(--muted); }
.kpi small { color: var(--muted); font-size: 12px; }
.kpi-alert { box-shadow: inset 0 0 0 2px var(--red), var(--shadow); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 3px; }
.dot-1, .sw-1 { background: #2a78d6; } .dot-2, .sw-2 { background: #eb6834; } .sw-3 { background: #1baf7a; } .sw-4 { background: #eda100; }

/* Dashboard */
.hello h2 { font-size: 22px; margin: 0; }
.hello { margin-bottom: 16px; }
.big-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.big-btn { display: flex; align-items: center; gap: 16px; padding: 22px; border-radius: 22px; color: var(--ink); text-decoration: none !important; box-shadow: var(--shadow); transition: transform .15s; }
.big-btn:hover { transform: translateY(-2px); }
.big-btn strong { display: block; font-size: 20px; }
.big-btn small { font-size: 14px; opacity: .85; }
.big-btn-primary { background: linear-gradient(135deg, #1e3a8a, #2563eb); color: #fff; }
.big-btn-soft { background: linear-gradient(135deg, #fff6d6, #ffe1ea); }
.big-ico { font-size: 34px; width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: rgba(255, 255, 255, .3); flex: none; }

/* Ticket list item */
.list { display: flex; flex-direction: column; }
.list.card { padding: 6px 8px; }
.t-item, .q-item { display: flex; gap: 14px; align-items: center; padding: 14px 12px; border-radius: 14px; color: var(--ink); text-decoration: none !important; border-left: 4px solid transparent; }
.t-item + .t-item, .q-item + .q-item { border-top: 1px solid var(--line); }
.t-item:hover, .q-item:hover { background: var(--surface-2); }
.t-item.pri-urgent { border-left-color: var(--red); }
.t-item.pri-medium { border-left-color: var(--orange); }
.t-item.is-overdue { background: #fff7f7; }
.t-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; font-size: 22px; flex: none; }
.t-body { flex: 1; min-width: 0; }
.t-top { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.t-code { font-weight: 800; font-size: 13px; color: var(--ink-2); letter-spacing: .3px; }
.t-code.big { font-size: 15px; background: var(--gray-l); padding: 3px 10px; border-radius: 8px; }
.t-title { font-weight: 600; font-size: 15.5px; margin: 3px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-meta { font-size: 13px; color: var(--muted); }
.t-arrow { font-size: 24px; color: #c3c9d6; }
.t-heading { font-size: 22px; margin: 10px 0 4px; }
.q-item { justify-content: space-between; }
.q-item > div:first-child { min-width: 0; }
.q-amount { font-weight: 800; font-size: 18px; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; white-space: nowrap; }
.amount-big { font-size: 32px; font-weight: 800; color: var(--primary-d); margin: 6px 0; }
.mini-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 4px; border-bottom: 1px dashed var(--line); color: var(--ink); }
.mini-row:last-child { border-bottom: 0; }

/* Detail */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.detail-side { position: sticky; top: 84px; }
.dl { display: grid; grid-template-columns: 130px 1fr; gap: 8px 12px; margin: 0; font-size: 14px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 500; }
.it-panel { display: flex; flex-direction: column; gap: 10px; border: 2px solid var(--primary-l); }
.it-panel form { margin: 0; }
.more summary { cursor: pointer; font-weight: 600; color: var(--primary-d); padding: 8px 0; }
.confirm-card { background: linear-gradient(135deg, #e3f7ee, #e8f0ff); border: 2px solid var(--green); }
.decide-card { border: 2px solid var(--orange); }

.gallery { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.thumb { display: block; width: 110px; height: 110px; border-radius: 12px; overflow: hidden; background: var(--gray-l); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.lg { width: 220px; height: 220px; }
.thumb-wrap { position: relative; }
.thumb-wrap form { position: absolute; top: 4px; right: 4px; margin: 0; }
.thumb-x { border: 0; background: rgba(0, 0, 0, .6); color: #fff; width: 26px; height: 26px; border-radius: 50%; cursor: pointer; }
.evidence figure { margin: 0; display: flex; flex-direction: column; gap: 6px; max-width: 220px; }
.evidence figcaption { display: flex; flex-direction: column; gap: 3px; }
.file-chip { display: inline-flex; gap: 4px; align-items: center; padding: 5px 10px; background: var(--gray-l); border-radius: 8px; font-size: 13px; margin: 2px; color: var(--ink); }

.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline li { display: flex; gap: 12px; padding: 8px 0; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 17px; top: 42px; bottom: -8px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline.compact li::before { display: none; }
.tl-dot { width: 36px; height: 36px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; flex: none; font-size: 16px; z-index: 1; }
.tl-resolve .tl-dot { background: var(--green-l); } .tl-reopen .tl-dot { background: var(--red-l); } .tl-comment .tl-dot { background: var(--primary-l); }
.tl-body { flex: 1; min-width: 0; padding-top: 6px; }
.tl-head { font-size: 14px; }
.tl-note { margin-top: 4px; background: var(--surface-2); padding: 8px 12px; border-radius: 10px; font-size: 14px; }
.comment-form { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.comment-actions { display: flex; justify-content: space-between; margin-top: 8px; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* Ticket form */
.step h3 { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.step-no { width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: 15px; flex: none; }
.tiles { display: grid; gap: 12px; }
.tiles-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 18px 12px; border: 2px solid var(--line); border-radius: 18px; cursor: pointer; background: var(--surface); transition: all .15s; }
.tile input { position: absolute; opacity: 0; pointer-events: none; }
.tile-ico { font-size: 36px; }
.tile-label { font-weight: 700; font-size: 17px; }
.tile small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.tile:has(input:checked) { border-color: var(--primary); background: var(--primary-l); box-shadow: 0 0 0 4px rgba(37, 99, 235, .15); }
.tile-red:has(input:checked) { border-color: var(--red); background: var(--red-l); box-shadow: 0 0 0 4px rgba(239, 68, 68, .15); }
.tile-orange:has(input:checked) { border-color: var(--orange); background: var(--orange-l); box-shadow: 0 0 0 4px rgba(245, 158, 11, .18); }
.tile-gray:has(input:checked) { border-color: #8a93a6; background: var(--gray-l); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chips.is-empty { margin: 0; }
.chips.static { margin: 8px 0; }
.chip { cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: 10px 16px; border-radius: 99px; border: 1.5px solid var(--line); font-weight: 500; font-size: 14px; background: var(--surface); }
.chip input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.photo-drop { position: relative; display: flex; align-items: center; gap: 14px; padding: 18px; border: 2px dashed #c4cee0; border-radius: 16px; cursor: pointer; background: var(--surface-2); }
.photo-drop:hover { border-color: var(--primary); background: var(--primary-l); }
.photo-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.photo-drop-ico { font-size: 34px; }
.photo-drop.small { padding: 12px; }
.photo-drop.small .photo-drop-ico { font-size: 24px; }
.previews { display: flex; flex-wrap: wrap; gap: 10px; }
.previews:not(:empty) { margin-top: 10px; }
.prev { width: 110px; display: flex; flex-direction: column; gap: 4px; }
.prev img, .prev-file { width: 110px; height: 110px; object-fit: cover; border-radius: 12px; background: var(--gray-l); display: grid; place-items: center; font-size: 36px; }
.prev small { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exif-tag { font-size: 11.5px; font-weight: 700; padding: 3px 6px; border-radius: 6px; background: var(--gray-l); line-height: 1.3; }
.exif-tag.ok { background: var(--green-l); color: #0f6b42; }
.exif-tag.bad { background: var(--red-l); color: #a11d1d; }
.sticky-submit { position: sticky; bottom: 12px; z-index: 5; }
.asset-pill { display: flex; gap: 14px; align-items: center; border: 2px solid var(--primary-l); }
.asset-pill .big-ico { background: var(--primary-l); }

/* Dialog */
.dialog { border: 0; border-radius: 22px; padding: 22px; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px); box-shadow: 0 30px 80px rgba(0, 0, 0, .25); color: var(--ink); }
.dialog::backdrop { background: rgba(20, 26, 40, .45); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; }
.dialog-head h3 { margin: 0; }
.dialog .icon-btn { box-shadow: none; background: var(--surface-2); }

/* Table */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12.5px; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); font-weight: 600; padding: 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr[data-href] { cursor: pointer; }
.table tr[data-href]:hover td { background: var(--surface-2); }
.table .num { text-align: right; white-space: nowrap; }
.table input[type=text], .table input[type=number] { min-height: 38px; padding: 6px 10px; }
.row-ok td { background: #f2fbf6; }
.row-miss td { background: #fff4f4; }
.row-muted td { opacity: .55; }
.meter { display: inline-block; width: 60px; height: 8px; background: var(--gray-l); border-radius: 4px; overflow: hidden; vertical-align: middle; }
.meter span { display: block; height: 100%; background: var(--green); border-radius: 4px; }

.pager { display: flex; gap: 6px; justify-content: center; margin: 14px 0; flex-wrap: wrap; }
.pager a { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
.pager a.active { background: var(--primary); color: #fff; }

/* Asset */
.asset-head { display: flex; gap: 22px; align-items: flex-start; }
.qr-box { display: flex; flex-direction: column; gap: 8px; align-items: center; flex: none; }
.qr { width: 150px; height: 150px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.qr svg { width: 100%; height: 100%; display: block; }
.asset-info { flex: 1; min-width: 0; }

/* Quote viewer */
.doc-viewer { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 14px; }
.doc-viewer-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: center; padding: 10px 12px; background: var(--surface-2); }
.pdf-frame { width: 100%; height: 72vh; border: 0; display: block; background: #525659; }
.doc-img { display: block; width: 100%; }

/* Scan / audit */
.scan-card { max-width: 560px; margin-left: auto; margin-right: auto; }
.reader { width: 100%; max-width: 420px; margin: 0 auto 12px; border-radius: 16px; overflow: hidden; }
.reader:empty { display: none; }
.manual-code { display: flex; gap: 8px; margin-top: 12px; }
.scan-log { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; }
.scan-item { padding: 8px 12px; border-radius: 10px; font-size: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.scan-item.ok { background: var(--green-l); } .scan-item.warn { background: var(--orange-l); } .scan-item.bad { background: var(--red-l); }
.progress { height: 14px; background: var(--gray-l); border-radius: 7px; overflow: hidden; margin: 10px 0; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--green), var(--teal)); border-radius: 7px; transition: width .3s; }
.steps-text li { margin-bottom: 6px; }

/* Reports */
.report-filter { gap: 12px; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 12px; padding: 4px; flex-wrap: wrap; }
.seg label { padding: 8px 14px; border-radius: 9px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.seg label.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg input { display: none; }
.custom-range { display: inline-flex; gap: 6px; align-items: center; }
.custom-range input { width: auto; min-height: 42px; }
.chart-box { position: relative; height: 280px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); margin-bottom: 8px; }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* Notifications */
.notif { display: block; padding: 14px 12px; border-radius: 12px; color: var(--ink); text-decoration: none !important; border-left: 4px solid transparent; }
.notif + .notif { border-top: 1px solid var(--line); }
.notif.unread { background: var(--primary-l); border-left-color: var(--primary); }
.notif-title { font-weight: 700; }
.notif-msg { color: var(--ink-2); font-size: 14px; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 20px); opacity: 0; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; z-index: 100; transition: all .25s; max-width: calc(100vw - 32px); font-weight: 500; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-error { background: #b42323; }

/* Login */
.login-page { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(circle at 20% 10%, #ffe9a8 0, transparent 40%), radial-gradient(circle at 90% 20%, #ffc9d6 0, transparent 35%), radial-gradient(circle at 50% 100%, #c9e0ff 0, transparent 50%), var(--bg); padding: 20px; }
.login-wrap { width: 100%; max-width: 420px; }
.login-hero { text-align: center; margin-bottom: 18px; }
.login-hero h1 { font-size: 30px; margin: 6px 0 0; }
.login-hero p { color: var(--ink-2); margin: 0; font-weight: 500; }
.login-emoji { font-size: 44px; letter-spacing: 6px; }
.login-card { display: flex; flex-direction: column; gap: 14px; padding: 26px; }

/* ------------------------------------------------------------ Responsive */
@media (max-width: 1100px) {
	.detail-grid { grid-template-columns: minmax(0, 1fr); }
	.detail-side { position: static; }
	.grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.grid-side { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
	body { font-size: 15.5px; }
	.sidebar { transform: translateX(-100%); box-shadow: 0 0 40px rgba(0, 0, 0, .2); }
	.menu-open .sidebar { transform: none; }
	.menu-open .backdrop { display: block; position: fixed; inset: 0; background: rgba(20, 26, 40, .4); z-index: 35; }
	.main { margin-left: 0; padding-bottom: 84px; }
	.topbar { padding: 10px 14px; }
	.page-title { font-size: 18px; }
	.content { padding: 6px 14px 24px; }
	.only-mobile { display: inline-grid; }
	.only-desktop { display: none !important; }
	.card { padding: 16px; border-radius: 16px; }
	.grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); gap: 12px; }
	.big-actions { grid-template-columns: minmax(0, 1fr); gap: 12px; }
	.big-btn { padding: 18px; }
	.tiles-3 { grid-template-columns: minmax(0, 1fr); }
	.tiles-3 .tile { flex-direction: row; text-align: left; padding: 12px 14px; gap: 12px; }
	.tiles-3 .tile-ico { font-size: 28px; }
	.tiles-3 .tile small { display: block; }
	.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.stat b { font-size: 24px; }
	.kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.kpi b { font-size: 20px; }
	.asset-head { flex-direction: column; align-items: center; text-align: center; }
	.asset-head .t-top, .asset-head .btn-row { justify-content: center; }
	.thumb.lg { width: 100%; height: auto; aspect-ratio: 1; }
	.evidence figure { max-width: none; width: 100%; }
	.q-item { flex-direction: column; align-items: stretch; }
	.q-amount { flex-direction: row; justify-content: space-between; align-items: center; }
	.dl { grid-template-columns: 120px 1fr; }
	.sticky-submit { bottom: 90px; }
	.pdf-frame { height: 60vh; }
	.filters select, .filters input[type=search] { flex: 1 1 100%; }

	/* Bảng → thẻ */
	.rtable thead { display: none; }
	.rtable, .rtable tbody, .rtable tr, .rtable td { display: block; width: 100%; }
	.rtable tr { border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; margin-bottom: 10px; }
	.rtable td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
	.rtable td::before { content: attr(data-label); color: var(--muted); font-size: 13px; text-align: left; flex: none; }
	.rtable td[data-label=""]::before { display: none; }
	.rtable td.num { text-align: right; }

	.bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px rgba(0, 0, 0, .05); }
	.bottom-nav a { position: relative; display: flex; flex-direction: column; align-items: center; font-size: 11px; color: var(--muted); font-weight: 600; text-decoration: none !important; padding: 4px 0; }
	.bottom-nav a span { font-size: 22px; line-height: 1.2; }
	.bottom-nav a.active { color: var(--primary-d); }
	.bottom-nav a.fab span { width: 56px; height: 56px; margin-top: -26px; border-radius: 50%; background: linear-gradient(135deg, #1e3a8a, #2563eb); color: #fff; display: grid; place-items: center; font-size: 30px; box-shadow: 0 8px 20px rgba(37, 99, 235, .45); border: 4px solid var(--surface); }
	.bottom-nav a.fab { color: var(--primary-d); }
	.bottom-nav em { right: 18%; top: 0; }
}

@media print {
	.sidebar, .topbar, .bottom-nav, .toolbar, .filters, .btn { display: none !important; }
	.main { margin: 0; }
	.card { box-shadow: none; border: 1px solid #ddd; }
}
.table td.wrap { max-width: 170px; min-width: 120px; white-space: normal; } .table td.wrap .badge { white-space: normal; margin-top: 4px; }

/* Logo */
.brand { flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px 20px 12px; }
img.brand-logo { width: 150px; height: auto; max-height: 110px; object-fit: contain; background: none; border-radius: 0; }
.login-logo { width: min(320px, 80vw); height: auto; display: block; margin: 0 auto 6px; filter: drop-shadow(0 6px 14px rgba(30, 36, 51, .12)); }
.logo-setting { display: flex; gap: 14px; align-items: center; }
.logo-setting img { width: 90px; height: 64px; object-fit: contain; background: var(--surface-2); border-radius: 12px; padding: 6px; }
.logo-setting .photo-drop { flex: 1; }
.assign-card { border: 2px solid var(--primary-l); }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist li div { display: flex; flex-direction: column; }
.checklist li.bad b { color: #a1620a; }

/* ===== v1.1.1 — Tối ưu điện thoại: chống tràn ngang ===== */
html { overflow-x: hidden; }
.app, .main, .content { max-width: 100%; min-width: 0; }
.main { overflow-x: clip; }
input, select, textarea, img, video, canvas, iframe { max-width: 100%; }
.big-btn > *, .t-item > *, .q-item > *, .stat, .kpi, .card { min-width: 0; }
.hello h2, .big-btn strong, .big-btn small, .stat span, .kpi span, .t-meta, .card h3, .card h2, .dl dd, .alert { overflow-wrap: anywhere; }
.custom-range { display: flex; flex-wrap: wrap; max-width: 100%; }
.custom-range input { flex: 1 1 130px; min-width: 0; }
@media (max-width: 860px) {
	.topbar { gap: 10px; }
	.hello h2 { font-size: 20px; line-height: 1.3; }
	.hello { margin-bottom: 12px; }
	.big-btn { gap: 12px; padding: 16px; border-radius: 18px; }
	.big-btn strong { font-size: 18px; }
	.big-btn small { font-size: 13px; display: block; line-height: 1.4; }
	.big-btn .big-ico, .big-btn > span:first-child { flex: none; }
	.stat { padding: 12px 14px; }
	.stat span { font-size: 13px; line-height: 1.35; }
	.t-item, .q-item { gap: 10px; padding: 12px 8px; }
	.t-item .t-ico, .t-item > span:first-child { flex: none; }
	.btn-row, .filters, .tabs { flex-wrap: wrap; }
	.btn { white-space: normal; text-align: center; }
	.table-wrap { max-width: 100%; }
	.custom-range input { flex-basis: 120px; }
	.bottom-nav a { min-width: 0; font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
	.bottom-nav { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 360px) {
	.stats, .kpis { grid-template-columns: minmax(0, 1fr); }
	.hello h2 { font-size: 18px; }
}

/* ===== v1.2.0 — Vision IT Service Desk: màu thương hiệu + icon nét ===== */
:root {
	--bg: #f4f6fb;
	--ink: #111a2e;
	--ink-2: #3f4a60;
	--muted: #6b7489;
	--navy: #1e3a8a;
	--primary: #2563eb;
	--primary-d: #1d4ed8;
	--primary-l: #eaf1ff;
	--brand-red: #dc2626;
	--radius: 16px;
	--shadow: 0 1px 2px rgba(17, 26, 46, .04), 0 4px 16px rgba(17, 26, 46, .06);
}
.ic { width: 1.15em; height: 1.15em; vertical-align: -.22em; flex: none; display: inline-block; }
.badge .ic, .t-meta .ic, small .ic { width: 1em; height: 1em; vertical-align: -.15em; }
.btn .ic { width: 1.15em; height: 1.15em; vertical-align: 0; }
.t-meta .ic { opacity: .75; }

/* Thương hiệu ở menu trái */
.brand-text strong { font-size: 16px; letter-spacing: -.2px; color: var(--navy); }
.brand-text small { font-size: 11.5px; }
.brand::after { content: ""; display: block; width: 36px; height: 3px; border-radius: 2px; background: var(--brand-red); margin-top: 2px; }
.menu a { color: var(--ink-2); }
.menu .mi { font-size: 19px; color: var(--muted); display: inline-grid; place-items: center; }
.menu a.active .mi, .menu a:hover .mi { color: var(--primary); }
.menu a.menu-cta .mi { color: #fff; }
.logout { display: inline-grid; place-items: center; }

/* Topbar */
.icon-btn { color: var(--ink-2); }
.icon-btn .ic { width: 22px; height: 22px; }
.bell .ic { color: var(--navy); }

/* Lời chào + nút lớn */
.hello h2 { letter-spacing: -.3px; }
.big-ico { background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .25); }
.big-ico .ic { width: 30px; height: 30px; stroke-width: 1.8; }
.big-btn-soft { background: var(--surface); border: 1px solid var(--line); }
.big-btn-soft .big-ico { background: var(--primary-l); border: 0; color: var(--primary); }
.big-btn-soft small { color: var(--muted); opacity: 1; }
.big-btn-primary { box-shadow: 0 10px 24px rgba(30, 58, 138, .25); }

/* Danh sách ticket */
.t-icon { background: var(--primary-l); color: var(--primary-d); }
.t-icon .ic { width: 22px; height: 22px; stroke-width: 1.8; }
.card-head h3 .ic, .card > h3 .ic, .stack > h3 .ic { color: var(--primary); }

/* Khu vực chọn ảnh, ô lựa chọn */
.photo-drop-ico { color: var(--primary); display: inline-grid; place-items: center; }
.photo-drop-ico .ic { width: 34px; height: 34px; stroke-width: 1.6; }
.photo-drop.small .photo-drop-ico .ic { width: 24px; height: 24px; }
.tile-ico { color: var(--primary); display: inline-grid; place-items: center; }
.tile-ico .ic { width: 32px; height: 32px; stroke-width: 1.7; }
.prev-file .ic { width: 34px; height: 34px; color: var(--primary); }
.empty .ic { color: var(--muted); }
.mark .ic { width: 20px; height: 20px; }
.row-ok .mark .ic, .exif-tag.ok .ic { color: var(--green); }
.row-miss .mark .ic, .exif-tag.bad .ic { color: var(--red); }

/* Thanh điều hướng dưới (điện thoại) */
.bottom-nav a span { display: inline-grid; place-items: center; height: 28px; }
.bottom-nav a span .ic { width: 23px; height: 23px; }
.bottom-nav a.active span .ic { stroke-width: 2.3; }
.bottom-nav a.fab span .ic { width: 28px; height: 28px; stroke-width: 2.5; }
@media (max-width: 860px) {
	.bottom-nav a.fab span { height: 56px; }
}

/* Trang đăng nhập */
.login-page { background: radial-gradient(circle at 15% 10%, #dbe6ff 0, transparent 40%), radial-gradient(circle at 90% 15%, #fde2e2 0, transparent 32%), radial-gradient(circle at 50% 100%, #e3ecff 0, transparent 50%), var(--bg); }
.login-hero h1 { font-size: 26px; color: var(--navy); letter-spacing: -.4px; }
.login-hero p { color: var(--muted); }
@media (max-width: 860px) {
	.bottom-nav a.fab { overflow: visible; }
}
