/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Brand Color Palette (Right Away / Failsafe) */
  --brand-blue: #1EADEF;
  --global-scale: 1;
  --brand-blue-strong: #0077B8;
  --accent-orange: #F1511B;
  --charcoal: #333333;

  /* Primary UI palette (mapped to existing tokens) */
  --primary-color: var(--brand-blue);
  --primary-dark: var(--brand-blue-strong);
  --primary-light: #F0FAFF;
  --secondary-color: var(--brand-blue-strong);
  --accent-color: var(--accent-orange);
  
  /* Semantic Colors */
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --info-color: #3b82f6;
  
  /* Neutrals */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: var(--charcoal);
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  
  /* Transitions */
  --transition-base: all 0.2s ease;
  --transition-slow: all 0.3s ease;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #F5F7FA;
  min-height: 100vh;
  color: var(--gray-900);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transform: scale(var(--global-scale));
  transform-origin: top center;
}

/* Screen Management */
.screen {
  display: none;
}

.screen.active {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

/* Login Screen */
.login-container {
  max-width: 440px;
  margin: 80px auto;
  background: white;
  padding: 48px;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-2xl);
  backdrop-filter: blur(10px);
}

.login-container h1 {
  text-align: center;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.login-container h2 {
  text-align: center;
  color: var(--gray-600);
  margin-bottom: 32px;
  font-size: 18px;
  font-weight: 500;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--gray-700);
  font-weight: 600;
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  font-size: 15px;
  transition: var(--transition-base);
  background: var(--gray-50);
}

.form-group input:focus,
.form-group select:focus,
.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  background: white;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.error {
  color: var(--danger-color);
  margin-top: 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
}

.register-link {
  text-align: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-200);
}

.register-link a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition-base);
}

.register-link a:hover {
  color: var(--primary-dark);
}

/* Modern Button Styles */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-base);
  letter-spacing: 0.025em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--gray-600);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--gray-700);
  box-shadow: var(--shadow-lg);
}

.btn-danger {
  background: var(--danger-color);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-danger:hover:not(:disabled) {
  background: #dc2626;
  box-shadow: var(--shadow-lg);
}

.btn-control {
  background: var(--info-color);
  color: white;
  margin: 5px;
}

.btn-control:hover:not(:disabled) {
  background: #2563eb;
}

.btn-control.active {
  background: var(--warning-color);
}

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

.btn-large {
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 700;
}

/* Dashboard Header */
.header {
  background: white;
  padding: 24px 32px;
  box-shadow: var(--shadow-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--gray-100);
  gap: 16px;
}

.header.analytics-header {
  flex-direction: column;
  align-items: stretch;
}

.analytics-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header h1 {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

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

.header-logo {
  height: 26px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 24px;
  flex: 1 1 auto;
  flex-wrap: wrap;
  min-width: 0;
}

.main-nav a {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-600);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  transition: var(--transition-base);
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

.header-user {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.status-control {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-control label {
  font-weight: 600;
  color: var(--gray-700);
  font-size: 13px;
}

.status-control select {
  padding: 6px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  font-size: 13px;
  font-weight: 500;
  background: white;
  cursor: pointer;
  transition: var(--transition-base);
}

.status-control select:hover {
  border-color: var(--primary-color);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 16px;
  border-left: 1px solid var(--gray-200);
}

.user-info span {
  font-weight: 600;
  color: var(--gray-900);
  font-size: 14px;
}

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

/* Dashboard Container */
.dashboard-container {
  max-width: 1800px;
  margin: 24px auto;
  padding: 0 24px 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  grid-template-areas:
    "controls active queue agent-status";
}

/* Panel Grid Areas */
.call-controls-panel {
  grid-area: controls;
}

.queue-calls-panel {
  grid-area: queue;
}

.outbound-call-panel {
  grid-area: outbound;
}

.active-call-panel {
  grid-area: active;
}

.my-calls-panel {
  grid-area: calls;
}

.stats-panel {
  grid-area: stats;
}

.agent-status-panel {
  grid-area: agent-status;
}

/* Agent Status Monitor */
.status-count-badges {
  display: flex;
  gap: 8px;
  font-size: 12px;
  margin-left: 12px;
}

.status-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.status-badge.status-available {
  background: #d1fae5;
  color: #065f46;
}

.status-badge.status-active {
  background: #dbeafe;
  color: #1e40af;
}

.status-badge.status-break {
  background: #fef3c7;
  color: #92400e;
}

.agent-status-list {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.agent-status-item {
  background: linear-gradient(135deg, var(--gray-50) 0%, white 100%);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
  border-left: 4px solid var(--gray-400);
  transition: var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.agent-status-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(2px);
}

.agent-status-item.status-available {
  border-left-color: var(--success-color);
}

.agent-status-item.status-active {
  border-left-color: var(--info-color);
}

.agent-status-item.status-break,
.agent-status-item.status-meal {
  border-left-color: var(--warning-color);
}

.agent-status-item.status-offline {
  border-left-color: var(--danger-color);
  opacity: 0.7;
}

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

.agent-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--gray-900);
}

.agent-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 600;
  background: var(--gray-200);
  color: var(--gray-700);
}

.agent-status-badge.available {
  background: #d1fae5;
  color: #065f46;
}

.agent-status-badge.active {
  background: #dbeafe;
  color: #1e40af;
}

.agent-status-badge.break,
.agent-status-badge.meal {
  background: #fef3c7;
  color: #92400e;
}

.agent-status-badge.offline {
  background: #fee2e2;
  color: #991b1b;
}

.agent-status-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--gray-600);
}

