/* ════════════════════════════════════════════════════════════════
   PURTA-I-NET — Core Design System & Layout Styles
   ════════════════════════════════════════════════════════════════ */

:root {
  --bg-main: #f0f2f7;
  --bg-card: #ffffff;
  --bg-header: var(--primary-dark, #8a1f2b);
  --bg-footer: #e4e7eb;
  
  --text-main: #1f2937;
  --text-muted: #64748b;
  --text-light: #f8fafc;
  
  --border-color: #e2e8f0;
  --border-radius-sm: 6px;
  --border-radius-md: 10px;
  --border-radius-lg: 16px;
  --border-radius-pill: 50px;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
  
  --header-height: 48px;
  --footer-height: 34px;
  --sidebar-width: 200px;
  --sidebar-collapsed-width: 50px;
  --notif-width: 220px;
  
  --transition-speed: 0.25s;
}

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

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* Flex Gap Utility Helpers for Bootstrap 4 */
.gap-1 { gap: 4px !important; }
.gap-1-5 { gap: 6px !important; }
.gap-2 { gap: 8px !important; }
.gap-2-5 { gap: 10px !important; }
.gap-3 { gap: 12px !important; }
.gap-4 { gap: 16px !important; }

/* ════════════════════════════════════════════════════════════════
   SEARCH HIGHLIGHT STYLING (High-Visibility Yellow Marker)
   ════════════════════════════════════════════════════════════════ */
mark.search-highlight,
.search-highlight,
mark {
  background-color: var(--purta-highlight-bg, #ffeb3b) !important;
  color: var(--purta-highlight-text, #1a1a1a) !important;
  font-weight: 700 !important;
  padding: 1px 4px !important;
  border-radius: 3px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) !important;
  display: inline !important;
  line-height: inherit !important;
}

/* ════════════════════════════════════════════════════════════════
   1. HEADER COMPONENT
   ════════════════════════════════════════════════════════════════ */
.app-header {
  height: var(--header-height);
  background: var(--purta-header-gradient, linear-gradient(90deg, var(--primary-deep, #800000) 0%, var(--primary-color, #981b27) 50%, var(--primary-dark, #7d000d) 100%));
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  color: #ffffff;
}

.header-logo-icon {
  width: 28px;
  height: 28px;
  background-color: var(--primary-color, #981b27);
  border: 1.5px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.brand-text {
  font-size: 14px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.header-dropdown-pill {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  padding: 3px 10px;
  border-radius: var(--border-radius-pill);
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: background var(--transition-speed);
}

.header-dropdown-pill:hover,
.header-dropdown-pill.active {
  background: rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.45);
}

/* ── Financial Year Header Dropdown ── */
.header-fy-wrap {
  position: relative;
}

.header-fy-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 250px;
  background: var(--purta-card-bg) !important;
  border: 1px solid var(--purta-border);
  border-radius: 10px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.2), 0 4px 14px rgba(0, 0, 0, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.97);
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 99999;
  overflow: hidden;
}

.header-fy-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.header-fy-header {
  background: var(--purta-header-gradient);
  padding: 10px 14px 8px;
  color: #ffffff;
}

.header-fy-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #ffffff;
}

.header-fy-badge {
  font-size: 10px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.header-fy-subtitle {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 2px;
}

.header-fy-list {
  max-height: 240px;
  overflow-y: auto;
  padding: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) #f1f5f9;
}

.header-fy-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 3px;
  text-decoration: none !important;
  color: var(--purta-text-main) !important;
  border: 1px solid transparent;
}

.header-fy-item:hover {
  background: var(--inverse-color);
  color: var(--primary-color) !important;
}

.header-fy-item.active {
  background: var(--light-color);
  border-color: var(--purta-border);
  font-weight: 600;
}

.header-fy-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-fy-item-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--inverse-color);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}

.header-fy-item.active .header-fy-item-icon {
  background: var(--purta-primary-gradient);
  color: #ffffff;
}

.header-fy-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--purta-text-main);
  line-height: 1.2;
}

.header-fy-item:hover .header-fy-name {
  color: var(--primary-color);
}

.header-fy-period {
  font-size: 10px;
  color: var(--purta-text-muted);
  margin-top: 1px;
}

.header-fy-status {
  font-size: 9.5px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.header-fy-status.current {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.header-fy-status.closed {
  background: rgba(156, 163, 175, 0.15);
  color: #6b7280;
}

.header-fy-status.upcoming {
  background: rgba(59, 130, 246, 0.15);
  color: #2563eb;
}

.header-link {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s;
}

.header-link:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 4px 10px;
  border-radius: var(--border-radius-pill);
  font-size: 11.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.header-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

.header-menu-toggle-btn {
  display: none;
}

.user-profile-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
}

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #fff;
}

.user-name {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

/* ── User Profile Dropdown Panel ── */
.purta-user-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 220px;
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18), 0 4px 14px rgba(152, 27, 39, 0.1);
  border: 1px solid rgba(152, 27, 39, 0.15);
  overflow-y: visible !important;
  overflow-x: hidden !important;
  background: #ffffff !important;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.97);
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  max-height: none !important;
  z-index: 99999;
}

