/* ============================================================================
   KFC COS Management System - Main CSS
   RTL Responsive SPA with Sidebar & Modern Card-based UI
   ============================================================================ */

/* ============================================================================
   1. CSS VARIABLES & THEME CONFIGURATION
   ============================================================================ */

:root {
  /* KFC Primary Colors */
  --kfc-red: #E4002B;
  --kfc-red-hover: #C50025;
  --kfc-dark: #1B1B1B;
  --cream: #FFFFFF;
  --charcoal: #1B1B1B;

  /* Semantic Colors */
  --success: #4CAF50;
  --warning: #FF9800;
  --info: #2196F3;
  --danger: #E4002B;

  /* Light Mode (Default) */
  --bg: #FFFFFF;
  --bg2: #FFFFFF;
  --bg3: #F5F5F5;
  --text: #212121;
  --text2: #757575;
  --border: #E0E0E0;

  /* Sidebar */
  --sidebar-bg: #1B1B1B;
  --sidebar-text: #FFFFFF;
  --sidebar-hover: rgba(255, 255, 255, 0.08);
  --sidebar-border: rgba(255, 255, 255, 0.08);
  --sidebar-muted: rgba(255, 255, 255, 0.55);

  /* Shadows & Effects */
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  --radius: 6px;
  --transition: 0.2s ease;

  /* Compatibility aliases (used by mobile.css and some modules) */
  --bg-secondary: var(--bg3);
  --bg-primary: var(--bg);
  --text-primary: var(--text);
  --text-secondary: var(--text2);
  --border-color: var(--border);
  --card-bg: var(--bg2);
  --font-family: 'Rubik', 'Segoe UI', Tahoma, sans-serif;
  --z-fixed: 1000;
  --z-modal: 1050;
  --transition-base: 0.2s ease;
  --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 2px 10px rgba(0, 0, 0, 0.1);
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 12px;
  --spacing-lg: 16px;
  --spacing-xl: 24px;
  --font-size-xs: 11px;
  --font-size-sm: 12px;
  --font-size-base: 14px;
  --font-size-md: 15px;
  --font-size-lg: 16px;
  --font-size-xl: 18px;
  --font-size-2xl: 22px;
  --topbar-height: 48px;
  --bottom-nav-height: 64px;
  --sidebar-width: 260px;

  /* Additional aliases for mobile.css compatibility */
  --primary: var(--kfc-red);
  --bottom-nav-bg: var(--bg2);
  --z-sticky: 100;
  --z-dropdown: 200;
  --transition-fast: 0.15s ease;
  --radius-full: 50%;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --fw-semibold: 600;
  --card-border: var(--border);
  --divider: var(--border);
  --shadow-xl: 0 8px 30px rgba(0, 0, 0, 0.2);
}

/* Dark Mode via [data-theme="dark"] */
[data-theme="dark"] {
  --bg: #121212;
  --bg2: #1E1E1E;
  --bg3: #252525;
  --text: #E0E0E0;
  --text2: #9E9E9E;
  --border: #333333;
  --sidebar-bg: #0D0D0D;
  --sidebar-text: #FFFFFF;
  --sidebar-hover: rgba(255, 255, 255, 0.1);
  --sidebar-border: rgba(255, 255, 255, 0.06);
  --sidebar-muted: rgba(255, 255, 255, 0.5);
  --card-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* ============================================================================
   2. GLOBAL STYLES & RESET
   ============================================================================ */

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

html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: 'Rubik', 'Segoe UI', Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
  -webkit-text-size-adjust: 100%;
}

/* ============================================================================
   3. TYPOGRAPHY
   ============================================================================ */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 8px;
}

h1 { font-size: 32px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }
h4 { font-size: 18px; }
h5 { font-size: 16px; }
h6 { font-size: 14px; }

p {
  margin-bottom: 16px;
  color: var(--text2);
}

a {
  color: var(--kfc-red);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--kfc-red-hover);
}

strong {
  font-weight: 700;
  color: var(--text);
}

small {
  font-size: 12px;
  color: var(--text2);
}

/* ============================================================================
   4. LAYOUT STRUCTURE
   ============================================================================ */

/* App Shell */
.app-shell,
.app-container {
  display: flex;
  min-height: 100vh;
  flex-direction: row;
}

.app-shell.active,
.app-container.active {
  display: flex;
}

/* Login Screen */
.login-screen,
#loginScreen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #1B1B1B;
  padding: 16px;
}

