:root {
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Minimalist Monochromatic Dark Palette */
  --bg-body: #09090b;
  --bg-sidebar: #0e0e11;
  --bg-card: #141417;
  --bg-card-hover: #19191d;
  --bg-input: #121215;
  --border: #232328;
  --border-subtle: #1c1c20;
  --border-focus: #3f3f46;

  --text-main: #f4f4f5;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;

  /* Restrained Accents */
  --accent-blue: #2563eb;
  --accent-candle: #d97706;
  --accent-laser: #0284c7;

  /* Feedback */
  --danger: #e11d48;
  --danger-bg: rgba(225, 29, 72, 0.1);
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.1);

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --sidebar-w: 240px;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font);
  background-color: var(--bg-body);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  position: relative;
}

body.sidebar-drawer-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.toast.toast-error { border-left: 3px solid var(--danger); }
.toast.toast-success { border-left: 3px solid var(--success); }
.toast.toast-info { border-left: 3px solid var(--accent-blue); }

/* ----------------------------------------------------
   LOGIN & LOGOUT MINIMALIST PAGES
---------------------------------------------------- */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background-color: var(--bg-body);
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
}

.auth-header {
  margin-bottom: 24px;
  text-align: center;
}

.auth-icon-badge {
  width: 44px;
  height: 44px;
  background: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-muted);
}

.auth-header h1 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}

.auth-header p {
  font-size: 13px;
  color: var(--text-muted);
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 9px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.btn-primary {
  background: var(--text-main);
  color: #000;
}
.btn-primary:hover {
  background: #e4e4e7;
}

.btn-secondary {
  background: var(--bg-input);
  color: var(--text-main);
  border-color: var(--border);
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: rgba(225, 29, 72, 0.2);
}
.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

.alert-error {
  padding: 10px 12px;
  background: var(--danger-bg);
  border: 1px solid rgba(225, 29, 72, 0.25);
  color: #fca5a5;
  border-radius: var(--radius-sm);
  font-size: 12px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Quick test pill bar */
.auth-quick-select {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
}
.auth-quick-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: 10px;
  text-align: center;
}
.quick-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.quick-btn {
  padding: 6px 8px;
  background: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.quick-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: var(--border-focus);
}

/* ----------------------------------------------------
   APP LAYOUT (Authenticated Views)
---------------------------------------------------- */
.app-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  position: relative;
}

/* Sidebar */
.app-sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), width 0.2s ease;
}

.sidebar-header {
  height: 56px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  padding: 14px 8px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 400;
  transition: all 0.15s;
}

.nav-item:hover {
  color: var(--text-main);
  background: var(--bg-card);
}

.nav-item.active {
  color: var(--text-main);
  background: var(--bg-card);
  font-weight: 500;
  border-left: 2px solid var(--text-main);
}

.nav-icon {
  width: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
}

.nav-item.active .nav-icon {
  color: var(--text-main);
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-snippet {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.user-avatar-sm {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-main);
  flex-shrink: 0;
}

.user-snippet-details {
  min-width: 0;
}

.user-snippet-name {
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-snippet-role {
  font-size: 10px;
  color: var(--text-dim);
}

/* Main Area */
.app-content {
  margin-left: var(--sidebar-w);
  flex: 1 1 0%;
  min-width: 0;
  width: calc(100% - var(--sidebar-w));
  max-width: calc(100% - var(--sidebar-w));
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

/* Top Header */
.app-topbar {
  height: 56px;
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-body);
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  box-sizing: border-box;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.topbar-title {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-menu-btn {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 15px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.mobile-menu-btn:active {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
}

.sidebar-close-btn {
  display: none;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  margin-left: auto;
  transition: all 0.15s ease;
}

.sidebar-close-btn:active {
  color: var(--text-main);
  border-color: var(--border-focus);
  background: var(--bg-card);
}

.sidebar-backdrop {
  display: none;
}

.mobile-bottom-nav {
  display: none;
}

.mobile-back-btn {
  display: none;
}

.page-wrapper {
  padding: 24px 28px;
  max-width: 1560px;
  width: 100%;
  min-width: 0;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Card utility */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* ----------------------------------------------------
   DASHBOARD & CARDS (Minimalist)
---------------------------------------------------- */
.page-header {
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.page-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.page-sub {
  color: var(--text-muted);
  font-size: 13px;
}

/* Module big cards */
.module-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 16px;
  margin-bottom: 32px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.module-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s;
}

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

.module-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.module-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-body);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.module-card.candles .module-card-icon { color: var(--accent-candle); }
.module-card.laser .module-card-icon { color: var(--accent-laser); }

.module-card-name {
  font-size: 16px;
  font-weight: 600;
}

.module-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.5;
  flex: 1;
}

/* Apps Grid */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 16px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.app-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s;
}

.app-item-card:hover {
  border-color: var(--border-focus);
}

.app-item-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.app-item-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-body);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.app-item-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.app-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--bg-body);
  color: var(--text-muted);
}

