/* Base Portal Styles */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: #f8fafc;
  color: #0f172a;
  line-height: 1.6;
  font-size: 14px;
}

.portal-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin-left: 280px;
  transition: margin-left 0.3s ease;
}

.portal-wrapper.menu-collapsed {
  margin-left: 64px;
}

.portal-wrapper.menu-hidden {
  margin-left: 0;
}

/* Main Navigation Bar */
.portal-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 0 24px;
  height: 64px;
  flex-shrink: 0;
  position: relative;
  z-index: 1001;
}

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

.navbar-logo {
  height: 32px;
  display: flex;
  align-items: center;
}

.navbar-logo img {
  height: 100%;
  max-width: 120px;
}

.navbar-right {
  display: flex;
  align-items: center;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
}

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

.user-name {
  font-size: 14px;
  font-weight: 500;
  color: #1e293b;
  white-space: nowrap;
}

.user-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: #64748b;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s ease;
  background: transparent;
  border: 1px solid transparent;
}

.action-link:hover {
  background: #f1f5f9;
  color: #1e293b;
  border-color: #e2e8f0;
}

.action-link i {
  font-size: 14px;
}

/* Main Content Area */
.portal-main {
  margin-left: 6px;
  padding: 20px;
  min-height: calc(100vh - 64px);
  background: #f8fafc;
  transition: margin-left 0.3s ease;
}

.page-header {
  margin-top: 0px;
  margin-bottom: 32px;
}

.page-title {
  font-size: 28px;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 8px 0;
}

.page-subtitle {
  color: #64748b;
  font-size: 16px;
  margin: 0;
}

/* Cards */
.portal-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
}

.card-title {
  font-size: 20px;
  font-weight: 600;
  color: #0f172a;
  margin: 0;
}

.card-subtitle {
  color: #1A1A1A;
  font-size: 16px;
  margin: 8px 0 0 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  font-size: 16px;
  font-weight: 500;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  gap: 8px;
}

.btn-primary {
  background-color: #3b82f6;
  color: #ffffff;
  border-color: #3b82f6;
}

.btn-primary:hover {
  background-color: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.btn-success {
  background-color: #10b981;
  color: #ffffff;
  border-color: #10b981;
}

.btn-success:hover {
  background-color: #059669;
  border-color: #059669;
  color: #ffffff;
}

.btn-outline {
  background-color: transparent;
  color: #64748b;
  border-color: #d1d5db;
}

.btn-outline:hover {
  background-color: #f8fafc;
  color: #1e293b;
  border-color: #9ca3af;
}

.btn-danger {
  background-color: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}

.btn-danger:hover {
  background-color: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 14px;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 18px;
}

/* Forms */
.form-horizontal {
  margin-top: 24px;
  padding: 0px;

}

.form-horizontal .form-group {
  margin-bottom: 16px;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.form-horizontal .form-group:last-child {
  margin-bottom: 0;
}

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

.form-label {
  display: block;
  font-weight: 500;
  color: #1e293b;
  margin-bottom: 8px;
  font-size: 16px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 16px;
  background-color: #ffffff;
  color: #0f172a;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group input:disabled,
.form-group textarea:disabled,
.form-group select:disabled {
  background-color: #f9fafb;
  color: #9ca3af;
  cursor: not-allowed;
}

/* Textarea specific styling */
.form-group textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.5;
  font-family: inherit;
}

.help-text {
  font-size: 14px;
  color: #64748b;
  margin-top: 8px;
  line-height: 1.4;
}

.help-link {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
}

.help-link:hover {
  text-decoration: underline;
  color: #2563eb;
}

.form-actions {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
}

/* Crispy Forms Button Styling */
.form-actions .btn {
  margin-right: 12px;
  margin-bottom: 8px;
}

.form-actions .btn:last-child {
  margin-right: 0;
}

/* Form Button Container */
.btn-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}

.btn-toolbar .btn {
  margin: 0;
}

/* Crispy Forms ButtonHolder */
.ButtonHolder {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  align-items: center !important;
  justify-content: flex-start !important;
  margin-top: 24px !important;
  padding-top: 16px !important;
  border-top: 1px solid #f1f5f9 !important;
}

.ButtonHolder .btn {
  margin: 0 !important;
  margin-right: 12px !important;
}

.ButtonHolder .btn:last-child {
  margin-right: 0 !important;
  margin-left: 12px !important;
}

/* Additional crispy forms button spacing */
.form-horizontal .btn {
  margin-right: 12px !important;
  margin-bottom: 8px !important;
}

.form-horizontal .btn:last-child {
  margin-right: 0 !important;
}

/* Target any button container */
.btn-group,
.btn-toolbar,
.form-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  align-items: center !important;
  justify-content: flex-end !important;
}