.login-box {
  background: #FFFFFF;
  border-radius: 8px;
  padding: 20px 16px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.login-box .logo-img {
  width: 70px;
  height: 70px;
  margin-bottom: 10px;
}

.login-box h1 {
  font-size: 18px;
  color: var(--kfc-red);
  margin-bottom: 4px;
}

.login-box .subtitle {
  color: var(--text2);
  font-size: 13px;
  margin-bottom: 24px;
}

.login-box input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #D9D9D9;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: #212121;
  margin-bottom: 12px;
  direction: rtl;
  transition: border var(--transition);
}

.login-box input:focus {
  outline: none;
  border-color: var(--kfc-red);
}

.btn-login {
  width: 100%;
  padding: 12px;
  background: var(--kfc-red);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  margin-top: 8px;
  transition: all var(--transition);
}

.btn-login:hover {
  background: #c70024;
}

.login-error {
  color: var(--danger);
  font-size: 13px;
  margin-top: 8px;
  display: none;
}

.demo-users {
  margin-top: 20px;
  text-align: right;
}

.demo-users h3 {
  font-size: 12px;
  color: var(--text2);
  margin-bottom: 8px;
}

.demo-user-btn {
  display: block;
  width: 100%;
  padding: 8px 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 11px;
  color: var(--text);
  cursor: pointer;
  margin-bottom: 6px;
  text-align: right;
  transition: all var(--transition);
}

.demo-user-btn:hover {
  border-color: var(--kfc-red);
  background: var(--bg);
}

.demo-user-btn span {
  color: var(--text2);
  font-size: 10px;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  height: 100vh;
  height: 100dvh;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 150;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  overflow-y: auto;
  overflow-x: hidden;
  border-left: none;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.35);
  transform: translateX(100%);
}

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

.sidebar-header {
  padding: 20px;
  text-align: center;
  border-bottom: 1px solid var(--sidebar-border);
}

.sidebar-header .logo-img {
  width: 70px;
  height: auto;
  border-radius: 8px;
  background: none;
  padding: 0;
  box-shadow: none;
}

.sidebar-header h2 {
  font-size: 15px;
  font-weight: 600;
  margin-top: 8px;
  color: var(--sidebar-text);
}

.sidebar-header .branch {
  font-size: 11px;
  color: var(--sidebar-muted);
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  color: var(--sidebar-muted);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 13px;
  border-right: 3px solid transparent;
  -webkit-tap-highlight-color: transparent;
}

.nav-item:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-text);
}

.nav-item.active {
  background: rgba(228, 0, 43, 0.25);
  color: #fff;
  border-right-color: var(--kfc-red);
  font-weight: 600;
}

.nav-item .icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.nav-item .badge {
  margin-right: auto;
  background: var(--kfc-red);
  color: #fff;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 600;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--sidebar-border);
  font-size: 12px;
}

.sidebar-footer .user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.sidebar-footer .avatar {
  width: 34px;
  height: 34px;
  background: var(--kfc-red);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  color: #fff;
}

.sidebar-footer .user-name {
  font-weight: 500;
  font-size: 13px;
  color: var(--sidebar-text);
}

.sidebar-footer .user-role {
  font-size: 11px;
  color: var(--sidebar-muted);
}

.btn-logout {
  width: 100%;
  padding: 7px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.6);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-logout:hover {
  background: rgba(228, 0, 43, 0.2);
  color: var(--kfc-red);
  border-color: rgba(228, 0, 43, 0.3);
}

/* Hamburger & Overlay */
.hamburger-btn {
  display: none;
  position: fixed;
  top: 8px;
  right: 8px;
  z-index: 250;
  background: var(--kfc-red);
  color: #fff;
  border: none;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  font-size: 20px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(228, 0, 43, 0.4);
  -webkit-tap-highlight-color: transparent;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 149;
  -webkit-tap-highlight-color: transparent;
}

.sidebar-overlay.active {
  display: block;
}

/* Main Content Area */
.main-content,
.pages-container,
#pagesContainer {
  flex: 1;
  margin-right: 0;
  padding: 10px;
  min-height: 100vh;
  padding-top: 46px;
  overflow-x: hidden;
  max-width: 100vw;
  background-color: var(--bg);
  color: var(--text);
}

.page {
  display: none;
  overflow-x: hidden;
  max-width: 100%;
}

.page.active {
  display: block;
}

.page-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 16px;
  gap: 8px;
}

.page-header h1 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.page-header .btn-group {
  width: 100%;
  flex-wrap: wrap;
  gap: 4px;
}

.page-header .btn-group .btn {
  flex: 1;
  min-width: 0;
  justify-content: center;
  font-size: 11px;
  padding: 6px 8px;
}

