/* Client Panel Layout CSS */

:root {
  --sidebar-width: 280px;
  --header-height: 70px;
}

body.client-panel {
  /* Premium Light Theme Variables (DigitalOcean Inspired) */
  --bg-dark: #ffffff;
  --bg-darker: #f3f5f9;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.85);
  
  --primary: #0069ff;       /* DigitalOcean Blue */
  --primary-hover: #0055d4;
  --primary-glow: rgba(0, 105, 255, 0.12);
  
  --secondary: #00b4d8;     /* Cyan/Sky Accent */
  --secondary-hover: #0096c7;
  --secondary-glow: rgba(0, 180, 216, 0.12);

  --accent-green: #10b981;
  --accent-red: #ef4444;
  --accent-yellow: #f59e0b;
  
  --text-primary: #0f172a;   /* Slate 900 */
  --text-secondary: #475569; /* Slate 600 */
  --text-muted: #64748b;     /* Slate 500 */
  
  --border-light: #e2e8f0;   /* Slate 200 */
  --border-focus: rgba(0, 105, 255, 0.45);
  
  --glass-shadow: 0 1px 3px 0 rgba(0,0,0,0.05), 0 1px 2px 0 rgba(0,0,0,0.06), 0 20px 25px -5px rgba(0,0,0,0.05);

  background-color: var(--bg-darker);
  background-image: 
    radial-gradient(circle at 0% 0%, rgba(0, 105, 255, 0.04) 0%, transparent 35%),
    radial-gradient(circle at 100% 100%, rgba(0, 180, 216, 0.02) 0%, transparent 35%);
  min-height: 100vh;
}

/* Ambient glow overrides for light theme */
body.client-panel .floating-glow-orb {
  opacity: 0.05;
}

body.client-panel .logo {
  width: 188px;
  height: 50px;
}

body.client-panel .logo::before {
  background-image: url("../../assets/brand/logo-dark.png");
}

body.client-panel .auth-header .logo {
  width: 236px;
  height: 66px;
  margin-left: auto;
  margin-right: auto;
}

/* Dashboard App Wrapper */
.app-wrapper {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* Sidebar Styling */
.app-sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  background: #ffffff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  z-index: 90;
  transition: var(--transition);
}

.sidebar-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 24px;
  border-bottom: 1px solid var(--border-light);
}

.sidebar-menu-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Custom scrollbar for sidebar menu */
.sidebar-menu-scroll::-webkit-scrollbar {
  width: 5px;
}
.sidebar-menu-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-menu-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.08);
  border-radius: 3px;
}
.sidebar-menu-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.15);
}

.sidebar-item {
  width: 100%;
}

.submenu-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.submenu-toggle:hover {
  background: rgba(0, 0, 0, 0.02);
  color: var(--text-primary);
}

.menu-icon {
  font-size: 1.1rem;
  line-height: 1;
  display: inline-block;
  width: 20px;
  text-align: center;
}

.menu-text {
  flex: 1;
}

.submenu-arrow {
  width: 14px;
  height: 14px;
  transition: transform 0.25s ease;
  color: var(--text-muted);
}

.sidebar-item.expanded .submenu-arrow {
  transform: rotate(180deg);
}

/* Submenu List styling with dashed lines */
.submenu-list {
  list-style: none;
  padding: 0;
  margin: 0;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 14px;
  border-left: 1px dashed rgba(0, 0, 0, 0.08);
  margin-left: 24px;
}

.sidebar-item.expanded .submenu-list {
  max-height: 500px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.submenu-list li a {
  display: block;
  padding: 8px 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.submenu-list li a:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.02);
}

.submenu-list li a.active {
  color: var(--primary);
  font-weight: 700;
  background: rgba(0, 105, 255, 0.06);
  border: 1px solid rgba(0, 105, 255, 0.15);
  box-shadow: none;
}

.sidebar-group-label {
  padding: 14px 14px 6px;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sidebar-group-label:first-child {
  padding-top: 4px;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-light);
}

/* Standalone sidebar logout link style */
.sidebar-footer .sidebar-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: var(--accent-red);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.sidebar-footer .sidebar-item a:hover {
  background: rgba(239, 68, 68, 0.05);
}

/* Main Content Wrapper */
.app-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

/* Header Navbar */
.app-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  border-bottom: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 80;
}

.header-title-section h1 {
  font-size: 1.35rem;
  font-weight: 800;
}

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

.notifications-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  transition: var(--transition);
}

.notifications-btn:hover {
  background: var(--bg-glass);
  color: var(--text-primary);
}

.notifications-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-red);
  box-shadow: 0 0 8px var(--accent-red);
}

.user-profile-widget {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  font-size: 0.95rem;
  border: 2px solid var(--border-light);
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.2;
}

.user-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Page Inner Layout */
.page-container {
  padding: 28px 24px;
  flex: 1;
  max-width: 1680px;
  width: 100%;
  margin: 0 auto;
}

/* Welcome Block */
.welcome-hero {
  margin-bottom: 32px;
}

.welcome-hero h2 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.welcome-hero p {
  color: var(--text-secondary);
}

/* Quick Stats Widgets Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stats-card {
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stats-icon-box {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.stats-icon-box.blue {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.stats-icon-box.green {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.stats-icon-box.red {
  background: rgba(239, 68, 68, 0.1);
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.stats-icon-box.cyan {
  background: rgba(6, 182, 212, 0.1);
  color: var(--secondary);
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.stats-info-box h3 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}

.stats-num {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.1;
}

/* Dashboard Charts & Logs Layout */
.dashboard-details-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.80fr;
  gap: 32px;
  margin-bottom: 32px;
}

.chart-card {
  padding: 24px;
}

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

.chart-title {
  font-weight: 800;
  font-size: 1.1rem;
}

.chart-canvas-container {
  height: 220px;
  position: relative;
  width: 100%;
}

.chart-svg {
  width: 100%;
  height: 100%;
}

.recent-activity-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
  list-style: none;
}