.purta-user-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.purta-dd-header {
  background: var(--purta-header-gradient, linear-gradient(135deg, var(--primary-color, #981b27) 0%, var(--primary-dark, #6b0f1a) 100%));
  padding: 10px 14px 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.purta-dd-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  object-fit: cover;
  flex-shrink: 0;
}

.purta-dd-user-info .dd-name {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.purta-dd-user-info .dd-role {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 1px;
  letter-spacing: 0.2px;
}

.purta-dd-section {
  padding: 5px 12px 2px;
  font-size: 8.5px;
  font-weight: 700;
  color: #9ca3af;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.purta-user-dropdown .dropdown-item {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 5px 12px !important;
  font-size: 11.5px !important;
  font-weight: 500 !important;
  color: #374151 !important;
  border-radius: 0 !important;
  transition: background 0.15s, color 0.15s, padding-left 0.15s !important;
  text-decoration: none !important;
}

.purta-user-dropdown .dropdown-item:hover {
  background: var(--inverse-color, #fff0f2) !important;
  color: var(--primary-color, #981b27) !important;
  padding-left: 15px !important;
}

.purta-user-dropdown .dropdown-item .dd-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border-radius: 7px;
  font-size: 11.5px;
  color: #6b7280;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.purta-user-dropdown .dropdown-item:hover .dd-icon {
  background: var(--light-color, rgba(152, 27, 39, 0.12));
  color: var(--primary-color, #981b27);
}

.purta-user-dropdown .dropdown-divider {
  margin: 4px 14px !important;
  border: 0;
  border-top: 1px solid #f3f4f6 !important;
}

.purta-user-dropdown .dd-logout {
  color: #b91c1c !important;
}

.purta-user-dropdown .dd-logout .dd-icon {
  background: rgba(185, 28, 28, 0.08);
  color: #b91c1c;
}

.purta-user-dropdown .dd-logout:hover {
  background: #fef2f2 !important;
  color: #991b1b !important;
}

.icon-btn-toggle {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  transition: background 0.2s;
}

.icon-btn-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ════════════════════════════════════════════════════════════════
   2. APP LAYOUT STRUCTURE
   ════════════════════════════════════════════════════════════════ */
.app-container {
  display: flex;
  flex: 1;
  margin-top: var(--header-height);
  margin-bottom: var(--footer-height);
  height: calc(100vh - var(--header-height) - var(--footer-height));
  overflow: hidden;
  position: relative;
}

#left-sidebar-component-root {
  height: 100%;
  display: flex;
  flex-shrink: 0;
  z-index: 900;
}

/* ════════════════════════════════════════════════════════════════
   3. LEFT SIDEBAR MENU COMPONENT
   ════════════════════════════════════════════════════════════════ */
.left-sidebar {
  width: var(--sidebar-width);
  height: 100%;
  background-color: #ffffff;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transition: width var(--transition-speed) ease;
  z-index: 900;
  overflow-x: hidden; /* clip width during collapse animation */
  overflow-y: visible;
  min-width: 0;
  user-select: none;
}

.left-sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

.left-sidebar.collapsed .sidebar-header-bar {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 8px 0 !important;
  width: 100% !important;
}

.left-sidebar.collapsed .sidebar-header-title,
.left-sidebar.collapsed .sidebar-header-actions {
  display: none !important;
}

.left-sidebar.collapsed .sidebar-toggle-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 32px !important;
  height: 28px !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

.left-sidebar.collapsed .sidebar-toggle-btn i {
  transform: rotate(180deg);
  font-size: 13px;
  display: block;
}

.left-sidebar.collapsed .sidebar-search,
.left-sidebar.collapsed .chevron-icon,
.left-sidebar.collapsed .menu-item-left span,
.left-sidebar.collapsed .menu-title,
.left-sidebar.collapsed .sidebar-header-text,
.left-sidebar.collapsed .submenu-list {
  display: none !important;
}

.left-sidebar.collapsed .sidebar-menu-list {
  scrollbar-width: none !important; /* Hide scrollbar in collapsed mode for perfect centering */
}
.left-sidebar.collapsed .sidebar-menu-list::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.left-sidebar.collapsed .menu-item {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.left-sidebar.collapsed .menu-item-header {
  width: 36px !important;
  height: 36px !important;
  margin: 3px auto !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 6px;
  text-align: center;
}

.left-sidebar.collapsed .menu-item-left {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: center !important;
}

.left-sidebar.collapsed .menu-item-left i {
  font-size: 16px !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  display: inline-block !important;
  line-height: 1 !important;
  text-align: center !important;
}

.sidebar-header-bar {
  background-color: var(--primary-color);
  color: #ffffff;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
}

.sidebar-toggle-btn,
.sidebar-action-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 11px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background 0.15s, opacity 0.15s;
}

.sidebar-toggle-btn:hover,
.sidebar-action-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.sidebar-search {
  padding: 6px;
  border-bottom: 1px solid #edf2f7;
  background-color: #fafafa;
}

.sidebar-search input {
  width: 100%;
  padding: 5px 8px;
  font-size: 11.5px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  outline: none;
  transition: border-color 0.2s;
}

.sidebar-search input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(152, 27, 39, 0.15);
}

.left-sidebar.collapsed .sidebar-search,
.left-sidebar.collapsed .sidebar-header-text {
  display: none;
}

.sidebar-menu-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  list-style: none;
  min-height: 0; /* critical: allows flex child to scroll */
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color, #981b27) #f1f5f9;
}

.sidebar-menu-list::-webkit-scrollbar {
  width: 5px;
}
.sidebar-menu-list::-webkit-scrollbar-track {
  background: #f1f5f9;
}
.sidebar-menu-list::-webkit-scrollbar-thumb {
  background: var(--primary-color, #981b27);
  border-radius: 4px;
}
.sidebar-menu-list::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark, #6b0f1a);
}
.sidebar-menu-list::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.menu-item {
  border-bottom: 1px solid #f1f5f9;
}

.menu-item-header {
  padding: 5px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: #334155;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.menu-item-header:hover {
  background-color: var(--inverse-color, #fff0f2);
  color: var(--primary-color);
}

.menu-item.active > .menu-item-header {
  background-color: var(--primary-color) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}

.menu-item.active .menu-item-left i,
.menu-item.active .menu-item-left span,
.menu-item.active .chevron-icon {
  color: #ffffff !important;
}

.menu-item.active-route:not(.active) > .menu-item-header {
  background-color: var(--inverse-color, #fff0f2) !important;
  color: var(--primary-color) !important;
  font-weight: 600 !important;
}

.menu-item.active-route:not(.active) .menu-item-left i,
.menu-item.active-route:not(.active) .menu-item-left span,
.menu-item.active-route:not(.active) .chevron-icon {
  color: var(--primary-color) !important;
}

.submenu-list {
  list-style: none;
  background-color: #fafbfc;
  padding-left: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-item.active .submenu-list {
  max-height: 600px; /* large enough for any submenu */
}

.submenu-item a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 28px;
  font-size: 11px;
  color: #475569;
  transition: background 0.15s, color 0.15s;
}

.submenu-item a:hover {
  background-color: var(--inverse-color, #fff0f2);
  color: var(--primary-color);
}

.submenu-item.active-route a,
.submenu-item.active a {
  background-color: var(--light-color, #fee2e2) !important;
  color: var(--primary-color) !important;
  font-weight: 700 !important;
}

.submenu-item.active-route a i,
.submenu-item.active a i {
  color: var(--primary-color) !important;
}

.chevron-icon {
  transition: transform 0.25s ease;
  font-size: 12px;
  color: #94a3b8;
  flex-shrink: 0;
}

.menu-item.active .chevron-icon {
  transform: rotate(180deg);
  color: #ffffff;
}

/* Collapsed mini view styles */
.left-sidebar.collapsed .menu-item-header {
  justify-content: center;
  padding: 10px 0;
}

.left-sidebar.collapsed .menu-item.active-route .menu-item-header,
.left-sidebar.collapsed .menu-item.active .menu-item-header {
  background-color: var(--primary-color) !important;
  color: #ffffff !important;
  border-radius: 6px;
  margin: 3px auto !important;
  width: 36px !important;
  height: 36px !important;
}

.left-sidebar.collapsed .menu-item.active-route .menu-item-left i,
.left-sidebar.collapsed .menu-item.active .menu-item-left i {
  color: #ffffff !important;
}

/* ════════════════════════════════════════════════════════════════
   4. MAIN DASHBOARD CONTENT AREA & 3-COLUMN MASONRY WATERFALL LAYOUT
   ════════════════════════════════════════════════════════════════ */
/* Dashboard root is the real scroller — .main-content fills it */
#dashboard-component-root {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow-y: auto !important;
  position: relative;
}

#dashboard-component-root::-webkit-scrollbar {
  width: 8px;
}
#dashboard-component-root::-webkit-scrollbar-track {
  background: #e2e8f0;
}
#dashboard-component-root::-webkit-scrollbar-thumb {
  background: var(--primary-color, #981b27);
  border-radius: 4px;
}
#dashboard-component-root::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark, #6b0f1a);
}

.main-content {
  flex: 1;
  background-color: var(--bg-main);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

/* Hero Section — pinned top hero card with rounded bottom corners */
.home-hero {
  background: var(--purta-header-gradient, linear-gradient(135deg, var(--primary-color, #981b27) 0%, var(--primary-dark, #6b0f1a) 55%, var(--primary-deep, #3d0008) 100%));
  padding: 10px 18px 12px;
  position: sticky;
  top: 0;
  z-index: 10;
  border-radius: 0 0 14px 14px;
  margin: 0 10px 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
}

.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 80% 10%, rgba(255, 255, 255, 0.07) 0%, transparent 55%),
    radial-gradient(ellipse at 10% 90%, rgba(255, 255, 255, 0.04) 0%, transparent 50%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.hero-greeting-label {
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.50);
  margin-bottom: 1px;
}

.hero-greeting-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 1px;
}

.hero-greeting-sub {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.65);
}

.hero-search-wrap {
  position: relative;
  width: 100%;
  max-width: 540px;
  margin-top: 8px;
}

.hero-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(152, 27, 39, 0.55);
  font-size: 13px;
  z-index: 2;
  pointer-events: none;
}

.home-search-input {
  width: 100% !important;
  background: rgba(255, 255, 255, 0.97) !important;
  border: 1.5px solid transparent !important;
  border-radius: 8px !important;
  padding: 6px 14px 6px 34px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  color: #1f2937 !important;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.16) !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
  outline: none !important;
}

.hero-stats {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 0;
}

.hero-stat-pill {
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 9px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  gap: 5px;
}

.hero-refresh-btn {
  background: rgba(255, 255, 255, 0.18) !important;
  border: 1px solid rgba(255, 255, 255, 0.30) !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.hero-refresh-btn:hover {
  background: rgba(255, 255, 255, 0.28) !important;
  border-color: rgba(255, 255, 255, 0.50) !important;
  color: #fff !important;
}

.home-search-input:focus {
  border-color: rgba(152, 27, 39, 0.35) !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15), 0 0 0 3px rgba(152, 27, 39, 0.10) !important;
}

/* ════════════════════════════════════════════════════════════════
   3-COLUMN WATERFALL FLEX LAYOUT & MODULE CARDS
   ════════════════════════════════════════════════════════════════ */
.home-grid-section {
  padding: 10px 12px 24px;
  overflow: visible !important;
}

.home-cols-container {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.home-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Search: No Results State ── */
.home-no-results {
  width: 100%;
  text-align: center;
  padding: 60px 20px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: fadeInUp 0.3s ease both;
}

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

.home-no-results-icon {
  width: 60px;
  height: 60px;
  background: #f1f5f9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #cbd5e1;
  margin-bottom: 4px;
}

.home-no-results-title {
  font-size: 15px;
  font-weight: 700;
  color: #475569;
}

.home-no-results-title em {
  font-style: normal;
  color: #981b27;
}

.home-no-results-sub {
  font-size: 12px;
  color: #94a3b8;
  max-width: 320px;
  line-height: 1.5;
}

/* ── Search Text Highlight ── */
mark.search-highlight,
.search-highlight,
mark {
  background-color: var(--purta-highlight-bg, #ffeb3b) !important;
  color: var(--purta-highlight-text, #1a1a1a) !important;
  border-radius: 3px !important;
  padding: 1px 4px !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) !important;
}

/* 10-Color Accent System */
.c1  { --ca: #981b27; }
.c2  { --ca: #1a6eb5; }
.c3  { --ca: #0e7e5a; }
.c4  { --ca: #7c3aed; }
.c5  { --ca: #b45309; }
.c6  { --ca: #0369a1; }
.c7  { --ca: #be185d; }
.c8  { --ca: #047857; }
.c9  { --ca: #9333ea; }
.c10 { --ca: #c2410c; }

.module-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07), 0 4px 14px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.module-card:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.11), 0 2px 8px rgba(152, 27, 39, 0.08);
  transform: translateY(-1px);
}

.mc-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid #f3f4f6;
  border-left: 4px solid var(--ca, #981b27);
}

.mc-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--ca, #981b27) 0%, color-mix(in srgb, var(--ca, #981b27) 60%, #000) 100%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.mc-title-wrap {
  flex: 1;
  min-width: 0;
}

.mc-title {
  font-size: 12px;
  font-weight: 700;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.mc-count {
  font-size: 9.5px;
  font-weight: 500;
  color: #9ca3af;
  margin-top: 1px;
}

.mc-head-video {
  background: transparent;
  border: 1px solid #e5e7eb;
  border-radius: 5px;
  padding: 2px 6px;
  font-size: 10px;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.14s;
  flex-shrink: 0;
  line-height: 1;
}

.mc-head-video:hover {
  border-color: #dc2626;
  color: #dc2626;
}

.mc-head-video-active {
  border-color: rgba(220, 38, 38, 0.35) !important;
  color: #dc2626 !important;
  background: rgba(220, 38, 38, 0.06) !important;
}

.mc-head-video[disabled] {
  opacity: 0.28;
  cursor: default;
}

/* Item List with Internal Scrollbar */
.mc-list {
  list-style: none;
  padding: 2px 0;
  margin: 0;
  max-height: 250px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: var(--ca, #981b27) #f0f0f0;
}

.mc-list::-webkit-scrollbar {
  width: 5px;
}

.mc-list::-webkit-scrollbar-track {
  background: #f0f0f0;
}

.mc-list::-webkit-scrollbar-thumb {
  background: var(--ca, #981b27);
  border-radius: 99px;
}

/* Item Row */
.mc-item {
  display: flex;
  align-items: center;
  border-left: 3px solid transparent;
  transition: background 0.1s, border-color 0.1s;
}

.mc-item:hover {
  background: #f9fafb;
  border-left-color: var(--ca, #981b27);
}

.mc-link {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  padding: 5px 6px 5px 8px;
  font-size: 11.5px;
  font-weight: 500;
  color: #374151 !important;
  text-decoration: none !important;
  transition: color 0.1s;
  overflow: hidden;
}

.mc-link:hover {
  color: var(--ca, #981b27) !important;
}

.mc-dot {
  width: 5px;
  height: 5px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #d1d5db;
  transition: background 0.1s;
}

.mc-item:hover .mc-dot {
  background: var(--ca, #981b27);
}

.mc-link-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mc-item:hover .mc-link-text {
  text-decoration: underline;
}

/* Action Badges */
.mc-actions {
  display: flex;
  align-items: center;
  gap: 3px;
  padding-right: 8px;
  flex-shrink: 0;
}

.mc-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  border: 1px solid #e5e7eb;
  font-size: 10px;
  color: #9ca3af;
  background: #f9fafb;
  cursor: pointer;
  transition: all 0.14s;
}

.mc-badge:hover {
  border-color: var(--ca, #981b27);
  color: var(--ca, #981b27);
  background: rgba(0, 0, 0, 0.04);
}

.mc-badge.video-badge {
  color: #6b7280;
}

.mc-badge.video-badge:hover {
  border-color: #dc2626;
  color: #dc2626;
  background: rgba(220, 38, 38, 0.05);
}

/* Card Footer */
.mc-footer {
  padding: 7px 12px;
  border-top: 1px solid #f3f4f6;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mc-footer-label {
  font-size: 10px;
  color: #9ca3af;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ════════════════════════════════════════════════════════════════
   5. RIGHT NOTIFICATIONS SIDEBAR
   ════════════════════════════════════════════════════════════════ */
.right-notifications {
  width: var(--notif-width);
  height: 100%;
  background-color: #ffffff;
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transition: width var(--transition-speed) ease;
  z-index: 900;
  overflow: hidden;
  min-height: 0;
}

.right-notifications.collapsed {
  width: var(--sidebar-collapsed-width);
}

.notif-header {
  background-color: var(--primary-color);
  color: #ffffff;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
}

.notif-toggle-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 11px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background 0.15s;
}
.notif-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.notif-header .header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.notif-header button {
  color: #ffffff;
  font-size: 11px;
}

.notif-collapsed-view {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  width: 100%;
  overflow-y: auto;
}

.collapsed-notif-item-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.collapsed-notif-item-icon:hover {
  transform: scale(1.12);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

/* Status-Based Background Displays for Collapsed Sidebar Icons */
.collapsed-notif-item-icon.ongoing,
.collapsed-notif-item-icon[data-status="ongoing"] {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 3px 8px rgba(245, 158, 11, 0.4);
}

.collapsed-notif-item-icon.completed,
.collapsed-notif-item-icon.done,
.collapsed-notif-item-icon[data-status="completed"] {
  background: linear-gradient(135deg, #22c55e 0%, #15803d 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 3px 8px rgba(34, 197, 94, 0.4);
}

.collapsed-notif-item-icon.not-started,
.collapsed-notif-item-icon.new,
.collapsed-notif-item-icon[data-status="not-started"] {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 3px 8px rgba(239, 68, 68, 0.4);
}

.collapsed-notif-item-icon.rework,
.collapsed-notif-item-icon.on-hold,
.collapsed-notif-item-icon[data-status="rework"] {
  background: linear-gradient(135deg, #64748b 0%, #334155 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 3px 8px rgba(100, 116, 139, 0.4);
}

.collapsed-notif-item-icon .c-dot {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid #ffffff;
}

.collapsed-bell-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #f59e0b; /* Bright Yellow / Amber Bell button */
  color: #ffffff;
  border: none;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
  transition: transform 0.18s, background 0.18s;
}
.collapsed-bell-btn:hover {
  background: #d97706;
  transform: scale(1.08);
}

.right-notifications.collapsed .notif-header-title,
.right-notifications.collapsed .notif-header .header-actions {
  display: none !important;
}

.right-notifications.collapsed .notif-header {
  justify-content: center;
  padding: 8px 0;
}

.right-notifications.collapsed .notif-toggle-btn i {
  transform: rotate(180deg);
}

.right-notifications.collapsed .notif-filter-bar,
.right-notifications.collapsed .notif-body {
  display: none !important;
}

.right-notifications.collapsed .notif-collapsed-view {
  display: flex !important;
}

.notif-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  min-height: 0; /* critical for flex scroll */
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color, #981b27) #f1f5f9;
}

.notif-body::-webkit-scrollbar {
  width: 5px;
}
.notif-body::-webkit-scrollbar-track {
  background: #f1f5f9;
}
.notif-body::-webkit-scrollbar-thumb {
  background: var(--primary-color, #981b27);
  border-radius: 4px;
}
.notif-body::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark, #6b0f1a);
}
.notif-body::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.notif-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: auto;
  text-align: center;
  color: #94a3b8;
  padding: 20px;
}

.notif-empty-icon {
  font-size: 32px;
  margin-bottom: 10px;
  color: #cbd5e1;
}

.notif-empty-title {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}

.notif-empty-desc {
  font-size: 11px;
  margin-top: 2px;
}

/* ── Notification Filter Bar ── */
.notif-filter-bar {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 5px 6px;
  border-bottom: 1px solid #f1f5f9;
  background: #fafbfc;
  flex-wrap: nowrap;
  overflow-x: auto;
}

.nf-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1.5px 5px;
  border-radius: 99px;
  font-size: 9.5px;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.nf-chip:hover, .nf-chip.active {
  background: #fff;
  color: #1e293b;
  border-color: #cbd5e1;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.nf-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* ── Notification Body ── */
.notif-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.notif-body::-webkit-scrollbar { width: 4px; }
.notif-body::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 2px; }

/* ── Notification Card ── */
.notif-card {
  position: relative;
  padding: 10px 14px 8px;
  border-bottom: 1px solid #f1f5f9;
  background: #ffffff;
  transition: background 0.15s;
}
.notif-card:hover {
  background: #fafbff;
}

/* Unread blue dot */
.notif-card-unread-dot {
  position: absolute;
  top: 12px;
  right: 10px;
  width: 7px;
  height: 7px;
  background: #3b82f6;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(59,130,246,0.2);
}

/* Top row: avatar + name/ticket */
.notif-card-top {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 6px;
}

.notif-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* Status-Based Avatar Colors */
.notif-avatar.ongoing {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.35);
}

.notif-avatar.completed,
.notif-avatar.done {
  background: linear-gradient(135deg, #22c55e 0%, #15803d 100%) !important;
  box-shadow: 0 2px 6px rgba(34, 197, 94, 0.35);
}

.notif-avatar.not-started,
.notif-avatar.new {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%) !important;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.35);
}

.notif-avatar.rework,
.notif-avatar.on-hold {
  background: linear-gradient(135deg, #64748b 0%, #334155 100%) !important;
  box-shadow: 0 2px 6px rgba(100, 116, 139, 0.35);
}

.notif-card-info {
  flex: 1;
  min-width: 0;
}

.notif-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.notif-user-name {
  font-size: 11px;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
}

.notif-ticket-id {
  font-size: 9px;
  color: #94a3b8;
  margin-top: 1px;
}

/* ── Status Badges ── */
.notif-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 99px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.notif-status-badge.ongoing {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.notif-status-badge.completed {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.notif-status-badge.not-started {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.notif-status-badge.rework {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.notif-status-badge.on-hold {
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid #334155;
}

/* ── Notification Message ── */
.notif-message {
  font-size: 10.5px;
  color: #374151;
  line-height: 1.45;
  margin-bottom: 5px;
}

/* ── Meta row: tag + time ── */
.notif-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.notif-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 600;
  color: #64748b;
}

.notif-time {
  font-size: 9px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 3px;
}

/* ── Serial / Timestamp ── */
.notif-serial {
  font-size: 8.5px;
  color: #cbd5e1;
  border-top: 1px dashed #f1f5f9;
  padding-top: 3px;
  margin-top: 2px;
}

/* ════════════════════════════════════════════════════════════════
   6. FOOTER BAR COMPONENT (100% Theme-Derived & Polished UI/UX)
   ════════════════════════════════════════════════════════════════ */
.app-footer {
  height: var(--footer-height);
  background-color: var(--purta-card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--purta-border);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.03);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  font-size: 11.5px;
  user-select: none;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

/* Pulsing Live Connection Status Badge (Always Green for Online Status) */
.footer-status-badge,
.status-badge {
  background-color: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease;
}

.footer-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 0 2px #d1fae5;
  display: inline-block;
  animation: footerDotPulse 2s infinite ease-in-out;
}

.footer-status-text {
  color: #059669;
  font-weight: 700;
}

@keyframes footerDotPulse {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.25);
    opacity: 1;
    filter: drop-shadow(0 0 3px #10b981);
  }
  100% {
    transform: scale(0.95);
    opacity: 0.8;
  }
}

/* Themed Live Clock Pill */
.footer-clock-pill,
.footer-clock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 6px;
  background-color: var(--inverse-color);
  border: 1px solid var(--light-color);
  color: var(--primary-color);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.2px;
  transition: all 0.2s ease;
}

.footer-clock-icon {
  font-size: 11.5px;
  color: var(--primary-color);
  opacity: 0.9;
}

.footer-clock-text {
  font-weight: 700;
  color: var(--primary-color);
}

/* Quick Action Pills */
.footer-action-pills {
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-pill-btn {
  background-color: var(--purta-card-bg);
  border: 1px solid var(--purta-border);
  border-radius: 20px;
  padding: 2.5px 11px;
  font-size: 11px;
  font-weight: 600;
  color: var(--purta-text-main);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  text-decoration: none !important;
  outline: none !important;
}

.footer-pill-btn .footer-btn-icon,
.footer-pill-btn i {
  font-size: 11.5px;
  color: var(--primary-color);
  transition: all 0.2s ease;
}

.footer-pill-btn:hover {
  background: var(--purta-primary-gradient) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.16);
}

.footer-pill-btn:hover .footer-btn-icon,
.footer-pill-btn:hover i {
  color: #ffffff !important;
}

.footer-pill-btn:active {
  transform: scale(0.96);
}

/* Footer Right Section */
.footer-right {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--purta-text-muted);
  font-size: 11px;
}

.footer-powered-label {
  font-size: 10.5px;
  color: var(--purta-text-muted);
  font-weight: 500;
}

.footer-brand-chip,
.footer-logo-wrap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background-color: var(--inverse-color);
  border: 1px solid var(--light-color);
  border-radius: 14px;
  padding: 2px 9px;
  color: var(--primary-color);
  font-weight: 700;
  font-size: 11px;
  cursor: default;
  transition: all 0.2s ease;
}

.footer-brand-chip:hover,
.footer-logo-wrap:hover {
  border-color: var(--primary-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.footer-brand-name {
  color: var(--primary-color);
  font-weight: 700;
}

.footer-star-icon {
  color: var(--primary-color);
  font-size: 11.5px;
  transition: transform 0.25s ease;
}

.footer-brand-chip:hover .footer-star-icon,
.footer-logo-wrap:hover .footer-star-icon {
  transform: rotate(72deg) scale(1.15);
}

/* ════════════════════════════════════════════════════════════════
   7. PREMIUM CALCULATOR MODAL
   ════════════════════════════════════════════════════════════════ */

/* ── Overlay ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ── Modal Box ── */
.calc-modal {
  width: 330px;
  background: #ffffff;
  border-radius: 18px;
  box-shadow:
    0 24px 60px rgba(0,0,0,0.35),
    0 0 0 1px rgba(255,255,255,0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: calcPopIn 0.28s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
  user-select: none;
}

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

/* ── Header ── */
.calc-header {
  background: var(--purta-header-gradient, linear-gradient(135deg, var(--primary-color, #981b27) 0%, var(--primary-dark, #6b0f1a) 100%));
  color: #fff;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: grab;
  gap: 8px;
}
.calc-header:active { cursor: grabbing; }

.calc-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.calc-header-icon {
  width: 26px;
  height: 26px;
  background: rgba(255,255,255,0.18);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.calc-header-title-text {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.calc-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.calc-icon-btn {
  background: rgba(255,255,255,0.1);
  border: none;
  color: rgba(255,255,255,0.85);
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  padding: 0;
}
.calc-icon-btn:hover {
  background: rgba(255,255,255,0.25);
  color: #fff;
}

/* ── Display Area ── */
.calc-display-area {
  background: #0f172a;
  padding: 16px 18px 12px;
  min-height: 86px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
}

.calc-expr-row {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 6px;
  min-height: 36px;
}

.calc-expr {
  color: #e2e8f0;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.5px;
  word-break: break-all;
  text-align: right;
  line-height: 1.25;
  flex: 1;
  transition: color 0.2s;
}
.calc-expr.is-error { color: #f87171; }
.calc-expr.is-result { color: #38bdf8; }

.calc-copy-btn {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.45);
  width: 24px;
  height: 24px;
  border-radius: 5px;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 4px;
  transition: all 0.15s;
}
.calc-copy-btn:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}
.calc-copy-btn.copied {
  background: #22c55e;
  color: #fff;
  border-color: #22c55e;
}

.calc-result-row {
  text-align: right;
  min-height: 20px;
}
.calc-result {
  color: #64748b;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.3px;
  transition: color 0.2s;
}
.calc-result.has-preview { color: #38bdf8; }

/* ── History Panel ── */
.calc-history-panel {
  background: #1e293b;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.calc-history-panel.open { max-height: 160px; }

.calc-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px 6px;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.calc-history-clear-btn {
  background: rgba(248,113,113,0.15);
  border: none;
  color: #f87171;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.calc-history-clear-btn:hover { background: rgba(248,113,113,0.25); }

.calc-history-list {
  max-height: 120px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #334155 transparent;
}
.calc-history-list::-webkit-scrollbar { width: 4px; }
.calc-history-list::-webkit-scrollbar-thumb { background: #334155; border-radius: 2px; }

.calc-history-empty {
  color: #475569;
  font-size: 11.5px;
  text-align: center;
  padding: 14px 0;
  font-style: italic;
}

.calc-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.12s;
}
.calc-history-item:hover { background: rgba(255,255,255,0.04); }
.calc-history-item:hover .calc-history-reuse { opacity: 1; }

.calc-history-expr {
  color: #94a3b8;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}
.calc-history-res {
  color: #38bdf8;
  font-size: 12px;
  font-weight: 600;
}
.calc-history-reuse {
  color: #64748b;
  font-size: 9px;
  opacity: 0;
  transition: opacity 0.15s;
  margin-left: 4px;
}

/* ── Button Grid ── */
.calc-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  padding: 12px;
  background: #f8fafc;
}

.calc-btn {
  height: 48px;
  border-radius: 11px;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.14s ease;
  position: relative;
  overflow: hidden;
  border: none;
  outline: none;
}
.calc-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.06);
  opacity: 0;
  transition: opacity 0.1s;
}
.calc-btn:active::after { opacity: 1; }
.calc-btn:active { transform: scale(0.94); }

/* Number buttons */
.calc-num-btn {
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.calc-num-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  transform: translateY(-1px);
}

/* Operator buttons */
.calc-op-btn {
  background: #fff0f2;
  color: #981b27;
  border: 1px solid #fecdd3;
  font-size: 17px;
  font-weight: 700;
}
.calc-op-btn:hover {
  background: #ffe4e8;
  border-color: #fda4af;
  box-shadow: 0 3px 8px rgba(152,27,39,0.15);
  transform: translateY(-1px);
}

/* Function buttons (%, √, x², 1/x, +/-) */
.calc-fn-btn {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
  font-size: 12.5px;
  font-weight: 700;
}
.calc-fn-btn:hover {
  background: #f1f5f9;
  color: #1e293b;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

/* Clear button */
.calc-clear-btn {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.calc-clear-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  box-shadow: 0 3px 8px rgba(220,38,38,0.18);
  transform: translateY(-1px);
}

/* Backspace/delete button */
.calc-del-btn {
  background: #fef9f0;
  color: #d97706;
  border: 1px solid #fde68a;
  font-size: 14px;
}
.calc-del-btn:hover {
  background: #fef3c7;
  border-color: #fcd34d;
  transform: translateY(-1px);
}

/* Equals button */
.calc-eq-btn {
  grid-column: 1 / -1;
  height: 50px;
  background: var(--purta-primary-gradient, linear-gradient(135deg, var(--primary-color, #981b27) 0%, var(--primary-dark, #6b0f1a) 100%));
  color: #ffffff;
  font-size: 22px;
  font-weight: 700;
  border-radius: 12px;
  border: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  letter-spacing: 1px;
  transition: all 0.15s;
}
.calc-eq-btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}
.calc-eq-btn:active { transform: translateY(0); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); }

/* ════════════════════════════════════════════════════════════════
   8. RESPONSIVE UTILITIES & MOBILE DRAWER SYSTEM
   ════════════════════════════════════════════════════════════════ */

/* ── Laptop / Tablet Medium Screens (<= 1024px) ── */
@media (max-width: 1024px) {
  :root {
    --sidebar-width: 230px;
    --notif-width: 260px;
  }

  .home-cols-container {
    flex-wrap: wrap;
    gap: 14px;
  }

  .home-col {
    flex: 1 1 calc(50% - 10px);
    min-width: 0;
  }

  /* When there are 3 columns on 2-col tablet layout, 3rd column takes full width */
  .home-col:nth-child(3) {
    flex: 1 1 100%;
  }

  .calculator-modal {
    width: 360px;
  }
}

/* ── Tablet Small Screens (<= 992px) ── */
@media (max-width: 992px) {
  /* Right Notifications Panel: HIDDEN off-screen by default on responsive */
  .right-notifications {
    position: fixed;
    top: var(--header-height);
    bottom: var(--footer-height);
    right: 0;
    width: 280px !important;
    height: calc(100vh - var(--header-height) - var(--footer-height));
    z-index: 1200;
    box-shadow: -6px 0 24px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* Slide in FULL 280px drawer view when explicitly toggled open */
  .right-notifications.open {
    transform: translateX(0) !important;
    width: 280px !important;
  }

  .right-notifications.open .notif-filter-bar,
  .right-notifications.open .notif-body {
    display: flex !important;
    width: 100% !important;
  }

  .right-notifications.open .notif-header-title,
  .right-notifications.open .notif-header .header-actions {
    display: flex !important;
  }

  .right-notifications.open .notif-collapsed-view {
    display: none !important;
  }
}

/* ── Mobile Devices & Portrait Tablets (<= 768px) ── */
@media (max-width: 768px) {
  :root {
    --header-height: 46px;
    --footer-height: 32px;
  }

  /* Top Header Adjustments */
  .app-header {
    padding: 0 10px;
  }

  .brand-text {
    font-size: 13px;
  }

  .header-dropdown-pill {
    padding: 2px 7px;
    font-size: 11px;
  }

  .header-link {
    display: none; /* Accessible from menu */
  }

  /* On Responsive: Hide text labels from top header buttons, display ONLY icons */
  .header-btn-text {
    display: none !important;
  }

  .header-btn {
    padding: 5px 9px !important;
    font-size: 13px !important;
    border-radius: 8px !important;
  }

  /* Active Background Colors for Header Buttons on Hover / Active */
  .header-btn:hover,
  .header-btn:focus,
  .header-btn:active,
  .header-btn.active,
  .header-menu-toggle-btn:hover,
  .header-menu-toggle-btn:active,
  .icon-btn-toggle:hover,
  .icon-btn-toggle:active {
    background: rgba(255, 255, 255, 0.32) !important;
    border-color: rgba(255, 255, 255, 0.65) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18) !important;
  }

  .user-name {
    max-width: 75px;
    font-size: 11.5px;
  }

  /* Header Hamburger Menu Toggle Button */
  .header-menu-toggle-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    cursor: pointer;
    transition: background 0.18s;
    margin-right: 6px;
  }
  .header-menu-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.45);
  }

  /* Left Sidebar Overlay Drawer: HIDDEN off-screen by default on responsive */
  .left-sidebar {
    position: fixed;
    top: var(--header-height);
    bottom: var(--footer-height);
    left: 0;
    width: 260px !important;
    height: calc(100vh - var(--header-height) - var(--footer-height));
    z-index: 1200;
    box-shadow: 6px 0 24px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
  }

  /* Slide in FULL 260px expanded text view when explicitly toggled open */
  .left-sidebar.open,
  .left-sidebar.mobile-open {
    transform: translateX(0) !important;
    width: 260px !important;
  }

  .left-sidebar.open .sidebar-search {
    display: block !important;
  }

  .left-sidebar.open .menu-item-left span {
    display: inline-block !important;
  }

  .left-sidebar.open .chevron-icon {
    display: inline-block !important;
  }

  .left-sidebar.open .menu-item-header {
    padding: 8px 12px !important;
    justify-content: space-between !important;
  }

  .left-sidebar.open .menu-item-left {
    justify-content: flex-start !important;
    width: auto !important;
  }

  /* Single Column Dashboard Grid */
  .home-hero {
    padding: 10px 14px 14px;
  }

  .hero-top {
    position: relative;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .hero-greeting-name {
    font-size: 15px;
  }

  .hero-greeting-sub {
    font-size: 11px;
  }

  /* Tablet view (577px - 992px): Option pills in a single horizontal ROW */
  @media (min-width: 577px) {
    .hero-top {
      padding-right: 0 !important;
    }
    .hero-stats {
      width: fit-content;
      display: flex !important;
      flex-direction: row !important;
      align-items: center !important;
      gap: 6px !important;
      position: absolute;
      right: 10px;
      top: 6px;
      z-index: 2;
    }
    .hero-stat-pill {
      font-size: 9px;
      padding: 3px 9px;
    }
    .hero-search-wrap {
      max-width: 100%;
      margin-top: 8px !important;
    }
  }

  /* Mobile view (<= 576px): Option pills stacked in a vertical COLUMN */
  @media (max-width: 576px) {
    .hero-top {
      padding-right: 95px !important;
    }
    .hero-stats {
      width: fit-content;
      display: flex !important;
      flex-direction: column !important;
      align-items: flex-end !important;
      gap: 3px !important;
      position: absolute;
      right: 10px;
      top: -2px;
      z-index: 2;
    }
    .hero-stat-pill {
      font-size: 8px !important;
      padding: 2px 6px !important;
    }
    .hero-search-wrap {
      max-width: 100%;
      margin-top: 14px !important;
    }
  }

  .home-grid-section {
    padding: 10px 10px 30px;
  }

  .home-cols-container {
    display: flex !important;
    flex-direction: row !important;
    gap: 10px !important;
    align-items: flex-start !important;
  }

  .home-col {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    width: auto !important;
  }

  @media (max-width: 576px) {
    .home-cols-container {
      flex-direction: column !important;
      gap: 10px !important;
    }

    .home-col {
      flex: 1 1 100% !important;
      width: 100% !important;
    }
  }

  /* Modal responsiveness */
  .calculator-modal {
    width: calc(100vw - 24px);
    max-width: 380px;
    top: 55% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
  }

  .purta-user-dropdown {
    right: 0 !important;
    left: auto !important;
    min-width: 220px !important;
  }
}

/* ── Mobile Screens & Smartphones (<= 576px) ── */
@media (max-width: 576px) {
  /* 1. Hide financial year date select pill */
  .header-dropdown-pill {
    display: none !important;
  }

  /* 2. Header brand title make smaller */
  .brand-text {
    font-size: 11px !important;
    letter-spacing: -0.2px;
  }

  .header-logo-icon {
    width: 22px !important;
    height: 22px !important;
    font-size: 11px !important;
  }

  /* 3. User profile trigger: show circular user avatar logo ONLY */
  .user-name,
  .user-profile-btn .fa-chevron-down {
    display: none !important;
  }

  .user-profile-btn {
    padding: 2px !important;
    border-radius: 50% !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
  }

  .user-avatar {
    width: 26px !important;
    height: 26px !important;
  }
}

/* ── Small Smartphones (<= 480px) ── */
@media (max-width: 480px) {
  .header-btn {
    font-size: 11px !important;
    padding: 3px 6px !important;
  }

  .brand-text {
    font-size: 10px !important;
  }

  .footer-right {
    display: none; /* Hide copyright text on very small screens */
  }

  .app-footer {
    padding: 0 8px;
  }

  .footer-clock-pill,
  .footer-clock {
    font-size: 10px;
    padding: 2px 6px;
  }

  .footer-pill-btn {
    padding: 2px 7px;
    font-size: 10px;
  }
}

/* ── Tiny Screens (<= 360px) ── */
@media (max-width: 360px) {
  .brand-text {
    display: none; /* Show logo icon only on 320px screen */
  }
}

/* ════════════════════════════════════════════════════════════════
   GLOBAL HEADER SEARCH & AUTOCOMPLETE POPOVER
   ════════════════════════════════════════════════════════════════ */
.header-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.header-search-input {
  background: rgba(255, 255, 255, 0.2) !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  border-radius: 5px !important;
  color: #ffffff !important;
  font-size: 12px !important;
  height: 26px !important;
  padding: 0 10px !important;
  width: 140px;
  outline: none !important;
  transition: all 0.2s ease;
}

.header-search-input:focus {
  background: rgba(255, 255, 255, 0.3) !important;
  border-color: #ffffff !important;
  width: 190px;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.35) !important;
}

.header-search-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
  font-size: 11.5px;
}

.header-search-popover {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  width: 220px;
  background: #ffffff;
  border: 1px solid var(--purta-border, #cbd5e1);
  border-radius: 6px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  z-index: 10050;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: botFadeIn 0.16s ease;
}

.header-search-scroll-top,
.header-search-scroll-bottom {
  height: 14px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: #94a3b8;
  cursor: pointer;
  user-select: none;
}

.header-search-scroll-top:hover,
.header-search-scroll-bottom:hover {
  background: var(--inverse-color, #fff0f2);
  color: var(--primary-color, #981b27);
}

.header-search-list {
  max-height: 230px;
  overflow-y: auto;
}

.header-search-item {
  padding: 6px 12px;
  font-size: 12px;
  color: var(--primary-color, #981b27);
  cursor: pointer;
  border-bottom: 1px solid #f8fafc;
  transition: all 0.12s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-search-item:hover,
.header-search-item.active {
  background: var(--inverse-color, #fff0f2);
  font-weight: 600;
  padding-left: 15px;
}

.header-search-empty {
  padding: 10px 12px;
  font-size: 11.5px;
  color: var(--purta-text-muted, #64748b);
  text-align: center;
  font-style: italic;
}

/* ════════════════════════════════════════════════════════════════
   TECHNICAL SUPPORT & FEEDBACK MODAL DIALOG
   ════════════════════════════════════════════════════════════════ */
.support-modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(15, 23, 42, 0.65) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
  z-index: 10000 !important;
  overflow-y: auto !important;
  padding: 20px 10px !important;
  display: none;
  align-items: center !important;
  justify-content: center !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.support-modal-overlay.active {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.support-modal-box {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  width: 660px;
  max-width: 96vw;
  margin: auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: supportModalPop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
}

@keyframes supportModalPop {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.support-modal-header {
  background: var(--purta-header-gradient, linear-gradient(90deg, #6b21a8 0%, #7e22ce 100%));
  color: #ffffff;
  padding: 9px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: move;
  user-select: none;
}

.support-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13.5px;
}

.support-header-icon {
  font-size: 14px;
}

.support-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.support-hdr-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  height: 24px;
  min-width: 24px;
  padding: 0 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.support-hdr-btn:hover {
  background: rgba(255, 255, 255, 0.35);
  color: #ffffff;
}

.support-hdr-close:hover {
  background: #ef4444;
  border-color: #ef4444;
}

.support-options-menu {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  min-width: 165px;
  background: #ffffff;
  border: 1px solid var(--purta-border, #cbd5e1);
  border-radius: 6px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
  z-index: 250;
  overflow: hidden;
  animation: botFadeIn 0.15s ease;
}

.support-option-item {
  padding: 8px 12px;
  font-size: 11.5px;
  color: #334155;
  cursor: pointer;
  transition: all 0.12s ease;
  display: flex;
  align-items: center;
}

.support-option-item:hover {
  background: var(--inverse-color, #fff0f2);
  color: var(--primary-color, #981b27);
  font-weight: 600;
}

/* Modal Body */
.support-modal-body {
  padding: 14px 16px;
  background: #f8fafc;
  overflow-y: auto;
  max-height: calc(90vh - 120px);
}

.support-form-card {
  background: #ffffff;
  border: 1.5px solid var(--purta-border, #cbd5e1);
  border-radius: 8px;
  padding: 16px 14px 12px;
  position: relative;
  margin-top: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.support-tab-pill-wrap {
  position: absolute;
  top: -11px;
  left: 14px;
}

.support-tab-pill {
  background: var(--purta-header-gradient, var(--primary-color, #981b27));
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  display: inline-block;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.support-form-group {
  margin-bottom: 11px;
}

.support-form-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--purta-text-main, #334155);
  margin-bottom: 3px;
  display: block;
}

.support-compound-input,
.support-compound-textarea {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--purta-border, #cbd5e1);
  border-radius: 4px;
  background: #ffffff;
  overflow: hidden;
  transition: all 0.18s ease;
}

.support-compound-input:focus-within,
.support-compound-textarea:focus-within {
  border-color: var(--primary-color, #981b27);
  box-shadow: 0 0 0 2.5px rgba(152, 27, 39, 0.14);
}

.support-input-prefix-icon,
.support-textarea-prefix-icon {
  background: var(--purta-header-gradient, var(--primary-color, #981b27));
  color: #ffffff;
  width: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.support-input-field,
.support-textarea-field,
.support-select-field {
  border: none !important;
  outline: none !important;
  width: 100%;
  padding: 5px 9px !important;
  font-size: 12px !important;
  color: var(--purta-text-main, #1e293b) !important;
  background: transparent !important;
}

.support-textarea-field {
  resize: vertical;
  min-height: 70px;
}

.support-select-field {
  cursor: pointer;
  height: 28px;
}

.support-file-control {
  font-size: 11.5px;
  color: #475569;
}

.support-capture-note {
  margin-top: 10px;
  padding: 8px 12px;
  background: #ffffff;
  border: 1px dashed var(--purta-border, #cbd5e1);
  border-radius: 6px;
  font-size: 10.5px;
  color: var(--purta-text-muted, #64748b);
  line-height: 1.45;
}

/* Modal Footer */
.support-modal-footer {
  padding: 8px 16px;
  background: #f1f5f9;
  border-top: 1px solid var(--purta-border, #e2e8f0);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.btn-support-save {
  background: var(--purta-header-gradient, var(--primary-color, #981b27));
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 22px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12);
}

.btn-support-save:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-support-close {
  background: #ffffff;
  border: 1px solid var(--purta-border, #cbd5e1);
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 20px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-support-close:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

/* ════════════════════════════════════════════════════════════════
   MASTER FILE & IMAGE UPLOAD WIDGETS (GLOBAL)
   ════════════════════════════════════════════════════════════════ */
.bot-file-picker-box {
  display: flex;
  align-items: center;
  background: #f8fafc;
  border: 1.5px solid var(--purta-border, #cbd5e1);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  transition: all 0.2s ease;
  min-height: 38px;
}

.bot-file-picker-box:focus-within,
.bot-file-picker-box:hover {
  border-color: var(--primary-color, #981b27);
  background: #ffffff;
}

.bot-file-browse-btn {
  background: var(--purta-header-gradient, var(--primary-color, #981b27));
  color: #ffffff !important;
  border: none;
  height: 38px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  transition: filter 0.15s ease;
}

.bot-file-browse-btn:hover {
  filter: brightness(1.1);
}

.bot-file-name-text {
  flex: 1;
  padding: 0 12px;
  font-size: 12px;
  color: var(--purta-text-main, #334155);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bot-file-name-text.empty {
  color: var(--purta-text-muted, #94a3b8);
  font-style: italic;
}

.bot-file-size-badge {
  background: #f1f5f9;
  border: 1px solid var(--purta-border, #cbd5e1);
  color: var(--purta-text-muted, #64748b);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  margin-right: 8px;
  flex-shrink: 0;
}

.bot-file-clear-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 0 10px;
  height: 38px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: color 0.15s ease;
  flex-shrink: 0;
}

.bot-file-clear-btn:hover {
  color: #ef4444;
}

.bot-dropzone {
  border: 2px dashed var(--purta-border, #cbd5e1);
  border-radius: 10px;
  background: #f8fafc;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.bot-dropzone:hover,
.bot-dropzone.dragover {
  border-color: var(--primary-color, #981b27);
  background: var(--inverse-color, #fff0f2);
}

.bot-dropzone-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--inverse-color, #ffebe6);
  color: var(--primary-color, #981b27);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 8px;
  border: 1px solid rgba(152, 27, 39, 0.15);
}

.bot-dropzone-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--purta-text-main, #1e293b);
  margin-bottom: 3px;
}

.bot-dropzone-title span {
  color: var(--primary-color, #981b27);
  text-decoration: underline;
}

.bot-dropzone-desc {
  font-size: 11px;
  color: var(--purta-text-muted, #64748b);
}

