/* Base Layout CSS - Extracted from base.html */

:root {
  --primary-color: #246cf9;
  --secondary-color: #f9fafb;
  --success-color: #20c997;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #0dcaf0;
  --light-color: #f8f9fa;
  --dark-color: #212529;
}

.text-gradient {
  background:
    linear-gradient(180deg, #4685ff 0%, #246cf9 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2));
  -webkit-background-clip: text; /* Chrome, Safari */
  -webkit-text-fill-color: transparent;
  background-clip: text; /* Firefox */
  color: transparent;
}

body {
  font-family: "Inter", sans-serif;
}

/* Sidebar Styles */
.sidebar {
  width: 270px;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  background: white;
  border-right: 1px solid #dee2e6;
  z-index: 1000;
  overflow-y: auto;
  transition: transform 0.3s ease;
}

.sidebar-brand {
  text-align: center;
  padding-top: 1.5rem;
  font-size: 28px;
  line-height: 32px;
  font-weight: 700;
}

.btn-transfer {
  width: 200px;
}

.sidebar-nav {
  padding: 1rem 0;
}

.nav-item {
  margin-bottom: 0.25rem;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 1rem 1rem;
  font-size: 16px;
  color: #727688;
  text-decoration: none;
  border-radius: 0;
  margin: 0 0.5rem;
  transition: all 0.15s ease;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(70, 133, 255, 0.08);
  font-weight: 600;
}

.nav-link:hover span,
.nav-link:hover > i,
.nav-link.active span,
.nav-link.active > i {
  color: #246cf9;
}

.nav-link:hover .nav-icon,
.nav-link.active .nav-icon {
  filter: invert(0%) sepia(100%) saturate(2000%) hue-rotate(202deg)
    brightness(80%);
}

.nav-link i {
  width: 20px;
  margin-right: 0.75rem;
  text-align: center;
}

.nav-icon {
  width: 20px;
  height: 20px;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

/* Main Content */
.main-content {
  margin-left: 270px;
  padding: 0;
  transition: margin-left 0.3s ease;
}

.top-bar {
  background: white;
  border-bottom: 1px solid #dee2e6;
  padding: 0.75rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 100;
}

.page-content {
  padding: 2rem;
}

.page-header {
  margin-bottom: 2rem;
}

.page-title {
  /* color: #212529; */
  margin: 0;
  font-size: 28px;
  line-height: 32px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 600px;
}

.card {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Button Styles */
.btn {
  font-size: 14px;
}

.btn-primary {
  background:
    linear-gradient(180deg, #4685ff 0%, #246cf9 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2));
  border-color: transparent;
  padding: 8px 16px;
  border-radius: 8px;
  color: white;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background:
    linear-gradient(180deg, #3a7bff 0%, #1e5cf0 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3));
  border-color: transparent;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(70, 133, 255, 0.3);
}

.btn-primary:focus {
  background:
    linear-gradient(180deg, #4685ff 0%, #246cf9 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2));
  border-color: transparent;
  box-shadow: 0 0 0 0.2rem rgba(70, 133, 255, 0.25);
}

.btn-primary:active {
  background:
    linear-gradient(180deg, #2e6bff 0%, #1a4ce8 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4));
  border-color: transparent;
  transform: translateY(0);
}

/* User Interface */
.user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
}

/* Mobile Overlay */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.sidebar-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
  }

  .main-content {
    margin-left: 0;
  }

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

  .top-bar {
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .page-title {
    font-size: 1.25rem;
    flex: 1;
    min-width: 0;
  }

  .user-info {
    display: none;
  }

  .user-info-mobile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .btn-responsive {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
  }

  .btn-responsive .d-none-mobile {
    display: none !important;
  }

  .page-content {
    padding: 1rem;
  }

  /* Mobile Navigation Tabs */
  .nav-tabs-mobile {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .nav-tabs-mobile::-webkit-scrollbar {
    display: none;
  }

  .nav-tabs-mobile .nav-link {
    white-space: nowrap;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 576px) {
  .top-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .top-bar > div {
    justify-content: space-between;
  }

  .page-title {
    font-size: 1.125rem;
  }

  .btn-responsive {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
  }
}

/* Add Bot Popup (SweetAlert2) - matches design */
.swal-add-bot-popup {
  border-radius: 16px;
  padding: 32px 32px 28px;
  max-width: 480px;
}

.swal-add-bot-popup .swal2-title {
  font-size: 22px;
  font-weight: 700;
  color: #212529;
  padding: 0 0 16px;
  text-align: center;
}

.swal-add-bot-popup .swal2-html-container {
  padding: 0;
  text-align: center;
  margin: 0;
}

.swal-add-bot-popup .swal2-close {
  top: 12px;
  right: 12px;
  font-size: 16px;
  color: #6c757d;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.swal-add-bot-popup .swal2-close:hover {
  background-color: #dee2e6;
  color: #495057;
}
