/* Premium Compact Google RCS Admin Panel */

:root {
  --primary-blue: #1a73e8;
  --primary-blue-dark: #1557b0;
  --secondary-blue: #4285f4;
  --light-blue: #e8f0fe;
  --gray-50: #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #eeeeee;
  --gray-300: #e0e0e0;
  --gray-400: #bdbdbd;
  --gray-500: #9e9e9e;
  --gray-600: #757575;
  --gray-700: #616161;
  --gray-800: #424242;
  --gray-900: #212121;
  --success-green: #34a853;
  --warning-orange: #fbbc04;
  --error-red: #ea4335;
  --purple: #9c27b0;
  --teal: #009688;
  --red: #f44336;
  --border-radius: 6px;
  --border-radius-lg: 8px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--gray-100);
  color: var(--gray-800);
  line-height: 1.4;
  margin: 0;
  padding: 0;
  font-size: 14px;
}

/* Jio-Style Header */
.header-section {
  background: linear-gradient(135deg, #003d82 0%, #1a5bb8 100%);
  box-shadow: 0 2px 8px rgba(0, 61, 130, 0.3);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 64px;
}

/* Header Enhancements */
.header-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.header-section::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1), transparent);
}

.header-section .navbar {
  padding: 0;
  min-height: 64px;
  width: 100%;
}

.navbar-brand-container {
  padding: 8px 24px;
  height: 64px;
  display: flex;
  align-items: center;
}

.brand-logo-wrapper {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: all 0.3s ease;
}

.brand-logo-wrapper:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-logo i {
  color: #003d82;
  font-size: 20px;
  font-weight: 600;
}

.brand-text {
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: #003d82;
  margin: 0;
  letter-spacing: -0.2px;
}

.btn-icon {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  width: 36px !important;
  height: 36px !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 16px;
  backdrop-filter: blur(10px);
  position: relative;
}

/* Enhanced button hover effects */
.btn-icon::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-icon:hover::before {
  opacity: 1;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
}

.btn-icon:focus {
  background: rgba(255, 255, 255, 0.25);
  color: white;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.user-avatar {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

/* User avatar enhanced styling */
.user-avatar::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
  border-radius: 50%;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.user-avatar:hover::before {
  opacity: 1;
}

.user-avatar:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
}

/* Responsive Header */
@media (max-width: 768px) {
  .header-section .navbar {
    padding: 0 16px;
  }

  .navbar-brand-container {
    padding: 8px 0;
  }

  .brand-logo-wrapper {
    padding: 6px 16px;
    border-radius: 16px;
  }

  .brand-text {
    font-size: 14px;
  }

  .brand-logo i {
    font-size: 18px;
  }

  .btn-icon {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .user-avatar {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
}

@media (max-width: 576px) {
  .brand-text {
    display: none;
  }

  .brand-logo-wrapper {
    padding: 8px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
  }

  .brand-logo {
    justify-content: center;
  }

  .navbar-nav .btn-icon:not(:last-child) {
    display: none;
  }
}

/* Main Content */
.main-content {
  padding: 1.5rem 0;
  min-height: calc(100vh - 64px);
  margin-top: 0;
}

/* Navigation Tabs */
.nav-tabs-section {
  margin-bottom: 1.5rem;
}

.custom-tabs {
  border-bottom: 1px solid var(--gray-300);
}

.custom-tabs .nav-link {
  border: none;
  color: var(--gray-600);
  font-weight: 500;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.custom-tabs .nav-link:hover {
  color: var(--primary-blue);
  border-color: transparent;
  background: none;
}

.custom-tabs .nav-link.active {
  color: var(--primary-blue);
  border-bottom-color: var(--primary-blue);
  background: none;
  font-weight: 600;
}

/* Search Section */
.search-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.search-container {
  position: relative;
  flex: 1;
  max-width: 400px;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-500);
  font-size: 0.9rem;
}

.search-input {
  padding-left: 2.25rem;
  border: 1px solid var(--gray-300);
  border-radius: 20px;
  height: 36px;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  background: white;
}

.search-input:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.1);
  outline: none;
}

.view-options {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.view-label {
  font-size: 0.85rem;
  color: var(--gray-600);
  font-weight: 500;
}

.btn-view {
  background: white;
  border: 1px solid var(--gray-300);
  color: var(--gray-600);
  width: 32px;
  height: 32px;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 0.8rem;
}

.btn-view:hover {
  border-color: var(--primary-blue);
  color: var(--primary-blue);
  background: var(--light-blue);
}

.btn-view.active {
  background: var(--primary-blue);
  border-color: var(--primary-blue);
  color: white;
}

/* Agents Grid */
.agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.agent-card {
  background: white;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid var(--gray-200);
  overflow: hidden;
}

.agent-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-blue);
}

.create-agent-card {
    border: 1px dashed var(--gray-400);
    background: var(--gray-50);
    display: flex;
    justify-content: center;
    align-items: center;
} 
.create-agent-card:hover {
  border-color: var(--primary-blue);
  background: var(--light-blue);
}