.badge.candle { border-color: rgba(217, 119, 6, 0.4); color: var(--accent-candle); }
.badge.laser { border-color: rgba(2, 132, 199, 0.4); color: var(--accent-laser); }
.badge.active { color: var(--success); border-color: rgba(16, 185, 129, 0.3); }
.badge.inactive { color: var(--danger); border-color: rgba(225, 29, 72, 0.3); }

.app-item-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
  flex: 1;
}

.app-item-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

/* Data Table */
.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--border-focus) transparent;
}

.table-card::-webkit-scrollbar {
  height: 6px;
}
.table-card::-webkit-scrollbar-track {
  background: var(--bg-body);
}
.table-card::-webkit-scrollbar-thumb {
  background: var(--border-focus);
  border-radius: 3px;
}

.minimal-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
  min-width: 680px;
}

.minimal-table th {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg-body);
}

.minimal-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
  vertical-align: middle;
}

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

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  box-sizing: border-box;
  overflow-y: auto;
}
.modal-overlay.hidden { display: none; }

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: min(480px, calc(100vw - 32px));
  max-height: 85vh;
  overflow-y: auto;
  box-sizing: border-box;
}

.modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 {
  font-size: 14px;
  font-weight: 600;
}
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
}
.modal-body {
  padding: 20px 18px;
}

/* CLI Helper Box in Users Page */
.cli-notice-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 13px;
}
.cli-code-inline {
  font-family: var(--font-mono);
  background: var(--bg-body);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: #38bdf8;
}

/* ====================================================
   RESPONSIVE DESIGN SYSTEM (Multi-Screen Architecture)
   - Laptops & Ultrabooks (1025px - 1440px)
   - Tablets & Small Windows (max-width: 1024px)
   - Mobile Phones (max-width: 768px)
   - Small Screens (max-width: 380px)
==================================================== */

/* ----------------------------------------------------
   1. LAPTOPS & COMPACT DESKTOPS (1025px - 1366px)
   Prevents horizontal shifting, optimizes table space,
   and stacks or reflows panels smoothly.
---------------------------------------------------- */
@media (min-width: 1025px) and (max-width: 1366px) {
  :root {
    --sidebar-w: 220px;
  }

  .page-wrapper {
    padding: 20px 22px;
    max-width: 100%;
  }

  .kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
  }

  .candle-workspace-grid {
    display: flex;
    flex-direction: column;
    gap: 22px;
    width: 100%;
    min-width: 0;
  }

  .candle-workspace-main {
    order: 1;
    width: 100%;
    min-width: 0;
  }

  .candle-quick-panel {
    position: static;
    width: 100%;
    order: 2;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
  }

  .qp-shortcuts-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .module-cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .apps-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

  .knowledge-category-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

  .pricing-calculator-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

