:root {
  --sidebar-bg: #0b1126;
  --sidebar-active-bg: #ffffff;
  --sidebar-active-text: #0b1126;
  --main-bg: #f8f9fa;
  --table-header-bg: #e2e8f0;
  --text-main: #1a202c;
  --text-muted: #718096;
  --border-color: #e2e8f0;
  --accent-primary: #1a73e8;
  --status-active-bg: rgba(40, 199, 111, 0.12);
  --status-active-text: #28c76f;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--main-bg);
  color: var(--text-main);
}

.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
  width: 260px;
  background-color: var(--sidebar-bg);
  color: white;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 0;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-brand {
  padding: 0 1.5rem 2rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-title {
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.8rem;
  opacity: 0.7;
}

.sidebar nav {
  flex: 1;
}

.sidebar nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar nav ul li {
  padding: 0.2rem 1rem;
}

.sidebar nav ul li a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.sidebar nav ul li a:hover {
  color: white;
  background: rgba(255, 255, 255, 0.05);
}

.sidebar nav ul li a.active {
  background-color: white !important;
  color: #0b1126 !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sidebar nav ul li a.active svg {
  color: #0b1126 !important;
  stroke: #0b1126 !important;
}



.sidebar nav ul li a svg {
  width: 20px;
  height: 20px;
}

.sidebar-footer {
  padding: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 36px;
  height: 36px;
  background: #1a73e8;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
}

/* Main Content Area */
.main-content {
  flex: 1;
  padding: 1.5rem 2rem;
  overflow-y: auto;
  background-color: white;
}

.content-header {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.content-header h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #111;
}

.content-header p {
  color: var(--text-muted);
  margin: 5px 0 0;
  font-size: 0.9rem;
}

/* Table Styling - Clean Figma Style */
.table-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  overflow-x: auto;
  width: 100%;
  padding: 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead th {
  background-color: #f1f5f9;
  padding: 0.85rem 0.6rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.75rem;
  color: #4a5568;
  letter-spacing: 0.02em;
  border-bottom: 1px solid #e2e8f0;
}

.data-table tbody td {
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid #edf2f7;
  font-size: 0.75rem;
  vertical-align: middle;
  color: #4a5568;
  height: 48px;
}

.data-table tbody tr:hover {
  background-color: #f7fafc;
}

/* Pagination Styling */
.pagination {
  background: white;
  padding: 1.5rem 2rem;
  border-top: 1px solid #f1f3f9;
}

/* Button & Search Styling */
.search-input-container {
  position: relative;
  max-width: 320px;
  width: 100%;
}

.search-input-container input {
  width: 100%;
  padding: 0.7rem 1rem 0.7rem 3rem !important;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #4a5568;
  transition: all 0.2s;
  background-color: #fcfdfe;
}

.search-input-container input:focus {
  outline: none;
  border-color: #3182ce;
  background-color: white;
  box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

/* Action Buttons */
.btn-action {
  background: none;
  border: none;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  color: #718096;
  transition: all 0.2s;
}

.btn-action:hover {
  background: #f1f3f9;
  color: #2d3748;
}

/* Premium Search Bar & Filter */
.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}

.search-input-wrapper {
  position: relative;
  width: 100%;
}

.search-input-wrapper input {
  width: 100%;
  padding: 0.75rem 2.8rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.9rem;
  color: #1a202c;
  background: #f8fafc !important;
  transition: all 0.2s !important;
  outline: none !important;
  box-sizing: border-box;
}

.search-input-wrapper input:focus {
  border-color: #cbd5e0 !important;
  background: white !important;
  box-shadow: 0 0 0 4px rgba(226, 232, 240, 0.4) !important;
}

.search-icon-left {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #a0aec0;
  pointer-events: none;
  display: flex;
  align-items: center;
}

.search-clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #cbd5e0;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 0;
  transition: color 0.2s;
}

.search-clear-btn:hover {
  color: #a0aec0;
}

.btn-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.75rem 1.25rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: white;
  color: #2d3748;
  font-size: 0.9rem;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  white-space: nowrap;
}

.btn-filter:hover {
  background: #f7fafc;
  border-color: #cbd5e0;
}

.filter-badge {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  color: #4a5568;
  font-weight: 700;
  margin-left: 2px;
}

/* Login Page Specific Styles */
.login-container {
  background-color: #0b1126;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.login-card {
  background: #f8fafc;
  width: 100%;
  max-width: 420px;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.login-logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.login-logo-circle {
  background: #0b1126;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-brand-name {
  font-weight: 700;
  color: #0b1126;
  font-size: 1.1rem;
}

.login-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 30px;
  color: #0b1126;
}

