/* ==========================================================================
   PiksoBot 2.0 - Ultra-Premium SaaS Admin & Control Panel Design System
   Tailored for Business Owners with Glassmorphism, Modern Gradients & Micro-Animations
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #FF5100;
  --primary-hover: #E64800;
  --primary-light: rgba(255, 81, 0, 0.08);
  --primary-glow: rgba(255, 81, 0, 0.25);
  
  --bg-main: #0B0F19;
  --bg-sidebar: #0F172A;
  --bg-card: #FFFFFF;
  --bg-subtle: #F8FAFC;
  --bg-hover: #F1F5F9;
  
  --text-dark: #0F172A;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --text-white: #FFFFFF;
  
  --border-light: #E2E8F0;
  --border-dark: #1E293B;
  
  --success: #10B981;
  --success-light: #ECFDF5;
  --warning: #F59E0B;
  --warning-light: #FFFBEB;
  --danger: #EF4444;
  --danger-light: #FEF2F2;
  --purple: #8B5CF6;
  --purple-light: #F5F3FF;
  --blue: #2563EB;
  --blue-light: #EFF6FF;

  --shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 10px 30px rgba(255, 81, 0, 0.22);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background: var(--bg-main);
  color: var(--text-dark);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Main App Grid Container
   ========================================================================== */
.dash-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
  background: #F1F5F9;
}

/* ==========================================================================
   Sidebar Navigation (Ultra-Sleek Dark Mode Glass Sidebar)
   ========================================================================== */
.dash-sidebar {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-dark);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
  z-index: 50;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 6px 20px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 18px;
}
.brand-logo {
  height: 38px;
  width: 42px;
  object-fit: contain;
  border-radius: 9px;
  background: rgba(255,255,255,0.08);
  filter: drop-shadow(0 4px 10px rgba(255, 81, 0, 0.3));
}
.brand-texts h2 {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: -0.02em;
  margin: 0;
}
.brand-texts h2 span {
  color: var(--primary);
  font-weight: 800;
}
.brand-texts p {
  font-size: 11px;
  color: #38BDF8;
  font-weight: 700;
  margin-top: 2px;
  letter-spacing: 0.02em;
}

/* User Operator Profile Card in Sidebar */
.sidebar-user-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}
.sidebar-user-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 81, 0, 0.4);
}
.user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
  background: #FFFFFF;
  box-shadow: 0 4px 12px rgba(255, 81, 0, 0.25);
}
.user-info h4 {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-white);
  margin: 0 0 2px 0;
}
.status-pill.online {
  font-size: 11px;
  color: #34D399;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Navigation Links */
.dash-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.nav-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-light);
  border: none;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
}
.nav-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-white);
  transform: translateX(3px);
}
.nav-btn.active {
  background: linear-gradient(135deg, rgba(255, 81, 0, 0.9) 0%, rgba(230, 72, 0, 0.95) 100%);
  color: var(--text-white);
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(255, 81, 0, 0.35);
}
.nav-badge {
  font-size: 11px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-white);
  padding: 3px 8px;
  border-radius: var(--radius-full);
}
.nav-btn.active .nav-badge {
  background: #FFFFFF;
  color: var(--primary);
}

.sidebar-footer {
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.btn-back-home, .btn-logout-link {
  display: block;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}
.btn-back-home {
  background: rgba(255, 255, 255, 0.05);
  color: #94A3B8;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.btn-back-home:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-white);
}
.btn-logout-link {
  color: #F87171;
  background: rgba(239, 68, 68, 0.08);
}
.btn-logout-link:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #FFFFFF;
}

/* ==========================================================================
   Main Content Area & Top Header
   ========================================================================== */
.dash-main {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
  background: #F8FAFC;
}

.dash-header {
  background: #FFFFFF;
  border-bottom: 1px solid var(--border-light);
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.03);
}
.header-title-box h1 {
  font-size: 21px;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.02em;
  margin: 0;
}
.header-title-box p {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFFFFF;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-dark);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}
.action-btn:hover {
  border-color: var(--text-dark);
  background: var(--bg-subtle);
  transform: translateY(-1px);
}
.action-btn.preview-btn {
  background: linear-gradient(135deg, #FF5100 0%, #E64800 100%);
  color: var(--text-white);
  border: none;
  box-shadow: 0 4px 14px rgba(255, 81, 0, 0.25);
}
.action-btn.preview-btn:hover {
  background: #E64800;
  box-shadow: 0 6px 18px rgba(255, 81, 0, 0.35);
}
.header-user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
}
.header-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--primary);
}
.header-user-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-dark);
}