.agent-timer {
  font-family: 'Courier New', monospace;
  font-weight: 700;
  color: var(--gray-900);
}

.call-direction-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  margin-left: 6px;
}

.call-direction-badge.inbound {
  background: #dbeafe;
  color: #1e40af;
}

.call-direction-badge.outbound {
  background: #fce7f3;
  color: #831843;
}

/* Modern Panel Design */
.panel {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-100);
  transition: var(--transition-slow);
  animation: slideIn 0.4s ease-out;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.panel:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.panel h2 {
  color: var(--gray-900);
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gray-100);
  flex-shrink: 0;
}

.panel h3 {
  color: var(--gray-700);
  margin-top: 16px;
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 600;
}

/* Status Indicator */
.status-indicator {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  font-weight: 600;
  font-size: 14px;
  border: 2px solid transparent;
  transition: var(--transition-base);
}

.status-indicator.online,
.status-indicator.available {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #065f46;
  border-color: #6ee7b7;
}

.status-indicator.offline {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #991b1b;
  border-color: #fca5a5;
}

.status-indicator.on-break,
.status-indicator.on-meal {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  border-color: #fcd34d;
}

.status-indicator.in-training,
.status-indicator.in-meeting {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e40af;
  border-color: #93c5fd;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@media (min-width: 1200px) {
  :root {
    --global-scale: 0.8;
  }
}

/* Call Controls */
.control-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.control-buttons .btn {
  flex: 1;
  min-width: 120px;
  padding: 10px 16px;
  font-size: 14px;
}

/* Outbound Call Styling */
.outbound-call {
  margin-top: 0;
  padding-top: 0;
}

.outbound-call .form-control {
  font-size: 15px;
  padding: 12px 16px;
  font-weight: 500;
}