/* ----------------------------------------------------
   2. TABLETS & COMPACT LAPTOPS (max-width: 1024px)
   Off-canvas drawer for full width content & zero overflow.
---------------------------------------------------- */
@media (max-width: 1024px) {
  /* Prevent iOS auto zoom */
  input, select, textarea, .form-input {
    font-size: 16px !important;
  }

  /* App Layout: 100% full width */
  .app-container {
    flex-direction: column;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  /* Sidebar transforms into off-canvas drawer */
  .app-sidebar {
    display: flex !important;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 280px;
    max-width: 86vw;
    z-index: 1050;
    background: #0e0e12;
    border-right: 1px solid var(--border);
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.7);
  }

  .app-sidebar.open {
    transform: translateX(0);
  }

  .sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
  }

  .sidebar-close-btn {
    display: flex;
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1040;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  .sidebar-backdrop.active {
    opacity: 1;
    pointer-events: auto;
  }

  /* Content area takes 100% width with 0 margin */
  .app-content {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
  }

  .app-topbar {
    padding: 0 16px;
    height: 54px;
    width: 100% !important;
  }

  .mobile-menu-btn {
    display: flex !important;
  }

  .mobile-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 13px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
  }

  .page-wrapper {
    padding: 18px 16px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .candle-workspace-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    min-width: 0;
  }

  .candle-workspace-main {
    order: 1;
    width: 100%;
    min-width: 0;
  }

  .candle-quick-panel {
    position: static;
    width: 100%;
    order: 2;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
  }

  .qp-shortcuts-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .pricing-calculator-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .calculator-card-result {
    position: static;
    margin-top: 14px;
  }

  .minimal-table {
    min-width: 640px;
  }
}