/* ==========================================================================
   Page Container & Cards
   ========================================================================== */
.dash-view-page {
  padding: 24px 28px;
  flex: 1;
}

.view-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  box-shadow: var(--shadow-sm);
}
.view-card-header {
  margin-bottom: 22px;
}
.view-card-header h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-dark);
  margin: 0 0 4px 0;
}
.view-card-header p {
  font-size: 13px;
  color: var(--text-muted);
}

/* Form Styles */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group {
  margin-bottom: 16px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.settings-grid .form-group label {
  display: block;
  margin-bottom: 7px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.btn-save-settings {
  border: 0;
  border-radius: 11px;
  background: #FF5100;
  color: #FFFFFF;
  padding: 12px 17px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}

.btn-save-settings:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(255, 81, 0, .22);
}

@media (max-width: 760px) {
  .settings-grid { grid-template-columns: 1fr; }
  .settings-grid .form-group { grid-column: auto !important; }
}
.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
}
.custom-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  background: #FFFFFF;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text-dark);
  transition: all 0.2s ease;
}
textarea.custom-input {
  height: auto;
  padding: 12px 14px;
  resize: vertical;
}
.custom-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.btn-save-op {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: var(--text-white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-glow);
}
.btn-save-op:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(255, 81, 0, 0.35);
}

/* Switch UI Toggle */
.switch-ui {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}
.switch-ui input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider-ui {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #CBD5E1;
  transition: .25s;
  border-radius: 34px;
}
.slider-ui:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .25s;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
input:checked + .slider-ui {
  background-color: var(--primary);
}
input:checked + .slider-ui:before {
  transform: translateX(22px);
}

/* ==========================================================================
   Live Chat 3-Column Interface
   ========================================================================== */
.chat-interface-grid {
  display: grid;
  grid-template-columns: 310px 1fr 280px;
  gap: 20px;
  height: calc(100vh - 120px);
}

/* Column 1: Threads List */
.threads-column {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.threads-search-box {
  padding: 14px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--bg-subtle);
}
.threads-search-box input {
  flex: 1;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  background: #FFFFFF;
  outline: none;
}
.threads-search-box input:focus {
  border-color: var(--primary);
}
.btn-clear-chats {
  height: 38px;
  padding: 0 10px;
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.btn-clear-chats:hover {
  background: #FEF2F2;
  color: var(--danger);
  border-color: #FECACA;
}

.threads-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}
.thread-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 6px;
  cursor: pointer;
  transition: all 0.18s ease;
  position: relative;
  background: transparent;
}
.thread-item:hover {
  background: var(--bg-subtle);
}
.thread-item.active {
  background: #FFF7ED;
  border: 1px solid #FFEDD5;
  box-shadow: 0 4px 12px rgba(255, 81, 0, 0.08);
}
.thread-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF5100 0%, #FF8A00 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  font-weight: 800;
  flex-shrink: 0;
}
.thread-details {
  flex: 1;
  min-width: 0;
}
.thread-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}
.thread-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.thread-time {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}
.thread-preview {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.btn-delete-thread-icon {
  background: none;
  border: none;
  color: #94A3B8;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  opacity: 0;
  transition: all 0.15s;
}
.thread-item:hover .btn-delete-thread-icon {
  opacity: 1;
}
.btn-delete-thread-icon:hover {
  color: var(--danger);
}

/* Column 2: Active Conversation */
.conversation-column {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.conversation-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FFFFFF;
}
.visitor-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.visitor-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
}
.visitor-header-info h4 {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-dark);
  margin: 0 0 2px 0;
}
.visitor-header-info p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}
.chat-actions {
  display: flex;
  gap: 8px;
}