.outbound-call .outbound-number-input {
  font-size: 16px;
  padding: 14px 18px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Call Info */
.call-info {
  text-align: center;
  padding: 32px 20px;
  color: var(--gray-400);
  font-size: 14px;
}

.call-details {
  background: linear-gradient(135deg, var(--gray-50) 0%, white 100%);
  padding: 16px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  border: 1px solid var(--gray-200);
}

.call-details p {
  margin: 6px 0;
  font-size: 14px;
  color: var(--gray-700);
}

.call-details strong {
  color: var(--gray-900);
  font-weight: 600;
}
 
/* Live Transcript (Active Call Panel) */
.live-transcript-content {
  margin-top: 6px;
  max-height: 160px;
  overflow-y: auto;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  font-size: 13px;
}

.live-transcript-line {
  margin-bottom: 4px;
}

.live-transcript-speaker {
  font-weight: 600;
  margin-right: 4px;
}

.live-transcript-speaker-customer {
  color: #1e40af;
}

.live-transcript-speaker-agent {
  color: #047857;
}

.live-transcript-speaker-system {
  color: var(--gray-500);
  font-style: italic;
}

/* Queue */
.queue-calls-list {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.queue-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--gray-50) 0%, white 100%);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--primary-color);
  transition: var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.queue-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
  border-left-color: var(--secondary-color);
}

.queue-item-info {
  flex: 1;
}

.queue-item-info strong {
  display: block;
  color: var(--gray-900);
  font-weight: 600;
  margin-bottom: 6px;
}

.queue-item-info div {
  font-size: 13px;
  color: var(--gray-600);
  margin-top: 4px;
}

.no-calls {
  text-align: center;
  padding: 48px 24px;
  color: var(--gray-400);
  font-style: italic;
  font-size: 15px;
}

/* Calls List */
.calls-list {
  max-height: 360px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.call-item {
  padding: 18px;
  margin-bottom: 12px;
  background: white;
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--info-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
}

.call-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.call-item.completed {
  border-left-color: var(--success-color);
}

.call-item.failed {
  border-left-color: var(--danger-color);
}

.call-item.on-hold {
  border-left-color: var(--warning-color);
}

.call-item-info strong {
  display: block;
  color: var(--gray-900);
  font-weight: 600;
  margin-bottom: 6px;
}

.call-item-info div {
  font-size: 13px;
  color: var(--gray-600);
  margin-top: 4px;
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.stat-item {
  text-align: center;
  padding: 16px;
  background: linear-gradient(135deg, var(--gray-50) 0%, white 100%);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  transition: var(--transition-base);
}

.stat-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 12px;
  color: var(--gray-600);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Admin Panel */
.admin-panel {
  max-width: 1600px;
  margin: 32px auto;
  padding: 0 32px;
}

.admin-panel h2 {
  color: white;
  margin-bottom: 24px;
  font-size: 28px;
  font-weight: 800;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  background: white;
  padding: 8px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow-x: auto;
}

.admin-tab {
  flex: 1;
  min-width: 120px;
  padding: 12px 20px;
  background: transparent;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  transition: var(--transition-base);
  white-space: nowrap;
}

.admin-tab:hover {
  background: var(--gray-100);
  color: var(--primary-color);
}

.admin-tab.active {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  box-shadow: var(--shadow-md);
}

.admin-tab-content {
  display: none;
}

.admin-tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

.admin-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
}

.admin-section {
  background: white;
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-100);
}

.admin-section h3 {
  color: var(--gray-900);
  margin-bottom: 24px;
  font-size: 18px;
  font-weight: 700;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--gray-100);
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease-out;
}

.modal-content {
  background: white;
  border-radius: var(--radius-2xl);
  padding: 36px;
  max-width: 700px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-2xl);
  position: relative;
  animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-large {
  max-width: 1000px;
}

.modal-content h3 {
  color: var(--gray-900);
  margin-bottom: 24px;
  font-size: 24px;
  font-weight: 700;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--gray-100);
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 28px;
  color: var(--gray-400);
  cursor: pointer;
  line-height: 1;
  transition: var(--transition-base);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
}

.close-modal:hover {
  background: var(--gray-100);
  color: var(--danger-color);
}

/* Personal Conversion Widget */
.conversion-widget {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease-out;
}