.create-agent-card .card-body {
  padding: 2rem 1.5rem;
  text-align: center;
}

.create-icon {
  width: 40px;
  height: 40px;
  background: var(--primary-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  color: white;
  font-size: 1.1rem;
}

.create-agent-card .card-title {
  color: var(--primary-blue);
  font-weight: 600;
  margin: 0;
  font-size: 0.95rem;
}

.agent-card .card-body {
  padding: 1.25rem;
}

.agent-avatar {
  width: 48px;
  height: 48px;
  background: var(--gray-200);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
  color: var(--gray-600);
}

.jio-avatar {
  background: #003d82;
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
}

.prasad-avatar {
  background: var(--purple);
  color: white;
}

.vishwnet-avatar {
  background: var(--teal);
  color: white;
  font-weight: 600;
}

.sahil-avatar {
  background: var(--red);
  color: white;
  font-weight: 600;
}

.carepay-avatar {
  background: var(--success-green);
  color: white;
}

.tech-avatar {
  background: var(--gray-700);
  color: white;
}

.eco-avatar {
  background: var(--success-green);
  color: white;
}

.agent-type {
  font-size: 0.75rem;
  color: var(--gray-500);
  text-transform: capitalize;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.agent-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.agent-date {
  font-size: 0.8rem;
  color: var(--gray-600);
  margin-bottom: 0.5rem;
}

.agent-service {
  font-size: 0.75rem;
  color: var(--primary-blue);
  font-weight: 500;
}

/* Analytics Section */
.analytics-section {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
}

.analytics-header h5 {
  font-family: "Roboto", sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.analytics-subtitle {
  color: var(--gray-700);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.learn-more-link {
  color: var(--primary-blue);
  text-decoration: none;
  font-weight: 500;
}

.learn-more-link:hover {
  text-decoration: underline;
  color: var(--primary-blue-dark);
}

.analytics-filters {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 0.75rem;
}

.analytics-table-container {
  overflow-x: auto;
}

.analytics-table {
  margin: 0;
  font-size: 0.85rem;
}

.analytics-table th {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-300);
  font-weight: 600;
  color: var(--gray-700);
  padding: 0.75rem;
  font-size: 0.8rem;
}

.analytics-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--gray-200);
  vertical-align: middle;
}

.agent-link {
  color: var(--primary-blue);
  text-decoration: none;
  font-weight: 500;
}

.agent-link:hover {
  text-decoration: underline;
}

.badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
}

.bg-warning {
  background-color: var(--warning-orange) !important;
  color: var(--gray-900);
}

/* Compact Modal */
.modal-content {
  border-radius: var(--border-radius-lg);
  border: none;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-300);
  padding: 1rem 1.5rem;
}

.modal-title {
  font-family: "Roboto", sans-serif;
  font-weight: 600;
  color: var(--gray-900);
  font-size: 1rem;
}

.modal-body {
  padding: 1.5rem;
}

.form-label {
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
}

.form-control,
.form-select {
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius);
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.form-control-sm,
.form-select-sm {
  padding: 0.5rem 0.75rem;
  height: auto;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.1);
  outline: none;
}

.form-text {
  font-size: 0.75rem;
  color: var(--gray-600);
  margin-top: 0.25rem;
}

.form-text a {
  color: var(--primary-blue);
  text-decoration: none;
}

.form-text a:hover {
  text-decoration: underline;
}

.btn-primary {
  background: var(--primary-blue);
  border-color: var(--primary-blue);
  font-weight: 600;
  border-radius: var(--border-radius);
  transition: all 0.2s ease;
  font-size: 0.85rem;
}

.btn-primary:hover {
  background: var(--primary-blue-dark);
  border-color: var(--primary-blue-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--gray-100);
  border-color: var(--gray-300);
  color: var(--gray-700);
  font-weight: 600;
  border-radius: var(--border-radius);
  font-size: 0.85rem;
}

.btn-secondary:hover {
  background: var(--gray-200);
  border-color: var(--gray-400);
  color: var(--gray-800);
}

.btn-sm {
  padding: 0.5rem 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .main-content {
    padding: 1rem 0;
  }

  .search-section {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .view-options {
    justify-content: center;
  }

  .agents-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.75rem;
  }

  .analytics-section {
    padding: 1rem;
  }

  .analytics-filters {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .modal-body {
    padding: 1rem;
  }

  .agent-card .card-body {
    padding: 1rem;
  }
}

@media (max-width: 576px) {
  .header-section .navbar {
    padding: 0.5rem 0;
  }

  .brand-text {
    font-size: 1rem;
  }

  .custom-tabs .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }

  .agents-grid {
    grid-template-columns: 1fr;
  }

  .search-container {
    max-width: 100%;
  }
}

/* Smooth Transitions */
* {
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s
    ease;
}

/* Smooth animations */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.header-section * {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Tooltip Customization */
.tooltip {
  font-size: 0.75rem;
}

.tooltip-inner {
  background: var(--gray-900);
  border-radius: var(--border-radius);
  padding: 0.375rem 0.5rem;
}
