/* MOKzento base: tokens + shared components. Page specific styles live in css/pages/*.css */

@font-face { font-family: "Poppins"; font-weight: 400; font-style: normal; font-display: swap; src: url("../vendor/fonts/poppins-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-style: normal; font-display: swap; src: url("../vendor/fonts/poppins-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-style: normal; font-display: swap; src: url("../vendor/fonts/poppins-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-style: normal; font-display: swap; src: url("../vendor/fonts/poppins-latin-700-normal.woff2") format("woff2"); }

:root {
  --navy: #10264a;
  --navy-2: #1b3a6b;
  --orange: #f47b20;
  --orange-dark: #e06a10;
  --orange-soft: #fff0e1;
  --text: #1f2d46;
  --muted: #6b7a90;
  --line: #e6ecf5;
  --bg: #f3f6fb;
  --card: #ffffff;
  --green: #16a34a;   --green-soft: #e4f7ea;
  --blue: #2563eb;    --blue-soft: #e5eeff;
  --purple: #7c3aed;  --purple-soft: #efe8ff;
  --amber: #f59e0b;   --amber-soft: #fff2d9;
  --red: #ef4444;     --red-soft: #ffe5e5;
  --radius: 16px;
  --shadow: 0 4px 18px rgba(16, 38, 74, .07);
  --bs-body-font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-color: var(--text);
  --bs-primary: var(--orange);
  --bs-primary-rgb: 244, 123, 32;
  --bs-link-color: var(--orange-dark);
  --bs-link-hover-color: var(--orange);
}

html, body { min-height: 100%; }
body {
  font-family: var(--bs-body-font-family);
  font-size: .875rem;
  color: var(--text);
  background: linear-gradient(135deg, #f5f8fd 0%, #eaf0fa 100%) fixed;
}
h1, h2, h3, h4, h5, h6 { color: var(--navy); font-weight: 600; }
a { text-decoration: none; }

/* Buttons */
.btn { font-weight: 500; border-radius: 10px; font-size: .85rem; }
.btn-orange { --bs-btn-color: #fff; --bs-btn-bg: var(--orange); --bs-btn-border-color: var(--orange);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--orange-dark); --bs-btn-hover-border-color: var(--orange-dark);
  --bs-btn-active-bg: var(--orange-dark); --bs-btn-active-border-color: var(--orange-dark); --bs-btn-active-color: #fff;
  --bs-btn-focus-shadow-rgb: 244, 123, 32; --bs-btn-disabled-bg: var(--orange); --bs-btn-disabled-border-color: var(--orange); }
.btn-white { --bs-btn-color: var(--navy); --bs-btn-bg: #fff; --bs-btn-border-color: #d9e1ee;
  --bs-btn-hover-color: var(--navy); --bs-btn-hover-bg: #f6f9fe; --bs-btn-hover-border-color: #c6d2e5;
  --bs-btn-active-bg: #eef3fb; --bs-btn-active-color: var(--navy); --bs-btn-active-border-color: #c6d2e5; }
.btn-icon { width: 32px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; }

/* Forms */
.form-label { font-weight: 500; color: var(--navy); font-size: .8rem; margin-bottom: .3rem; }
.form-control, .form-select { border-radius: 10px; border-color: #d9e1ee; font-size: .85rem; padding: .55rem .8rem; color: var(--text); }
.form-control:focus, .form-select:focus { border-color: var(--orange); box-shadow: 0 0 0 .2rem rgba(244, 123, 32, .15); }
.form-check-input:checked { background-color: var(--orange); border-color: var(--orange); }
.form-check-input:focus { border-color: var(--orange); box-shadow: 0 0 0 .2rem rgba(244, 123, 32, .15); }
.req { color: var(--red); }

/* Cards */
.mz-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem 1.2rem; height: 100%; }
.mz-card-title { font-size: .98rem; font-weight: 600; color: var(--navy); display: flex; align-items: center; gap: .5rem; margin: 0 0 .85rem; }
.mz-card-title i { color: var(--orange); font-size: 1.05rem; }
.mz-card-title .ms-auto, .mz-card-title .link { font-size: .78rem; font-weight: 500; }
.link { color: var(--blue); font-weight: 500; }
.link:hover { text-decoration: underline; }

/* Page head */
.page-head { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head .ph-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--orange); color: #fff; display: grid; place-items: center; font-size: 1.5rem; flex: none; box-shadow: 0 6px 14px rgba(244, 123, 32, .28); }
.page-head h1 { font-size: 1.45rem; font-weight: 700; margin: 0; line-height: 1.2; }
.page-head p { margin: .1rem 0 0; color: var(--muted); font-size: .85rem; }
.page-head .ph-actions { margin-left: auto; display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }

/* Icon tiles */
.itile { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem; flex: none; }
.tile-green { background: var(--green-soft); color: var(--green); }
.tile-blue { background: var(--blue-soft); color: var(--blue); }
.tile-orange { background: var(--amber-soft); color: var(--orange); }
.tile-purple { background: var(--purple-soft); color: var(--purple); }
.tile-red { background: var(--red-soft); color: var(--red); }
.tile-gray { background: #eef2f8; color: #5b6b82; }

/* Stat tiles */
.stat-tile { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: .85rem 1rem; display: flex; align-items: center; gap: .8rem; height: 100%; }
.stat-tile .st-val { font-size: 1.2rem; font-weight: 700; color: var(--navy); line-height: 1.2; }
.stat-tile .st-lbl { font-size: .78rem; color: var(--text); font-weight: 500; }
.chg { display: inline-flex; align-items: center; gap: 2px; font-size: .68rem; font-weight: 600; border-radius: 6px; padding: 1px 7px; margin-top: 3px; }
.chg-up { background: var(--green-soft); color: var(--green); }
.chg-down { background: var(--red-soft); color: var(--red); }
.chg-flat { background: #eef2f8; color: var(--muted); }

/* Status pills */
.pill { display: inline-flex; align-items: center; gap: 4px; border-radius: 7px; padding: 2px 10px; font-size: .72rem; font-weight: 600; white-space: nowrap; }
.pill i { font-size: .7rem; }
.pill-ok { background: #d9f6e3; color: #138a3e; }
.pill-warn { background: #ffefc9; color: #b36a00; }
.pill-bad { background: #ffe0e0; color: #d12c2c; }
.pill-info { background: var(--blue-soft); color: var(--blue); }
.pill-muted { background: #eaeff6; color: #5b6b82; }
.pill-role { background: var(--purple-soft); color: var(--purple); }
.pill-role-admin { background: var(--purple-soft); color: var(--purple); }
.pill-role-accounts { background: var(--blue-soft); color: var(--blue); }
.pill-role-sales { background: var(--amber-soft); color: #b36a00; }
.pill-role-inventory { background: var(--green-soft); color: #138a3e; }
.pill-role-viewer { background: #eaeff6; color: #5b6b82; }

/* Tables */
.mz-table { width: 100%; font-size: .8rem; margin: 0; }
.mz-table thead th { background: #eef3fb; color: var(--navy); font-weight: 600; padding: .5rem .7rem; border: 0; white-space: nowrap; font-size: .76rem; }
.mz-table thead th:first-child { border-radius: 8px 0 0 8px; }
.mz-table thead th:last-child { border-radius: 0 8px 8px 0; }
.mz-table tbody td { padding: .55rem .7rem; border-bottom: 1px solid #eef2f8; vertical-align: middle; }
.mz-table tbody tr:last-child td { border-bottom: 0; }
.mz-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.mz-table .act { white-space: nowrap; text-align: center; }
.mz-table .act a, .mz-table .act button { color: var(--blue); margin: 0 4px; background: none; border: 0; padding: 0; font-size: 1rem; }
.mz-table .act .del { color: var(--red); }
.table-wrap { overflow-x: auto; }

/* Misc */
.legend-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: .8rem; flex: none; }
.empty { text-align: center; color: var(--muted); padding: 1.5rem 1rem; }
.empty i { font-size: 1.8rem; color: #b7c3d6; display: block; margin-bottom: .3rem; }
.alert { border-radius: 12px; font-size: .85rem; border: 0; }
.modal-content { border: 0; border-radius: 18px; box-shadow: 0 20px 60px rgba(16, 38, 74, .25); }
.modal-header { border-bottom: 1px solid var(--line); }
.modal-title { font-size: 1.05rem; font-weight: 600; color: var(--navy); }
.nav-tabs-mz { display: flex; gap: .4rem; flex-wrap: wrap; border: 0; }
.nav-tabs-mz .nav-link { border: 1px solid #d9e1ee; border-radius: 10px; color: var(--navy); font-weight: 500; font-size: .82rem; padding: .4rem .9rem; background: #fff; }
.nav-tabs-mz .nav-link.active { background: var(--orange); border-color: var(--orange); color: #fff; }
.nav-tabs-mz .nav-link i { margin-right: 4px; }
.perm-check { color: var(--green); font-size: 1rem; }
.perm-dash { color: #b7c3d6; }
.progress { height: 8px; border-radius: 8px; background: #e9eff8; }
.progress-bar { background: var(--orange); }
.progress-bar.bg-danger { background: var(--red) !important; }

@media (max-width: 767.98px) { .table-wrap .mz-table td, .table-wrap .mz-table th { white-space: nowrap; } }

/* ---------- Icons & motion (Boxicons animations) ---------- */
.bx { line-height: 1; vertical-align: -0.12em; }
.btn .bx { font-size: 1.1em; transition: transform .2s ease; }
.btn:hover .bx-right-arrow-alt { transform: translateX(4px); }
.btn:hover .bx-left-arrow-alt { transform: translateX(-4px); }
.btn:hover .bx-plus, .btn:hover .bx-download { animation: tada 1s ease; }

.sidebar .sb-item:hover i, .qa:hover i, .bs-tile:hover i, .tb-icon:hover i { animation: tada 1s ease; }
.stat-tile:hover .itile i, .so-row:hover .itile i { animation: burst 1s ease; }
.page-head .ph-icon i { animation: none; }
.pill .bx-hourglass { animation: flashing 2s infinite; }
.soon-badge .bx-wrench { animation: tada 2.4s ease infinite; }
.mz-table .act a:hover i, .mz-table .act button:hover i { animation: tada .9s ease; }

/* page entrance */
.content > .mz-card, .content .row > [class*="col-"] > .mz-card, .content .stat-tile, .content .page-head, .content .dash-welcome { animation: none; }
.content .row > [class*="col-"]:nth-child(2) > .mz-card, .content .row > [class*="col-"]:nth-child(2) > .stat-tile { animation-delay: .06s; }
.content .row > [class*="col-"]:nth-child(3) > .mz-card, .content .row > [class*="col-"]:nth-child(3) > .stat-tile { animation-delay: .12s; }
.content .row > [class*="col-"]:nth-child(4) > .mz-card, .content .row > [class*="col-"]:nth-child(4) > .stat-tile { animation-delay: .18s; }
.content .row > [class*="col-"]:nth-child(5) > .mz-card, .content .row > [class*="col-"]:nth-child(5) > .stat-tile { animation-delay: .24s; }

.btn-loading { pointer-events: none; opacity: .85; }

@keyframes mz-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes mz-pop { from { opacity: 0; transform: scale(.4) rotate(-12deg); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