.conversion-widget h3 {
  color: white !important;
  margin: 0 0 12px 0 !important;
  text-align: center;
  font-size: 14px !important;
  font-weight: 700 !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.conversion-display {
  background: rgba(255, 255, 255, 0.98);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.conversion-percentage {
  font-size: 42px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 12px;
  transition: var(--transition-slow);
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.conversion-percentage.rate-high {
  background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.conversion-percentage.rate-medium {
  background: linear-gradient(135deg, var(--warning-color) 0%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.conversion-percentage.rate-low {
  background: linear-gradient(135deg, var(--danger-color) 0%, #dc2626 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.conversion-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 2px solid var(--gray-200);
}

.conversion-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

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

.conversion-stat .stat-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--gray-900);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--gray-300);
  transition: 0.3s;
  border-radius: 26px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

input:checked + .slider {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

input:checked + .slider:before {
  transform: translateX(24px);
}

/* Responsive Design */
@media (max-width: 1400px) {
  .dashboard-container {
    grid-template-columns: repeat(2, 1fr);
    grid-template-areas:
      "controls active"
      "queue outbound"
      "calls stats";
  }
}

@media (max-width: 1024px) {
  .dashboard-container {
    grid-template-columns: 1fr;
    grid-template-areas:
      "controls"
      "queue"
      "outbound"
      "active"
      "calls"
      "stats";
    padding: 0 20px 20px;
  }
  
  .admin-controls {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 14px;
  }

  .login-container {
    margin: 40px 20px;
    padding: 32px;
  }

  .header {
    flex-direction: column;
    padding: 20px;
    gap: 16px;
  }

  .header h1 {
    font-size: 24px;
  }

  .header-left {
    width: 100%;
    justify-content: flex-start;
  }

  .main-nav {
    flex-wrap: wrap;
    justify-content: flex-start;
    margin: 4px 0 0;
  }

  .header-controls {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }

  .user-info {
    padding-left: 0;
    border-left: none;
    padding-top: 12px;
    border-top: 2px solid var(--gray-200);
    width: 100%;
    justify-content: space-between;
  }

  .dashboard-container {
    margin: 20px auto;
    grid-template-columns: 1fr;
  }

  .control-buttons {
    flex-direction: column;
  }

  .control-buttons .btn {
    width: 100%;
  }

  .panel {
    padding: 20px;
  }

  .admin-tabs {
    flex-wrap: wrap;
  }

  .modal-content {
    padding: 24px;
    margin: 20px;
  }
}

/* Additional legacy styles for compatibility */
.checkbox-group {
  max-height: 300px;
  overflow-y: auto;
  padding: 12px;
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  margin-top: 12px;
}

.checkbox-group label {
  display: block;
  padding: 12px;
  margin-bottom: 8px;
  background: white;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-base);
  border: 2px solid transparent;
  font-size: 14px;
}

.checkbox-group label:hover {
  border-color: var(--primary-color);
  transform: translateX(4px);
}

.checkbox-group input[type="checkbox"] {
  margin-right: 10px;
  cursor: pointer;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.form-actions .btn {
  flex: 1;
}

.help-text {
  font-size: 13px;
  color: var(--gray-500);
  margin-top: 8px;
  line-height: 1.5;
  font-style: italic;
}

/* User forwarding section */
.user-forwarding-section {
  margin-top: 16px;
  padding: 16px;
  background: linear-gradient(135deg, var(--gray-50) 0%, white 100%);
  border-radius: var(--radius-md);
  border: 2px solid var(--gray-200);
}

/* Recording, Analytics, and other legacy compatibility styles */
.recordings-filters,
.analytics-filters,
.filter-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.recording-item,
.graded-call-item,
.call-detail,
.agent-card,
.queue-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 15px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
}

.recording-item:hover,
.graded-call-item:hover,
.agent-card:hover,
.queue-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* KPI cards */
.analytics-kpis,
.kpi-card {
  animation: slideIn 0.4s ease-out;
}

.kpi-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--primary-color);
  transition: var(--transition-base);
}

.kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.kpi-card.positive {
  border-left-color: var(--success-color);
}

.kpi-card.negative {
  border-left-color: var(--danger-color);
}

.kpi-card.neutral {
  border-left-color: var(--gray-400);
}

.kpi-card h4 {
  color: var(--gray-600);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.kpi-value {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 8px;
}

.kpi-card.positive .kpi-value {
  color: var(--success-color);
}

.kpi-card.negative .kpi-value {
  color: var(--danger-color);
}

.kpi-card.neutral .kpi-value {
  color: var(--gray-400);
}

/* Analytics toolbar under header nav */
.analytics-header-actions {
  max-width: 1200px;
  margin: 12px auto 0;
  padding: 8px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.analytics-actions-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.analytics-tools-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
}

.analytics-tools-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.analytics-header-user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.analytics-header-user span {
  font-size: 13px;
}

@media (max-width: 768px) {
  .analytics-header-user {
    margin-left: 0;
  }
}

.kpi-label {
  font-size: 13px;
  color: var(--gray-600);
  font-weight: 500;
}

/* Badge styles */
.outcome-badge,
.intent-badge,
.score-badge,
.count-badge,
.forwarding-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
}

.outcome-badge.opportunity_booked,
.positive-bg {
  background: #d1fae5;
  color: #065f46;
}

.outcome-badge.opportunity_not_booked,
.negative-bg,
.negative-call-bg {
  background: #fee2e2;
  color: #991b1b;
  border-left: 4px solid var(--danger-color) !important;
}

.outcome-badge.neutral,
.neutral-bg,
.neutral-call-bg {
  background: #fef3c7;
  color: #92400e;
  border-left: 4px solid var(--warning-color) !important;
}

.positive-call-bg {
  background: #e8f5e9 !important;
  border-left: 4px solid var(--success-color) !important;
}

.count-badge {
  background: var(--primary-color);
  color: white;
}

/* Loading and no-data states */
.loading,
.no-data,
.no-recording {
  text-align: center;
  padding: 40px 20px;
  color: var(--gray-400);
  font-style: italic;
}

.loading::after {
  content: '...';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%, 20% { content: '.'; }
  40% { content: '..'; }
  60%, 100% { content: '...'; }
}

/* Transcript and grading styles */
.transcript-content,
.grading-results,
.grading-details {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
}

.grading-card,
.detail-section {
  background: var(--gray-50);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}

/* Status colors */
.status-control select option[value="available"] {
  background: #d1fae5;
}

.status-control select option[value="active"] {
  background: #dbeafe;
}

.status-control select option[value="meeting"],
.status-control select option[value="training"] {
  background: #fef3c7;
}

.status-control select option[value="meal"],
.status-control select option[value="break"] {
  background: #fee2e2;
}

.status-control select option[value="offline"] {
  background: var(--gray-200);
}

/* ========================================
   DTMF KEYPAD STYLES
   ======================================== */

#dtmfKeypad {
  display: none; /* Hidden by default, shown when call is active */
  margin-top: 1rem;
  padding: 1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.keypad-title {
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  max-width: 240px;
  margin: 0 auto;
}

.keypad-btn {
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  font-size: 1.5rem;
  font-weight: 600;
  color: #667eea;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.keypad-btn:hover {
  background: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

.keypad-btn:active,
.keypad-btn.keypad-active {
  background: #667eea;
  color: white;
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) inset;
}

/* Special styling for * and # keys */
.keypad-btn[onclick*="*"],
.keypad-btn[onclick*="#"] {
  background: rgba(255, 255, 255, 0.85);
  font-size: 2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .keypad-btn {
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
  }
  
  .keypad-grid {
    max-width: 200px;
    gap: 0.4rem;
  }
}

/* ========================================
   AGENT STATUS MONITOR
   ======================================== */

.agent-status-monitor {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 20px;
  border: 1px solid var(--gray-100);
  transition: var(--transition-slow);
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: 600px;
}

.agent-status-monitor:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

/* ========================================
   QUEUE PHONE NUMBER TRUNCATION FIX
   ======================================== */

.queue-card .phone-numbers,
.queue-item .phone-numbers {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  font-size: 12px;
  color: var(--gray-600);
}

/* ========================================
   CALL HISTORY SECTION STYLES
   ======================================== */

.call-history-section {
  max-width: 1800px;
  margin: 0 auto;
  animation: slideIn 0.5s ease-out;
}

.call-history-section h2 {
  color: var(--gray-900);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.call-history-filters {
  background: var(--gray-50);
  padding: 20px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  border: 1px solid var(--gray-200);
}

.call-history-filters h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--gray-700);
}

.call-history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 800px;
  overflow-y: auto;
  padding: 4px;
}

/* Direction Badge Styles */
.direction-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 8px;
}