.activity-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.activity-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.activity-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.activity-dot.green { background: var(--accent-green); box-shadow: 0 0 6px var(--accent-green); }
.activity-dot.blue { background: var(--primary); box-shadow: 0 0 6px var(--primary); }
.activity-dot.yellow { background: var(--accent-yellow); box-shadow: 0 0 6px var(--accent-yellow); }

.activity-content {
  flex: 1;
}

.activity-text {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 500;
}

.activity-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Server Management CSS */
.services-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.service-item-card {
  padding: 24px;
  position: relative;
  cursor: pointer;
}

.service-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.service-title-area h3 {
  font-size: 1.15rem;
  font-weight: 800;
}

.service-ip {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: monospace;
}

.status-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
}

.status-running {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-stopped {
  background: rgba(239, 68, 68, 0.1);
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-booting {
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent-yellow);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.service-item-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.service-item-details span strong {
  display: block;
  color: var(--text-primary);
  font-size: 0.95rem;
  margin-top: 2px;
}

.service-actions-row {
  display: flex;
  gap: 12px;
}

.service-action-btn {
  flex: 1;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

/* Server Control Panel overlay */
.server-panel-overlay {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-top: 32px;
  animation: fadeIn 0.4s ease forwards;
}

.control-widget-card {
  padding: 32px;
}

.control-header-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 20px;
  margin-bottom: 24px;
}

.control-state-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

.pulse-dot.running { background: var(--accent-green); box-shadow: 0 0 10px var(--accent-green); }
.pulse-dot.stopped { background: var(--accent-red); box-shadow: 0 0 10px var(--accent-red); }
.pulse-dot.booting { background: var(--accent-yellow); box-shadow: 0 0 10px var(--accent-yellow); }

.control-buttons-wrapper {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
}

.vm-actions-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.vm-stat-meter-box {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
}

.vm-stat-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 8px;
}

.vm-meter-bar-track {
  height: 6px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.vm-meter-bar-fill {
  height: 100%;
  background: var(--secondary);
  width: 0%;
  transition: width 0.5s ease-out;
}

.vm-meter-bar-fill.purple {
  background: var(--primary);
}

/* Simulated VNC Command Shell Console */
.vnc-console-wrapper {
  background: #020205;
  border: 1px solid #1e293b;
  border-radius: var(--radius-md);
  overflow: hidden;
  font-family: 'Courier New', Courier, monospace;
}

.vnc-header {
  background: #0d0d18;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #1e293b;
}

.vnc-title {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vnc-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
}

.vnc-body {
  padding: 20px;
  height: 260px;
  overflow-y: auto;
  color: #a5f3fc;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vnc-line {
  line-height: 1.4;
  word-break: break-all;
}

.vnc-line.system { color: #94a3b8; }
.vnc-line.command { color: #f8fafc; }
.vnc-line.command::before { content: "root@vps-vm1:~# "; color: var(--accent-green); font-weight: 700; }
.vnc-line.error { color: var(--accent-red); }
.vnc-line.success { color: var(--accent-green); }

.vnc-input-row {
  display: flex;
  align-items: center;
  background: #05050c;
  padding: 10px 20px;
  border-top: 1px solid #1e293b;
}

.vnc-prompt {
  color: var(--accent-green);
  font-weight: 700;
  font-size: 0.9rem;
  margin-right: 8px;
}

.vnc-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
}

/* Billing Screen styling */
.billing-filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.filter-tab {
  background: var(--bg-glass);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}

.filter-tab:hover, .filter-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.billing-table-wrapper {
  overflow-x: auto;
}

.billing-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.billing-table th {
  padding: 16px 20px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-light);
}

.billing-table td {
  padding: 20px;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.95rem;
}

.billing-table tr:hover td {
  background: rgba(0, 0, 0, 0.01);
}

/* Dialog styling (Invoice detail / checkout modal) */
.invoice-dialog {
  margin: auto;
  border: none;
  background: none;
  outline: none;
  padding: 0;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  max-width: 600px;
  width: calc(100% - 40px);
}

.invoice-dialog::backdrop {
  background: rgba(15, 23, 42, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.dialog-content-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  color: var(--text-primary);
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 16px;
  margin-bottom: 24px;
}

.dialog-header h3 {
  font-size: 1.25rem;
  font-weight: 800;
}

.close-dialog-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.25rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border-light);
}

.close-dialog-btn:hover {
  background: var(--bg-glass);
}

.invoice-meta-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.invoice-meta-info div span {
  display: block;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 4px;
}

.invoice-items-breakdown {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}

.invoice-items-breakdown th {
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 8px;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
}

.invoice-items-breakdown td {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
}

.invoice-total-row {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 2px solid var(--border-light);
}

.payment-form-card {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Support Screen styling */
.support-tickets-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.ticket-item-card {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.ticket-info-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ticket-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ticket-id {
  font-weight: 700;
  color: var(--secondary);
  font-family: monospace;
}

.ticket-subject {
  font-weight: 700;
  font-size: 1rem;
}

.ticket-last-updated {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Chat view for support message details */
.ticket-chat-wrapper {
  display: flex;
  flex-direction: column;
  height: 500px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  animation: fadeIn 0.4s ease forwards;
}

.ticket-chat-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
}

.ticket-chat-body {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.chat-message {
  max-width: 70%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chat-message.user {
  align-self: flex-end;
}

.chat-message.agent {
  align-self: flex-start;
}

.chat-bubble {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  line-height: 1.4;
}

.chat-message.user .chat-bubble {
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 2px;
}

.chat-message.agent .chat-bubble {
  background: var(--bg-glass);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  border-bottom-left-radius: 2px;
}

.chat-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.chat-message.user .chat-meta {
  text-align: right;
}

.ticket-chat-input-area {
  padding: 16px 20px;
  background: #f8fafc;
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 12px;
  align-items: center;
}

.ticket-chat-input {
  flex: 1;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text-primary);
  outline: none;
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
}

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

/* Keyframes pulse animation */
@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.5; }
}

/* Mobile Sidebar Overrides */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(5px);
  z-index: 85;
}

.mobile-bar {
  display: none;
  height: var(--header-height);
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

/* Auth Page layout styling */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(0, 105, 255, 0.06) 0%, transparent 50%);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  padding: 40px;
}

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