.btn-group .btn,
.btn-toolbar .btn,
.form-actions .btn {
  margin: 0 !important;
  margin-right: 12px !important;
}

.btn-group .btn:last-child,
.btn-toolbar .btn:last-child,
.form-actions .btn:last-child {
  margin-right: 0 !important;
}

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 16px;
}

.alert-success {
  background-color: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.alert-danger {
  background-color: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.alert-warning {
  background-color: #fffbeb;
  color: #d97706;
  border: 1px solid #fed7aa;
}

.alert-info {
  background-color: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

/* Lists */
.list-group {
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.list-group-item {
  padding: 12px 16px;
  background-color: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
}

.list-group-item:last-child {
  border-bottom: none;
}

.list-group-item.bg-light {
  background-color: #f8fafc;
  font-weight: 500;
}

.phone-number {
  font-weight: 600;
  font-size: 16px;
  color: #0f172a;
}

.status-active {
  color: #10b981;
  font-size: 14px;
  margin-left: 8px;
  font-weight: 500;
}

.modal-text {
  font-size: 16px;
  margin-bottom: 16px;
  color: #0f172a;
}

.modal-list {
  font-size: 16px;
  margin-top: 8px;
}

.modal-list li {
  margin-bottom: 4px;
}

/* Empty State Design */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 24px;
  text-align: center;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  margin: 24px 0;
}

.empty-state-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.empty-state-icon i {
  font-size: 36px;
  color: #ffffff;
}

.empty-state-content {
  max-width: 480px;
}

.empty-state-title {
  font-size: 24px;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 16px 0;
  line-height: 1.3;
}

.empty-state-description {
  font-size: 16px;
  color: #64748b;
  line-height: 1.6;
  margin: 0 0 32px 0;
}

.empty-state-actions {
  display: flex;
  justify-content: center;
}

.empty-state-actions .btn {
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.empty-state-actions .btn:hover {
  transform: translateY(-1px);
}

.empty-state-actions .btn .icon {
  color: #ffffff;
}

/* Code styling */
code {
  background-color: #eff6ff;
  color: #1d4ed8;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Segoe UI', monospace;
  font-size: 14px;
  border: 1px solid #dbeafe;
}

.code-snippet {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  margin: 16px 0;
  border-radius: 6px;
  padding: 16px;
  font-family: 'Segoe UI', monospace;
  font-size: 14px;
  line-height: 1.5;
  color: #0f172a;
  width: 100%;
  resize: none;
}

.code-description {
    color: #64748b;
    margin-top: 16px;
}

/* Modern Tokenfield Styling */
.tokenfield {
  height: auto !important;
  min-height: 44px !important;
  padding: 8px 12px !important;
  border: 1px solid #d1d5db !important;
  border-radius: 6px !important;
  background-color: #ffffff !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
  font-family: 'Segoe UI', sans-serif !important;
  font-size: 16px !important;
  line-height: 1.5 !important;
}

.tokenfield.focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
  outline: none !important;
}

.tokenfield .token {
  display: inline-flex !important;
  align-items: center !important;
  height: 32px !important;
  margin: 2px 6px 2px 0 !important;
  padding: 0 10px !important;
  background-color: #eff6ff !important;
  border: 1px solid #dbeafe !important;
  border-radius: 6px !important;
  color: #1d4ed8 !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
  cursor: default !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box !important;
}

.tokenfield .token:hover {
  background-color: #dbeafe !important;
  border-color: #93c5fd !important;
}

.tokenfield .token.active {
  background-color: #3b82f6 !important;
  border-color: #3b82f6 !important;
  color: #ffffff !important;
}

.tokenfield .token.duplicate {
  background-color: #fef2f2 !important;
  border-color: #fecaca !important;
  color: #dc2626 !important;
  animation: tokenBlink 0.3s ease-in-out !important;
}

.tokenfield .token.invalid {
  background-color: #fef2f2 !important;
  border-color: #fecaca !important;
  color: #dc2626 !important;
}

.tokenfield .token .token-label {
  display: inline-block !important;
  padding: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 200px !important;
  line-height: 1.4 !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  color: inherit !important;
}

.tokenfield .token .close {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 18px !important;
  height: 18px !important;
  margin-left: 8px !important;
  padding: 0 !important;
  background: none !important;
  border: none !important;
  border-radius: 50% !important;
  color: inherit !important;
  font-size: 14px !important;
  font-weight: bold !important;
  line-height: 1 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  opacity: 0.7 !important;
  flex-shrink: 0 !important;
  float: none !important;
}

.tokenfield .token .close:hover {
  background-color: rgba(0, 0, 0, 0.1) !important;
  opacity: 1 !important;
}

.tokenfield .token.active .close:hover {
  background-color: rgba(255, 255, 255, 0.2) !important;
}

.tokenfield .token-input {
  width: 60px !important;
  min-width: 60px !important;
  height: 32px !important;
  padding: 0 !important;
  margin: 2px 0 !important;
  background: none !important;
  border: none !important;
  outline: none !important;
  font-family: inherit !important;
  font-size: 15px !important;
  color: #0f172a !important;
  box-shadow: none !important;
}

.tokenfield .token-input:focus {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

.tokenfield.disabled {
  background-color: #f9fafb !important;
  cursor: not-allowed !important;
  opacity: 0.6 !important;
}

.tokenfield.disabled .token-input {
  cursor: not-allowed !important;
}

.tokenfield.disabled .token:hover {
  cursor: not-allowed !important;
  background-color: #eff6ff !important;
  border-color: #dbeafe !important;
}

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

/* Icons */
.icon {
  font-size: 16px;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-phone {
  color: #3b82f6;
}

.icon-trash {
  color: #ef4444;
}

.icon-plus {
  color: #10b981;
}

/* Utilities */
.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

.text-muted {
  color: #6b7280;
}

.margin-top-20 {
  margin-top: 20px;
}

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

.padding-bottom-35 {
  padding-bottom: 35px;
}

/* Pagination */
.pagination {
  margin: 24px 0 0 0;
  display: flex;
  justify-content: center;
  gap: 4px;
  list-style: none;
  padding: 0;
}

.pagination .page-item {
  list-style: none;
}

.pagination .page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 8px 12px;
  color: #64748b;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.pagination .page-link:hover {
  background: #f1f5f9;
  color: #1e293b;
  border-color: #cbd5e1;
}

.pagination .page-item.active .page-link {
  background: #3b82f6;
  color: #ffffff;
  border-color: #3b82f6;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-dialog {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  max-width: 500px;
  width: 90%;
  margin: 28px auto;
  position: relative;
  z-index: 10000;
}

.modal-content {
  border: none;
  border-radius: 8px;
}

.modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.modal-title {
  font-size: 20px;
  font-weight: 600;
  color: #0f172a;
  margin: 0;
  flex: 1;
}

.modal-body {
  padding: 24px;
  font-size: 16px;
  color: #0f172a;
}

.modal-footer {
  padding: 16px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.close {
  background: none;
  border: none;
  font-size: 24px;
  color: #9ca3af;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin-left: auto;
}

.close:hover {
  color: #6b7280;
  background-color: #f1f5f9;
}

/* Responsive */
@media (max-width: 768px) {
  .portal-main {
    margin-left: 0;
  }
  
  .portal-menu.mobile-open + .portal-main {
    margin-left: 0;
  }
  
  .page-title {
    font-size: 28px;
  }
  
  .portal-card {
    padding: 16px;
  }
  
  .portal-navbar {
    padding: 0 16px;
  }
  
  .navbar-left {
    gap: 12px;
  }
  
  .navbar-logo img {
    max-width: 100px;
  }
  
  .user-details {
    display: none;
  }
  
  .user-menu {
    gap: 8px;
  }

  /* Mobile pagination adjustments */
  .pagination {
    margin: 16px 0 0 0;
    gap: 2px;
  }

  .pagination .page-link {
    min-width: 32px;
    height: 32px;
    padding: 6px 8px;
    font-size: 13px;
  }
  
  /* Ensure desktop menu toggle doesn't affect mobile hamburger */
  .portal-menu .menu-toggle {
    display: none;
  }
} 

.empty-state-actions .btn .icon {
  color: #ffffff;
}

.btn-danger .icon {
  color: #ffffff;
} 