/* ----------------------------------------------------
   3. MOBILE PHONES (max-width: 768px)
---------------------------------------------------- */
@media (max-width: 768px) {
  .topbar-title {
    font-size: 13px;
    max-width: 150px;
  }

  .logout-btn-text,
  .user-name-text {
    display: none;
  }

  .topbar-user-btn,
  #topLogoutBtn {
    padding: 6px 10px;
  }

  /* Page Wrapper with bottom nav padding */
  .page-wrapper {
    padding: 14px 12px calc(76px + env(safe-area-inset-bottom, 0px)) 12px;
  }

  /* Mobile Bottom Navigation Bar */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(14, 14, 18, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
    z-index: 990;
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-dim);
    font-size: 10px;
    font-weight: 500;
    text-decoration: none;
    background: none;
    border: none;
    padding: 6px 8px;
    cursor: pointer;
    flex: 1;
    min-width: 0;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-nav-item i {
    font-size: 16px;
    transition: transform 0.15s ease;
  }

  .mobile-nav-item:active i {
    transform: scale(1.15);
  }

  .mobile-nav-item.active {
    color: var(--accent-candle);
    font-weight: 600;
  }

  .mobile-nav-item.active i {
    color: var(--accent-candle);
  }

  /* Page Header */
  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 16px;
  }

  .page-title {
    font-size: 18px;
  }

  .page-sub {
    font-size: 12px;
  }

  /* Module Cards & Apps Grid */
  .module-cards-grid,
  .apps-grid,
  .knowledge-category-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Candle Hero Banner */
  .candle-hero-banner {
    padding: 16px 14px;
    gap: 12px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
  }

  .candle-hero-banner h1 {
    font-size: 16px !important;
  }

  .candle-hero-banner .page-sub {
    font-size: 12px;
  }

  .candle-hero-banner > div:last-child {
    width: 100%;
  }

  .candle-hero-banner > div:last-child button {
    width: 100%;
    justify-content: center;
  }

  /* KPI Stat Cards (Sleek 2x2 grid) */
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    margin-bottom: 16px !important;
  }

  .kpi-card {
    padding: 10px 12px;
  }

  .kpi-label {
    font-size: 9px;
    letter-spacing: 0.03em;
  }

  .kpi-icon {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }

  .kpi-val {
    font-size: 17px;
    margin-bottom: 2px;
  }

  .kpi-sub {
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Candle Tabs */
  .candle-tabs {
    gap: 6px;
    margin-bottom: 14px;
  }

  .candle-tab-btn {
    padding: 7px 11px;
    font-size: 12px;
    border-radius: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border);
  }

  .candle-tab-btn.active {
    background: rgba(217, 119, 6, 0.15);
    border-color: var(--accent-candle);
    color: var(--accent-candle);
  }

  /* Filter Bar */
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
    margin-bottom: 14px;
  }

  .filter-bar > div {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .filter-pills {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
    padding-bottom: 4px;
    width: 100%;
  }

  .filter-pills::-webkit-scrollbar {
    display: none;
  }

  .filter-pill {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 6px 12px;
    font-size: 11px;
  }

  .filter-bar .btn,
  .filter-bar button {
    width: 100%;
    justify-content: center;
    padding: 8px 14px;
  }

  /* Modals on mobile */
  .modal-overlay {
    padding: 8px;
    align-items: flex-end;
  }

  .modal-box,
  .modal-box.modal-lg,
  .modal-box.modal-xl {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 90vh !important;
    border-radius: 16px 16px 10px 10px !important;
    margin: 0 auto;
  }

  .modal-header {
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 20;
    padding: 12px 16px;
  }

  .modal-body {
    padding: 14px 14px 24px 14px;
    -webkit-overflow-scrolling: touch;
  }

  .modal-body form > div:last-child {
    display: flex !important;
    flex-direction: column-reverse !important;
    gap: 8px !important;
  }

  .modal-body form > div:last-child button {
    width: 100% !important;
    min-height: 42px !important;
  }

  .form-grid-2,
  .form-grid-3 {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .form-grid-4 {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .order-items-builder {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px;
  }

  .order-builder-table {
    min-width: 440px;
  }

  .qp-shortcuts-grid {
    grid-template-columns: 1fr 1fr;
  }

  .calc-price-number {
    font-size: 2rem;
  }

  .stock-alert-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .task-item-card {
    padding: 12px;
    gap: 10px;
  }

  .cli-notice-box {
    flex-direction: column;
    gap: 8px;
  }

  .auth-wrapper {
    padding: 16px 12px;
  }

  .auth-card {
    padding: 24px 18px;
  }

  .toast-container {
    bottom: 74px;
    left: 12px;
    right: 12px;
  }

  .toast {
    font-size: 12px;
    padding: 8px 12px;
  }
}

/* ----------------------------------------------------
   4. ULTRA-COMPACT SCREENS (max-width: 380px)
---------------------------------------------------- */
@media (max-width: 380px) {
  .kpi-grid {
    grid-template-columns: 1fr !important;
  }
  .form-grid-4 {
    grid-template-columns: 1fr;
  }
  .qp-shortcuts-grid {
    grid-template-columns: 1fr;
  }
}

/* ----------------------------------------------------
   GLOWARA MOMENTS - GYERTYAMŰHELY & RENDELÉS STÍLUSOK
---------------------------------------------------- */
.candle-hero-banner {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.12) 0%, rgba(20, 20, 23, 0.95) 60%);
  border: 1px solid rgba(217, 119, 6, 0.3);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  color: #34d399;
  font-weight: 500;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.spin-icon {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* KPI Stat Cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 14px;
  margin-bottom: 24px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s, border-color 0.15s;
}

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

.kpi-card.highlight {
  border-color: rgba(217, 119, 6, 0.4);
}

.kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.kpi-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  font-weight: 600;
}

.kpi-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--bg-body);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--accent-candle);
  border: 1px solid var(--border);
}

.kpi-val {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
  margin-bottom: 4px;
}

.kpi-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* Tab Navigation */
.candle-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  padding-bottom: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border-focus) transparent;
}