/* Top Bar */
.top-bar,
.alerts-bar,
#topBar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 6px 10px 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 90;
  font-size: 12px;
}

.alerts-bar .greeting {
  font-weight: 500;
  font-size: 11px;
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alerts-bar .actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle,
.notif-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  -webkit-tap-highlight-color: transparent;
}

.notif-btn {
  position: relative;
}

.notif-btn .dot {
  position: absolute;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background: var(--kfc-red);
  border-radius: 50%;
}

/* ============================================================================
   5. BUTTONS
   ============================================================================ */

.btn {
  padding: 7px 12px;
  border: none;
  border-radius: 4px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  -webkit-tap-highlight-color: transparent;
}

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

.btn-primary:hover {
  background: #c70024;
}

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

.btn-secondary:hover {
  border-color: #999;
}

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

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

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

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

.btn-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ============================================================================
   6. CARDS
   ============================================================================ */

.card {
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: none;
  border: 1px solid var(--border);
  margin-bottom: 10px;
  transition: all var(--transition);
  overflow: hidden;
  max-width: 100%;
}

.card:hover {
  border-color: #bbb;
}

.card-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.card-header h3 {
  font-size: 14px;
  font-weight: 600;
}

.card-header .btn-group {
  width: 100%;
  flex-wrap: wrap;
}

/* Stat Cards */
.stat-card {
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 10px;
  box-shadow: none;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  word-break: break-word;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 3px;
  height: 100%;
  background: var(--kfc-red);
}

.stat-card.green::before {
  background: var(--success);
}

.stat-card.yellow::before {
  background: var(--warning);
}

.stat-card.blue::before {
  background: var(--info);
}

.stat-label {
  font-size: 11px;
  color: var(--text2);
  margin-bottom: 4px;
}

.stat-value {
  font-size: 17px;
  font-weight: 700;
}

.stat-change {
  font-size: 11px;
  margin-top: 4px;
}

.stat-change.up {
  color: var(--danger);
}

.stat-change.down {
  color: var(--success);
}

/* ============================================================================
   7. FORMS
   ============================================================================ */

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

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 5px;
  color: var(--text2);
}

.form-control {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 12px;
  background: var(--bg2);
  color: var(--text);
  direction: rtl;
  transition: border var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--kfc-red);
}

select.form-control {
  cursor: pointer;
}

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

/* ============================================================================
   8. TABLES
   ============================================================================ */

.table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -12px;
  padding: 0 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  min-width: 500px;
}

th {
  background: var(--bg3);
  padding: 6px 8px;
  text-align: right;
  font-weight: 600;
  font-size: 10px;
  color: var(--text2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  font-size: 11px;
}

tr:hover td {
  background: var(--bg3);
}

/* ============================================================================
   9. BADGES
   ============================================================================ */

.badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
}

.badge-success {
  background: #4CAF50;
  color: #fff;
}

.badge-warning {
  background: #FF9800;
  color: #fff;
}

.badge-danger {
  background: #E4002B;
  color: #fff;
}

.badge-info {
  background: #2196F3;
  color: #fff;
}

/* ============================================================================
   10. MODALS & POPUPS
   ============================================================================ */

.modal-overlay,
.popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active,
.popup-overlay.active {
  display: flex;
}