.operator-status-banner {
  background: var(--success-light);
  border-bottom: 1px solid #A7F3D0;
  padding: 8px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #065F46;
}
.pulse-dot-green {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
  animation: pulse-green 2s infinite;
}
@keyframes pulse-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.chat-feed {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #F8FAFC;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.feed-msg {
  max-width: 72%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.5;
  position: relative;
  word-break: break-word;
}
.feed-msg.visitor {
  background: #FFFFFF;
  color: var(--text-dark);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  border: 1px solid #E2E8F0;
  box-shadow: var(--shadow-sm);
}
.feed-msg.agent {
  background: linear-gradient(135deg, #FF5100 0%, #E64800 100%);
  color: var(--text-white);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 14px rgba(255, 81, 0, 0.25);
}
.feed-system-notice {
  width: 100%;
  text-align: center;
  background: #EFF6FF;
  border: 1px dashed #93C5FD;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 12px;
  color: #1E40AF;
  font-weight: 700;
  margin: 6px 0;
}

/* Copilot Suggestion Bar */
.copilot-bar {
  padding: 8px 18px;
  background: #FFFFFF;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 10px;
}
.copilot-tag {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
}
.suggestion-chip {
  background: #FFF7ED;
  border: 1px solid #FFEDD5;
  color: #9A3412;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}
.suggestion-chip:hover {
  background: #FFEDD5;
  transform: translateY(-1px);
}

/* Single Operator Lock Banner */
.operator-occupied-banner {
  background: #FFFBEB;
  border: 1.5px solid #FCD34D;
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 12px 18px;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.08);
}
.occupied-icon {
  font-size: 26px;
  width: 44px;
  height: 44px;
  background: #FEF3C7;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.occupied-text h4 {
  font-size: 13.5px;
  font-weight: 800;
  color: #92400E;
  margin: 0 0 2px 0;
}
.occupied-text p {
  font-size: 11.5px;
  color: #B45309;
  margin: 0;
}

/* Join Prompt Card */
.join-chat-prompt-card {
  padding: 24px;
  background: #FFFFFF;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.join-card-content {
  display: flex;
  align-items: center;
  gap: 12px;
}
.join-card-icon {
  font-size: 24px;
}
.join-card-texts h4 {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-dark);
  margin: 0 0 2px 0;
}
.join-card-texts p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}
.btn-big-join-chat {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: var(--text-white);
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 22px;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-big-join-chat:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4);
}

/* Reply Box */
.chat-reply-box {
  background: #FFFFFF;
  border-top: 1px solid var(--border-light);
  padding: 16px 20px;
}
.reply-header-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  margin-bottom: 8px;
}
.replying-as-label {
  color: var(--text-muted);
}
.chat-reply-box textarea {
  width: 100%;
  height: 64px;
  padding: 10px 14px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  resize: none;
  outline: none;
  transition: border-color 0.2s;
}
.chat-reply-box textarea:focus {
  border-color: var(--primary);
}
.reply-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}
.reply-tools {
  display: flex;
  gap: 6px;
}
.tool-btn {
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-dark);
  cursor: pointer;
  transition: all 0.15s;
}
.tool-btn:hover {
  background: #E2E8F0;
}
.btn-send {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: var(--text-white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-glow);
  transition: all 0.2s;
}
.btn-send:hover {
  transform: translateY(-1px);
}

/* Column 3: Visitor & Business Details */
.visitor-details-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  overflow-y: auto;
  box-shadow: var(--shadow-sm);
}
.visitor-details-panel h3 {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}
.detail-section {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #F1F5F9;
}
.detail-section label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.detail-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
}

/* ==========================================================================
   Subscription Pricing Cards Grid
   ========================================================================== */
.plans-page-container {
  max-width: 1200px;
  margin: 0 auto;
}
.plans-header-box {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}
.billing-cycle-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 6px 18px;
  box-shadow: var(--shadow-sm);
}
.cycle-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}
.cycle-label.active {
  color: var(--text-dark);
}
.discount-pill {
  background: #ECFDF5;
  color: #059669;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 800;
}