.candle-tabs::-webkit-scrollbar {
  height: 4px;
}
.candle-tabs::-webkit-scrollbar-track {
  background: transparent;
}
.candle-tabs::-webkit-scrollbar-thumb {
  background: var(--border-focus);
  border-radius: 4px;
}

.candle-tab-btn {
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

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

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

/* Filter Controls */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.filter-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  min-width: 0;
}

.filter-pill {
  padding: 5px 12px;
  background: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.filter-pill:hover {
  color: var(--text-main);
  border-color: var(--border-focus);
}

.filter-pill.active {
  background: var(--accent-candle);
  color: #fff;
  border-color: var(--accent-candle);
  font-weight: 500;
}

/* Status Badges */
.badge-status {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.status-quick-btn {
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
  font-family: inherit;
  user-select: none;
}
.status-quick-btn:hover {
  transform: scale(1.05);
  filter: brightness(1.25);
}
.status-quick-btn:active {
  transform: scale(0.96);
}

.badge-status-new {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-status-progress {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-status-ready {
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-status-done {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-status-cancel {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-pay {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.badge-pay-paid {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-pay-pending {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

/* Order Item Chips */
.order-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 280px;
}

.order-chip {
  background: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.order-chip strong {
  color: var(--text-main);
  margin-right: 2px;
}

.custom-spec-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 2px 6px;
  background: rgba(217, 119, 6, 0.1);
  color: #fbbf24;
  border-radius: 4px;
  border: 1px solid rgba(217, 119, 6, 0.25);
  margin-top: 4px;
}

.urgent-tag {
  color: #ef4444;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
}

/* Empty State Card */
.empty-state-card {
  background: var(--bg-card);
  border: 1px dashed var(--border-focus);
  border-radius: var(--radius-lg);
  padding: 40px 24px;
  text-align: center;
  max-width: 540px;
  margin: 30px auto;
}

.empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(217, 119, 6, 0.15);
  color: var(--accent-candle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 16px;
}

/* Stock Alert Box */
.stock-alert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.alert-item-card {
  background: var(--bg-card);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-left: 4px solid var(--accent-candle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.alert-item-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}

.alert-item-meta {
  font-size: 11px;
  color: var(--text-muted);
}

/* Modal Size Variants */
.modal-box.modal-lg {
  max-width: min(760px, calc(100vw - 32px));
}
.modal-box.modal-xl {
  max-width: min(960px, calc(100vw - 32px));
}

/* Multi-Column Form Grids */
.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}
.form-grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

/* Item Repeater Builder in Order Modal */
.order-items-builder {
  background: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 14px;
}
.order-builder-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 10px;
}
.order-builder-table th {
  text-align: left;
  padding: 6px 8px;
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
}
.order-builder-table td {
  padding: 6px 4px;
}

/* Quick Stock Adjustment Buttons */
.btn-stock-adj {
  width: 26px;
  height: 26px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg-body);
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-stock-adj:hover {
  background: var(--accent-candle);
  color: #fff;
  border-color: var(--accent-candle);
}
.btn-stock-adj.minus:hover {
  background: var(--danger);
  border-color: var(--danger);
}

/* CLP Hazmat Label Preview */
.clp-label-preview-box {
  background: #ffffff;
  color: #111827;
  border: 3px solid #111827;
  padding: 18px;
  border-radius: 4px;
  font-family: 'Segoe UI', Arial, sans-serif;
  max-width: 440px;
  margin: 0 auto;
  box-shadow: 0 4px 18px rgba(0,0,0,0.5);
  line-height: 1.4;
}
.clp-pictograms-container {
  display: flex;
  gap: 18px;
  justify-content: center;
  margin: 12px 0;
}
.ghs-diamond {
  width: 44px;
  height: 44px;
  border: 3px solid #ef4444;
  transform: rotate(45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  margin: 8px;
}
.ghs-diamond-content {
  transform: rotate(-45deg);
  font-size: 18px;
  color: #111827;
}

/* Production Batch Preview */
.production-preview-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

@media print {
  body * {
    visibility: hidden;
  }
  .clp-printable, .clp-printable * {
    visibility: visible;
  }
  .clp-printable {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 20px;
  }
}

/* Tasks & To-Do Styling */
.task-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: all 0.15s ease;
  margin-bottom: 10px;
}
.task-item-card:hover {
  border-color: var(--border-focus);
}
.task-item-card.priority-urg {
  border-left: 4px solid var(--danger);
}
.task-item-card.priority-high {
  border-left: 4px solid #f59e0b;
}
.task-item-card.priority-norm {
  border-left: 4px solid #3b82f6;
}
.task-item-card.priority-low {
  border-left: 4px solid var(--text-dim);
}
.task-item-card.completed {
  opacity: 0.6;
  background: rgba(20, 20, 23, 0.4);
}
.task-title.completed {
  text-decoration: line-through;
  color: var(--text-muted);
}
.task-checkbox-custom {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  cursor: pointer;
  accent-color: var(--accent-candle);
  margin-top: 2px;
}
.preset-pills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.preset-pill {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}
.preset-pill:hover {
  border-color: var(--accent-candle);
  color: var(--text-main);
  background: rgba(217, 119, 6, 0.1);
}

/* ==========================================
   PRICING CALCULATOR STYLES (APP PARITY)
   ========================================== */
.pricing-calculator-layout {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 1.5rem;
  margin-bottom: 24px;
}

@media (max-width: 1024px) {
  .pricing-calculator-layout {
    grid-template-columns: 1fr;
  }
}

.calculator-card-result {
  background: linear-gradient(145deg, #18202d, #121620);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 1.5rem;
}

.calc-price-hero {
  text-align: center;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
}

.calc-price-label {
  font-size: 0.82rem;
  color: var(--accent-candle);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
}

.calc-price-number {
  font-size: 2.75rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -1px;
  margin-top: 0.35rem;
}

.calc-breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.calc-breakdown-row:last-child {
  border-bottom: none;
}

.calc-breakdown-row.highlight {
  font-weight: 700;
  color: #10b981;
  font-size: 1.05rem;
}

/* ----------------------------------------------------
   MŰHELY GYORSPANEL & WORKSPACE GRID (Desktop & Responsive)
---------------------------------------------------- */
.candle-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 22px;
  align-items: start;
  width: 100%;
  min-width: 0;
}

.candle-workspace-main {
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
}

#candleTabContent,
.candle-tab-pane {
  width: 100%;
  min-width: 0;
}

.candle-quick-panel {
  position: sticky;
  top: 76px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  width: 100%;
}

.quick-panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transition: border-color 0.2s ease;
}

.quick-panel-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.qp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.qp-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}

.status-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: qpPulseDot 2s infinite;
  flex-shrink: 0;
}

@keyframes qpPulseDot {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.qp-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.25);
  padding: 2px 7px;
  border-radius: 999px;
}

.qp-count-pill {
  font-size: 11px;
  font-weight: 700;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: #38bdf8;
  padding: 2px 8px;
  border-radius: 999px;
}

.qp-alerts-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.qp-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  transition: transform 0.15s ease;
}

.qp-alert:hover {
  transform: translateX(2px);
}

.qp-alert-danger {
  background: rgba(225, 29, 72, 0.09);
  border: 1px solid rgba(225, 29, 72, 0.25);
  color: #fca5a5;
}

.qp-alert-danger .qp-alert-icon {
  color: #f43f5e;
  font-size: 13px;
}

.qp-alert-warning {
  background: rgba(245, 158, 11, 0.09);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #fcd34d;
}

.qp-alert-warning .qp-alert-icon {
  color: #f59e0b;
  font-size: 13px;
}

.qp-alert-ok {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-sm);
  color: #6ee7b7;
  font-size: 12px;
  line-height: 1.4;
}

.qp-alert-text {
  flex: 1;
  min-width: 0;
}

.qp-alert-title {
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qp-alert-sub {
  font-size: 11px;
  opacity: 0.85;
}

.qp-alert-action {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 6px;
  font-size: 12px;
  border-radius: 4px;
  transition: color 0.15s;
}

.qp-alert-action:hover {
  color: var(--text-main);
}

/* Quick Task Form & List */
.qp-task-input-wrap {
  display: flex;
  gap: 6px;
}

.qp-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 7px 10px;
  font-size: 12px;
  outline: none;
}

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

.qp-btn-add {
  background: var(--text-main);
  color: #000;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0 12px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.qp-btn-add:hover {
  background: #e4e4e7;
}

.qp-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.qp-task-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border);
  font-size: 12px;
  transition: background 0.15s, border-color 0.15s;
}