.modal,
.popup-content {
  background: var(--bg2);
  border-radius: 6px;
  padding: 16px;
  width: 98vw;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.modal h2 {
  font-size: 16px;
  margin-bottom: 14px;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 16px;
}

.modal-actions .btn {
  width: 100%;
  justify-content: center;
}

/* ============================================================================
   11. TOAST NOTIFICATIONS
   ============================================================================ */

.toast-container {
  position: fixed;
  top: 56px;
  left: 10px;
  right: 10px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.toast.success {
  background: var(--success);
}

.toast.error {
  background: var(--danger);
}

.toast.warning {
  background: var(--warning);
}

.toast.info {
  background: var(--success);
}

@keyframes slideIn {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* ============================================================================
   12. TABS
   ============================================================================ */

.tabs {
  display: flex;
  gap: 0;
  border-bottom: none;
  margin-bottom: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex-wrap: nowrap;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text2);
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  background: var(--bg3);
  font-family: inherit;
  border-radius: 0;
  white-space: nowrap;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.tab:first-child {
  border-radius: 0 6px 6px 0;
}

.tab:last-child {
  border-radius: 6px 0 0 6px;
}

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

.tab.active {
  color: #fff;
  background: var(--kfc-red);
}

.tab-content {
  display: none;
}

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

/* ============================================================================
   13. FILTERS & SEARCH
   ============================================================================ */

.filters {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  margin-bottom: 16px;
}

.filters select,
.filters input {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
  background: var(--bg);
  color: var(--text);
  width: 100%;
}

.progress-bar {
  height: 6px;
  background: var(--bg3);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* ============================================================================
   14. APPROVAL ITEMS
   ============================================================================ */

.approval-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  transition: all var(--transition);
  gap: 8px;
}

.approval-item:hover {
  border-color: var(--kfc-red);
}

.approval-info {
  flex: 1;
  min-width: 0;
  width: 100%;
}

.approval-type {
  font-size: 11px;
  color: var(--text2);
}

.approval-desc {
  font-size: 13px;
  font-weight: 500;
  margin-top: 2px;
}

.approval-meta {
  font-size: 11px;
  color: var(--text2);
  margin-top: 2px;
}

.approval-item .btn-group {
  width: 100%;
}

.approval-item .btn-group .btn {
  flex: 1;
}

/* ============================================================================
   15. DROPDOWN & NOTIFICATIONS
   ============================================================================ */

.notif-dropdown {
  display: none;
  position: fixed;
  top: 38px;
  left: 10px;
  right: 10px;
  width: auto;
  max-width: 360px;
  background: var(--bg2);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  z-index: 250;
  max-height: 60vh;
  overflow-y: auto;
}

.notif-dropdown.show {
  display: block;
}

.notif-item {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  cursor: pointer;
  transition: background var(--transition);
}

.notif-item:hover {
  background: var(--bg3);
}

.notif-item.unread {
  border-right: 3px solid var(--kfc-red);
}

.notif-time {
  font-size: 10px;
  color: var(--text2);
  margin-top: 4px;
}

/* ============================================================================
   16. SETTINGS
   ============================================================================ */

.settings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.settings-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-left: none;
  border-bottom: 1px solid var(--border);
  padding: 8px;
}

.settings-menu-item {
  padding: 8px 12px;
  font-size: 12px;
  cursor: pointer;
  color: var(--text2);
  transition: all var(--transition);
  border-radius: 6px;
  -webkit-tap-highlight-color: transparent;
}

.settings-menu-item:hover {
  color: var(--text);
  background: var(--bg3);
}

.settings-menu-item.active {
  color: var(--kfc-red);
  background: rgba(228, 0, 43, 0.1);
}

.settings-content {
  padding: 12px 0;
}

/* ============================================================================
   17. GRIDS & LAYOUT
   ============================================================================ */

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.stats-grid-4 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.mod-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.mod-card-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  font-size: 12px;
}

.mod-card-inner {
  padding: 12px;
}

.mod-card-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}

.mod-card-sub {
  font-size: 11px;
  color: var(--text2);
  margin-bottom: 8px;
}

.mod-metric-label {
  font-size: 9px;
  color: var(--text2);
}

.mod-metric-val {
  font-size: 13px;
  font-weight: 700;
}

/* Welcome Grid */
.welcome-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.welcome-card {
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--card-shadow);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}

.welcome-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(26, 10, 0, 0.15);
}

.welcome-card .wc-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.welcome-card h3 {
  font-size: 14px;
  margin-bottom: 4px;
}

.welcome-card p {
  font-size: 12px;
  color: var(--text2);
}

/* Info & Tooltips */
.info-exp {
  position: relative;
  display: inline-block;
  cursor: help;
  margin-right: 4px;
  vertical-align: middle;
  -webkit-tap-highlight-color: transparent;
}

.info-exp .info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--info);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  font-style: normal;
}

.info-exp .info-bubble {
  display: none;
  position: fixed;
  background: var(--charcoal);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 11px;
  line-height: 1.7;
  min-width: 200px;
  max-width: calc(100vw - 40px);
  z-index: 9999;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  direction: rtl;
  font-weight: 400;
  text-align: right;
  white-space: normal;
  pointer-events: none;
}

.info-exp:hover .info-bubble {
  display: block;
}

.info-exp .info-formula {
  display: block;
  direction: ltr;
  text-align: left;
  font-family: monospace;
  background: rgba(255, 255, 255, 0.1);
  padding: 6px 8px;
  border-radius: 4px;
  margin: 6px 0 2px;
  font-size: 10px;
}

/* ============================================================================
   18. ADVANCED FILTERS
   ============================================================================ */

.adv-filters {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 16px;
}