.auth-header h2 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.auth-header p {
  color: var(--text-secondary);
}

.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  text-align: center;
  padding: 12px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

.auth-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.auth-form-wrapper {
  display: none;
}

.auth-form-wrapper.active {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Responsiveness for dashboard */
@media (max-width: 1024px) {
  .dashboard-details-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .app-sidebar {
    transform: translateX(-100%);
  }
  .app-sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay.open {
    display: block;
  }
  .app-content {
    margin-left: 0;
  }
  .mobile-bar {
    display: flex;
  }
  .app-header {
    display: none; /* Mobile bar replaces it or it adjusts */
  }
  .app-header.mobile-visible {
    display: flex;
    position: static;
    border-bottom: none;
    padding: 16px 24px;
    height: auto;
  }
  .page-container {
    padding: 24px 16px;
  }
  .control-buttons-wrapper {
    flex-wrap: wrap;
  }
  .control-buttons-wrapper .btn {
    flex: 1 1 40%;
  }
}

/* ==========================================
   Enterprise SaaS Platform Overrides (Vercel, Cloudflare, DigitalOcean)
   ========================================== */

/* Flat Left Sidebar */
.app-sidebar .sidebar-menu-scroll .sidebar-item {
  margin-bottom: 2px;
}
.app-sidebar .sidebar-menu-scroll .sidebar-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: var(--transition);
  border: 1px solid transparent;
}
.app-sidebar .sidebar-menu-scroll .sidebar-item a:hover {
  background: rgba(0, 0, 0, 0.02);
  color: var(--text-primary);
}
.app-sidebar .sidebar-menu-scroll .sidebar-item a.active {
  color: #fff;
  font-weight: 700;
  background: var(--primary);
  border: 1px solid var(--primary);
  box-shadow: 0 4px 12px rgba(0, 105, 255, 0.15);
}

/* SPA Panel Switching */
.portal-view {
  display: none;
}
.portal-view.active {
  display: block;
  animation: fadeInPortal 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes fadeInPortal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Secondary Horizontal Sub-Navigation Tab-Bar */
.sub-nav-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 1px;
}
.sub-nav-tabs::-webkit-scrollbar {
  height: 4px;
}
.sub-nav-tab {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}
.sub-nav-tab:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.02);
}
.sub-nav-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Dynamic Panels Inside Tab Views */
.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
}

/* Enterprise Data Tables */
.data-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  margin-bottom: 24px;
}
.data-table-enterprise {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}
.data-table-enterprise th {
  background: #f8fafc;
  padding: 14px 18px;
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}
.data-table-enterprise td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
}
.data-table-enterprise tr:last-child td {
  border-bottom: none;
}
.data-table-enterprise tr:hover td {
  background: rgba(0, 0, 0, 0.01);
}

/* Status Badges */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 20px;
  text-transform: uppercase;
}
.status-pill.success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.status-pill.warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent-yellow);
  border: 1px solid rgba(245, 158, 11, 0.2);
}
.status-pill.danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.status-pill.info {
  background: rgba(0, 105, 255, 0.08);
  color: var(--primary);
  border: 1px solid rgba(0, 105, 255, 0.15);
}

/* Metric Cards Grid */
.enterprise-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}
@media (max-width: 1024px) {
  .enterprise-grid-3 {
    grid-template-columns: 1fr;
  }
}

/* Large SaaS Info Section */
.hero-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 24px;
  line-height: 1.5;
}

/* Simulated CLI Terminal */
.cli-terminal {
  background: #020205;
  border: 1px solid #1e293b;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-family: monospace;
  font-size: 0.85rem;
  color: #10b981;
  max-height: 250px;
  overflow-y: auto;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.8);
}
.cli-line {
  margin-bottom: 6px;
  line-height: 1.4;
}
.cli-line.cmd::before {
  content: "$ ";
  color: var(--secondary);
}
.cli-line.success { color: var(--accent-green); }
.cli-line.error { color: var(--accent-red); }
.cli-line.info { color: var(--text-secondary); }

/* Compact inline action button */
.btn-compact {
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
}

/* Security Score Visualizer */
.security-gauge-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.security-score-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: conic-gradient(var(--accent-green) 85%, rgba(0,0,0,0.06) 0%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
}
.security-score-inner {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--bg-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.security-score-val {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent-green);
}
.security-score-label {
  font-size: 0.65rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-weight: 700;
}

/* ==========================================
   General Component Overrides for Client Panel Light Theme
   ========================================== */

body.client-panel .form-control {
  background: #ffffff;
  border: 1px solid var(--border-light);
  color: var(--text-primary);
}

body.client-panel .form-control:focus {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 105, 255, 0.12);
}

body.client-panel .form-control::placeholder {
  color: var(--text-muted);
}

/* Dropdown / Select elements */
body.client-panel select.form-control {
  background-color: #ffffff !important;
  color: var(--text-primary) !important;
}

body.client-panel select.form-control option {
  background-color: #ffffff !important;
  color: var(--text-primary) !important;
}

/* Overriding inline styling elements */
body.client-panel div[style*="background:rgba(255,255,255,0.05)"],
body.client-panel div[style*="background: rgba(255, 255, 255, 0.05)"] {
  background: rgba(0, 0, 0, 0.06) !important;
}

body.client-panel div[style*="background:rgba(255,255,255,0.02)"],
body.client-panel div[style*="background: rgba(255, 255, 255, 0.02)"],
body.client-panel div[style*="background:rgba(255,255,255,0.01)"],
body.client-panel div[style*="background: rgba(255, 255, 255, 0.01)"] {
  background: rgba(0, 0, 0, 0.02) !important;
}

