/* ==============================================================================
   Kite Suite Platform — Shared UI Design System
   ============================================================================== */

:root {
  --bg: #090d16;
  --bg-secondary: #0f172a;
  --card-bg: #0f172a;
  --card-border: #1e293b;
  --card-hover-border: #6366f1;
  --card-inner: #1e293b;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --accent-light: rgba(99, 102, 241, 0.12);
  --modal-bg: #0f172a;
  --modal-border: #334155;
  --badge-green: #10b981;
  --badge-green-bg: rgba(16, 185, 129, 0.15);
  --badge-indigo: #818cf8;
  --badge-indigo-bg: rgba(99, 102, 241, 0.15);
}

.light {
  --bg: #f8fafc;
  --bg-secondary: #ffffff;
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --card-hover-border: #4f46e5;
  --card-inner: #f1f5f9;
  --text: #0f172a;
  --text-muted: #64748b;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-light: rgba(79, 70, 229, 0.08);
  --modal-bg: #ffffff;
  --modal-border: #cbd5e1;
  --badge-green: #059669;
  --badge-green-bg: rgba(5, 150, 105, 0.12);
  --badge-indigo: #4f46e5;
  --badge-indigo-bg: rgba(79, 70, 229, 0.1);
}

.medium {
  --bg: #1e293b;
  --bg-secondary: #0f172a;
  --card-bg: #1e293b;
  --card-border: #334155;
  --card-hover-border: #6366f1;
  --card-inner: #27354a;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --accent-light: rgba(99, 102, 241, 0.15);
  --modal-bg: #1e293b;
  --modal-border: #334155;
  --badge-green: #10b981;
  --badge-green-bg: rgba(16, 185, 129, 0.15);
  --badge-indigo: #818cf8;
  --badge-indigo-bg: rgba(99, 102, 241, 0.15);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.2s, color 0.2s;
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--card-border);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.brand-text h1 {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-text p {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-link {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  transition: all 0.12s;
}

.nav-link:hover {
  color: var(--text);
  background: var(--card-inner);
}

/* Theme Toggle */
.btn-theme {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-theme:hover {
  color: var(--text);
  border-color: var(--accent);
}

/* Sleek 9-Dots Launcher Button */
.btn-launcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background-color: var(--card-bg);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-launcher:hover,
.btn-launcher.active {
  color: var(--accent);
  border-color: var(--accent);
  background-color: var(--accent-light);
}

/* 100% Solid Opaque 9-Dots Modal */
.launcher-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: rgba(0, 0, 0, 0.4);
}

.launcher-backdrop.open {
  display: block;
}

.launcher-modal {
  display: none;
  position: absolute;
  top: 54px;
  right: 1.5rem;
  width: 380px;
  max-width: calc(100vw - 2rem);
  background-color: var(--modal-bg);
  border: 1px solid var(--modal-border);
  border-radius: 20px;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
  z-index: 99999;
  padding: 1rem;
  animation: modalIn 0.15s ease-out;
}

.launcher-modal.open {
  display: block;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(-6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--card-border);
}

.modal-title {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: var(--card-inner);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.75rem;
  margin-bottom: 0.75rem;
  outline: none;
}

.search-input:focus {
  border-color: var(--accent);
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  max-height: 360px;
  overflow-y: auto;
  padding: 2px;
}

.app-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.4rem;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background-color: var(--card-inner);
  text-decoration: none;
  color: var(--text);
  text-align: center;
  transition: all 0.12s;
}

.app-card:hover {
  border-color: var(--accent);
  background-color: var(--accent-light);
  transform: translateY(-2px);
}

.app-icon {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.app-name {
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.app-category {
  font-size: 0.6rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--card-border);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.modal-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

/* Page Container */
main {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.hero-banner {
  text-align: center;
  margin-bottom: 3rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--badge-green-bg);
  color: var(--badge-green);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: 2.25rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
  line-height: 1.15;
}

.hero-sub {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 1.5rem auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--card-inner);
  border-color: var(--card-hover-border);
}

/* Cards & Grid */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.15s;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* Footer */
footer {
  border-top: 1px solid var(--card-border);
  background: var(--bg-secondary);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==============================================================================
   Kite Suite Dashboard & Rich Application Components
   ============================================================================== */

/* Dashboard Layout */
.dashboard-layout {
  display: flex;
  min-height: calc(100vh - 65px);
  width: 100%;
}

.dashboard-sidebar {
  width: 250px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--card-border);
  padding: 1.25rem 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
  transition: all 0.2s;
}

@media (max-width: 900px) {
  .dashboard-layout {
    flex-direction: column;
  }
  .dashboard-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--card-border);
    padding: 0.75rem 1rem;
  }
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sidebar-title {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0.5rem 0.75rem 0.25rem 0.75rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.15s;
  cursor: pointer;
  border: 1px solid transparent;
}

.sidebar-link:hover {
  color: var(--text);
  background: var(--card-inner);
}

.sidebar-link.active {
  color: var(--accent);
  background: var(--accent-light);
  border-color: rgba(99, 102, 241, 0.2);
  font-weight: 700;
}

.sidebar-icon {
  font-size: 1.05rem;
  width: 20px;
  text-align: center;
}

.sidebar-badge {
  margin-left: auto;
  font-size: 0.7rem;
  background: var(--accent-light);
  color: var(--accent);
  padding: 2px 7px;
  border-radius: 9999px;
  font-weight: 700;
}

.dashboard-main {
  flex: 1;
  padding: 1.75rem 2rem;
  overflow-y: auto;
}

@media (max-width: 640px) {
  .dashboard-main {
    padding: 1rem;
  }
}

/* Page Header */
.page-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-title-group h2 {
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.page-title-group p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* KPI Metrics */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.metric-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: transform 0.15s, border-color 0.15s;
}

.metric-card:hover {
  border-color: var(--card-hover-border);
}

.metric-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.metric-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.metric-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.metric-val {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  font-family: 'JetBrains Mono', monospace;
}

.metric-footer {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
}

.trend-up {
  color: #10b981;
  font-weight: 700;
}

.trend-down {
  color: #ef4444;
  font-weight: 700;
}

/* Tab Bar */
.tab-bar {
  display: flex;
  gap: 0.4rem;
  border-bottom: 1px solid var(--card-border);
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tab-btn:hover {
  color: var(--text);
}

.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* Data Table Container */
.data-table-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.table-toolbar {
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--card-border);
  flex-wrap: wrap;
}

.table-search {
  display: flex;
  align-items: center;
  background: var(--card-inner);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 0.4rem 0.8rem;
  gap: 0.5rem;
  min-width: 240px;
}

.table-search input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 0.82rem;
  width: 100%;
}