.adv-filters .filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.adv-filters .filter-group label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text2);
  text-transform: uppercase;
}

.adv-filters .filter-group select {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
  background: var(--bg);
  color: var(--text);
  width: 100%;
}

/* Multi-select */
.multi-select-wrap {
  position: relative;
  width: 100%;
}

.multi-select-btn {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  text-align: right;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.multi-select-btn:hover {
  border-color: var(--kfc-red);
}

.multi-select-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  z-index: 50;
  max-height: 220px;
  overflow-y: auto;
  margin-top: 4px;
}

.multi-select-dropdown.open {
  display: block;
}

.multi-select-dropdown label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s;
}

.multi-select-dropdown label:hover {
  background: var(--bg3);
}

.multi-select-dropdown input[type="checkbox"] {
  accent-color: var(--kfc-red);
}

.selected-tags {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.selected-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  background: rgba(228, 0, 43, 0.1);
  color: var(--kfc-red);
  border-radius: 12px;
  font-size: 10px;
  font-weight: 500;
}

.selected-tag .remove-tag {
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}

.filter-summary {
  font-size: 11px;
  color: var(--text2);
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-summary .clear-filters {
  color: var(--kfc-red);
  cursor: pointer;
  font-size: 11px;
  text-decoration: underline;
}

/* ============================================================================
   19. DATE FILTERS
   ============================================================================ */

.date-filters {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: var(--bg3);
  border-radius: 12px;
  margin-bottom: 16px;
}

.date-filters .df-dates {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
}

.date-filters .df-dates label {
  font-size: 11px;
  color: var(--text2);
  font-weight: 600;
  white-space: nowrap;
  min-width: 20px;
}

.date-filters .df-dates input[type="date"] {
  flex: 1;
  padding: 10px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  min-height: 44px;
  -webkit-appearance: none;
}

.date-filters .df-quick {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  width: 100%;
}

.date-filters .quick-btn {
  padding: 10px 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
  text-align: center;
  min-height: 40px;
}

.date-filters .quick-btn:hover,
.date-filters .quick-btn.active {
  background: var(--kfc-red);
  color: #fff;
  border-color: var(--kfc-red);
}

/* ============================================================================
   20. MULTI-ITEM ROWS
   ============================================================================ */

.multi-item-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  align-items: end;
  margin-bottom: 8px;
  padding: 10px;
  background: var(--bg3);
  border-radius: 8px;
}

.multi-item-row .form-group {
  margin-bottom: 0;
}

.multi-item-row .form-group label {
  font-size: 11px;
}

.multi-item-row input,
.multi-item-row select {
  padding: 8px 10px;
  font-size: 12px;
}

.remove-row {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
}

.add-row-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg3);
  border: 1px dashed var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
  color: var(--text2);
  cursor: pointer;
  transition: all var(--transition);
  margin-top: 4px;
}

.add-row-btn:hover {
  border-color: var(--kfc-red);
  color: var(--kfc-red);
}

/* ============================================================================
   21. CHARTS & CONTAINERS
   ============================================================================ */

.chart-container {
  position: relative;
  height: 200px;
  margin: 12px 0;
}

.charts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

/* ============================================================================
   22. EMPTY STATE & LOADING
   ============================================================================ */

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text2);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 16px;
  margin-bottom: 8px;
  color: var(--text);
}

.empty-state p {
  font-size: 13px;
  margin-bottom: 16px;
}

/* Loading State */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Error State */
.error {
  border-color: var(--danger) !important;
  background-color: rgba(244, 67, 54, 0.05) !important;
}

/* ============================================================================
   23. MOBILE-FIRST RESPONSIVE STYLES
   ============================================================================ */

/* Touch targets 44px minimum */
.btn {
  min-height: 44px;
}

.btn-sm {
  min-height: 36px;
}

.nav-item {
  min-height: 44px;
}

.tab {
  min-height: 44px;
}

.form-control {
  min-height: 44px;
}

select.form-control {
  min-height: 44px;
}

.demo-user-btn {
  min-height: 44px;
}

/* Pad content for bottom nav */
.main-content {
  padding-bottom: 72px;
}

/* Mobile visibility */
.desktop-only {
  display: none !important;
}

.mobile-only {
  display: block !important;
}

.mobile-only-flex {
  display: flex !important;
}

/* Bottom Navigation (mobile) */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  z-index: 140;
  padding: 0;
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.bottom-nav::-webkit-scrollbar {
  display: none;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 6px 2px 4px;
  cursor: pointer;
  color: var(--text2);
  font-size: 9px;
  font-weight: 500;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
  min-height: 50px;
  min-width: 52px;
  position: relative;
  border: none;
  background: none;
  font-family: inherit;
}