body.client-panel input[style*="background:rgba(255,255,255,0.01)"],
body.client-panel input[style*="background: rgba(255, 255, 255, 0.01)"] {
  background: rgba(0, 0, 0, 0.02) !important;
}

/* Button overrides */
body.client-panel .btn-secondary {
  background: #ffffff;
  border-color: var(--border-light);
  color: var(--text-primary);
}

body.client-panel .btn-secondary:hover {
  background: #f8fafc;
  border-color: rgba(0, 105, 255, 0.25);
  color: var(--primary);
}

/* Close & notification button hovers */
body.client-panel .close-dialog-btn:hover,
body.client-panel .notifications-btn:hover {
  background: rgba(0, 0, 0, 0.03);
}

/* ==========================================
   Enterprise Service Provider Dashboard (Redesign Upgrade)
   ========================================== */

/* Operation Center */
.operation-center-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.operation-card {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.operation-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
  border-color: rgba(0, 105, 255, 0.15);
}
.operation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.operation-title {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}
.operation-status-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
}
.operation-latency {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: monospace;
}
.status-indicator-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  position: relative;
}
.status-indicator-dot.online {
  background: var(--accent-green);
  box-shadow: 0 0 6px var(--accent-green);
}
.status-indicator-dot.offline {
  background: var(--accent-red);
  box-shadow: 0 0 6px var(--accent-red);
}
.status-indicator-dot.pulse::after {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid inherit;
  opacity: 0;
  animation: dotPulse 2s infinite ease-out;
}
.status-indicator-dot.online.pulse::after {
  border-color: var(--accent-green);
}
@keyframes dotPulse {
  0% { transform: scale(0.6); opacity: 0; }
  50% { opacity: 0.5; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* NOC Status Cards */
.noc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.noc-card {
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.noc-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
.noc-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.noc-progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(0,0,0,0.06);
  border-radius: 2px;
  overflow: hidden;
}
.noc-progress-inner {
  height: 100%;
  border-radius: 2px;
  transition: width 0.8s ease-in-out;
}

/* Financial KPI Grid */
.financial-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.financial-card {
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.financial-num {
  font-size: 1.5rem;
  font-weight: 800;
}
.financial-trend {
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.financial-trend.up { color: var(--accent-green); }
.financial-trend.down { color: var(--accent-red); }

/* Quick Action Center Button */
.btn-enterprise {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
}
.btn-enterprise:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
  border-color: var(--primary);
  color: var(--primary);
}

/* Upgraded Activity Logs */
.activity-log-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}
.activity-log-item:last-child {
  border-bottom: none;
}
.activity-log-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 105, 255, 0.06);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.activity-log-body {
  flex: 1;
  font-size: 0.85rem;
  line-height: 1.4;
}
.activity-log-title {
  font-weight: 700;
  color: var(--text-primary);
}
.activity-log-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
  display: flex;
  gap: 12px;
}
.activity-log-ip {
  font-family: monospace;
}

/* Service Detail Cards for Customer Dashboard */
.customer-service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}
.customer-service-card {
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition);
}
.customer-service-card:hover {
  border-color: var(--primary);
  box-shadow: 0 10px 20px rgba(0,0,0,0.02);
}
.customer-service-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.customer-service-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
}
.customer-service-detail {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.customer-service-footer {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.customer-service-date {
  font-weight: 700;
  color: var(--text-primary);
}

.service-metric-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.service-metric-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.82rem;
}

.service-metric-list span {
  color: var(--text-muted);
  font-weight: 700;
}

.service-metric-list strong {
  color: var(--text-primary);
  font-weight: 800;
  text-align: right;
}

.service-card-action {
  width: 100%;
  margin-top: auto;
}

.customer-action-hub {
  display: grid;
  grid-template-columns: minmax(190px, 280px) 1fr;
  gap: 20px;
  align-items: start;
  padding: 22px 24px;
  margin: 20px 0 24px;
}

.customer-action-hub h3 {
  margin: 0 0 6px;
  color: var(--text-primary);
  font-size: 1.18rem;
  font-weight: 800;
}

.customer-action-hub p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
}

.customer-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.customer-action-grid .btn-enterprise {
  justify-content: center;
  min-height: 42px;
  white-space: normal;
  text-align: center;
}

.service-technical-details {
  border-top: 1px solid var(--border-light);
  padding-top: 10px;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 650;
}

.service-technical-details summary {
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 800;
  list-style: none;
}

.service-technical-details summary::-webkit-details-marker {
  display: none;
}

.service-technical-details summary::after {
  content: "+";
  margin-left: 6px;
  color: var(--primary);
}

.service-technical-details[open] summary::after {
  content: "-";
}

.service-technical-details div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.service-technical-details strong {
  color: var(--text-primary);
}

#widget-traffic .chart-canvas-container {
  height: 280px;
}

.customer-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.account-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.snapshot-card {
  padding: 16px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.snapshot-card span {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.snapshot-card strong {
  color: var(--text-primary);
  font-size: 1.15rem;
  font-weight: 800;
}

.snapshot-card small {
  color: var(--text-secondary);
  font-size: 0.78rem;
}

.dashboard-activity-summary {
  padding: 22px 24px;
  margin-bottom: 24px;
}

.dashboard-activity-summary .chart-title {
  margin-bottom: 14px;
}

.dashboard-activity-summary .activity-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-activity-summary .activity-item {
  align-items: flex-start;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.015);
  padding: 12px;
}

.ustad-insights-card {
  padding: 20px 22px;
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  gap: 20px;
  align-items: start;
  margin-bottom: 24px;
}

.ustad-insights-card h3 {
  color: var(--text-primary);
  font-size: 1.08rem;
  font-weight: 800;
  margin: 0;
}

.ustad-insights-card p {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.45;
}

.ustad-insights-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ustad-insights-list div {
  position: relative;
  padding: 10px 12px 10px 28px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: rgba(0, 105, 255, 0.025);
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.4;
}

.ustad-insights-list div::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 16px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
}

.ustad-ops-intelligence {
  grid-template-columns: minmax(190px, 280px) 1fr;
  margin-top: 6px;
}