.table-scroll {
  overflow-x: auto;
  width: 100%;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.83rem;
}

table.data-table th {
  background: var(--card-inner);
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--card-border);
  white-space: nowrap;
}

table.data-table td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--card-border);
  vertical-align: middle;
}

table.data-table tr:last-child td {
  border-bottom: none;
}

table.data-table tbody tr {
  transition: background-color 0.1s;
}

table.data-table tbody tr:hover {
  background-color: var(--card-inner);
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-active, .badge-paid, .badge-completed {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.badge-pending, .badge-progress {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.badge-overdue, .badge-failed, .badge-alert {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.badge-info, .badge-trial {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent);
}

/* Action Icons inside tables */
.table-btn {
  background: var(--card-inner);
  border: 1px solid var(--card-border);
  color: var(--text);
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
}

.table-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.table-btn-danger:hover {
  border-color: #ef4444;
  color: #ef4444;
}

/* Form Controls & Modal System */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  background: var(--modal-bg);
  border: 1px solid var(--modal-border);
  border-radius: 20px;
  width: 100%;
  max-width: 580px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  animation: modalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-box-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-box-header h3 {
  font-size: 1.1rem;
  font-weight: 800;
}

.modal-box-body {
  padding: 1.5rem;
  max-height: 70vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-box-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--card-border);
  background: var(--card-inner);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

.form-input, .form-select, .form-textarea {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 0.6rem 0.85rem;
  color: var(--text);
  font-size: 0.85rem;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 500px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Toast Notifications */
.toast-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  color: var(--text);
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  pointer-events: auto;
  animation: toastSlide 0.2s ease-out;
}

@keyframes toastSlide {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.toast-success {
  border-left: 4px solid #10b981;
}

.toast-error {
  border-left: 4px solid #ef4444;
}

/* POS & KDS Specific Components */
.pos-table-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.pos-table-card {
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  border-radius: 14px;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
}

.pos-table-card:hover {
  transform: translateY(-2px);
}

.pos-table-card.available {
  border-color: #10b981;
}

.pos-table-card.occupied {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.05);
}

.pos-table-card.billing {
  border-color: #f59e0b;
}

.pos-menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}

.pos-item-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.pos-item-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}


/* ==============================================================================
   Kite Suite Platform — Full Enterprise UI Extensions
   ============================================================================== */

/* Navigation Mega Dropdowns */
.nav-dropdown-group {
  position: relative;
  display: inline-block;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 320px;
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 0.75rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1050;
}

.nav-dropdown-group:hover .nav-dropdown-menu,
.nav-dropdown-group:focus-within .nav-dropdown-menu {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  color: var(--text) !important;
  text-decoration: none !important;
  font-size: 0.82rem;
  font-weight: 600;
  transition: background 0.15s;
}

.dropdown-link:hover {
  background: var(--card-inner);
  color: var(--accent);
}

.dropdown-link .dropdown-icon {
  font-size: 1.15rem;
}

.dropdown-link .dropdown-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: normal;
}