.direction-badge.inbound {
  background: linear-gradient(135deg, #dbeafe 0%, #93c5fd 100%);
  color: #1e40af;
  border: 2px solid #60a5fa;
}

.direction-badge.outbound {
  background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
  color: #831843;
  border: 2px solid #f472b6;
}

/* Call Row Styles */
.call-history-row {
  background: white;
  border: 1px solid var(--gray-200);
  border-left: 4px solid var(--gray-400);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: var(--transition-base);
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
}

.call-history-row:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-left-width: 6px;
}

/* Call Row - Date/Time Column */
.call-time {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
}

.call-date {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-900);
}

.call-clock {
  font-size: 13px;
  color: var(--gray-600);
  font-family: 'Courier New', monospace;
}

/* Call Row - Main Info Column */
.call-main-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0; /* Allow flex shrinking */
}

.call-primary-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.call-direction-icon {
  font-size: 18px;
}

.call-agent-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-900);
}

.call-phone-number {
  font-size: 14px;
  color: var(--gray-600);
  font-family: 'Courier New', monospace;
}

.call-secondary-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--gray-600);
}

.call-duration-badge,
.call-company-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--gray-100);
  border-radius: 12px;
  font-weight: 600;
  font-size: 12px;
}

/* Call Row - Outcome Column */
.call-outcome-column {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  min-width: 140px;
}