.plans-pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 16px;
}
.plan-pricing-card {
  background: #FFFFFF;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
}
.plan-pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #CBD5E1;
}
.plan-pricing-card.featured {
  border-color: var(--primary);
  background: linear-gradient(180deg, #FFF9F5 0%, #FFFFFF 100%);
  box-shadow: 0 12px 36px rgba(255, 81, 0, 0.14);
}
.plan-pricing-card.active-current-plan {
  border-color: var(--success);
  box-shadow: 0 12px 36px rgba(16, 185, 129, 0.14);
}
.featured-ribbon {
  position: absolute;
  top: -11px;
  right: 14px;
  background: var(--primary);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  letter-spacing: 0.05em;
}
.current-plan-badge {
  position: absolute;
  top: -11px;
  left: 14px;
  background: var(--success);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}
.plan-name-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 8px;
}
.plan-price-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 4px;
}
.plan-price-amount {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-dark);
}
.plan-price-period {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}
.yearly-billed-info {
  font-size: 10.5px;
  color: var(--success);
  font-weight: 700;
  margin-bottom: 6px;
}
.plan-quota-brief {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}
.plan-features-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  margin-bottom: 20px;
}
.plan-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dark);
  font-weight: 600;
}
.check-icon {
  color: var(--success);
  font-weight: 800;
}
.btn-plan-action {
  width: 100%;
  height: 40px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1.5px solid var(--border-light);
  background: var(--bg-subtle);
  color: var(--text-dark);
}
.btn-plan-action:hover {
  background: var(--text-dark);
  color: #FFFFFF;
}
.plan-pricing-card.featured .btn-plan-action {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}
.btn-plan-action.current-active {
  background: #ECFDF5;
  color: #059669;
  border-color: #A7F3D0;
  cursor: default;
}

/* ==========================================================================
   Operator Quota & Team Cards Grid
   ========================================================================== */
.operator-quota-summary-banner {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #FFFFFF;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
}
.quota-summary-text h3 {
  font-size: 17px;
  font-weight: 800;
  margin: 0 0 4px 0;
}
.quota-summary-text p {
  font-size: 13px;
  color: #94A3B8;
  margin: 0;
}
.quota-summary-text strong {
  color: #38BDF8;
}
.quota-badge-pill {
  background: rgba(255, 255, 255, 0.1);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 800;
}

.op-plan-locked-box {
  background: #FFFBEB;
  border: 1.5px solid #FCD34D;
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.locked-icon {
  font-size: 32px;
}
.locked-texts h4 {
  font-size: 15px;
  font-weight: 800;
  color: #92400E;
  margin: 0 0 2px 0;
}
.locked-texts p {
  font-size: 12.5px;
  color: #B45309;
  margin: 0;
}
.btn-upgrade-plan-now {
  margin-left: auto;
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 12.5px;
  cursor: pointer;
  white-space: nowrap;
}

.team-operators-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 14px;
}
.operator-item-card {
  background: #FFFFFF;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.operator-item-card.owner-card {
  border-color: #FFD8A8;
  background: #FFF9F5;
}
.op-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.op-avatar-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
}
.op-card-header h5 {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text-dark);
  margin: 0 0 2px 0;
}
.op-role-pill {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
}
.op-details-row {
  font-size: 12px;
  color: var(--text-dark);
  margin-bottom: 12px;
  line-height: 1.6;
}
.op-link-box {
  background: #0F172A;
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.op-link-url {
  font-size: 11px;
  font-family: monospace;
  color: #38BDF8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.btn-copy-op-link {
  background: #1E293B;
  color: #FFFFFF;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.op-card-actions {
  display: flex;
  gap: 8px;
}
.btn-test-login {
  flex: 1;
  height: 36px;
  background: var(--primary);
  color: #FFFFFF;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.btn-delete-op {
  height: 36px;
  padding: 0 14px;
  background: #FEF2F2;
  color: var(--danger);
  border: 1px solid #FECACA;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

/* ==========================================================================
   Transfer Modal Styles
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.transfer-modal-card {
  width: 100%;
  max-width: 480px;
  background: #FFFFFF;
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-close-btn {
  background: none;
  border: none;
  font-size: 18px;
  font-weight: 800;
  color: #94A3B8;
  cursor: pointer;
}
.transfer-operator-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--border-light);
  border-radius: 12px;
  background: #F8FAFC;
  margin-bottom: 10px;
  transition: all 0.15s;
}
.transfer-operator-item:hover {
  border-color: var(--blue);
  background: var(--blue-light);
}
.transfer-op-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.transfer-op-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--primary);
  background: #FFFFFF;
}
.transfer-op-details h5 {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-dark);
  margin: 0 0 2px 0;
}
.transfer-op-details span {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}
.btn-select-transfer {
  background: var(--blue);
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.btn-select-transfer:hover {
  background: #1D4ED8;
}
.btn-cancel {
  width: 100%;
  height: 40px;
  background: #F1F5F9;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
  cursor: pointer;
}