/* Hero Section & Mockup Window */
.hero-mockup-wrapper {
  margin: 3.5rem auto 0;
  max-width: 1060px;
  border-radius: 18px;
  padding: 8px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.4), rgba(236, 72, 153, 0.2), rgba(16, 185, 129, 0.2));
  box-shadow: 0 25px 60px -15px rgba(99, 102, 241, 0.25);
}

.mockup-window {
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.mockup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: var(--card-inner);
  border-bottom: 1px solid var(--card-border);
  font-size: 0.75rem;
}

.mockup-dots {
  display: flex;
  gap: 6px;
}

.mockup-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.mockup-address {
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 0.25rem 1.5rem;
  color: var(--text-muted);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
}

.mockup-body {
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.5rem;
  min-height: 380px;
}

@media (max-width: 768px) {
  .mockup-body {
    grid-template-columns: 1fr;
  }
}

.mockup-sidebar {
  border-right: 1px solid var(--card-border);
  padding-right: 1rem;
}

.mockup-sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  cursor: pointer;
  margin-bottom: 0.25rem;
  transition: all 0.15s;
}

.mockup-sidebar-item.active,
.mockup-sidebar-item:hover {
  background: var(--card-inner);
  color: var(--accent);
  font-weight: 600;
}

.mockup-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.mockup-stat-box {
  background: var(--card-inner);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1rem;
}

.mockup-stat-num {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent);
}

.mockup-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Infinite Live Apps Marquee */
.marquee-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  background: var(--card-inner);
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
  padding: 1.15rem 0;
  margin: 3rem 0;
}

.marquee-container::before,
.marquee-container::after {
  content: "";
  position: absolute;
  top: 0;
  width: 120px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.marquee-container::before {
  left: 0;
  background: linear-gradient(to right, var(--card-inner), transparent);
}

.marquee-container::after {
  right: 0;
  background: linear-gradient(to left, var(--card-inner), transparent);
}

.marquee-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  animation: scrollMarquee 35s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes scrollMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-chip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 0.5rem 1.15rem;
  text-decoration: none;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s;
}

.marquee-chip:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

/* Infra Ticker */
.infra-ticker-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 0.85rem 1.35rem;
  margin: 2rem 0;
  font-size: 0.8rem;
}

.pulse-indicator {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 rgba(16, 185, 129, 0.4);
  animation: pulseGreen 1.8s infinite;
  margin-right: 0.45rem;
}

@keyframes pulseGreen {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Stats Section */
.stats-showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 3rem 0;
}

.stat-showcase-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.75rem;
  text-align: center;
  transition: transform 0.2s;
}

.stat-showcase-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.stat-num-highlight {
  font-size: 2.3rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.35rem;
}

/* Category Filter Tabs for Product Explorer */
.filter-tabs-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.filter-tab-pill {
  border: 1px solid var(--card-border);
  background: var(--card-inner);
  color: var(--text-muted);
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.filter-tab-pill.active,
.filter-tab-pill:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

/* Architecture Showcase Tabs */
.arch-container {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  overflow: hidden;
  margin: 3rem 0;
}

.arch-header {
  display: flex;
  background: var(--card-inner);
  border-bottom: 1px solid var(--card-border);
  overflow-x: auto;
}

.arch-nav-btn {
  padding: 1rem 1.5rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
}

.arch-nav-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: var(--bg-secondary);
}

