/* ========================================
   BSB Fortrade Custom Styles
   Integrating with Vuexy Template
   ======================================== */

/* Root Variables */
:root {
  --primary-color: #064e8d;
  --secondary-color: #00072b;
  --success-color: #28c76f;
  --danger-color: #ea5455;
  --warning-color: #ff9f43;
  --info-color: #00cfe8;
  --dark-color: #1e1e1e;
  --light-color: #f8f8f8;
  --border-color: #ddd;
  --text-primary: #333;
  --text-secondary: #6c757d;
}

/* Override Vuexy primary colors with BSB brand colors */
.bg-primary,
.btn-primary {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
}

.text-primary {
  color: var(--primary-color) !important;
}

/* Custom Login Page Styles */
.login-container {
  display: flex;
  min-height: 100vh;
  background: #fff;
}

.login-left {
  flex: 1;
  background: linear-gradient(135deg, rgba(6, 78, 141, 0.9), rgba(0, 7, 43, 0.9));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.login-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* opacity: 0.3; */
  position: absolute;
  top: 0;
  left: 0;
}

.login-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: #fff;
}

.login-form-wrapper {
  width: 100%;
  max-width: 450px;
}

.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.logo-img {
  max-width: 200px;
  height: auto;
}

.login-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  text-align: center;
}

.login-description {
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

/* Dashboard Layout Overrides */
.dashboard-container {
  display: flex;
  min-height: 100vh;
  background: #f8f8f8;
}

.dashboard-sidebar {
  width: 260px;
  background: #fff;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  z-index: 1000;
  overflow-y: auto;
}

.dashboard-sidebar.collapsed {
  width: 80px;
}

.dashboard-main {
  flex: 1;
  margin-left: 260px;
  transition: margin-left 0.3s ease;
}

.dashboard-sidebar.collapsed+.dashboard-main {
  margin-left: 80px;
}

.dashboard-header {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 999;
}

/* Sidebar Styles */
.sidebar-header {
  padding: 1.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f0f0f0;
}

.sidebar-logo-img {
  max-width: 150px;
  height: auto;
}

.sidebar-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0.5rem;
  transition: all 0.3s ease;
}

.sidebar-toggle:hover {
  color: var(--primary-color);
}

.nav-menu-list {
  list-style: none;
  padding: 1rem 0;
  margin: 0;
}

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

.nav-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover {
  background: #f8f8f8;
  color: var(--primary-color);
}

.nav-link.active {
  background: linear-gradient(90deg, rgba(6, 78, 141, 0.1), transparent);
  color: var(--primary-color);
  border-left: 3px solid var(--primary-color);
}

.nav-link i {
  margin-right: 1rem;
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

.nav-section-title {
  display: block;
  padding: 1rem 1.5rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Header Search Bar */
.search-bar {
  flex: 1;
  max-width: 600px;
  position: relative;
}

.search-bar i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 3rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(6, 78, 141, 0.1);
}

/* Header Right Icons */
.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
}

.header-icon-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.3s ease;
  position: relative;
}

.header-icon-btn:hover {
  background: #f8f8f8;
  color: var(--primary-color);
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-color);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.user-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(6, 78, 141, 0.3);
}

/* Dashboard Content */
.dashboard-content {
  padding: 1.5rem;
  min-height: calc(100vh - 80px);
}

/* Dashboard Banner */
.dashboard-banner {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 12px;
  padding: 3rem 2rem;
  margin-bottom: 2rem;
  color: #fff;
  text-align: center;
  background-size: cover;
  background-position: center;
}

.banner-content h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.btn-add-offer {
  background: #fff;
  color: var(--primary-color);
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-add-offer:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Data Table Styles */
.data-table-container {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 1.5rem;
}

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

.table-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
  .dashboard-sidebar {
    transform: translateX(-100%);
  }

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

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

  .login-container {
    flex-direction: column;
  }

  .login-left {
    min-height: 200px;
  }
}

/* Notification Popup */
.notification-popup {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  width: 320px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
}

.notification-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #f0f0f0;
  font-weight: 600;
  color: var(--text-primary);
}

.notification-body {
  padding: 0.5rem 0;
}

.notification-item {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #f8f8f8;
  cursor: pointer;
  transition: background 0.2s ease;
}

.notification-item:hover {
  background: #f8f8f8;
}

.notification-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.notification-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.notification-time {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* User Menu */
.user-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  min-width: 180px;
  z-index: 1000;
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.2s ease;
}

.user-menu-item:hover {
  background: #f8f8f8;
}

.user-menu-item.logout {
  color: var(--danger-color);
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.breadcrumb-item {
  color: var(--text-secondary);
  text-decoration: none;
}

.breadcrumb-item:hover {
  color: var(--primary-color);
}

.breadcrumb-separator {
  color: var(--text-secondary);
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(6, 78, 141, 0.1);
}

/* Button Styles */
.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  font-size: 0.95rem;
}

.btn-primary {
  background: var(--primary-color);
  color: #fff;
}

.btn-primary:hover {
  background: #053d6f;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(6, 78, 141, 0.3);
}

/* Loading Spinner */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f0f0f0;
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Error Message */
.error-message {
  background: #fff5f5;
  border: 1px solid #feb2b2;
  color: #c53030;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

/* Success Message */
.success-message {
  background: #f0fff4;
  border: 1px solid #9ae6b4;
  color: #22543d;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}