.call-outcome-badge {
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.call-outcome-badge.positive {
  background: #d1fae5;
  color: #065f46;
}

.call-outcome-badge.negative {
  background: #fee2e2;
  color: #991b1b;
}

.call-outcome-badge.neutral {
  background: #fef3c7;
  color: #92400e;
}

.call-outcome-badge.ungraded {
  background: var(--gray-200);
  color: var(--gray-600);
}

.call-score-display {
  font-size: 13px;
  color: var(--gray-600);
  font-weight: 600;
}

/* MISSED CALL HIGHLIGHTING - RED */
.call-history-row.missed-call {
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
  border-left-color: var(--danger-color);
  border-left-width: 6px;
}

.call-history-row.missed-call:hover {
  background: linear-gradient(135deg, #ffe4e6 0%, #fecdd3 100%);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

.call-history-row.missed-call .call-agent-name {
  color: var(--danger-color);
  font-weight: 700;
}

.call-history-row.missed-call .call-outcome-badge {
  background: var(--danger-color);
  color: white;
  animation: pulse 2s ease-in-out infinite;
}

/* Positive and Negative Call Highlighting */
.call-history-row.positive-call {
  border-left-color: var(--success-color);
}

.call-history-row.negative-call {
  border-left-color: var(--danger-color);
}

.call-history-row.neutral-call {
  border-left-color: var(--warning-color);
}

/* Call Detail Modal Tabs */
.tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 12px 20px;
  border: none;
  background: transparent;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: var(--transition-base);
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-600);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--primary-color);
  background: var(--gray-50);
}

.tab-btn.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  background: transparent;
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease-out;
}

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

/* Call Details Content Styling */
.call-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.info-box {
  background: var(--gray-50);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
}

.info-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.info-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-900);
  word-break: break-word;
}

/* Section within tabs */
.section {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--gray-200);
}

.section:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.section h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Quick Metrics in Overview Tab */
.quick-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.metric-item {
  background: white;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 2px solid var(--gray-200);
  text-align: center;
}