.arch-content-pane {
  display: none;
  padding: 2rem;
}

.arch-content-pane.active {
  display: block;
}

/* FAQ Accordion */
.faq-accordion-group {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 2rem 0;
}

.faq-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq-card:hover {
  border-color: var(--accent);
}

.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.faq-collapse {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  padding: 0 1.5rem;
}

.faq-card.open .faq-collapse {
  max-height: 300px;
  padding-bottom: 1.25rem;
}

.faq-card.open .faq-arrow {
  transform: rotate(180deg);
}

.faq-arrow {
  transition: transform 0.2s;
}

/* Comprehensive 7-Column Ecosystem Footer */
.kite-ecosystem-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--card-border);
  padding: 4rem 1.5rem 2rem;
  margin-top: 5rem;
}

.footer-top-grid {
  display: grid;
  grid-template-columns: 2fr repeat(5, 1fr);
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto 3rem;
}

@media (max-width: 992px) {
  .footer-top-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 576px) {
  .footer-top-grid {
    grid-template-columns: 1fr;
  }
}

.footer-brand-col p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 1rem 0;
  line-height: 1.6;
}

.footer-col-title {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
  margin-bottom: 1rem;
}

.footer-link-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-link-list a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.15s;
}

.footer-link-list a:hover {
  color: var(--accent);
}

.footer-badge-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 0;
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-legal-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 1.5rem auto 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==============================================================================
   UNIVERSAL ENTERPRISE RESPONSIVE SYSTEM (FOLDING MOBILE -> 4K SMART TV)
   ============================================================================== */