.ops-intelligence-list {
  display: grid;
  gap: 10px;
}

.ops-intelligence-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--border-light);
  border-left-width: 3px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  padding: 12px;
}

.ops-intelligence-item.critical {
  border-left-color: var(--accent-red);
}

.ops-intelligence-item.watch {
  border-left-color: var(--accent-yellow);
}

.ops-intelligence-item.info {
  border-left-color: var(--primary);
}

.ops-priority {
  display: block;
  margin-bottom: 3px;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ops-intelligence-item strong {
  color: var(--text-primary);
  font-size: 0.88rem;
  line-height: 1.35;
}

.ops-intelligence-item .btn-enterprise {
  min-height: 34px;
  padding: 7px 11px;
  font-size: 0.75rem;
  white-space: nowrap;
}

.ops-compact-card {
  grid-template-columns: minmax(220px, 320px) 1fr;
}

.ops-compact-list {
  display: grid;
  gap: 8px;
}

.ops-compact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  padding: 10px 12px;
}

.ops-compact-item strong {
  color: var(--text-primary);
  font-size: 0.86rem;
  line-height: 1.35;
}

.admin-quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.admin-quick-actions-grid .btn-enterprise {
  min-height: 42px;
  justify-content: center;
  white-space: normal;
  text-align: center;
}

.system-health-grid {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.system-health-grid .operation-card {
  min-height: 112px;
  padding: 18px;
}

.admin-alert-strip {
  padding: 20px 22px;
  display: grid;
  grid-template-columns: minmax(180px, 250px) 1fr;
  gap: 18px;
  align-items: start;
  margin-bottom: 20px;
}

.admin-alert-strip h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.05rem;
  font-weight: 800;
}

.admin-alert-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.admin-alert-grid div {
  display: flex;
  flex-direction: column;
  gap: 7px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.015);
  padding: 12px;
}

.admin-alert-grid strong {
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 800;
}

.admin-alert-grid small {
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 650;
}

.traffic-metric-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 700;
}

.traffic-metric-row strong {
  color: var(--text-primary);
}

.traffic-widget-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.traffic-range-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: #f8fafc;
}

.traffic-range-tabs button {
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
}

.traffic-range-tabs button.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.traffic-analytics-canvas {
  position: relative;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  overflow: hidden;
  padding: 4px;
}

.traffic-grid-lines line {
  stroke: rgba(15, 23, 42, 0.08);
  stroke-width: 1;
}

.traffic-axis-labels text {
  fill: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
}

.traffic-tooltip {
  position: absolute;
  right: 16%;
  top: 28px;
  z-index: 2;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 7px 9px;
  font-size: 0.74rem;
  font-weight: 800;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}

.status-ribbon-summary {
  display: none;
}

/* ==========================================
   Advanced SaaS Features (Microsoft 365, Cloudflare, Azure style)
   ========================================== */

/* Global Search & Ctrl+K Badge */
.global-search-container {
  position: relative;
  max-width: 380px;
  width: 100%;
}
.global-search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.global-search-input-wrapper input {
  width: 100%;
  padding: 8px 88px 8px 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  font-size: 0.85rem;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
}
.global-search-input-wrapper input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 105, 255, 0.12);
}
.search-icon-inside {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
}
.ctrl-k-badge {
  position: absolute;
  right: 12px;
  background: rgba(0,0,0,0.06);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  font-family: monospace;
  pointer-events: none;
}

.platform-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(16, 185, 129, 0.18);
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.06);
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.platform-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

@media (max-width: 760px) {
  .global-search-container {
    max-width: 220px;
  }
}
.global-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  max-height: 400px;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-top: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  z-index: 100;
  display: none;
}
.global-search-dropdown.open {
  display: block;
  animation: fadeInPortal 0.15s ease-out;
}
.search-category {
  padding: 10px 14px 4px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-light);
  background: rgba(0, 0, 0, 0.01);
}
.search-item {
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: var(--transition);
}
.search-item:hover {
  background: rgba(0, 105, 255, 0.04);
  color: var(--primary);
}
.search-item-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Quick Action Drawer Panel */
.quick-action-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 360px;
  height: 100vh;
  background: var(--bg-card);
  border-left: 1px solid var(--border-light);
  box-shadow: -10px 0 30px rgba(0,0,0,0.05);
  z-index: 99;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 30px 24px;
  display: none;
  flex-direction: column;
}
.quick-action-drawer.open {
  display: flex;
  transform: translateX(0);
}
.quick-action-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 16px;
}
.quick-action-drawer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  overflow-y: auto;
}
.quick-action-drawer-card {
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-glass);
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.quick-action-drawer-card:hover {
  border-color: var(--primary);
  background: rgba(0, 105, 255, 0.03);
  transform: translateY(-2px);
}
.quick-action-drawer-icon {
  font-size: 1.5rem;
}
.quick-action-drawer-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Advanced Tabbed Notification Popup */
.notifications-container {
  position: relative;
  display: inline-block;
}
.notification-dropdown-panel {
  position: absolute;
  top: 100%;
  right: 0;
  width: 320px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-top: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  z-index: 100;
  display: none;
  overflow: hidden;
}
.notification-dropdown-panel.open {
  display: block;
  animation: fadeInPortal 0.15s ease-out;
}
.notification-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-light);
  background: #f8fafc;
  padding: 0 10px;
}
.notification-tab-btn {
  background: none;
  border: none;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 10px 8px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}
.notification-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.notification-tab-content {
  max-height: 280px;
  overflow-y: auto;
  padding: 10px 0;
}
.notification-tab-pane {
  display: none;
  padding: 0 16px;
}
.notification-tab-pane.active {
  display: block;
}

