/* =========================================================
   MHGSS Admin
   ========================================================= */
:root {
  --navy: #0a2540; --navy-2: #0f3460; --blue: #1660c4; --green: #16a34a; --sun: #f59e0b; --sun-l: #fbbf24;
  --red: #dc2626; --ink: #0f1c2e; --text: #475569; --muted: #94a3b8; --line: #e6ecf3; --bg: #f3f6fb; --card: #fff;
  --grad: linear-gradient(135deg, #1660c4, #16a34a); --radius: 16px; --shadow: 0 6px 24px rgba(15, 28, 46, .06);
  --sb-w: 268px; --ease: cubic-bezier(.22,.8,.24,1);
  --head: 'Plus Jakarta Sans', system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Inter', system-ui, sans-serif; font-size: 14.5px; color: var(--text); background: var(--bg); line-height: 1.55; }
a { color: var(--blue); text-decoration: none; }
h1, h2, h3 { font-family: var(--head); color: var(--ink); margin: 0; }
button { font: inherit; cursor: pointer; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

/* Sidebar */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sb-w); background: var(--navy); color: rgba(255,255,255,.7); display: flex; flex-direction: column; z-index: 50; transition: transform .35s var(--ease); }
.sb-brand { display: flex; align-items: center; gap: 12px; padding: 20px 22px; border-bottom: 1px solid rgba(255,255,255,.07); }
.sb-brand img { width: 44px; height: 44px; border-radius: 10px; background: #fff; object-fit: contain; }
.sb-brand strong { display: block; color: #fff; font-family: var(--head); font-size: 18px; }
.sb-brand small { color: var(--sun-l); font-size: 12px; }
.sb-nav { flex: 1; overflow-y: auto; padding: 12px 12px 30px; }
.sb-nav::-webkit-scrollbar { width: 5px; } .sb-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 5px; }
.sb-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: rgba(255,255,255,.35); margin: 18px 12px 6px; font-weight: 600; }
.sb-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: rgba(255,255,255,.72); font-weight: 500; transition: all .25s; position: relative; }
.sb-nav a i { width: 20px; text-align: center; font-size: 15px; }
.sb-nav a:hover { background: rgba(255,255,255,.06); color: #fff; transform: translateX(3px); }
.sb-nav a.active { background: var(--grad); color: #fff; box-shadow: 0 8px 20px rgba(22,96,196,.35); }
.badge { margin-left: auto; background: var(--sun-l); color: var(--navy); font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 20px; animation: pop 2s infinite; }
@keyframes pop { 50% { transform: scale(1.12); } }
.sb-overlay { display: none; }

/* Main */
.main { margin-left: var(--sb-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 40; height: 70px; display: flex; align-items: center; gap: 16px; padding: 0 28px; background: rgba(255,255,255,.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 20px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-toggle { display: none; width: 42px; height: 42px; border: 0; border-radius: 10px; background: var(--bg); color: var(--ink); }
.tb-actions { display: flex; align-items: center; gap: 14px; }
.tb-btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 10px; background: var(--bg); color: var(--ink); font-weight: 600; font-size: 13.5px; transition: .25s; }
.tb-btn:hover { background: var(--blue); color: #fff; }
.tb-user { display: flex; align-items: center; gap: 10px; }
.tb-name strong { display: block; color: var(--ink); font-size: 14px; line-height: 1.2; }
.tb-name small { color: var(--muted); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 800; font-family: var(--head); flex-shrink: 0; }
.avatar.lg { width: 58px; height: 58px; font-size: 22px; }
.content { padding: 28px; flex: 1; animation: fadeUp .45s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } }
.adm-foot { padding: 18px 28px; font-size: 13px; color: var(--muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 10px; border: 1px solid transparent; font-weight: 600; font-size: 14px; transition: all .25s var(--ease); white-space: nowrap; text-decoration: none; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 6px 16px rgba(22,96,196,.25); }
.btn-primary:hover { box-shadow: 0 10px 22px rgba(22,96,196,.35); color: #fff; }
.btn-light { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-light:hover { border-color: var(--blue); color: var(--blue); }
.btn-sun { background: linear-gradient(135deg,#fcd34d,#f59e0b); color: var(--navy); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger-soft { background: #fee2e2; color: var(--red); }
.btn-danger-soft:hover { background: var(--red); color: #fff; }
.btn-block { width: 100%; }
.btn.loading { pointer-events: none; opacity: .75; }
.btn.loading i::before { content: '\f110'; } .btn.loading i { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Cards */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin-bottom: 24px; border: 1px solid var(--line); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.card-head h3 { font-size: 16.5px; display: flex; align-items: center; gap: 10px; }
.card-head h3 i { color: var(--blue); }
.link { font-weight: 600; font-size: 13.5px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-2 > .card { margin-bottom: 24px; }
.grid-users { grid-template-columns: 1.5fr 1fr; align-items: start; }

/* Dashboard */
.welcome { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding: 28px; margin-bottom: 24px; border-radius: 20px; color: #fff;
  background: linear-gradient(120deg, rgba(10,37,64,.95), rgba(22,96,196,.85)), url('../../assets/images/hero1.jpg') center/cover; position: relative; overflow: hidden; }
.welcome::after { content: ''; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; border: 3px dashed rgba(251,191,36,.5); animation: spin 25s linear infinite; }
.welcome h2 { color: #fff; font-size: 24px; margin-bottom: 4px; }
.welcome p { margin: 0; opacity: .85; }
.welcome-actions { display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; margin-bottom: 24px; }
.stat-card { display: flex; align-items: center; gap: 16px; padding: 20px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--text); animation: fadeUp .5s var(--ease) both; transition: transform .3s var(--ease), box-shadow .3s; }
.stat-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(15,28,46,.1); }
.stat-card > i { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 21px; color: #fff; flex-shrink: 0; }
.stat-card strong { display: block; font-family: var(--head); font-size: 26px; color: var(--ink); line-height: 1.1; }
.stat-card span { font-size: 13px; }
.c-sun { background: linear-gradient(135deg,#fcd34d,#f59e0b) !important; } .c-blue { background: linear-gradient(135deg,#60a5fa,#1660c4) !important; }
.c-green { background: linear-gradient(135deg,#4ade80,#16a34a) !important; } .c-purple { background: linear-gradient(135deg,#c084fc,#7c3aed) !important; }
.c-teal { background: linear-gradient(135deg,#5eead4,#0d9488) !important; } .c-pink { background: linear-gradient(135deg,#f9a8d4,#db2777) !important; }
.stat-card.c-sun, .stat-card.c-blue, .stat-card.c-green, .stat-card.c-purple, .stat-card.c-teal, .stat-card.c-pink { background: #fff !important; }
.stat-card.c-sun > i { background: linear-gradient(135deg,#fcd34d,#f59e0b); } .stat-card.c-blue > i { background: linear-gradient(135deg,#60a5fa,#1660c4); }
.stat-card.c-green > i { background: linear-gradient(135deg,#4ade80,#16a34a); } .stat-card.c-purple > i { background: linear-gradient(135deg,#c084fc,#7c3aed); }
.stat-card.c-teal > i { background: linear-gradient(135deg,#5eead4,#0d9488); } .stat-card.c-pink > i { background: linear-gradient(135deg,#f9a8d4,#db2777); }
.legend { display: flex; gap: 14px; font-size: 13px; }
.legend span { display: flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.bar-chart { display: flex; align-items: flex-end; gap: 12px; height: 220px; padding-top: 20px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; }
.bars { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 5px; border-bottom: 1px solid var(--line); }
.bar { width: 40%; max-width: 26px; height: var(--h); min-height: 3px; border-radius: 6px 6px 0 0; position: relative; animation: grow 1s var(--ease) both; transform-origin: bottom; }
.bar em { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 11px; color: var(--muted); font-weight: 600; }
@keyframes grow { from { transform: scaleY(0); } }
.mini-list li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.mini-list { list-style: none; padding: 0; margin: 0 0 16px; }
.mini-list a { color: var(--ink); font-weight: 500; }
.mini-list b { color: var(--muted); font-weight: 600; white-space: nowrap; }
.quick-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-links a { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; background: var(--bg); color: var(--ink); font-weight: 600; transition: .25s; }
.quick-links a:hover { background: var(--grad); color: #fff; }

/* Tables */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar-right { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search { position: relative; min-width: 260px; }
.search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { width: 100%; padding: 10px 14px 10px 40px; border: 1px solid var(--line); border-radius: 10px; font: inherit; outline: none; background: var(--bg); transition: .25s; }
.search input:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(22,96,196,.1); }
.hint { font-size: 13px; color: var(--muted); margin: -4px 0 12px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); font-weight: 600; padding: 12px 14px; background: var(--bg); white-space: nowrap; }
.table th:first-child { border-radius: 10px 0 0 10px; } .table th:last-child { border-radius: 0 10px 10px 0; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { transition: background .2s, opacity .3s, transform .3s; }
.table tbody tr:hover { background: #f8fbff; }
.table tr.unread td { font-weight: 600; color: var(--ink); }
.table tr.unread td:first-child { box-shadow: inset 3px 0 0 var(--sun); }
.table tr.removing { opacity: 0; transform: translateX(30px); }
.table tr.dragging { opacity: .4; background: #eef5ff; }
.table tr.drag-over td { border-top: 2px solid var(--blue); }
.table .empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.table .empty i { font-size: 34px; margin-bottom: 10px; opacity: .5; }
.w-check { width: 36px; } .w-handle { width: 30px; } .w-actions { width: 130px; text-align: right !important; }
.handle { cursor: grab; color: var(--muted); }
.thumb { width: 64px; height: 46px; object-fit: cover; border-radius: 8px; background: var(--bg); }
.icon-cell { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--bg); color: var(--blue); font-size: 16px; }
.strong { font-weight: 600; color: var(--ink); }
.strong:hover { color: var(--blue); }
.stars { color: var(--sun); letter-spacing: 2px; }
.actions { text-align: right; white-space: nowrap; }
.actions form { display: inline; }
.act { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: 0; background: var(--bg); color: var(--text); margin-left: 4px; transition: .2s; }
.act:hover { background: var(--blue); color: #fff; }
.act-del:hover { background: var(--red); }
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.pager a { min-width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; background: var(--bg); color: var(--ink); font-weight: 600; padding: 0 10px; }
.pager a.current, .pager a:hover { background: var(--grad); color: #fff; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips a { padding: 7px 13px; border-radius: 20px; background: var(--bg); color: var(--text); font-size: 13px; font-weight: 600; }
.chips a.active, .chips a:hover { background: var(--navy); color: #fff; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; background: var(--bg); }
.pill-new { background: #fef3c7; color: #b45309; } .pill-contacted { background: #dbeafe; color: #1d4ed8; } .pill-surveyed { background: #ede9fe; color: #6d28d9; }
.pill-won { background: #dcfce7; color: #15803d; } .pill-lost { background: #fee2e2; color: #b91c1c; }
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-cell strong { display: block; color: var(--ink); } .user-cell small { color: var(--muted); }

/* Switch */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 24px; background: #cbd5e1; transition: .3s; cursor: pointer; }
.switch span::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: .3s var(--ease); box-shadow: 0 2px 4px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::before { transform: translateX(20px); }
.switch-row { display: flex; align-items: center; gap: 12px; font-weight: 600; color: var(--ink); cursor: pointer; padding-top: 28px; }

/* Forms */
.page-actions { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.form-card { padding: 28px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 22px; }
.form-grid.one { grid-template-columns: 1fr; }
.form-group { display: flex; flex-direction: column; min-width: 0; }
.col-full { grid-column: 1 / -1; }
.lbl { font-weight: 600; color: var(--ink); margin-bottom: 7px; font-size: 13.5px; }
.req { color: var(--red); }
.input { width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; font: inherit; color: var(--ink); background: #fbfcfe; outline: none; transition: .25s; }
.input:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(22,96,196,.1); }
.input.invalid { border-color: var(--red); animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
textarea.input { resize: vertical; }
.help { color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.form-foot { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.slug-input { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfe; overflow: hidden; }
.slug-input span { padding: 0 4px 0 14px; color: var(--muted); }
.slug-input .input { border: 0; box-shadow: none; padding-left: 4px; background: transparent; }
.icon-input { display: flex; gap: 8px; }
.icon-preview { width: 46px; height: 44px; flex-shrink: 0; border-radius: 10px; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: 18px; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 6px; margin-top: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; max-height: 220px; overflow-y: auto; background: #fff; animation: fadeUp .3s; }
.icon-grid button { height: 42px; border-radius: 9px; border: 1px solid transparent; background: var(--bg); color: var(--ink); font-size: 16px; transition: .2s; }
.icon-grid button:hover { background: var(--blue); color: #fff; transform: scale(1.1); }
.rating-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.rating-input input { display: none; }
.rating-input label { font-size: 30px; color: #cbd5e1; cursor: pointer; transition: color .2s, transform .2s; line-height: 1; }
.rating-input label:hover, .rating-input label:hover ~ label, .rating-input input:checked ~ label { color: var(--sun-l); }
.rating-input label:hover { transform: scale(1.2); }
.img-field { display: flex; flex-direction: column; gap: 8px; }
.dropzone { position: relative; display: flex; align-items: center; justify-content: center; min-height: 170px; border: 2px dashed #cbd5e1; border-radius: 14px; background: var(--bg); cursor: pointer; overflow: hidden; transition: .25s; }
.dropzone:hover, .dropzone.drag { border-color: var(--blue); background: #eef5ff; }
.dropzone .preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #0f1c2e; display: none; }
.dropzone.has-img .preview { display: block; }
.dropzone.has-img .dz-text { opacity: 0; background: rgba(10,37,64,.75); color: #fff; }
.dropzone.has-img:hover .dz-text { opacity: 1; }
.dz-text { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; color: var(--text); padding: 20px; transition: .3s; width: 100%; height: 100%; justify-content: center; }
.dz-text i { font-size: 30px; color: var(--blue); }
.dropzone.has-img .dz-text i { color: var(--sun-l); }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.check-inline { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--red); cursor: pointer; }
.editor-wrap { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.editor-wrap .ql-toolbar { border: 0; border-bottom: 1px solid var(--line); background: var(--bg); }
.editor-wrap .ql-container { border: 0; font: inherit; font-size: 15px; min-height: 260px; }
.editor-wrap .ql-editor { min-height: 260px; }
.pw-meter { height: 5px; border-radius: 5px; background: var(--line); margin-top: 8px; overflow: hidden; }
.pw-meter span { display: block; height: 100%; width: 0; transition: .4s; }

/* Tabs */
.tabs { display: flex; gap: 6px; margin-bottom: 18px; overflow-x: auto; padding-bottom: 4px; }
.tabs a { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 10px; background: #fff; border: 1px solid var(--line); color: var(--text); font-weight: 600; white-space: nowrap; transition: .25s; }
.tabs a:hover { color: var(--blue); border-color: var(--blue); }
.tabs a.active { background: var(--grad); color: #fff; border-color: transparent; }

/* Message view */
.msg-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.msg-head > div { flex: 1; }
.msg-head h2 { font-size: 21px; }
.msg-head p { margin: 2px 0 0; font-size: 13px; }
.status-select { width: auto; min-width: 170px; }
.msg-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.msg-meta a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; background: var(--bg); color: var(--ink); font-weight: 500; }
.msg-meta a:hover { background: var(--blue); color: #fff; }
.info-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.info-grid div { padding: 14px; border-radius: 12px; background: var(--bg); }
.info-grid small { display: block; color: var(--muted); font-size: 12px; }
.info-grid strong { color: var(--ink); }
.msg-body { padding: 20px; border-radius: 12px; background: #fbfcfe; border: 1px solid var(--line); color: var(--ink); white-space: normal; line-height: 1.7; }

/* Alerts / toasts / confirm */
.alert { display: flex; gap: 10px; align-items: center; padding: 13px 16px; border-radius: 12px; margin-bottom: 18px; font-weight: 500; animation: fadeUp .4s; transition: opacity .4s, transform .4s; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-error { background: #fee2e2; color: #991b1b; }
.alert.hide { opacity: 0; transform: translateY(-10px); }
.toast-wrap { position: fixed; top: 20px; right: 20px; z-index: 300; display: flex; flex-direction: column; gap: 10px; }
.toast { min-width: 260px; max-width: 360px; padding: 14px 16px; border-radius: 12px; background: var(--navy); color: #fff; box-shadow: 0 14px 34px rgba(0,0,0,.2); display: flex; gap: 10px; align-items: flex-start; animation: toastIn .4s var(--ease); }
.toast i { color: #4ade80; margin-top: 3px; } .toast.error i { color: #f87171; }
.toast.hide { animation: toastOut .35s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(50px); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(50px); } }
.confirm { position: fixed; inset: 0; z-index: 400; background: rgba(10,37,64,.55); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; opacity: 0; visibility: hidden; transition: .25s; }
.confirm.open { opacity: 1; visibility: visible; }
.confirm-card { background: #fff; border-radius: 20px; padding: 30px; max-width: 380px; width: 100%; text-align: center; transform: scale(.9); transition: transform .3s var(--ease); }
.confirm.open .confirm-card { transform: none; }
.confirm-icon { width: 66px; height: 66px; margin: 0 auto 14px; border-radius: 50%; background: #fee2e2; color: var(--red); display: grid; place-items: center; font-size: 26px; }
.confirm-card h3 { margin-bottom: 6px; }
.confirm-actions { display: flex; gap: 10px; justify-content: center; margin-top: 20px; }

/* Login */
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 20% 20%, rgba(22,96,196,.15), transparent 40%), radial-gradient(circle at 80% 80%, rgba(22,163,74,.15), transparent 40%), var(--bg); }
.login-wrap { width: 100%; max-width: 980px; display: grid; grid-template-columns: 1fr 1fr; background: #fff; border-radius: 26px; overflow: hidden; box-shadow: 0 30px 80px rgba(10,37,64,.18); animation: fadeUp .6s var(--ease); }
.login-art { position: relative; background-size: cover; background-position: center; display: flex; align-items: flex-end; padding: 40px; color: #fff; min-height: 520px; }
.login-art::before { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 20%, rgba(10,37,64,.95)); }
.login-art > div { position: relative; }
.login-art h2 { color: #fff; font-size: 28px; line-height: 1.25; margin-bottom: 10px; }
.login-art p { opacity: .85; margin: 0; }
.login-card { padding: 50px 44px; display: flex; flex-direction: column; }
.login-logo { width: 74px; height: 74px; border-radius: 16px; box-shadow: 0 8px 20px rgba(0,0,0,.1); margin-bottom: 20px; object-fit: contain; animation: float 4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
.login-card h1 { font-size: 28px; }
.login-card > p { margin: 4px 0 24px; }
.input-icon { position: relative; margin-bottom: 18px; }
.input-icon > i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-icon input { width: 100%; padding: 13px 44px; border: 1px solid var(--line); border-radius: 12px; font: inherit; outline: none; background: var(--bg); transition: .25s; }
.input-icon input:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(22,96,196,.1); }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); padding: 8px; }
.login-card .btn { padding: 14px; margin-top: 6px; font-size: 15px; }
.back-link { margin-top: 20px; text-align: center; font-size: 13.5px; color: var(--muted); }
.back-link:hover { color: var(--blue); }

/* Responsive */
@media (max-width: 1100px) {
  .grid-2, .grid-users { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); box-shadow: 20px 0 50px rgba(0,0,0,.2); }
  .sidebar.open { transform: none; }
  .sb-overlay { position: fixed; inset: 0; background: rgba(10,37,64,.5); z-index: 45; }
  .sb-overlay.show { display: block; }
  .main { margin-left: 0; }
  .sb-toggle { display: grid; place-items: center; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { display: none; }
}
@media (max-width: 680px) {
  .content { padding: 16px; }
  .topbar { padding: 0 16px; }
  .tb-name, .tb-btn span { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .form-card { padding: 20px; }
  .search { min-width: 0; width: 100%; }
  .toolbar-right { width: 100%; }
  .welcome { padding: 22px; }
  .stat-cards { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-card { flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px; }
  /* responsive tables -> cards */
  .data-table thead { display: none; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table tr { border: 1px solid var(--line); border-radius: 14px; margin-bottom: 12px; padding: 8px 12px; position: relative; }
  .data-table td { border: 0; padding: 7px 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: right; }
  .data-table td[data-label]::before { content: attr(data-label); font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; text-align: left; }
  .data-table td:first-child { position: absolute; top: 12px; left: 12px; width: auto; padding: 0; }
  .data-table td.handle { display: none; }
  .data-table td.actions { justify-content: flex-end; border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 10px; }
  .data-table td:nth-child(2)[data-label], .data-table td.handle + td { padding-left: 30px; }
  .login-card { padding: 36px 24px; }
  .info-grid { grid-template-columns: 1fr; }
}