/* Luxury Enterprise Theme & Ambient Background Lighting - Theme Scoped */
html.dark body {
  background: radial-gradient(circle at 50% 0%, #111a33 0%, #070b14 60%, #04070d 100%) fixed !important;
  color: #f8fafc !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

html.medium body {
  background: #1e293b !important;
  color: #f1f5f9 !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

html.light body {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Enterprise Card Glassmorphism with Theme Scoping */
html.dark .card, html.dark .benefit-box, html.dark .stat-card {
  background: rgba(15, 23, 42, 0.72) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s, box-shadow 0.22s !important;
}

html.dark .card:hover, html.dark .benefit-box:hover {
  border-color: rgba(99, 102, 241, 0.45) !important;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45), 0 0 25px rgba(99, 102, 241, 0.15) !important;
}

html.medium .card, html.medium .benefit-box, html.medium .stat-card {
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  color: #f1f5f9 !important;
}

html.light .card, html.light .benefit-box, html.light .stat-card {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  color: #0f172a !important;
}

/* Responsive Fluid Tables */
.table-responsive, .table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
  scrollbar-width: thin;
}

/* Touch-First Interactive Targets (At least 44px on touch devices) */
button, .btn, .table-btn, input, select, textarea, a.sidebar-link {
  touch-action: manipulation;
}

/* TV & Remote Focus States */
:focus-visible {
  outline: 3px solid #6366f1 !important;
  outline-offset: 3px;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.75) !important;
}

/* Pulse Glow & Shimmer Keyframes */
@keyframes pulseSecurityGlow {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.pulse-security {
  animation: pulseSecurityGlow 2.5s infinite;
}

/* 1. Ultra-Narrow / Folding Phones (Folded ~260px - 360px) */
@media (max-width: 360px) {
  html {
    font-size: 13px;
  }
  header {
    padding: 0.5rem 0.75rem !important;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .brand-text h1 {
    font-size: 0.85rem !important;
  }
  .card {
    padding: 1rem 0.75rem !important;
    border-radius: 14px !important;
  }
  .guard-card {
    padding: 1.5rem 1rem !important;
    border-radius: 18px !important;
  }
  .hero-banner {
    padding: 2.5rem 0.5rem 2rem !important;
  }
  .hero-title {
    font-size: 1.65rem !important;
    line-height: 1.2 !important;
  }
  .hero-actions, .cta-group {
    flex-direction: column !important;
    width: 100% !important;
  }
  .hero-actions .btn, .cta-group .btn {
    width: 100% !important;
    justify-content: center;
  }
  .footer-badge-strip, .footer-legal-bar {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.75rem !important;
  }
  .hide-mobile {
    display: none !important;
  }
}

/* 2. Standard Smartphones & Large Mobile (361px - 576px) */
@media (min-width: 361px) and (max-width: 576px) {
  header {
    padding: 0.6rem 1rem !important;
  }
  .card {
    padding: 1.25rem 1rem !important;
  }
  .hero-banner {
    padding: 3rem 1rem 2.25rem !important;
  }
  .hero-title {
    font-size: 1.9rem !important;
    line-height: 1.25 !important;
  }
  .hero-actions {
    flex-direction: column !important;
  }
  .hero-actions .btn {
    width: 100% !important;
    justify-content: center;
  }
  .benefits-grid, .apps-grid-home {
    grid-template-columns: 1fr !important;
  }
  .hide-mobile {
    display: none !important;
  }
}

/* 3. Small Tablets, Phablets & Unfolded Folding Phones (577px - 768px) */
@media (min-width: 577px) and (max-width: 768px) {
  header {
    padding: 0.75rem 1.25rem !important;
  }
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.25rem !important;
  }
  .hero-title {
    font-size: 2.3rem !important;
  }
  .dashboard-layout {
    flex-direction: column !important;
  }
  .dashboard-sidebar {
    width: 100% !important;
    border-right: none !important;
    border-bottom: 1px solid var(--card-border) !important;
  }
  .hide-mobile {
    display: none !important;
  }
}

/* 4. Standard Tablets & iPad Pro (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .hero-title {
    font-size: 2.75rem !important;
  }
  .dashboard-sidebar {
    width: 220px !important;
  }
  .footer-top-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* 5. Laptops & Standard Desktops (1025px - 1440px) */
@media (min-width: 1025px) and (max-width: 1440px) {
  .hero-title {
    font-size: 3.2rem !important;
  }
  .benefits-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}

/* 6. Ultra-Wide Monitors & Smart TVs (1441px - 2560px) */
@media (min-width: 1441px) and (max-width: 2560px) {
  body {
    font-size: 16.5px;
  }
  .hero-banner {
    padding: 6rem 2rem 4rem !important;
  }
  .hero-title {
    font-size: 3.8rem !important;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
  }
  .max-container, .footer-top-grid, .footer-badge-strip, .footer-legal-bar {
    max-width: 1400px !important;
  }
}

/* 7. 4K Ultra-HD & Smart Displays (2560px+) */
@media (min-width: 2561px) {
  html {
    font-size: 20px;
  }
  body {
    max-width: 3200px;
    margin: 0 auto;
    box-shadow: 0 0 100px rgba(0, 0, 0, 0.8);
  }
  .hero-banner {
    padding: 8rem 3rem 5rem !important;
  }
  .hero-title {
    font-size: 4.5rem !important;
    max-width: 1400px;
  }
  .max-container, .footer-top-grid, .footer-badge-strip, .footer-legal-bar {
    max-width: 2200px !important;
  }
  .card {
    border-radius: 28px !important;
    padding: 2.5rem !important;
  }
}

/* ==============================================================================
   Universal Staff POS Counter Mode Security Shield
   Hides purchase costs, profit margins, supplier rates & P&L from staff
   ============================================================================== */
body.staff-counter-mode [data-pane="pane-purchase-bills"],
body.staff-counter-mode [data-pane="pane-purchase-orders"],
body.staff-counter-mode [data-pane="pane-expenses"],
body.staff-counter-mode [data-pane="pane-banking"],
body.staff-counter-mode [data-pane="pane-reports-profit-loss"],
body.staff-counter-mode [data-pane="pane-settings"],
body.staff-counter-mode #colHeaderMargin,
body.staff-counter-mode .margin-badge-display,
body.staff-counter-mode .profit-card-element,
body.staff-counter-mode .super-admin-link-element,
body.staff-counter-mode #kpiProfitCard,
body.staff-counter-mode .nav-group-purchases,
body.staff-counter-mode .cost-price-cell,
body.staff-counter-mode .margin-cell,
body.staff-counter-mode .pl-card,
body.staff-counter-mode .hide-in-counter-mode,
body.staff-counter-mode .purchase-cost-column {
  display: none !important;
}

body.staff-counter-mode .staff-counter-notice {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #10b981;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
}