/* Organization Selector */
.org-selector-container {
  position: relative;
  display: inline-block;
  margin-right: 16px;
}
.org-selector-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
}
.org-selector-btn:hover {
  background: rgba(0,0,0,0.02);
  border-color: var(--primary);
}
.org-selector-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 160px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-top: 6px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
  z-index: 100;
  display: none;
}
.org-selector-dropdown.open {
  display: block;
}
.org-item {
  padding: 10px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
}
.org-item:hover {
  background: rgba(0, 105, 255, 0.04);
  color: var(--primary);
}

/* System Status Band Ribbon */
.status-ribbon {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  padding: 8px 16px;
  background: rgba(16, 185, 129, 0.03);
  border: 1px solid rgba(16, 185, 129, 0.1);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  gap: 12px;
}
.status-ribbon-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Audit Timeline View */
.timeline-container {
  position: relative;
  padding-left: 20px;
  border-left: 2px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.timeline-node {
  position: relative;
}
.timeline-node::before {
  content: "";
  position: absolute;
  left: -27px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg-card);
  box-shadow: 0 0 6px rgba(0, 105, 255, 0.2);
}
.timeline-time {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  font-family: monospace;
}
.timeline-desc {
  font-size: 0.82rem;
  color: var(--text-primary);
  margin-top: 2px;
  line-height: 1.4;
}
.timeline-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Ctrl+K Command Palette Modal */
.command-palette-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 120px;
}
.command-palette-overlay.open {
  display: flex;
}
.command-palette-card {
  width: 100%;
  max-width: 550px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: fadeInPortal 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.palette-search-wrapper {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
}
.palette-search-wrapper input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 1rem;
  color: var(--text-primary);
}
.palette-list {
  max-height: 300px;
  overflow-y: auto;
  padding: 8px 0;
}
.palette-item {
  padding: 12px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: var(--transition);
}
.palette-item:hover, .palette-item.selected {
  background: rgba(0, 105, 255, 0.05);
  color: var(--primary);
}
.palette-shortcut {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: monospace;
}

/* Dashboard Widget Personalization Actions */
.draggable-widget {
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.draggable-widget.dragging {
  opacity: 0.4;
  transform: scale(0.98);
  border: 2px dashed var(--primary) !important;
}
.widget-controls {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 10;
}
.glass-card:hover .widget-controls {
  opacity: 1;
}
.widget-control-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.72rem;
  transition: var(--transition);
}
.widget-control-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--bg-glass);
}
.widget-control-btn.pinned {
  color: var(--accent-yellow);
  border-color: var(--accent-yellow);
}

.widget-menu-wrap {
  position: relative;
}

.widget-menu-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: var(--transition);
}

.widget-menu-btn:hover,
.widget-menu-wrap.open .widget-menu-btn {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--bg-glass);
}

.widget-menu-dropdown {
  position: absolute;
  top: 34px;
  right: 0;
  width: 150px;
  padding: 6px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1);
  display: none;
  z-index: 20;
}

.widget-menu-wrap.open .widget-menu-dropdown {
  display: block;
}

.widget-menu-item {
  width: 100%;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.widget-menu-item:hover {
  background: rgba(0, 105, 255, 0.06);
  color: var(--primary);
}

.critical-ops-widget {
  border-color: rgba(0, 105, 255, 0.18) !important;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
}
/* CRM Details layout */
.crm-layout {
  display: grid;
  grid-template-columns: 300px 1fr 300px;
  gap: 24px;
  margin-top: 20px;
}
@media (max-width: 1200px) {
  .crm-layout {
    grid-template-columns: 1fr;
  }
}
.crm-sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
}
.crm-field {
  margin-bottom: 14px;
}
.crm-field-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.crm-field-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* CRM Sub Tabs */
.crm-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 20px;
  overflow-x: auto;
}
.crm-tab-btn {
  background: none;
  border: none;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}
.crm-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(0,0,0,0.02);
}
.crm-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.crm-tab-panel {
  display: none;
}
.crm-tab-panel.active {
  display: block;
}

/* Health Score Circle Gauge */
.health-gauge {
  position: relative;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: conic-gradient(var(--health-color, var(--accent-green)) var(--score, 85%), rgba(0,0,0,0.06) 0%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.health-gauge-inner {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.health-score-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent-green);
}

/* Support Ticket Detail Layout */
.support-detail-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
}
@media (max-width: 992px) {
  .support-detail-layout {
    grid-template-columns: 1fr;
  }
}

/* Universal Entity Viewer Full-Screen Modal Overlay */
.entity-viewer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.entity-viewer-overlay.open {
  display: flex;
}
.entity-viewer-card {
  width: 100%;
  max-width: 1100px;
  height: 80vh;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.entity-viewer-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
}
.entity-viewer-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}
.entity-viewer-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  height: 100%;
}
@media (max-width: 768px) {
  .entity-viewer-grid {
    grid-template-columns: 1fr;
  }
}

/* Premium CRM 3-Column Interface Styles */
.crm-workspace-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-light);
}
.crm-eyebrow {
  display: block;
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.crm-workspace-header h2 {
  font-size: 1.55rem;
  line-height: 1.15;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 6px;
}
.crm-workspace-header p {
  max-width: 760px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.55;
}
.crm-header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.crm-kpi-grid {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}
.crm-container-3col {
  display: grid;
  grid-template-columns: minmax(240px, 280px) minmax(320px, 1fr) minmax(230px, 260px);
  gap: 12px;
  align-items: start;
  margin-top: 20px;
}
.crm-list-panel,
.crm-right-panel {
  position: sticky;
  top: calc(var(--header-height) + 20px);
}
.crm-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.crm-panel-heading h3 {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}
.crm-panel-heading span {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
}
.crm-client-card-list::-webkit-scrollbar,
.crm-tabs::-webkit-scrollbar {
  height: 4px;
  width: 4px;
}
.crm-client-card-list::-webkit-scrollbar-thumb,
.crm-tabs::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.16);
  border-radius: 999px;
}
@media (max-width: 1100px) {
  .crm-container-3col {
    grid-template-columns: 300px minmax(0, 1fr);
  }
  .crm-right-panel {
    position: static;
    grid-column: 1 / -1;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }
}
@media (max-width: 992px) {
  .crm-container-3col {
    grid-template-columns: 1fr;
  }
  .crm-list-panel,
  .crm-right-panel {
    position: static;
  }
  .crm-right-panel {
    display: flex !important;
  }
  .crm-workspace-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .crm-header-actions {
    justify-content: flex-start;
  }
  .crm-kpi-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
}
@media (max-width: 640px) {
  .crm-kpi-grid,
  .crm-right-panel {
    grid-template-columns: 1fr;
  }
}