.bottom-nav-item .bnav-icon {
  font-size: 18px;
  margin-bottom: 2px;
  line-height: 1;
}

.bottom-nav-item.active {
  color: var(--kfc-red);
}

.bottom-nav-item.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--kfc-red);
  border-radius: 0 0 2px 2px;
}

.bottom-nav-item .bnav-badge {
  position: absolute;
  top: 4px;
  right: 50%;
  transform: translateX(14px);
  background: var(--kfc-red);
  color: #fff;
  font-size: 9px;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  padding: 0 4px;
}

/* Mobile action cards */
.mobile-action-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 8px;
  transition: border-color 0.2s;
}

.mobile-action-card:active {
  border-color: var(--kfc-red);
}

.mobile-action-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.mobile-action-card-title {
  font-size: 14px;
  font-weight: 600;
}

.mobile-action-card-badge {
  font-size: 11px;
}

.mobile-action-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text2);
  margin-bottom: 4px;
}

.mobile-action-card-row:last-child {
  margin-bottom: 0;
}

.mobile-action-card-value {
  font-weight: 500;
  color: var(--text);
}

.mobile-action-card-input {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.mobile-action-card-input input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  text-align: center;
  min-height: 44px;
}

.mobile-action-card-input label {
  font-size: 12px;
  color: var(--text2);
  white-space: nowrap;
}

/* Sticky bottom actions */
.sticky-bottom-actions {
  position: sticky;
  bottom: 0;
  background: var(--bg2);
  padding: 12px 0 4px;
  border-top: 1px solid var(--border);
  margin-top: 16px;
  display: flex;
  gap: 8px;
}

.sticky-bottom-actions .btn {
  flex: 1;
  min-height: 44px;
  font-size: 14px;
  justify-content: center;
}

/* ============================================================================
   24. TABLET (min-width: 600px)
   ============================================================================ */

@media (min-width: 600px) {
  .login-box {
    padding: 32px 28px;
  }

  .login-box .logo-img {
    width: 90px;
    height: 90px;
  }

  .login-box h1 {
    font-size: 20px;
  }

  .demo-user-btn {
    font-size: 12px;
    padding: 9px 12px;
  }

  .main-content {
    padding: 16px;
    padding-top: 16px;
    padding-bottom: 72px;
  }

  .alerts-bar {
    padding: 10px 60px 10px 16px;
    font-size: 13px;
  }

  .alerts-bar .greeting {
    font-size: 12px;
    max-width: 65%;
  }

  .stats-grid,
  .stats-grid-4,
  .mod-cards-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .mod-card-inner {
    padding: 14px;
  }

  .mod-card-title {
    font-size: 15px;
  }

  .stat-card {
    padding: 14px;
  }

  .stat-value {
    font-size: 22px;
  }

  .stat-label {
    font-size: 12px;
  }

  .card {
    padding: 16px;
    margin-bottom: 12px;
  }

  .card-header h3 {
    font-size: 15px;
  }

  .chart-container {
    height: 240px;
  }

  .table-container {
    margin: 0 -16px;
    padding: 0 16px;
  }

  table {
    font-size: 12px;
    min-width: 580px;
  }

  th {
    padding: 8px 10px;
    font-size: 11px;
  }

  td {
    padding: 8px 10px;
    font-size: 12px;
  }

  .form-row {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .form-control {
    font-size: 13px;
    padding: 8px 12px;
  }

  .form-group label {
    font-size: 13px;
  }

  .btn {
    font-size: 13px;
    padding: 8px 14px;
  }

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

  .badge {
    font-size: 11px;
    padding: 3px 9px;
  }

  .page-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .page-header h1 {
    font-size: 18px;
  }

  .page-header .btn-group {
    width: auto;
    flex-wrap: nowrap;
    gap: 6px;
  }

  .page-header .btn-group .btn {
    flex: 0;
    font-size: 12px;
    padding: 7px 12px;
  }

  .multi-item-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .welcome-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .welcome-card {
    padding: 18px;
  }

  .welcome-card .wc-icon {
    font-size: 32px;
  }

  .welcome-card h3 {
    font-size: 15px;
  }

  .modal {
    width: 95vw;
    max-width: 600px;
    padding: 22px;
    max-height: 90vh;
  }

  .modal h2 {
    font-size: 18px;
  }

  .modal-actions {
    flex-direction: row;
    gap: 8px;
  }

  .modal-actions .btn {
    width: auto;
  }

  .approval-item {
    flex-direction: row;
    align-items: center;
    padding: 14px;
    gap: 12px;
  }

  .approval-info {
    min-width: 200px;
  }

  .approval-desc {
    font-size: 14px;
  }

  .notif-dropdown {
    position: absolute;
    width: 320px;
    right: -60px;
    max-height: 380px;
    top: 48px;
    left: auto;
  }

  .notif-item {
    padding: 12px 14px;
    font-size: 13px;
  }

  .filters {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
  }

  .filters select,
  .filters input {
    width: auto;
    font-size: 13px;
    flex: 0 1 auto;
  }

  .date-filters {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 14px;
    align-items: center;
  }

  .date-filters .df-dates {
    width: auto;
    flex: 0 1 auto;
    gap: 8px;
  }

  .date-filters .df-dates input[type="date"] {
    width: auto;
    flex: 0 1 auto;
    font-size: 13px;
    min-height: 36px;
    padding: 6px 10px;
  }

  .date-filters .df-dates label {
    font-size: 12px;
  }

  .date-filters .df-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: auto;
  }

  .date-filters .quick-btn {
    flex: 0;
    font-size: 12px;
    padding: 6px 14px;
    min-height: 36px;
  }

  .adv-filters {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px;
  }

  .adv-filters .filter-group {
    width: auto;
    flex: 1;
    min-width: 150px;
  }

  .adv-filters .filter-group select {
    min-width: 150px;
  }

  .multi-select-wrap {
    width: auto;
    min-width: 200px;
  }

  .tabs {
    margin-bottom: 20px;
  }

  .tab {
    padding: 9px 18px;
    font-size: 12px;
  }

  .toast-container {
    left: 20px;
    right: auto;
    top: 64px;
    width: auto;
  }

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

  .progress-bar {
    height: 8px;
  }

  .selected-tags {
    gap: 4px;
  }

  .selected-tag {
    font-size: 11px;
    padding: 2px 8px;
  }
}