.qp-task-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
}

.qp-task-check {
  position: relative;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  margin-bottom: 0;
  flex-shrink: 0;
}

.qp-task-check input {
  opacity: 0;
  position: absolute;
  cursor: pointer;
}

.qp-box {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--border-focus);
  border-radius: 4px;
  display: inline-block;
  position: relative;
  transition: all 0.15s;
}

.qp-task-check input:checked ~ .qp-box {
  background: var(--success);
  border-color: var(--success);
}

.qp-task-check input:checked ~ .qp-box::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid #000;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.qp-task-label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-main);
  font-size: 12px;
}

.qp-prio-tag {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 4px;
  flex-shrink: 0;
}

.qp-prio-tag.prio-urg {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(225, 29, 72, 0.3);
}

.qp-prio-tag.prio-high {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.qp-tasks-empty {
  padding: 14px 10px;
  text-align: center;
  color: #6ee7b7;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.qp-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 8px;
  text-align: right;
}

.qp-link-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s;
}

.qp-link-btn:hover {
  color: #38bdf8;
}

/* Workshop Sticky Notepad */
.qp-saved-tag {
  font-size: 10px;
  color: #10b981;
  opacity: 0;
  transition: opacity 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.qp-saved-tag.visible {
  opacity: 1;
}

.qp-textarea {
  width: 100%;
  height: 95px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: inherit;
  font-size: 12px;
  padding: 8px 10px;
  resize: vertical;
  line-height: 1.45;
  outline: none;
}

.qp-textarea:focus {
  border-color: var(--border-focus);
}

.qp-note-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.qp-note-btn {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 10px;
  padding: 4px 7px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.qp-note-btn:hover {
  color: var(--text-main);
  border-color: var(--border-focus);
}

.qp-note-clear {
  margin-left: auto;
  color: var(--danger);
}

.qp-note-clear:hover {
  background: var(--danger-bg);
  border-color: rgba(225, 29, 72, 0.4);
}

/* Shortcuts Card */
.qp-shortcuts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.qp-shortcut-btn {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 9px 8px;
  font-size: 11px;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.qp-shortcut-btn i {
  font-size: 15px;
}

.qp-shortcut-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
  transform: translateY(-1px);
}

/* Responsive layout handled in master responsive system above */

/* ----------------------------------------------------
   SIDEBAR BOTTOM WIDGETS & COMPANY DATA
---------------------------------------------------- */
.app-sidebar {
  display: flex;
  flex-direction: column;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
}

.sidebar-bottom-widgets {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
  background: rgba(0, 0, 0, 0.15);
}

.sidebar-status-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-status-tag {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: #4ade80;
  background: rgba(34, 197, 94, 0.12);
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.sidebar-status-meta {
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 16px;
}

.sidebar-company-btn {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.15s ease;
}

.sidebar-company-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
  color: #fff;
}

/* ----------------------------------------------------
   TUDÁSTÁR & KISOKOS STYLES
---------------------------------------------------- */
.knowledge-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 16px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.knowledge-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.knowledge-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.knowledge-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.knowledge-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-body);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.knowledge-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.knowledge-body {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
}

.knowledge-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-dim);
}