.crm-filter-btn {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--border-light);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.crm-filter-btn:hover {
  background: rgba(0, 105, 255, 0.06);
  color: var(--primary);
  border-color: rgba(0, 105, 255, 0.2);
}
.crm-filter-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.crm-client-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.crm-client-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: transparent;
  transition: background 0.2s;
}
.crm-client-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 105, 255, 0.06);
  border-color: rgba(0, 105, 255, 0.2);
}
.crm-client-card.active {
  background: rgba(0, 105, 255, 0.03);
  border-color: var(--primary);
  box-shadow: 0 4px 15px rgba(0, 105, 255, 0.05);
}
.crm-client-card.active::before {
  background: var(--primary);
}

/* Status dots */
.status-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.status-pill-dot.active { background-color: var(--accent-green); }
.status-pill-dot.risky { background-color: var(--accent-yellow); }
.status-pill-dot.suspended { background-color: var(--accent-red); }

/* Lifecycle Pipeline */
.lifecycle-stepper {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin: 16px 0;
  padding: 0 8px;
}
.lifecycle-stepper::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  height: 2px;
  background: var(--border-light);
  z-index: 1;
}
.lifecycle-step {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.lifecycle-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-darker);
  border: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 800;
  color: var(--text-muted);
  transition: all 0.3s;
}
.lifecycle-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: color 0.3s;
}
.lifecycle-step.completed .lifecycle-dot {
  background: rgba(16, 185, 129, 0.1);
  border-color: var(--accent-green);
  color: var(--accent-green);
}
.lifecycle-step.completed .lifecycle-label {
  color: var(--accent-green);
}
.lifecycle-step.current .lifecycle-dot {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 0 10px var(--primary-glow);
}
.lifecycle-step.current .lifecycle-label {
  color: var(--primary);
  font-weight: 800;
}
.lifecycle-step.risk .lifecycle-dot {
  background: var(--accent-red);
  border-color: var(--accent-red);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}
.lifecycle-step.risk .lifecycle-label {
  color: var(--accent-red);
  font-weight: 800;
}