.metric-item .metric-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.metric-item .metric-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--gray-900);
}

/* Conflict Warning */
.conflict-warning {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-left: 4px solid var(--warning-color);
  padding: 16px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.conflict-warning h4 {
  color: #92400e;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.conflict-warning p {
  color: #78350f;
  font-size: 14px;
  line-height: 1.6;
}

/* Summary Text */
.summary-text {
  background: var(--gray-50);
  padding: 16px;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--primary-color);
  font-size: 14px;
  line-height: 1.7;
  color: var(--gray-700);
}

/* Modal Actions */
.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 2px solid var(--gray-200);
}

.modal-actions .btn {
  flex: 1;
}

.status-message {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
}

.status-message.success {
  background: #d1fae5;
  color: #065f46;
  border-left: 4px solid var(--success-color);
}

.status-message.error {
  background: #fee2e2;
  color: #991b1b;
  border-left: 4px solid var(--danger-color);
}

/* Grading Details Specific Styles */
.adherence-overview {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.score-display-container {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 32px;
  border-radius: var(--radius-xl);
  text-align: center;
  min-width: 200px;
  box-shadow: var(--shadow-lg);
}

.score-display-container .score-percentage {
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 8px;
}

.score-display-container .score-label {
  font-size: 14px;
  opacity: 0.9;
  font-weight: 600;
}

/* Transcript Styling */
.transcript-content {
  background: var(--gray-50);
  padding: 24px;
  border-radius: var(--radius-lg);
  font-family: 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.8;
  max-height: 600px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.transcript-speaker {
  font-weight: 700;
  color: var(--primary-color);
  margin-top: 16px;
  margin-bottom: 4px;
}

.transcript-speaker.agent {
  color: var(--info-color);
}

.transcript-speaker.customer {
  color: var(--secondary-color);
}

/* Recording Player */
.recording-player {
  background: var(--gray-50);
  padding: 24px;
  border-radius: var(--radius-lg);
  text-align: center;
}

.recording-player audio {
  width: 100%;
  max-width: 600px;
  margin: 20px auto;
}

/* Notes Section */
.notes-list {
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: 24px;
}

.note-item {
  background: white;
  border: 1px solid var(--gray-200);
  border-left: 4px solid var(--primary-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
}

.note-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--gray-600);
}

.note-author {
  font-weight: 700;
  color: var(--gray-900);
}

.note-time {
  font-size: 11px;
  color: var(--gray-500);
}

.note-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--gray-700);
}

.add-note-section {
  background: var(--gray-50);
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 2px dashed var(--gray-300);
}

.add-note-section h5 {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 12px;
}

.add-note-section textarea {
  width: 100%;
  min-height: 100px;
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  transition: var(--transition-base);
}

.add-note-section textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.note-hint {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 8px;
  font-style: italic;
}

/* Responsive Adjustments for Call History */
@media (max-width: 1024px) {
  .call-history-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .call-outcome-column {
    align-items: flex-start;
    margin-top: 8px;
  }
  
  .call-info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .call-history-section {
    margin: 16px 12px !important;
    padding: 16px !important;
  }
  
  .call-history-filters {
    padding: 16px;
  }
  
  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .tab-btn {
    padding: 10px 16px;
    font-size: 13px;
  }
  
  .modal-content {
    width: 95%;
    padding: 24px 16px;
  }
  
  .modal-actions {
    flex-direction: column;
  }
  
  .call-history-row {
    padding: 16px;
  }
  
  .quick-metrics {
    grid-template-columns: 1fr;
  }
}

/* Print Styles for Call History */
@media print {
  .call-history-filters,
  .modal-actions,
  .tabs,
  .btn {
    display: none !important;
  }
  
  .call-history-section {
    box-shadow: none !important;
    padding: 0 !important;
  }
  
  .call-history-row {
    page-break-inside: avoid;
    box-shadow: none !important;
  }
}