/* ============================================================================
   25. DESKTOP (min-width: 769px)
   ============================================================================ */

@media (min-width: 769px) {
  .desktop-only {
    display: block !important;
  }

  .mobile-only {
    display: none !important;
  }

  .mobile-only-flex {
    display: none !important;
  }

  .hamburger-btn {
    display: none;
  }

  .sidebar-overlay {
    display: none !important;
  }

  .sidebar {
    transform: translateX(0);
    box-shadow: none;
    transition: width var(--transition);
    position: relative;
  }

  .main-content {
    margin-right: 260px;
    padding: 24px;
    padding-top: 56px;
    padding-bottom: 24px;
  }

  .bottom-nav {
    display: none !important;
  }

  .mobile-action-card {
    display: none !important;
  }

  .sticky-bottom-actions {
    position: static;
    border-top: none;
    margin-top: 16px;
  }

  .btn {
    min-height: auto;
  }

  .btn-sm {
    min-height: auto;
  }

  .nav-item {
    min-height: auto;
  }

  .tab {
    min-height: auto;
  }

  .form-control {
    min-height: auto;
  }

  select.form-control {
    min-height: auto;
  }

  .demo-user-btn {
    min-height: auto;
  }

  .alerts-bar {
    right: 260px;
    padding: 8px 24px;
    font-size: 13px;
  }

  .alerts-bar .greeting {
    font-size: 13px;
    max-width: none;
    overflow: visible;
    white-space: normal;
  }

  .alerts-bar .actions {
    gap: 16px;
  }

  .theme-toggle,
  .notif-btn {
    font-size: 20px;
  }

  .login-box {
    padding: 40px 36px;
  }

  .login-box .logo-img {
    width: 100px;
    height: 100px;
  }

  .login-box h1 {
    font-size: 22px;
  }

  .login-box .subtitle {
    font-size: 14px;
    margin-bottom: 32px;
  }

  .demo-user-btn {
    font-size: 13px;
    padding: 10px 14px;
  }

  .demo-user-btn span {
    font-size: 11px;
  }

  .page-header h1 {
    font-size: 20px;
  }

  .page-header .btn-group {
    gap: 10px;
  }

  .page-header .btn-group .btn {
    padding: 8px 18px;
    font-size: 13px;
    min-width: 100px;
  }

  .card {
    padding: 20px;
    margin-bottom: 16px;
  }

  .card-header {
    flex-direction: row;
    align-items: center;
  }

  .card-header h3 {
    font-size: 16px;
  }

  .card-header .btn-group {
    width: auto;
  }

  .stat-card {
    padding: 18px;
  }

  .stat-label {
    font-size: 13px;
  }

  .stat-value {
    font-size: 28px;
  }

  .chart-container {
    height: 300px;
  }

  .table-container {
    margin: 0;
  }

  table {
    font-size: 14px;
    min-width: auto;
  }

  th {
    padding: 10px 14px;
    font-size: 12px;
  }

  td {
    padding: 10px 14px;
    font-size: 13px;
  }

  .form-row {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
  }

  .multi-item-row {
    grid-template-columns: 2fr 1fr 1fr 2fr 40px;
    gap: 8px;
  }

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

  .welcome-card {
    padding: 24px;
  }

  .welcome-card .wc-icon {
    font-size: 36px;
  }

  .welcome-card h3 {
    font-size: 16px;
  }

  .modal {
    width: 600px;
    max-width: 90vw;
    padding: 28px;
    max-height: 85vh;
  }

  .modal h2 {
    font-size: 20px;
    margin-bottom: 20px;
  }

  .settings-grid {
    grid-template-columns: 200px 1fr;
    min-height: 500px;
  }

  .settings-menu {
    flex-direction: column;
    border-left: 1px solid var(--border);
    border-bottom: none;
    padding: 12px 0;
    gap: 0;
  }

  .settings-menu-item {
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 0;
    background: none;
  }

  .settings-menu-item.active {
    color: var(--kfc-red);
    border-left: 2px solid var(--kfc-red);
    background: transparent;
  }

  .settings-content {
    padding: 20px;
  }

  .filters {
    gap: 12px;
  }

  .filters select,
  .filters input {
    padding: 8px 12px;
    font-size: 13px;
  }

  .date-filters {
    padding: 12px 16px;
    gap: 10px;
  }

  .date-filters .df-dates input[type="date"] {
    font-size: 13px;
  }

  .date-filters .quick-btn {
    font-size: 12px;
  }

  .adv-filters {
    padding: 16px;
    gap: 12px;
  }

  .notif-dropdown {
    position: absolute;
    width: 360px;
    left: 0;
    right: auto;
    top: 48px;
  }

  .notif-item {
    padding: 12px 16px;
  }

  .notif-time {
    font-size: 11px;
  }

  .tabs {
    overflow: visible;
  }

  .tab {
    padding: 10px 24px;
    font-size: 13px;
  }

  .toast-container {
    top: 60px;
    left: 24px;
  }

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

  .btn {
    font-size: 13px;
    padding: 8px 16px;
  }

  .btn-sm {
    font-size: 13px;
    padding: 6px 14px;
  }

  .approval-item {
    padding: 16px;
    gap: 12px;
  }
}

