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

body {
  font-family: 'SF UI Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  overflow: hidden;
}

.app-container {
  display: flex;
  height: 100vh;
  padding: 20px;
  gap: 20px;
}

/* Sidebar - Conversation List */
.sidebar {
  width: 380px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}

.sidebar-header {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.user-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.user-avatar {
  display: none;
}

.user-details {
  flex: 1;
  margin-left: 0;
}

.user-name {
  color: white;
  font-weight: 600;
  font-size: 16px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.user-name:hover {
  transform: scale(1.02);
  text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.user-name:active {
  transform: scale(0.98);
}

.user-status {
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 320px;
  max-width: 420px;
  pointer-events: auto;
  animation: toastSlideIn 0.3s ease;
  position: relative;
  overflow: hidden;
}

.toast.hiding {
  animation: toastSlideOut 0.3s ease forwards;
}

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

@keyframes toastSlideOut {
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

.toast-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}

.toast-content {
  flex: 1;
}

.toast-title {
  color: #1a202c;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
}

.toast-message {
  color: #4a5568;
  font-size: 14px;
  line-height: 1.4;
}

.toast-close {
  background: none;
  border: none;
  color: #718096;
  font-size: 22px;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
  flex-shrink: 0;
  line-height: 1;
}

.toast-close:hover {
  background: rgba(0,0,0,0.05);
  color: #1a202c;
}

.toast.success .toast-icon {
  color: #10b981;
}

.toast.success .toast-progress {
  background: linear-gradient(90deg, #10b981, #059669);
}

.toast.info .toast-icon {
  color: #3b82f6;
}

.toast.info .toast-progress {
  background: linear-gradient(90deg, #3b82f6, #2563eb);
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  transform-origin: left;
  animation: toastProgress 4s linear forwards;
}

@keyframes toastProgress {
  to {
    transform: scaleX(0);
  }
}

.logout-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.search-new-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-bar {
  width: 100%;
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 10px;
  padding: 11px 16px;
  color: white;
  font-size: 14px;
  transition: all 0.2s;
}

.button-row {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.search-bar::placeholder {
  color: rgba(255, 255, 255, 0.75);
}

.search-bar:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.35);
  border-color: rgba(255, 255, 255, 0.5);
}

.new-message-btn {
  background: linear-gradient(135deg, #4A90E2 0%, #667eea 100%);
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.new-message-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(74, 144, 226, 0.5);
}

.conversations {
  flex: 1;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.conversation-item {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
}

.conversation-item:hover {
  background: rgba(255, 255, 255, 0.15);
}

.conversation-item.active {
  background: rgba(255, 255, 255, 0.3);
}

.contact-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.conversation-details {
  flex: 1;
  min-width: 0;
}

.conversation-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}

.contact-name {
  color: white;
  font-weight: 600;
  font-size: 16px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.message-time {
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.last-message {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Main Chat Area */
.chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  overflow: hidden;
}

.chat-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.1);
}

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

.chat-header-name {
  color: white;
  font-weight: 600;
  font-size: 18px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.chat-header-phone {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.chat-header-phone:hover {
  color: white;
  transform: scale(1.02);
  text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.chat-header-phone:active {
  transform: scale(0.98);
}

.delete-conversation-btn {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 8px;
  padding: 8px 12px;
  color: rgba(255, 255, 255, 0.95);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.delete-conversation-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: rgba(239, 68, 68, 0.6);
}

.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.message.outbound {
  align-self: flex-end;
  align-items: flex-end;
}

.message.inbound {
  align-self: flex-start;
  align-items: flex-start;
}

.message-bubble {
  padding: 13px 17px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.5;
  word-wrap: break-word;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.message.outbound .message-bubble {
  background: rgba(74, 144, 226, 0.9);
  color: white;
  border-bottom-right-radius: 5px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.message.inbound .message-bubble {
  background: rgba(255, 255, 255, 0.95);
  color: #1a202c;
  border-bottom-left-radius: 5px;
}

.message-timestamp {
  font-size: 12px;
  padding: 0 10px;
  font-weight: 500;
}

.message.outbound .message-timestamp {
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.message.inbound .message-timestamp {
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Note message styling - styled like outbound but yellow */
.message.note {
  align-self: flex-end;
  align-items: flex-end;
}

.message.note .message-bubble {
  background: rgba(245, 158, 11, 0.9);
  color: white;
  border-bottom-right-radius: 5px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.message.note .message-timestamp {
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.message-input-area {
  padding: 20px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  gap: 12px;
  background: rgba(255, 255, 255, 0.1);
  align-items: flex-end;
}

.message-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 20px;
  padding: 13px 20px;
  color: white;
  font-size: 15px;
  resize: none;
  max-height: 140px;
  min-height: 46px;
  font-family: inherit;
  transition: all 0.2s;
  line-height: 1.5;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
  /* Hide scrollbar */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.message-input::-webkit-scrollbar {
  display: none; /* Chrome/Safari/Opera */
}

.message-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.message-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.45);
  border-color: rgba(255, 255, 255, 0.65);
}

.send-btn {
  background: linear-gradient(135deg, #4A90E2 0%, #667eea 100%);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.45);
  flex-shrink: 0;
}

.send-btn:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(74, 144, 226, 0.6);
}

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

.send-btn svg {
  width: 24px;
  height: 24px;
  fill: white;
}

.note-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.45);
  flex-shrink: 0;
  margin-right: 8px;
}

.note-btn:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.6);
}

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

.note-btn svg {
  width: 24px;
  height: 24px;
  fill: white;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.show {
  display: flex;
}

.modal {
  background: rgba(103, 64, 142, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  padding: 28px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
  margin-bottom: 20px;
}

.modal-title {
  color: white;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 8px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.modal-subtitle {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.modal-buttons {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.modal-btn {
  flex: 1;
  padding: 13px 20px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-btn-primary {
  background: linear-gradient(135deg, #4A90E2 0%, #667eea 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.modal-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(74, 144, 226, 0.4);
}

.modal-btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.25);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.modal-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.35);
}

.contact-list {
  max-height: 400px;
  overflow-y: auto;
  margin: 16px 0;
}

.contact-list-item {
  padding: 14px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.contact-list-item:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.25);
}

.contact-list-item-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 17px;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

.contact-list-item-name {
  color: white;
  font-weight: 600;
  font-size: 15px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.contact-list-item-phone {
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
  padding: 40px;
}

.empty-state-icon {
  width: 90px;
  height: 90px;
  margin-bottom: 24px;
  opacity: 0.6;
  stroke: currentColor;
}

.empty-state-text {
  font-size: 19px;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  margin-bottom: 8px;
}

.empty-state-subtext {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.35);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.45);
}

/* Loading state */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 16px;
}

.spinner {
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid white;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  animation: spin 1s linear infinite;
  margin-right: 12px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Phone Dialer */
.phone-toggle {
  position: fixed;
  right: 0;
  top: 200px;
  width: 50px;
  height: 60px;
  background: linear-gradient(135deg, rgba(103, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px 0 0 8px;
  box-shadow: -4px 4px 16px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 101;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.phone-toggle.open {
  right: 180px;
}

.phone-toggle svg {
  width: 20px;
  height: 20px;
  fill: white;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
  position: relative;
  z-index: 2;
}

.phone-toggle::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 1;
}

.phone-toggle:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px) scale(1.05);
  box-shadow: -6px 6px 20px rgba(0, 0, 0, 0.2);
}

.phone-toggle:hover::before {
  opacity: 1;
}

.phone-sidebar {
  position: fixed;
  right: -180px;
  top: 80px;
  width: 180px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px 0 0 8px;
  box-shadow: -6px 6px 24px rgba(0, 0, 0, 0.25);
  padding: 12px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  z-index: 100;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.phone-sidebar.open {
  right: 0;
}

.phone-contact-selector {
  width: 100%;
  padding: 6px 8px;
  font-size: 11px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.phone-contact-selector:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.phone-contact-selector:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.1),
    0 6px 20px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.phone-contact-selector option {
  background: white;
  color: black;
}

.phone-display {
  width: 100%;
  padding: 8px;
  font-size: 14px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  font-weight: 600;
  letter-spacing: 1px;
  box-shadow:
    0 3px 12px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255,255,255,0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-display::placeholder {
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
}

.dialpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.dial-btn {
  position: relative;
  padding: 8px 12px;
  min-height: 36px;
  font-size: 14px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.dial-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 100%);
  opacity: 0;
  transition: opacity 0.3s;
}

.dial-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.dial-btn:hover::before {
  opacity: 1;
}

.dial-btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.call-controls {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.call-btn {
  flex: 1;
  padding: 12px 8px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.call-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.5);
}

.call-btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.call-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.hangup-btn {
  flex: 1;
  padding: 12px 8px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.hangup-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.5);
}

.hangup-btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.clear-btn {
  flex: 1;
  padding: 12px 8px;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

.clear-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.clear-btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.call-status {
  padding: 8px;
  text-align: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  font-weight: 600;
  font-size: 11px;
  min-height: 20px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.call-status.calling {
  background: rgba(251, 191, 36, 0.3);
  border-color: rgba(251, 191, 36, 0.4);
  color: #fef3c7;
  box-shadow:
    0 4px 16px rgba(251, 191, 36, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.call-status.connected {
  background: rgba(34, 197, 94, 0.3);
  border-color: rgba(34, 197, 94, 0.4);
  color: #dcfce7;
  box-shadow:
    0 4px 16px rgba(34, 197, 94, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.call-status.error {
  background: rgba(239, 68, 68, 0.3);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fee2e2;
  box-shadow:
    0 4px 16px rgba(239, 68, 68, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Pulsing animation for ringing */
@keyframes phonePulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 20px 10px rgba(102, 126, 234, 0);
  }
}

.phone-ringing {
  animation: phonePulse 1.5s ease-in-out infinite;
}

/* Input placeholder styling for modals */
#createContactForm input::placeholder,
#editContactForm input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

#createContactForm input:focus,
#editContactForm input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.2);
}

/* Modal Tabs */
.modal-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 2px;
}

.modal-tab {
  flex: 1;
  padding: 10px 16px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.modal-tab:hover {
  color: rgba(255, 255, 255, 0.9);
}

.modal-tab.active {
  color: white;
  border-bottom-color: rgba(255, 255, 255, 0.9);
}

/* AI Draft Modal Styles */
.ai-draft-modal {
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
}

.ai-draft-form {
  margin-bottom: 20px;
}

.ai-draft-form .form-group {
  margin-bottom: 16px;
}

.ai-draft-form label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.ai-draft-form input,
.ai-draft-form textarea {
  width: 100%;
  padding: 12px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: white;
  font-size: 14px;
  backdrop-filter: blur(10px);
  transition: all 0.2s;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.ai-draft-form input::placeholder,
.ai-draft-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.ai-draft-form input:focus,
.ai-draft-form textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.2);
}

.ai-draft-form textarea {
  resize: vertical;
  min-height: 70px;
}

.ai-draft-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: rgba(255, 255, 255, 0.9);
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.ai-draft-results {
  margin-top: 20px;
}

.ai-draft-results-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.ai-draft-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.ai-draft-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(10px);
}

.ai-draft-card:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

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

.ai-draft-card-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ai-draft-card-count {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.ai-draft-card-text {
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.95);
}

.ai-draft-refinement {
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.ai-draft-refinement .form-group {
  margin-bottom: 0;
}

.ai-draft-refinement input {
  width: 100%;
  padding: 12px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: white;
  font-size: 14px;
  backdrop-filter: blur(10px);
  transition: all 0.2s;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.ai-draft-refinement input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.ai-draft-refinement input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.2);
}

/* Privacy Toggle Button */
.privacy-toggle-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
}

.privacy-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
}

.privacy-toggle-btn .privacy-icon {
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.8);
}

/* Privacy Mode - no special styles needed, JS handles text replacement */

/* Toggle icon visibility based on mode */
body.privacy-mode .privacy-icon-visible {
  display: none !important;
}

body.privacy-mode .privacy-icon-hidden {
  display: block !important;
}