/* Health Breakdown Components */
.health-component-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  margin-bottom: 8px;
}
.health-component-label {
  color: var(--text-secondary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.health-component-bar-container {
  width: 120px;
  height: 6px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.health-component-bar {
  height: 100%;
  border-radius: 3px;
}

/* Profitability Widget */
.profit-stat-card {
  background: rgba(0, 0, 0, 0.01);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.profit-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}
.profit-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
}

/* ==========================================
   Responsive Shell Refinements
   ========================================== */

.mobile-actions,
.mobile-search-launcher,
.sidebar-mobile-close {
  display: none;
}

/* Tablet: keep shell recognizable, reduce grids to a maximum of two columns. */
@media (min-width: 768px) and (max-width: 1023px) {
  .floating-glow-orb {
    display: none;
  }

  .app-wrapper {
    display: block;
  }

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

  .app-header {
    display: flex !important;
    padding: 0 20px;
  }

  .app-header .global-search-container,
  .app-header .org-selector-container,
  .app-header #btnQuickActions,
  .app-header .platform-status-badge,
  .app-header .user-info {
    display: none !important;
  }

  .app-header .header-actions {
    gap: 10px;
    flex-shrink: 0;
  }

  .app-sidebar {
    transform: none !important;
  }

  .app-content {
    margin-left: var(--sidebar-width) !important;
    width: calc(100vw - var(--sidebar-width));
    flex: 0 0 calc(100vw - var(--sidebar-width));
    min-width: 0;
  }

  .page-container {
    padding: 24px;
  }

  .customer-service-grid,
  .operation-center-grid,
  .financial-kpi-grid,
  .noc-grid,
  .customer-action-grid,
  .account-summary-grid,
  .admin-quick-actions-grid,
  .admin-alert-grid,
  .customer-snapshot-grid,
  .ustad-insights-list,
  .stats-grid,
  .services-list-grid,
  .vm-actions-panel,
  .crm-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .dashboard-details-grid,
  .customer-action-hub,
  .admin-alert-strip,
  .ustad-ops-intelligence,
  .ops-compact-card,
  #view-admin-dashboard > div[style*="grid-template-columns"],
  #view-dashboard > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
}

/* Mobile: drawer navigation, simplified header, single-column content. */
@media (max-width: 767px) {
  :root {
    --header-height: 64px;
  }

  body.client-panel {
    overflow-x: hidden;
  }

  .floating-glow-orb {
    display: none;
  }

  .mobile-bar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand actions"
      "search search"
      "badge badge";
    row-gap: 10px;
    position: sticky;
    top: 0;
    z-index: 120;
    height: auto;
    min-height: var(--header-height);
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .app-wrapper {
    display: block;
  }

  body.client-panel .mobile-bar .logo {
    grid-area: brand;
    min-width: 0;
    width: min(176px, 100%);
    height: 48px;
  }

  .mobile-actions {
    grid-area: actions;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }

  .mobile-actions .notifications-btn,
  .mobile-avatar {
    width: 36px;
    height: 36px;
  }

  .mobile-actions .notifications-btn {
    border-radius: 50%;
    background: var(--bg-card);
  }

  .mobile-avatar {
    font-size: 0.86rem;
    border-width: 1px;
  }

  .app-header {
    display: none !important;
  }

  .global-search-container,
  .org-selector-container,
  #btnQuickActions,
  .platform-status-badge,
  .header-title-section {
    display: none !important;
  }

  .app-content {
    margin-left: 0 !important;
    width: 100%;
    min-width: 0;
  }

  .app-sidebar {
    width: 85vw;
    max-width: 360px;
    min-width: 280px;
    transform: translateX(-100%);
    z-index: 140;
    box-shadow: 18px 0 40px rgba(15, 23, 42, 0.18);
  }

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

  .sidebar-overlay {
    z-index: 130;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }

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

  .sidebar-header {
    padding: 0 16px;
    justify-content: space-between;
    flex-shrink: 0;
  }

  .sidebar-mobile-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--border-light);
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
  }

  .sidebar-menu-scroll {
    padding: 14px 10px;
    overflow-y: auto;
  }

  .sidebar-footer {
    flex-shrink: 0;
  }

  .page-container {
    padding: 16px;
    max-width: 100%;
  }

  .mobile-search-launcher {
    grid-area: search;
    display: flex;
    width: 100%;
    min-height: 44px;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 0;
    padding: 0 14px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  }

  .mobile-health-badge {
    grid-area: badge;
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(16, 185, 129, 0.18);
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.06);
    padding: 5px 9px;
    color: var(--text-secondary);
    font-size: 0.74rem;
    font-weight: 800;
  }

  .welcome-hero {
    align-items: flex-start !important;
    margin-bottom: 16px !important;
  }

  .welcome-hero h2 {
    font-size: 1.65rem;
    line-height: 1.18;
  }

  .welcome-hero p {
    font-size: 0.98rem;
    line-height: 1.5;
  }

  .welcome-hero > div:last-child {
    width: 100%;
    display: flex !important;
    flex-wrap: wrap;
    gap: 8px !important;
  }

  .welcome-hero > div:last-child > div {
    flex: 1 1 100%;
    padding: 8px 10px;
    border: 1px solid var(--border-light);
    border-radius: 999px;
    background: var(--bg-card);
    white-space: nowrap;
    font-size: 0.78rem;
  }

  .status-ribbon {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 8px;
    gap: 8px;
  }

  .status-ribbon::-webkit-scrollbar {
    display: none;
  }

  .status-ribbon-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    border: 1px solid rgba(16, 185, 129, 0.14);
    border-radius: 999px;
    background: #ffffff;
    color: var(--text-primary);
    padding: 9px 11px;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
  }

  .status-ribbon-item {
    display: none;
    width: 100%;
    border: 1px solid rgba(16, 185, 129, 0.12);
    border-radius: var(--radius-md);
    background: #ffffff;
    padding: 8px 10px;
    font-size: 0.76rem;
  }

  .status-ribbon.open .status-ribbon-item {
    display: flex;
  }

  .customer-service-grid,
  .operation-center-grid,
  .financial-kpi-grid,
  .noc-grid,
  .customer-action-grid,
  .account-summary-grid,
  .admin-quick-actions-grid,
  .admin-alert-grid,
  .customer-snapshot-grid,
  .ustad-insights-list,
  .ops-intelligence-list,
  .stats-grid,
  .services-list-grid,
  .vm-actions-panel,
  .crm-kpi-grid,
  .crm-container-3col,
  .entity-viewer-grid {
    grid-template-columns: 1fr !important;
  }

  .dashboard-details-grid,
  .customer-action-hub,
  .admin-alert-strip,
  .ustad-ops-intelligence,
  .ops-compact-card,
  #view-admin-dashboard > div[style*="grid-template-columns"],
  #view-dashboard > div[style*="grid-template-columns"],
  .support-detail-layout {
    grid-template-columns: 1fr !important;
  }

  .glass-card,
  .chart-card,
  .recent-activity-card,
  .customer-service-card,
  .operation-card,
  .financial-card,
  .noc-card {
    padding: 18px !important;
  }

  .chart-card-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .traffic-widget-actions {
    width: 100%;
    align-items: flex-start;
  }

  .traffic-range-tabs {
    width: 100%;
    overflow-x: auto;
  }

  .traffic-range-tabs button {
    flex: 1;
    min-width: max-content;
  }

  .traffic-metric-row {
    flex-direction: column;
    gap: 4px;
  }

  .chart-title {
    font-size: 1rem;
    line-height: 1.3;
  }

  .chart-canvas-container {
    height: 320px !important;
  }

  #widget-traffic .chart-canvas-container {
    height: 290px !important;
  }

  .customer-action-hub,
  .admin-alert-strip,
  .ustad-ops-intelligence {
    padding: 18px !important;
  }

  .dashboard-activity-summary .activity-list {
    grid-template-columns: 1fr;
  }

  .ops-intelligence-item {
    grid-template-columns: 1fr;
  }

  .ops-intelligence-item .btn-enterprise {
    width: 100%;
    justify-content: center;
  }

  .traffic-tooltip {
    top: 16px;
    right: 12px;
  }

  .ustad-insights-card {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .snapshot-card,
  .ustad-insights-card {
    padding: 18px !important;
  }

  .widget-controls {
    top: 10px;
    right: 10px;
    opacity: 1;
  }

  .widget-menu-dropdown {
    right: 0;
  }

  #widget-quickactions .btn-enterprise,
  #widget-admin-actions .btn-enterprise {
    width: 100%;
    justify-content: flex-start;
    white-space: normal;
    text-align: left;
  }

  .quick-action-drawer {
    width: 100%;
    padding: 22px 18px;
  }

  .quick-action-drawer-grid {
    grid-template-columns: 1fr;
  }

  .notification-dropdown-panel {
    position: fixed;
    top: 164px;
    right: 12px;
    left: 12px;
    width: auto;
  }

  .command-palette-overlay {
    padding: 168px 16px 0;
  }

  .command-palette-card {
    max-width: 100%;
  }

  .data-table-wrapper {
    margin-left: -2px;
    margin-right: -2px;
  }

  .data-table-enterprise {
    min-width: 640px;
  }

  .ticket-item-card,
  .ticket-chat-header,
  .ticket-chat-input-area,
  .customer-service-header,
  .customer-service-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .chat-message {
    max-width: 92%;
  }
}