/* ============================================================================
   26. WIDE DESKTOP (min-width: 1200px)
   ============================================================================ */

@media (min-width: 1200px) {
  .stats-grid,
  .stats-grid-4 {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }

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

  .mod-card-inner {
    padding: 16px;
  }

  .mod-card-title {
    font-size: 16px;
  }

  .mod-card-metrics {
    gap: 8px;
  }

  .mod-metric-label {
    font-size: 10px;
  }

  .mod-metric-val {
    font-size: 15px;
  }

  .charts-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-header .btn-group {
    gap: 12px;
  }

  .page-header .btn-group .btn {
    padding: 9px 22px;
    font-size: 14px;
    min-width: 120px;
  }

  .stat-card {
    padding: 22px;
  }

  .stat-value {
    font-size: 32px;
  }

  .stat-label {
    font-size: 14px;
  }

  .date-filters {
    padding: 14px 20px;
    gap: 12px;
  }

  .date-filters .quick-btn {
    font-size: 13px;
    padding: 7px 16px;
    min-height: 38px;
  }

  .date-filters .df-dates input[type="date"] {
    font-size: 14px;
  }
}

/* ============================================================================
   27. TOUCH TOOLTIP ON MOBILE
   ============================================================================ */

@media (hover: none) and (pointer: coarse) {
  .info-exp .info-bubble {
    pointer-events: auto;
  }

  .info-exp:hover .info-bubble {
    display: none;
  }

  .info-exp.touched .info-bubble {
    display: block !important;
  }
}

/* ============================================================================
   28. PRINT STYLES
   ============================================================================ */

@media print {
  body {
    background-color: white;
    color: black;
  }

  .sidebar,
  .top-bar,
  .topbar,
  .bottom-nav,
  .hamburger-btn,
  .hamburger {
    display: none;
  }

  .main-content {
    padding: 0;
  }
}
