/* GYMZIVO — Smart Gym & Fitness Management System · Powered by 10SoftBD */
:root {
  --gz-primary: #f05a28;
  --gz-primary-600: #d9481a;
  --gz-primary-50: #fff1eb;
  --gz-ink: #0f172a;
  --gz-ink-2: #334155;
  --gz-muted: #64748b;
  --gz-line: #e2e8f0;
  --gz-bg: #f4f6fa;
  --gz-card: #ffffff;
  --gz-side: #0f172a;
  --gz-side-2: #1e293b;
  --gz-side-text: #cbd5e1;
  --gz-radius: 14px;
  --gz-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .05);
  --bs-primary: #f05a28;
  --bs-primary-rgb: 240, 90, 40;
  --bs-link-color: #d9481a;
  --bs-link-hover-color: #b83b12;
  --bs-body-font-family: "Inter", "Segoe UI", system-ui, -apple-system, "Noto Sans Bengali", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bs-body-color: #1e293b;
  --bs-border-radius: .6rem;
}
.gz-dev { --gz-primary: #4f46e5; --gz-primary-600: #4338ca; --gz-primary-50: #eef2ff; --bs-primary: #4f46e5; --bs-primary-rgb: 79, 70, 229; --bs-link-color: #4338ca; --gz-side: #111827; }

body { background: var(--gz-bg); font-size: .925rem; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; }
.btn { border-radius: .6rem; font-weight: 500; }
.btn-primary { --bs-btn-bg: var(--gz-primary); --bs-btn-border-color: var(--gz-primary); --bs-btn-hover-bg: var(--gz-primary-600); --bs-btn-hover-border-color: var(--gz-primary-600); --bs-btn-active-bg: var(--gz-primary-600); --bs-btn-disabled-bg: var(--gz-primary); --bs-btn-disabled-border-color: var(--gz-primary); }
.btn-outline-primary { --bs-btn-color: var(--gz-primary); --bs-btn-border-color: var(--gz-primary); --bs-btn-hover-bg: var(--gz-primary); --bs-btn-hover-border-color: var(--gz-primary); --bs-btn-active-bg: var(--gz-primary-600); }
.text-primary { color: var(--gz-primary) !important; }
.bg-primary { background-color: var(--gz-primary) !important; }
.bg-primary-subtle { background: var(--gz-primary-50) !important; }
.form-control, .form-select { border-radius: .55rem; border-color: #d7dde6; }
.form-control:focus, .form-select:focus { border-color: var(--gz-primary); box-shadow: 0 0 0 .2rem rgba(var(--bs-primary-rgb), .15); }
.form-check-input:checked { background-color: var(--gz-primary); border-color: var(--gz-primary); }
.form-label { font-weight: 500; font-size: .85rem; color: var(--gz-ink-2); margin-bottom: .3rem; }
.required::after { content: " *"; color: #dc2626; }

/* ---------- Shell ---------- */
.gz-shell { display: flex; min-height: 100vh; }
.gz-sidebar { width: 256px; flex: 0 0 256px; background: var(--gz-side); color: var(--gz-side-text); position: fixed; inset: 0 auto 0 0; z-index: 1040; display: flex; flex-direction: column; transition: transform .2s ease; }
.gz-brand { display: flex; align-items: center; gap: .6rem; padding: 1.05rem 1.25rem; color: #fff; font-weight: 800; letter-spacing: .5px; font-size: 1.15rem; border-bottom: 1px solid rgba(255,255,255,.06); }
.gz-brand .logo { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--gz-primary), #ff9a3c); display: grid; place-items: center; color: #fff; font-size: 1.05rem; }
.gz-dev .gz-brand .logo { background: linear-gradient(135deg, #4f46e5, #06b6d4); }
.gz-brand small { display: block; font-size: .62rem; font-weight: 500; color: #94a3b8; letter-spacing: .3px; }
.gz-nav { overflow-y: auto; padding: .75rem .6rem 1.5rem; flex: 1; scrollbar-width: thin; }
.gz-nav .nav-group { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: #64748b; padding: .9rem .75rem .35rem; font-weight: 600; }
.gz-nav a { display: flex; align-items: center; gap: .7rem; color: var(--gz-side-text); padding: .52rem .75rem; border-radius: .55rem; font-size: .88rem; margin-bottom: 1px; }
.gz-nav a i { font-size: 1.05rem; width: 1.2rem; text-align: center; opacity: .85; }
.gz-nav a:hover { background: var(--gz-side-2); color: #fff; }
.gz-nav a.active { background: var(--gz-primary); color: #fff; box-shadow: 0 4px 14px rgba(var(--bs-primary-rgb), .35); }
.gz-nav a .badge { margin-left: auto; }
.gz-side-foot { padding: .8rem 1.1rem; font-size: .72rem; color: #64748b; border-top: 1px solid rgba(255,255,255,.06); }
.gz-main { flex: 1; margin-left: 256px; min-width: 0; display: flex; flex-direction: column; }
.gz-topbar { height: 62px; background: #fff; border-bottom: 1px solid var(--gz-line); display: flex; align-items: center; gap: .75rem; padding: 0 1.25rem; position: sticky; top: 0; z-index: 1030; }
.gz-topbar .search { position: relative; flex: 1; max-width: 460px; }
.gz-topbar .search input { padding-left: 2.2rem; background: #f1f5f9; border-color: transparent; }
.gz-topbar .search > i { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--gz-muted); }
.gz-search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border: 1px solid var(--gz-line); border-radius: .75rem; box-shadow: var(--gz-shadow); max-height: 420px; overflow: auto; display: none; z-index: 1050; }
.gz-search-results a { display: flex; gap: .6rem; padding: .55rem .8rem; color: var(--gz-ink); border-bottom: 1px solid #f1f5f9; align-items: center; }
.gz-search-results a:hover, .gz-search-results a.active { background: var(--gz-primary-50); }
.gz-search-results .grp { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--gz-muted); padding: .5rem .8rem .2rem; }
.gz-icon-btn { width: 38px; height: 38px; border-radius: 10px; display: inline-grid; place-items: center; color: var(--gz-ink-2); background: transparent; border: 0; position: relative; }
.gz-icon-btn:hover { background: #f1f5f9; }
.gz-icon-btn .dot { position: absolute; top: 5px; right: 5px; min-width: 17px; height: 17px; font-size: .62rem; border-radius: 9px; background: #ef4444; color: #fff; display: grid; place-items: center; padding: 0 4px; }
.gz-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--gz-primary-50); color: var(--gz-primary); display: inline-grid; place-items: center; font-weight: 700; font-size: .8rem; overflow: hidden; flex: 0 0 auto; }
.gz-avatar img { width: 100%; height: 100%; object-fit: cover; }
.gz-avatar.lg { width: 64px; height: 64px; font-size: 1.3rem; }
.gz-avatar.xl { width: 96px; height: 96px; font-size: 1.8rem; }
.gz-content { padding: 1.4rem 1.5rem 3rem; flex: 1; }
.gz-footer { padding: 1rem 1.5rem; color: var(--gz-muted); font-size: .78rem; border-top: 1px solid var(--gz-line); background: #fff; }
.gz-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.gz-page-head h1 { font-size: 1.35rem; font-weight: 700; margin: 0; color: var(--gz-ink); }
.gz-page-head .crumbs { font-size: .78rem; color: var(--gz-muted); margin-bottom: .2rem; }
.gz-backdrop { display: none; }

/* ---------- Cards ---------- */
.card { border: 1px solid var(--gz-line); border-radius: var(--gz-radius); box-shadow: var(--gz-shadow); }
.card-header { background: #fff; border-bottom: 1px solid var(--gz-line); font-weight: 600; padding: .85rem 1.1rem; border-radius: var(--gz-radius) var(--gz-radius) 0 0 !important; }
.card-body { padding: 1.1rem; }
.gz-stat { padding: 1rem 1.1rem; display: flex; gap: .9rem; align-items: center; height: 100%; }
.gz-stat .ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem; flex: 0 0 auto; }
.gz-stat .val { font-size: 1.35rem; font-weight: 700; color: var(--gz-ink); line-height: 1.15; }
.gz-stat .lbl { font-size: .78rem; color: var(--gz-muted); }
.ic-orange { background: #fff1eb; color: #f05a28; } .ic-green { background: #dcfce7; color: #16a34a; } .ic-red { background: #fee2e2; color: #dc2626; }
.ic-blue { background: #dbeafe; color: #2563eb; } .ic-purple { background: #ede9fe; color: #7c3aed; } .ic-amber { background: #fef3c7; color: #d97706; }
.ic-cyan { background: #cffafe; color: #0891b2; } .ic-slate { background: #e2e8f0; color: #475569; } .ic-pink { background: #fce7f3; color: #db2777; }

/* ---------- Tables ---------- */
.gz-table-wrap { position: relative; }
.table { --bs-table-hover-bg: #f8fafc; margin-bottom: 0; }
.table > thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--gz-muted); font-weight: 600; background: #f8fafc; border-bottom: 1px solid var(--gz-line); white-space: nowrap; padding: .65rem .8rem; }
.table > tbody td { padding: .62rem .8rem; vertical-align: middle; border-color: #eef2f6; }
.table th.sortable { cursor: pointer; user-select: none; }
.table th.sortable::after { content: "\2195"; opacity: .35; margin-left: .3rem; }
.table th.sort-asc::after { content: "\2191"; opacity: .9; } .table th.sort-desc::after { content: "\2193"; opacity: .9; }
.gz-toolbar { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; padding: .8rem 1.1rem; border-bottom: 1px solid var(--gz-line); }
.gz-toolbar .search { position: relative; min-width: 220px; flex: 1; max-width: 340px; }
.gz-toolbar .search input { padding-left: 2rem; }
.gz-toolbar .search i { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: var(--gz-muted); }
.gz-tfoot { display: flex; justify-content: space-between; align-items: center; padding: .7rem 1.1rem; gap: .5rem; flex-wrap: wrap; font-size: .82rem; color: var(--gz-muted); }
.gz-empty { text-align: center; padding: 2.8rem 1rem; color: var(--gz-muted); }
.gz-empty i { font-size: 2.4rem; display: block; margin-bottom: .5rem; opacity: .5; }
.gz-loading-overlay { position: absolute; inset: 0; background: rgba(255,255,255,.65); display: none; place-items: center; z-index: 5; border-radius: var(--gz-radius); }
.gz-loading .gz-loading-overlay { display: grid; }
.gz-badge { font-weight: 600; font-size: .72rem; padding: .35em .7em; }
.gz-actions { white-space: nowrap; text-align: right; }
.gz-actions .btn { padding: .2rem .45rem; }
.pagination { --bs-pagination-active-bg: var(--gz-primary); --bs-pagination-active-border-color: var(--gz-primary); --bs-pagination-color: var(--gz-ink-2); margin: 0; }

/* ---------- Misc ---------- */
.gz-toast-wrap { position: fixed; top: 1rem; right: 1rem; z-index: 2000; display: flex; flex-direction: column; gap: .5rem; }
.gz-toast { min-width: 280px; max-width: 420px; background: #fff; border-radius: .75rem; box-shadow: 0 10px 30px rgba(15,23,42,.18); padding: .75rem 1rem; display: flex; gap: .7rem; align-items: flex-start; border-left: 4px solid var(--gz-primary); animation: gzIn .2s ease; }
.gz-toast.success { border-color: #16a34a; } .gz-toast.danger { border-color: #dc2626; } .gz-toast.warning { border-color: #d97706; } .gz-toast.info { border-color: #2563eb; }
@keyframes gzIn { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }
.gz-kv { display: grid; grid-template-columns: 150px 1fr; gap: .45rem .8rem; font-size: .88rem; }
.gz-kv dt { color: var(--gz-muted); font-weight: 500; } .gz-kv dd { margin: 0; color: var(--gz-ink); }
.gz-timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.gz-timeline::before { content: ""; position: absolute; left: 15px; top: 4px; bottom: 4px; width: 2px; background: var(--gz-line); }
.gz-timeline li { position: relative; padding: 0 0 1rem 2.6rem; }
.gz-timeline .tl-ic { position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: .9rem; background: #fff; border: 2px solid var(--gz-line); }
.gz-timeline .tl-time { font-size: .75rem; color: var(--gz-muted); }
.gz-license-banner { border-radius: 0; margin: 0; border-left: 0; border-right: 0; font-size: .86rem; }
.nav-tabs .nav-link { color: var(--gz-muted); font-weight: 500; border: 0; border-bottom: 2px solid transparent; }
.nav-tabs .nav-link.active { color: var(--gz-primary); border-bottom-color: var(--gz-primary); background: transparent; }
.gz-module-card { border: 1px solid var(--gz-line); border-radius: .8rem; padding: .8rem .9rem; display: flex; gap: .7rem; align-items: center; background: #fff; }
.gz-module-card.off { background: #f8fafc; }
.gz-module-card .form-switch .form-check-input { width: 2.6em; height: 1.35em; cursor: pointer; }
.form-switch .form-check-input:checked { background-color: #16a34a; border-color: #16a34a; }
.skeleton { background: linear-gradient(90deg, #eef2f6 25%, #f8fafc 50%, #eef2f6 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: .4rem; min-height: 1rem; }
@keyframes sk { to { background-position: -200% 0; } }
.chart-box { position: relative; height: 280px; }
.chart-box.sm { height: 200px; }
.gz-auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: #fff; }
.gz-auth .hero { background: linear-gradient(145deg, #0f172a 0%, #1e293b 55%, #f05a28 140%); color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; }
.gz-dev.gz-auth .hero, .gz-dev .gz-auth .hero { background: linear-gradient(145deg, #0b1020 0%, #1e1b4b 60%, #4f46e5 140%); }
.gz-auth .panel { display: grid; place-items: center; padding: 2rem; }
.gz-auth .panel .inner { width: 100%; max-width: 400px; }
.gz-feature { display: flex; gap: .8rem; align-items: flex-start; margin-bottom: 1rem; color: #cbd5e1; }
.gz-feature i { color: #ff9a3c; font-size: 1.2rem; }
.quick-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; padding: 1rem .5rem; border: 1px solid var(--gz-line); border-radius: .8rem; color: var(--gz-ink-2); background: #fff; font-size: .8rem; font-weight: 500; text-align: center; }
.quick-tile i { font-size: 1.4rem; color: var(--gz-primary); }
.quick-tile:hover { border-color: var(--gz-primary); color: var(--gz-primary); }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: .35rem; }
.status-dot.healthy, .status-dot.online, .status-dot.connected { background: #16a34a; } .status-dot.warning { background: #d97706; } .status-dot.error { background: #dc2626; } .status-dot.offline, .status-dot.disconnected { background: #94a3b8; }
.text-xs { font-size: .75rem; } .text-sm { font-size: .85rem; } .fw-600 { font-weight: 600; } .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.min-w-0 { min-width: 0; }
.modal-content { border-radius: var(--gz-radius); border: 0; }
.modal-header { border-bottom: 1px solid var(--gz-line); } .modal-footer { border-top: 1px solid var(--gz-line); }
.gz-sticky-actions { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--gz-line); padding: .8rem 1.1rem; display: flex; gap: .5rem; justify-content: flex-end; border-radius: 0 0 var(--gz-radius) var(--gz-radius); }

/* ---------- Member card ---------- */
.member-card { width: 340px; max-width: 100%; aspect-ratio: 1.586; border-radius: 16px; color: #fff; padding: 18px; position: relative; overflow: hidden; background: linear-gradient(135deg, #0f172a 0%, #1e293b 55%, var(--gz-primary) 160%); box-shadow: 0 12px 30px rgba(15, 23, 42, .25); }
.member-card.expired { background: linear-gradient(135deg, #3f3f46, #71717a); }
.member-card .mc-head { display: flex; justify-content: space-between; align-items: center; }
.member-card .mc-logo { height: 30px; max-width: 120px; object-fit: contain; }
.member-card .mc-photo { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; border: 2px solid rgba(255,255,255,.6); background: rgba(255,255,255,.15); display: grid; place-items: center; font-weight: 700; font-size: 1.4rem; }
.member-card .mc-qr { background: #fff; padding: 5px; border-radius: 8px; width: 92px; height: 92px; }
.member-card .mc-qr img, .member-card .mc-qr canvas, .member-card .mc-qr svg { width: 100%; height: 100%; }
.member-card .mc-status { font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 20px; background: #16a34a; }
.member-card.expired .mc-status { background: #dc2626; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .gz-sidebar { transform: translateX(-100%); }
  .gz-main { margin-left: 0; }
  body.gz-side-open .gz-sidebar { transform: none; }
  body.gz-side-open .gz-backdrop { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 1035; }
  .gz-auth { grid-template-columns: 1fr; }
  .gz-auth .hero { display: none; }
  .gz-content { padding: 1rem .9rem 5rem; }
  .gz-topbar { padding: 0 .75rem; }
  .gz-kv { grid-template-columns: 120px 1fr; }
}
@media (max-width: 575.98px) {
  .gz-toolbar .search { max-width: none; min-width: 100%; }
  .gz-page-head h1 { font-size: 1.15rem; }
  .table-responsive-stack thead { display: none; }
  .table-responsive-stack tbody tr { display: block; border-bottom: 1px solid var(--gz-line); padding: .4rem 0; }
  .table-responsive-stack tbody td { display: flex; justify-content: space-between; gap: 1rem; border: 0; padding: .3rem .9rem; text-align: right; }
  .table-responsive-stack tbody td::before { content: attr(data-label); color: var(--gz-muted); font-weight: 500; text-align: left; }
  .table-responsive-stack tbody td.gz-actions { justify-content: flex-end; }
  .table-responsive-stack tbody td.gz-actions::before { content: none; }
}
@media print {
  .gz-sidebar, .gz-topbar, .gz-footer, .no-print, .gz-toolbar, .gz-tfoot { display: none !important; }
  .gz-main { margin: 0; } .gz-content { padding: 0; } .card { box-shadow: none; border: 0; } body { background: #fff; }
}