.login-form .form-group {
  text-align: left;
  margin-bottom: 20px;
}

.login-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #4a5568;
}

.login-form input {
  width: 100%;
  padding: 12px 16px;
  background: #ebf2f9;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #1a202c;
  box-sizing: border-box;
  transition: all 0.2s;
}

.login-form input:focus {
  outline: none;
  border-color: #3182ce;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.forgot-password-link {
  display: block;
  text-align: right;
  font-size: 0.8rem;
  color: #718096;
  text-decoration: none;
  margin-bottom: 30px;
}

.btn-login-submit {
  width: 100%;
  padding: 14px;
  background-color: #24335c;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-login-submit:hover {
  background-color: #1a264a;
}

/* Modal Styling */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

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

.modal-content {
  background: white;
  width: 100%;
  max-width: 500px;
  border-radius: 12px;
  padding: 1.5rem 2rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  position: relative;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
  opacity: 1;
}

.modal-content.view-large {
  max-width: 700px;
  padding: 0;
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.modal-header h2 {
  font-size: 1.25rem;
  color: #1a202c;
  font-weight: 700;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #a0aec0;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-subtitle {
  color: #718096;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.modal-subtitle strong {
  color: #2d3748;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #1a202c;
  background-color: #fcfdfe;
  box-sizing: border-box;
}

.form-control:focus {
  outline: none;
  border-color: #3182ce;
  box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.toggle-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #e2e8f0;
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked+.slider {
  background-color: #3182ce;
}

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

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 2rem;
}

.btn-cancel {
  padding: 0.65rem 1.25rem;
  background: white;
  color: #24335c;
  border: 1px solid #24335c;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

.btn-save {
  padding: 0.65rem 1.5rem;
  background: #24335c;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

.btn-save:hover {
  background: #1a264a;
}

.btn-save:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Spinner Animation */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

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

/* Modal Processing State */
.modal-overlay.processing {
  pointer-events: none;
}

.modal-overlay.processing .modal-close,
.modal-overlay.processing .btn-cancel {
  display: none;
}

/* Custom Scrollbar */
.table-container::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

.table-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
  background: #a0aec0;
}

/* Tooltip Error */
.tooltip-error {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: -10px;
  z-index: 10;
  display: none;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.tooltip-error.active {
  display: block;
}

.tooltip-arrow {
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid #feebc8;
  margin-left: 20px;
}

.tooltip-inner {
  background: white;
  border: 1px solid #feebc8;
  padding: 8px 12px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #c05621;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}

/* Toast Notification */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
}

.toast {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 300px;
  transform: translateX(120%);
  transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  margin-bottom: 12px;
  border-left: 4px solid #48bb78;
}

.toast.show {
  transform: translateX(0);
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toast-icon {
  width: 28px;
  height: 28px;
  background: #f0fff4;
  color: #48bb78;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-message {
  color: #2d3748;
  font-size: 0.9rem;
  font-weight: 600;
}

.toast-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #a0aec0;
  cursor: pointer;
}

.btn-success {
  background: #48bb78 !important;
}

.priority-badge {
  background: #24335c;
  color: white;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  min-width: 60px;
  display: inline-block;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.priority-badge:hover {
  background: #1a264a;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* View Company Modal Styles */
.modal-content.view-large {
  max-width: 650px;
  padding: 0;
  border-radius: 16px;
  overflow: hidden;
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #718096;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background: #f7fafc;
  color: #2d3748;
}

.view-modal-body {
  padding: 32px;
}

.company-view-header {
  display: flex;
  gap: 24px;
  margin-bottom: 32px;
}

.company-logo-box {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 1px solid #edf2f7;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7fafc;
  flex-shrink: 0;
  padding: 8px;
}

.company-logo-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.company-main-info {
  flex: 1;
}

.company-main-info h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a202c;
  margin: 0 0 4px 0;
}

.company-parent-title {
  color: #718096;
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.info-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #4a5568;
  font-size: 0.85rem;
}

.info-item svg {
  color: #a0aec0;
}

.info-item a {
  color: #3182ce;
  text-decoration: none;
}

.category-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.category-tag {
  background: #f7fafc;
  color: #4a5568;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid #edf2f7;
}

.phone-numbers-box {
  background: #f8fafc;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.phone-section-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 16px;
}

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

.phone-entry {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.phone-number {
  font-weight: 700;
  color: #1a202c;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.phone-label {
  font-size: 0.8rem;
  color: #718096;
  line-height: 1.4;
}

.whatsapp-badge {
  background: #e6fffa;
  color: #319795;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
}