/* custom.css - COMPLETE WORKING VERSION WITH FIXED SIDEBAR TOGGLE */

/* ===== BASE STYLES ===== */
:root {
  --primary-gradient-start: #667eea;
  --primary-gradient-end: #764ba2;
  --primary-color: #667eea;
  --secondary-color: #6c757d;
  --success-color: #198754;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #0dcaf0;
  --light-color: #f8f9fa;
  --dark-color: #212529;
  --sidebar-width: 280px;
  --navbar-height: 56px;
  --content-padding-top: 20px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%; /* Prevent font scaling in landscape */
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
  min-height: 100vh;
  padding-top: 0 !important;
  font-size: 14px; /* Base font size */
}

/* ===== NAVBAR STYLES ===== */
.navbar {
  min-height: var(--navbar-height);
}

.navbar-dark.bg-dark {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  height: var(--navbar-height);
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1030;
  width: 100%;
}

.navbar-dark .navbar-brand {
  color: white !important;
  font-weight: bold;
  font-size: 1.1rem;
  padding: 0.5rem 0;
}

.navbar-dark .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500;
  padding: 0.5rem 1rem;
}

.navbar-dark .navbar-nav .nav-link:hover {
  color: white !important;
}

.navbar .nav-link.dropdown-toggle {
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.navbar .badge.bg-light.text-dark {
  background-color: rgba(255, 255, 255, 0.9) !important;
  color: #212529 !important;
  font-weight: 600;
  margin-left: 0.5rem;
  font-size: 0.75rem;
}

.navbar-toggler {
  padding: 0.25rem 0.5rem;
  font-size: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.dropdown-menu {
  border-radius: 0.5rem;
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  margin-top: 0.5rem !important;
  font-size: 0.875rem;
}

.dropdown-item {
  padding: 0.5rem 1rem;
  transition: all 0.2s;
  font-size: 0.875rem;
}

.dropdown-item:hover {
  background-color: rgba(102, 126, 234, 0.1);
}

/* ===== LAYOUT STRUCTURE ===== */
.layout-wrapper {
  margin-top: var(--navbar-height) !important;
  padding-top: var(--content-padding-top) !important;
  min-height: calc(100vh - var(--navbar-height));
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* ===== MAIN CONTENT AREA ===== */
.main-content {
  margin-left: var(--sidebar-width);
  transition: all 0.3s ease;
  min-height: calc(100vh - var(--navbar-height));
  background-color: #f8f9fa;
  padding: var(--content-padding-top) 20px 20px;
  width: calc(100% - var(--sidebar-width));
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
  position: relative;
  left: 0;
}

.main-content.sidebar-hidden {
  margin-left: 0;
  width: 100% !important;
  max-width: 100% !important;
  left: 0;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-width);
  height: calc(100vh - var(--navbar-height));
  position: fixed;
  left: 0;
  top: var(--navbar-height);
  transition: transform 0.3s ease;
  z-index: 1025;
  overflow-y: auto;
  overflow-x: hidden;
  background: linear-gradient(180deg, #2d3748 0%, #1a202c 100%);
  box-shadow: 3px 0 10px rgba(0, 0, 0, 0.1);
  transform: translateX(0);
}

/* Sidebar states for toggle functionality */
.sidebar.hidden {
  transform: translateX(-280px);
}

/* For mobile sidebar - open state */
.sidebar.mobile-open {
  transform: translateX(0);
  z-index: 1035; /* Higher on mobile when open */
}

.sidebar .nav-link {
  color: #cbd5e0;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.25rem;
  transition: all 0.3s ease;
  border: none;
  font-weight: 500;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar .nav-link:hover {
  color: #fff;
  background-color: #4a5568;
  transform: translateX(5px);
}

.sidebar .nav-link.active {
  color: #fff;
  background: linear-gradient(
    135deg,
    var(--primary-gradient-start) 0%,
    var(--primary-gradient-end) 100%
  );
  box-shadow: 0 4px 15px rgba(116, 75, 162, 0.3);
  border: none;
}

.sidebar .nav-link i {
  width: 20px;
  text-align: center;
  font-size: 0.9rem;
}

/* Sidebar toggle button */
.sidebar-toggle {
  position: fixed;
  top: calc(var(--navbar-height) + 15px);
  left: 10px;
  z-index: 1035;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: #2d3748;
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.sidebar-toggle:hover {
  background: #4a5568;
  transform: scale(1.1);
}

.sidebar-toggle.sidebar-hidden {
  left: 10px !important;
  background: #667eea;
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1020;
  display: none;
  cursor: pointer;
}

/* ===== PAGE HEADER ===== */
.page-header {
  background: #fff;
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-top: 0 !important;
  margin-bottom: 1.25rem;
  box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
  border-left: 4px solid #667eea;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  word-wrap: break-word;
}

.page-header h1 {
  color: #5a5c69;
  font-weight: 700;
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.2;
}

.breadcrumb {
  background: transparent;
  padding: 0;
  margin-bottom: 0;
  margin-top: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
}

.breadcrumb-item a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
}

.breadcrumb-item.active {
  color: #718096;
}

/* ===== PAGE CONTENT ===== */
.page-content {
  background: #fff;
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
  margin-bottom: 1.5rem;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* ===== CARDS ===== */
.card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  overflow: hidden;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  margin-bottom: 1.25rem;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12) !important;
}

.card-header {
  background: #fff;
  border-bottom: 1px solid #e3e6f0;
  padding: 1rem 1.25rem;
  font-weight: 700;
  color: #5a5c69;
  width: 100%;
  font-size: 1rem;
}

.card-body {
  padding: 1.25rem;
}

.card-footer {
  background: #fff;
  border-top: 1px solid #e3e6f0;
  padding: 1rem 1.25rem;
}

/* ===== STATS CARDS ===== */
.stats-card {
  transition: all 0.3s ease;
  border-radius: 12px;
  overflow: hidden;
  height: 100%;
  border-left: 4px solid !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

.stats-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

.stats-card .card-body {
  padding: 1.5rem;
}

.stats-number {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.5rem;
  word-wrap: break-word;
}

.stats-title {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.stats-subtitle {
  font-size: 0.8rem;
  opacity: 0.8;
}

.stats-icon {
  font-size: 2rem;
  opacity: 0.8;
  transition: transform 0.3s ease;
}

.stats-card:hover .stats-icon {
  transform: scale(1.1) translateX(3px);
}

.stats-arrow {
  font-size: 1rem;
  opacity: 0.7;
  transition: transform 0.3s ease;
}

.stats-card:hover .stats-arrow {
  transform: translateX(3px);
}

.dashboard-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.dashboard-link:hover {
  color: inherit;
}

/* ===== TABLES ===== */
.table {
  background-color: white;
  border-radius: 0.5rem;
  overflow: hidden;
  width: 100% !important;
  max-width: 100% !important;
  margin-bottom: 0;
  font-size: 0.875rem;
}

.table thead th {
  border-bottom: 2px solid #e3e6f0;
  font-weight: 700;
  color: #5a5c69;
  background-color: #f8f9fc;
  padding: 0.75rem 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.85rem;
}

.table-hover tbody tr:hover {
  background-color: rgba(102, 126, 234, 0.05);
}

.table tbody td {
  padding: 0.75rem 0.5rem;
  vertical-align: middle;
  word-wrap: break-word;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-responsive {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1rem;
  border-radius: 0.5rem;
}

/* ===== BADGES ===== */
.badge {
  font-weight: 600;
  padding: 0.35em 0.65em;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  white-space: nowrap;
}

.badge.rounded-pill {
  padding: 0.4em 0.7em;
}

/* Badge gradient backgrounds */
.bg-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  border: none;
}

.bg-success {
  background: linear-gradient(135deg, #198754 0%, #157347 100%) !important;
  border: none;
}

.bg-warning {
  background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%) !important;
  border: none;
}

.bg-danger {
  background: linear-gradient(135deg, #dc3545 0%, #bb2d3b 100%) !important;
  border: none;
}

.bg-info {
  background: linear-gradient(135deg, #0dcaf0 0%, #0ba6c8 100%) !important;
  border: none;
}

.bg-secondary {
  background: linear-gradient(135deg, #6c757d 0%, #5c636a 100%) !important;
  border: none;
}

/* ===== BUTTONS ===== */
.btn {
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.3s ease;
  white-space: nowrap;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--primary-gradient-start) 0%,
    var(--primary-gradient-end) 100%
  );
  border: none;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-outline-primary {
  color: var(--primary-gradient-start);
  border-color: var(--primary-gradient-start);
}

.btn-outline-primary:hover {
  background: linear-gradient(
    135deg,
    var(--primary-gradient-start) 0%,
    var(--primary-gradient-end) 100%
  );
  border-color: transparent;
}

/* ===== FORMS ===== */
.form-control,
.form-select {
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid #ced4da;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-gradient-start);
  box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
}

.form-label {
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

/* ===== ALERTS ===== */
.alert {
  border: none;
  border-left: 4px solid;
  border-radius: 0.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  width: 100%;
  word-wrap: break-word;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.alert-success {
  border-left-color: var(--success-color);
  background-color: #d1e7dd;
}

.alert-danger {
  border-left-color: var(--danger-color);
  background-color: #f8d7da;
}

.alert-warning {
  border-left-color: var(--warning-color);
  background-color: #fff3cd;
}

.alert-info {
  border-left-color: var(--info-color);
  background-color: #cff4fc;
}

/* ===== TEXT COLORS ===== */
.text-primary {
  color: #667eea !important;
}
.text-success {
  color: #198754 !important;
}
.text-warning {
  color: #ffc107 !important;
}
.text-danger {
  color: #dc3545 !important;
}
.text-info {
  color: #0dcaf0 !important;
}

/* ===== BORDER LEFT COLORS ===== */
.border-left-primary {
  border-left-color: #667eea !important;
}
.border-left-success {
  border-left-color: #198754 !important;
}
.border-left-warning {
  border-left-color: #ffc107 !important;
}
.border-left-danger {
  border-left-color: #dc3545 !important;
}
.border-left-info {
  border-left-color: #0dcaf0 !important;
}

/* ===== LOGIN STYLES ===== */
.login-container {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;
  padding-top: calc(var(--navbar-height) + 20px) !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

.login-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 15px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.login-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 2rem 1.5rem;
  text-align: center;
  position: relative;
}

.login-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.login-body {
  padding: 1.5rem;
}

.login-body .form-control {
  border-radius: 8px;
  padding: 0.75rem;
  border: 2px solid #e2e8f0;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.btn-login {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 8px;
  padding: 0.75rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  font-size: 0.9rem;
}

/* ===== HOMEPAGE STYLES ===== */
.modern-hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 100px 0 80px;
  padding-top: calc(var(--navbar-height) + 80px) !important;
  position: relative;
  overflow: hidden;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

.hero-title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.btn-hero {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  color: white;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Extra small devices (phones, less than 576px) */
@media (max-width: 575.98px) {
  :root {
    --content-padding-top: 15px;
    --navbar-height: 56px;
  }

  body {
    font-size: 13px;
  }

  .navbar-brand {
    font-size: 1rem;
  }

  .navbar-nav .nav-link {
    padding: 0.5rem;
  }

  .page-header {
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .page-header h1 {
    font-size: 1.25rem;
  }

  .page-content {
    padding: 1rem;
  }

  .stats-number {
    font-size: 2rem;
  }

  .stats-icon {
    font-size: 1.5rem;
  }

  .card-body {
    padding: 1rem;
  }

  .card-header {
    padding: 0.75rem 1rem;
  }

  .table thead th,
  .table tbody td {
    padding: 0.5rem 0.25rem;
    font-size: 0.8rem;
  }

  .btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
  }
}

/* Small devices (tablets, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  .hero-title {
    font-size: 2.25rem;
  }

  .stats-number {
    font-size: 2.25rem;
  }

  .page-header h1 {
    font-size: 1.5rem;
  }
}

/* Medium devices (tablets, 768px and up) */
@media (max-width: 767.98px) {
  .sidebar {
    transform: translateX(-280px);
    width: 280px;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0 !important;
    padding: var(--content-padding-top) 15px 15px;
    width: 100vw !important;
    max-width: 100vw !important;
  }

  .sidebar-toggle {
    display: flex !important;
    top: calc(var(--navbar-height) + 10px);
  }

  /* Hide sidebar toggle on desktop */
  @media (min-width: 768px) {
    .sidebar-toggle {
      display: none !important;
    }
  }

  .container {
    padding-top: calc(var(--navbar-height) + 15px) !important;
  }

  .login-container {
    padding: 15px;
    padding-top: calc(var(--navbar-height) + 15px) !important;
  }

  .modern-hero {
    padding: 80px 0 60px;
    padding-top: calc(var(--navbar-height) + 60px) !important;
  }

  /* Stack columns on mobile */
  .col-md-6,
  .col-lg-4,
  .col-xl-3,
  .col-xl-4 {
    margin-bottom: 1rem;
  }

  /* Table responsiveness */
  .table-responsive {
    margin-left: -15px;
    margin-right: -15px;
    width: calc(100% + 30px) !important;
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .stats-number {
    font-size: 3rem;
  }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  .hero-title {
    font-size: 3rem;
  }

  .stats-number {
    font-size: 3.5rem;
  }
}

/* Container fixes */
.container,
.container-fluid {
  width: 100% !important;
  max-width: 100% !important;
  padding-right: 15px !important;
  padding-left: 15px !important;
  margin-right: auto !important;
  margin-left: auto !important;
  overflow-x: hidden;
}

/* Row and column spacing */
.row {
  margin-right: -15px !important;
  margin-left: -15px !important;
  width: calc(100% + 30px) !important;
}

.col,
[class*="col-"] {
  padding-right: 15px !important;
  padding-left: 15px !important;
}

/* Ensure images are responsive */
img {
  max-width: 100%;
  height: auto;
}

/* Prevent text overflow */
.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Utility classes */
.mt-0 {
  margin-top: 0 !important;
}
.pt-0 {
  padding-top: 0 !important;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(
    135deg,
    var(--primary-gradient-start) 0%,
    var(--primary-gradient-end) 100%
  );
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #5a6fd9 0%, #693f9d 100%);
}

/* Loading animation */
.loading {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid #f3f3f3;
  border-top: 2px solid var(--primary-gradient-start);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Print styles */
@media print {
  .navbar,
  .sidebar,
  .sidebar-toggle,
  .sidebar-overlay {
    display: none !important;
  }

  .layout-wrapper,
  .main-content {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }

  .page-header,
  .page-content {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .navbar-dark.bg-dark {
    background: #000 !important;
  }

  .btn-primary {
    background: #000 !important;
    border: 2px solid #fff !important;
  }
}

/* Additional CSS for sidebar fix - ADDED THESE STYLES */
/* Ensure container-fluid doesn't cause horizontal scroll */
.container-fluid {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
}

/* Prevent horizontal overflow */
.row {
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: 100% !important;
}

/* Ensure all columns are properly contained */
.col,
[class*="col-"] {
  padding-left: 15px !important;
  padding-right: 15px !important;
}

/* NEW: Full width when sidebar is hidden */
.main-content.full-width {
  width: 100% !important;
  margin-left: 0 !important;
  transition: all 0.3s ease;
}

/* NEW: Adjust sidebar toggle button position when sidebar is hidden */
.sidebar-toggle.sidebar-hidden {
  left: 10px !important;
}
/* FIX 1: Add to custom.css - Fixed width calculations */
.main-content.expanded {
  margin-left: 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
  transition: all 0.3s ease;
}

/* FIX 2: Container width fix */
.container-fluid {
  width: 100% !important;
  max-width: 100% !important;
  padding-left: 15px !important;
  padding-right: 15px !important;
  overflow-x: hidden !important;
}

/* FIX 3: Prevent horizontal scroll */
html,
body {
  overflow-x: hidden !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* FIX 4: Navbar positioning fix */
.navbar {
  width: 100% !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 1035 !important;
}

/* FIX 5: Sidebar toggle position fix */
.sidebar-toggle {
  position: fixed !important;
  top: 70px !important;
  left: 20px !important;
  z-index: 1040 !important;
}

/* FIX 6: When sidebar is hidden */
.sidebar.hidden ~ .main-content {
  width: 100vw !important;
  margin-left: 0 !important;
}

/* FIX 7: Mobile adjustments */
@media (max-width: 767.98px) {
  .sidebar {
    transform: translateX(-280px);
    z-index: 1050 !important;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .main-content {
    width: 100vw !important;
    margin-left: 0 !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
}
/* Add these to custom.css */

/* FIX: When sidebar is visible, make content take remaining space properly */
.main-content:not(.expanded) {
  width: calc(100vw - 280px) !important;
  margin-left: 280px !important;
  max-width: calc(100vw - 280px) !important;
}

/* FIX: When sidebar is hidden, content takes full width */
.main-content.expanded {
  width: 100vw !important;
  margin-left: 0 !important;
  max-width: 100vw !important;
}

/* FIX: Container fluid should always take full width of its parent */
.main-content .container-fluid {
  width: 100% !important;
  max-width: 100% !important;
  padding-left: 15px !important;
  padding-right: 15px !important;
}

/* FIX: Remove any extra padding/margin on page content */
.page-content,
.page-header,
.card {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* FIX: Ensure row takes full width */
.row {
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* FIX: Remove any horizontal scroll */
html,
body {
  overflow-x: hidden !important;
  width: 100% !important;
}

/* FIX: Mobile adjustments */
@media (max-width: 767.98px) {
  .main-content {
    width: 100vw !important;
    margin-left: 0 !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
}
/* ===== NAVBAR DROPDOWN FIX - DROPS OUTSIDE NAVBAR ===== */

/* Navbar base z-index - above sidebar */
.navbar {
  z-index: 1070 !important;
  min-height: 56px;
  overflow: visible !important;
}

/* Dropdown container - allow dropdown to extend outside */
.navbar-nav .dropdown {
  position: static !important;
}

/* Dropdown menu - position absolutely outside navbar */
.navbar-nav .dropdown-menu {
  position: absolute !important;
  top: 100% !important; /* Position below navbar */
  right: 20px !important; /* Align with right edge */
  left: auto !important;
  margin-top: 0 !important;
  z-index: 1100 !important; /* Higher than everything */
  min-width: 200px !important;
  border-radius: 8px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

/* Make sure dropdown is not constrained by navbar */
.navbar-nav {
  position: static !important;
}

.navbar .container-fluid {
  position: static !important;
  overflow: visible !important;
}

/* Dropdown header styling */
.dropdown-header {
  padding: 0.5rem 1rem !important;
  margin-bottom: 0 !important;
  white-space: nowrap !important;
}

/* Ensure sidebar elements stay below dropdown */
.sidebar {
  z-index: 1030 !important;
}

.sidebar-overlay {
  z-index: 1020 !important;
}

.sidebar-toggle {
  z-index: 1040 !important;
}

/* Make sure dropdown items are visible */
.dropdown-item {
  z-index: 1105 !important;
  position: relative !important;
}

/* Bootstrap override to ensure dropdown is visible */
.dropdown-menu.show {
  display: block !important;
  transform: none !important;
}

/* Remove any overflow hidden that might clip dropdown */
body,
.layout-wrapper,
.main-wrapper {
  overflow: visible !important;
}

/* Ensure navbar doesn't clip dropdown */
.navbar-collapse {
  overflow: visible !important;
}

/* Fix for mobile view */
@media (max-width: 767.98px) {
  .navbar-nav .dropdown-menu {
    right: 10px !important;
    left: 10px !important;
    position: fixed !important;
    top: 60px !important;
    width: auto !important;
  }
}

/* Ensure dropdown appears above all other content */
.dropdown-menu-end {
  --bs-position: end;
}
/* ===== PLATFORM MODAL STYLES ===== */

/* Custom Modal Styles for Platforms */
.platform-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Force display flex for any modal with display block */
.platform-modal[style*="display: block"] {
  display: flex !important;
}

.platform-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9998;
}

.platform-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 700px; /* Smaller than before (was 800px) */
  margin: 1.75rem auto;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 100px);
}

.platform-modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 15px;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  outline: 0;
  overflow: hidden;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.platform-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid #e3e6f0;
  background-color: #fff;
  flex-shrink: 0;
}

.platform-modal-title {
  margin: 0;
  font-weight: bold;
  color: #667eea;
  font-size: 1.25rem;
}

.platform-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  font-weight: bold;
  color: #6c757d;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.3s;
  line-height: 1;
  padding: 0;
  margin: 0;
}

.platform-modal-close:hover {
  opacity: 1;
  color: #dc3545;
  text-decoration: none;
}

.platform-modal-body {
  position: relative;
  flex: 1 1 auto;
  padding: 1.5rem;
  overflow-y: auto;
  max-height: calc(70vh - 120px);
  min-height: 200px;
}

.platform-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 1.5rem;
  border-top: 1px solid #e3e6f0;
  background-color: #fff;
  gap: 0.5rem;
  flex-shrink: 0; /* Prevent footer from shrinking */
  margin-top: auto; /* Push to bottom */
}

/* Ensure buttons are fully visible */
.platform-modal-footer .btn {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 100px;
}

/* Platform specific styles */
.platform-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.color-preview {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 1px solid #dee2e6;
}

.form-control-color {
  height: 42px;
  width: 42px;
  padding: 0.25rem;
  cursor: pointer;
}

/* Platform modal form styles */
.platform-modal input.form-control,
.platform-modal .form-select {
  border-radius: 10px;
  padding: 0.75rem;
  border: 2px solid #e3e6f0;
  font-size: 0.875rem;
}

.platform-modal input.form-control:focus,
.platform-modal .form-select:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Platform preview box */
#platformPreview,
#editPlatformPreview {
  min-height: 60px;
  transition: all 0.3s ease;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

/* Common platform buttons in modal */
.platform-modal .btn-outline-secondary {
  border-radius: 6px;
  padding: 0.375rem 0.75rem;
  font-size: 0.8rem;
}

.platform-modal .btn-outline-secondary:hover {
  background-color: rgba(102, 126, 234, 0.1);
  border-color: #667eea;
}

/* Required field indicator */
.required:after {
  content: " *";
  color: #dc3545;
}

/* Prevent body scroll when modal is open */
body.modal-open {
  overflow: hidden !important;
  padding-right: 0 !important;
}

/* Modal form labels */
.platform-modal .form-label {
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #495057;
}

.platform-modal .form-text {
  font-size: 0.8rem;
  color: #6c757d;
}

/* Card inside modal */
.platform-modal .card {
  border: 2px solid #e3e6f0;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.platform-modal .card-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #e3e6f0;
  padding: 0.75rem 1rem;
}

.platform-modal .card-body {
  padding: 1rem;
}

/* Example buttons grid */
.platform-modal .row.g-2 {
  margin: -0.25rem;
}

.platform-modal .row.g-2 > .col-auto {
  padding: 0.25rem;
}

/* Input group for color picker */
.platform-modal .input-group {
  border-radius: 10px;
  overflow: hidden;
}

.platform-modal .input-group .form-control-color {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.platform-modal .input-group .form-control {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-left: none;
}

/* Ensure modal is responsive */
@media (max-width: 768px) {
  .platform-modal-dialog {
    max-width: 95%;
    margin: 1rem auto;
  }

  .platform-modal-content {
    max-height: 90vh;
  }

  .platform-modal-body {
    max-height: calc(75vh - 120px);
    padding: 1rem;
  }

  .platform-modal-header,
  .platform-modal-footer {
    padding: 1rem;
  }

  .platform-modal-footer {
    flex-wrap: wrap;
  }

  .platform-modal-footer .btn {
    flex: 1;
    min-width: auto;
    margin: 0.25rem;
  }
}

@media (max-height: 700px) {
  .platform-modal-content {
    max-height: 95vh;
    margin-top: 10px;
  }

  .platform-modal-body {
    max-height: calc(80vh - 120px);
  }
}

/* Animation for modal appearance */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.platform-modal-content {
  animation: modalFadeIn 0.3s ease-out;
}

/* Ensure backdrop click works properly */
.platform-modal-backdrop {
  cursor: pointer;
}

/* Make sure modal is above everything */
.platform-modal {
  z-index: 9999 !important;
}

.platform-modal-backdrop {
  z-index: 9998 !important;
}

/* Fix for input validation states */
.platform-modal .form-control.is-invalid {
  border-color: #dc3545;
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.platform-modal .form-control.is-invalid:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

/* Improve scrollbar in modal */
.platform-modal-body::-webkit-scrollbar {
  width: 8px;
}

.platform-modal-body::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.platform-modal-body::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.platform-modal-body::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

/* ===== USER MODAL STYLES ===== */

/* Custom Modal Styles for Users */
.user-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Force display flex for any user modal with display block */
.user-modal[style*="display: block"] {
  display: flex !important;
}

.user-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9998;
}

.user-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 1.75rem auto;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 100px);
}

.user-modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 15px;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  outline: 0;
  overflow: hidden;
  max-height: 85vh; /* Reduced from 90vh */
  display: flex;
  flex-direction: column;
}

.user-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid #e3e6f0;
  background-color: #fff;
  flex-shrink: 0;
}

.user-modal-title {
  margin: 0;
  font-weight: bold;
  color: #667eea;
  font-size: 1.25rem;
}

.user-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  font-weight: bold;
  color: #6c757d;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.3s;
  line-height: 1;
  padding: 0;
  margin: 0;
}

.user-modal-close:hover {
  opacity: 1;
  color: #dc3545;
  text-decoration: none;
}

.user-modal-body {
  position: relative;
  flex: 1 1 auto;
  padding: 1.5rem;
  overflow-y: auto;
  min-height: 300px;
  /* Dynamic height that adjusts */
  max-height: calc(70vh - 140px);
}

.user-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 1.5rem;
  border-top: 1px solid #e3e6f0;
  background-color: #fff;
  gap: 0.5rem;
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  background: #fff;
  z-index: 10;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

/* Ensure buttons are always visible */
.user-modal-footer .btn {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 100px;
  padding: 0.5rem 1.5rem;
}

/* User modal form styles */
.user-modal input.form-control,
.user-modal .form-select {
  border-radius: 10px;
  padding: 0.75rem;
  border: 2px solid #e3e6f0;
  font-size: 0.875rem;
}

.user-modal input.form-control:focus,
.user-modal .form-select:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Form switch styling */
.user-modal .form-switch .form-check-input {
  width: 3em;
  height: 1.5em;
  cursor: pointer;
}

.user-modal .form-switch .form-check-input:checked {
  background-color: #667eea;
  border-color: #667eea;
}

/* Password fields card */
.user-modal .card {
  border: 2px solid #e3e6f0;
  border-radius: 10px;
  margin-bottom: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.user-modal .card-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #e3e6f0;
  padding: 0.75rem 1rem;
  cursor: pointer;
}

.user-modal .card-body {
  padding: 1rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

/* When password fields are shown */
.user-modal .card-body[style*="display: block"] {
  display: block !important;
  max-height: 500px;
  padding: 1rem;
}

/* Adjust modal when password fields expand */
.user-modal-content.expanded {
  max-height: 90vh;
}

.user-modal-content.expanded .user-modal-body {
  max-height: calc(75vh - 140px);
}

/* Ensure modal is responsive */
@media (max-width: 768px) {
  .user-modal-dialog {
    max-width: 95%;
    margin: 1rem auto;
    max-height: calc(100vh - 50px);
  }

  .user-modal-content {
    max-height: 90vh;
  }

  .user-modal-body {
    padding: 1rem;
    min-height: 250px;
    max-height: calc(70vh - 120px);
  }

  .user-modal-header,
  .user-modal-footer {
    padding: 1rem;
  }

  .user-modal-footer {
    flex-wrap: wrap;
  }

  .user-modal-footer .btn {
    flex: 1;
    min-width: auto;
    margin: 0.25rem;
  }

  .user-modal-content.expanded .user-modal-body {
    max-height: calc(75vh - 120px);
  }
}

@media (max-height: 700px) {
  .user-modal-content {
    max-height: 90vh;
    margin-top: 10px;
  }

  .user-modal-body {
    max-height: calc(65vh - 140px);
  }

  .user-modal-content.expanded {
    max-height: 95vh;
  }

  .user-modal-content.expanded .user-modal-body {
    max-height: calc(70vh - 140px);
  }
}

/* Animation for modal appearance */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-modal-content {
  animation: modalFadeIn 0.3s ease-out;
}

/* Fix for input validation states */
.user-modal .form-control.is-invalid {
  border-color: #dc3545;
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.user-modal .form-control.is-invalid:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

/* Improve scrollbar in modal */
.user-modal-body::-webkit-scrollbar {
  width: 8px;
}

.user-modal-body::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.user-modal-body::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.user-modal-body::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

/* Avatar circle in user modals */
.user-modal .avatar-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.1rem;
}

/* Form label styling */
.user-modal .form-label {
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #495057;
}

.user-modal .form-text {
  font-size: 0.8rem;
  color: #6c757d;
}

/* Required field indicator */
.user-modal .required:after {
  content: " *";
  color: #dc3545;
}

/* Make sure modal is above everything */
.user-modal {
  z-index: 10000 !important;
}

.user-modal-backdrop {
  z-index: 9999 !important;
}

/* Ensure backdrop click works properly */
.user-modal-backdrop {
  cursor: pointer;
}

/* Ensure password fields don't push content */
#passwordFields {
  transition: all 0.3s ease;
}

/* Edit modal specific adjustments */
#editUserModal .user-modal-content {
  min-height: 500px;
}

/* Prevent body scroll when modal is open */
body.modal-open {
  overflow: hidden !important;
}

/* Form check styles */
.user-modal .form-check {
  margin-bottom: 1rem;
}

.user-modal .form-check-input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
}

/* Button hover effects */
.user-modal-footer .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Modal backdrop fade */
.user-modal-backdrop {
  animation: backdropFadeIn 0.3s ease-out;
}

@keyframes backdropFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Ensure all content is visible */
.user-modal-body > *:last-child {
  margin-bottom: 20px;
}

/* Password fields animation */
#passwordFields {
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Adjust modal for extra content */
.user-modal-content.adjust-height {
  max-height: 92vh;
}

.user-modal-content.adjust-height .user-modal-body {
  max-height: calc(77vh - 140px);
}
/* ===== PASSWORD SHOW/HIDE TOGGLE ===== */

/* Password input group */
.password-input-group {
  position: relative;
}

.password-toggle-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #6c757d;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  z-index: 5;
}

.password-toggle-btn:hover {
  color: #667eea;
  background-color: rgba(102, 126, 234, 0.1);
}

.password-toggle-btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.25);
}

/* Adjust password input padding to make room for toggle button */
.password-input-group .form-control {
  padding-right: 45px;
}

/* Password strength indicator */
.password-strength {
  margin-top: 0.5rem;
  font-size: 0.8rem;
}

.strength-bar {
  height: 4px;
  border-radius: 2px;
  background-color: #e9ecef;
  margin-top: 0.25rem;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Password strength colors */
.strength-weak .strength-fill {
  background-color: #dc3545;
  width: 33%;
}

.strength-medium .strength-fill {
  background-color: #ffc107;
  width: 66%;
}

.strength-strong .strength-fill {
  background-color: #198754;
  width: 100%;
}

/* Password requirements list */
.password-requirements {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #6c757d;
}

.password-requirements ul {
  margin: 0;
  padding-left: 1.2rem;
}

.password-requirements li {
  margin-bottom: 0.25rem;
}

.password-requirements li.valid {
  color: #198754;
}

.password-requirements li.valid::before {
  content: "✓ ";
  font-weight: bold;
}

.password-requirements li.invalid {
  color: #dc3545;
}

.password-requirements li.invalid::before {
  content: "✗ ";
  font-weight: bold;
}
/* ===== ENSURE PASSWORD TOGGLE BUTTONS WORK PROPERLY ===== */
.password-toggle-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #6c757d;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  z-index: 100 !important; /* Ensure it's above other elements */
}

.password-toggle-btn:hover {
  color: #667eea;
  background-color: rgba(102, 126, 234, 0.1);
}

.password-toggle-btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.25);
}

/* Ensure password input has enough padding for toggle button */
.password-input-group .form-control {
  padding-right: 45px !important;
}

/* Ensure the toggle button is always clickable */
.password-input-group {
  position: relative;
}

.password-input-group .password-toggle-btn {
  z-index: 10 !important;
}

/* Make sure edit modal password fields have proper styling */
#editUserModal .password-input-group {
  position: relative;
}

#editUserModal .password-toggle-btn {
  z-index: 1000 !important;
}

/* Password visibility icon states */
.password-toggle-btn .fa-eye-slash {
  color: #667eea;
}

.password-toggle-btn .fa-eye {
  color: #6c757d;
}
/* ===== BEAUTIFUL CONFIRMATION MODAL ===== */
.confirmation-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.confirmation-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  z-index: 10049;
}

.confirmation-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 1.75rem auto;
  z-index: 10051;
  display: flex;
  flex-direction: column;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.confirmation-modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  background-color: #fff;
  background-clip: padding-box;
  border: none;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
  outline: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.confirmation-modal-header {
  display: flex;
  align-items: center;
  padding: 2rem 2rem 1rem;
  border-bottom: 1px solid #e3e6f0;
  background-color: #fff;
  flex-shrink: 0;
  position: relative;
}

.confirmation-modal-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1.5rem;
  font-size: 2rem;
  flex-shrink: 0;
}

.confirmation-modal-icon-warning {
  background: linear-gradient(
    135deg,
    rgba(255, 193, 7, 0.15) 0%,
    rgba(255, 193, 7, 0.3) 100%
  );
  color: #ffc107;
  border: 3px solid rgba(255, 193, 7, 0.3);
}

.confirmation-modal-icon-danger {
  background: linear-gradient(
    135deg,
    rgba(220, 53, 69, 0.15) 0%,
    rgba(220, 53, 69, 0.3) 100%
  );
  color: #dc3545;
  border: 3px solid rgba(220, 53, 69, 0.3);
}

.confirmation-modal-icon-success {
  background: linear-gradient(
    135deg,
    rgba(25, 135, 84, 0.15) 0%,
    rgba(25, 135, 84, 0.3) 100%
  );
  color: #198754;
  border: 3px solid rgba(25, 135, 84, 0.3);
}

.confirmation-modal-icon-info {
  background: linear-gradient(
    135deg,
    rgba(13, 202, 240, 0.15) 0%,
    rgba(13, 202, 240, 0.3) 100%
  );
  color: #0dcaf0;
  border: 3px solid rgba(13, 202, 240, 0.3);
}

.confirmation-modal-title {
  margin: 0;
  font-weight: 800;
  color: #2d3748;
  font-size: 1.5rem;
  flex-grow: 1;
}

.confirmation-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  font-weight: bold;
  color: #a0aec0;
  cursor: pointer;
  opacity: 0.7;
  transition: all 0.3s;
  line-height: 1;
  padding: 0.5rem;
  margin: -0.5rem -0.5rem -0.5rem auto;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.confirmation-modal-close:hover {
  opacity: 1;
  color: #667eea;
  background-color: rgba(102, 126, 234, 0.1);
  transform: rotate(90deg);
}

.confirmation-modal-body {
  position: relative;
  flex: 1 1 auto;
  padding: 2rem;
  overflow-y: auto;
}

.confirmation-modal-body p {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.6;
  color: #4a5568;
  text-align: center;
}

.confirmation-details {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
  border-radius: 12px;
  border-left: 4px solid #667eea;
}

.confirmation-detail-item {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.confirmation-detail-item:hover {
  background-color: rgba(102, 126, 234, 0.05);
  transform: translateX(5px);
}

.confirmation-detail-item:last-child {
  margin-bottom: 0;
}

.confirmation-detail-item i {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  font-size: 0.9rem;
  color: #667eea;
  background-color: rgba(102, 126, 234, 0.1);
  flex-shrink: 0;
}

.confirmation-detail-item span {
  font-size: 0.95rem;
  font-weight: 500;
  color: #4a5568;
}

.confirmation-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 1.5rem 2rem;
  border-top: 1px solid #e3e6f0;
  background-color: #f8fafc;
  gap: 1rem;
  flex-shrink: 0;
}

.confirmation-modal-footer .btn {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  padding: 0.75rem 2rem;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 12px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.confirmation-modal-footer .btn-outline-secondary {
  background-color: white;
  border-color: #e2e8f0;
  color: #4a5568;
}

.confirmation-modal-footer .btn-outline-secondary:hover {
  background-color: #f7fafc;
  border-color: #cbd5e0;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.confirmation-modal-footer .btn-warning {
  background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
  border: none;
  box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
  color: white;
}

.confirmation-modal-footer .btn-warning:hover {
  background: linear-gradient(135deg, #ffca2c 0%, #ffc107 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 193, 7, 0.4);
}

.confirmation-modal-footer .btn-danger {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  border: none;
  box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
  color: white;
}

.confirmation-modal-footer .btn-danger:hover {
  background: linear-gradient(135deg, #e35d6a 0%, #dc3545 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(220, 53, 69, 0.4);
}

.confirmation-modal-footer .btn-success {
  background: linear-gradient(135deg, #198754 0%, #157347 100%);
  border: none;
  box-shadow: 0 4px 15px rgba(25, 135, 84, 0.3);
  color: white;
}

.confirmation-modal-footer .btn-success:hover {
  background: linear-gradient(135deg, #20c997 0%, #198754 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(25, 135, 84, 0.4);
}

.confirmation-modal-footer .btn-info {
  background: linear-gradient(135deg, #0dcaf0 0%, #0ba6c8 100%);
  border: none;
  box-shadow: 0 4px 15px rgba(13, 202, 240, 0.3);
  color: white;
}

.confirmation-modal-footer .btn-info:hover {
  background: linear-gradient(135deg, #31d2f2 0%, #0dcaf0 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(13, 202, 240, 0.4);
}

/* Responsive styles */
@media (max-width: 768px) {
  .confirmation-modal-dialog {
    max-width: 95%;
    margin: 1rem auto;
  }

  .confirmation-modal-header {
    padding: 1.5rem 1.5rem 1rem;
    flex-direction: column;
    text-align: center;
  }

  .confirmation-modal-icon {
    margin-right: 0;
    margin-bottom: 1rem;
  }

  .confirmation-modal-title {
    font-size: 1.25rem;
  }

  .confirmation-modal-body {
    padding: 1.5rem;
  }

  .confirmation-modal-body p {
    font-size: 1rem;
  }

  .confirmation-modal-footer {
    padding: 1.25rem 1.5rem;
    flex-direction: column;
  }

  .confirmation-modal-footer .btn {
    width: 100%;
    min-width: auto;
  }

  .confirmation-details {
    padding: 1rem;
  }
}

/* Animation for backdrop */
.confirmation-modal-backdrop {
  animation: backdropFadeIn 0.3s ease-out;
}

@keyframes backdropFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Ensure body doesn't scroll when modal is open */
body.confirmation-modal-open {
  overflow: hidden !important;
}

/* Form validation styles */
.invalid-feedback {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.875em;
  color: #dc3545;
}

.form-control.is-invalid {
  border-color: #dc3545;
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

/* User modal alert positioning */
.user-modal-alert {
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Ensure user modal stays open when there are errors */
.user-modal.show-errors .user-modal-content {
  max-height: 90vh;
}

.user-modal.show-errors .user-modal-body {
  max-height: calc(75vh - 140px);
}
/* ===== OFFICER REPORT VIEW MODAL STYLES ===== */

/* Large modal for view report */
.confirmation-modal-dialog-lg {
  max-width: 800px !important;
}

/* Report details styling */
.report-detail-section {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
  border-radius: 12px;
  border-left: 4px solid #667eea;
}

.report-detail-label {
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
}

.report-detail-label i {
  width: 24px;
  color: #667eea;
  margin-right: 0.5rem;
}

.report-detail-value {
  padding: 0.75rem;
  background: white;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  word-wrap: break-word;
}

.report-attachment-preview {
  max-width: 100%;
  max-height: 300px;
  border-radius: 8px;
  border: 2px solid #e2e8f0;
  margin-bottom: 1rem;
}

.platform-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  color: white;
  font-weight: 600;
}

.platform-badge i {
  margin-right: 0.5rem;
}

/* Avatar circle for submitter */
.avatar-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.1rem;
}

/* View modal body with scroll */
#viewReportBody {
  max-height: 70vh;
  overflow-y: auto;
  padding: 1.5rem;
}

/* Loading spinner */
.view-modal-spinner {
  text-align: center;
  padding: 3rem;
}

.view-modal-spinner .spinner-border {
  width: 3rem;
  height: 3rem;
  color: #667eea;
}

.view-modal-spinner p {
  margin-top: 1rem;
  color: #6c757d;
}

/* Report link styling */
.report-link {
  color: #667eea;
  text-decoration: none;
  word-break: break-all;
}

.report-link:hover {
  color: #764ba2;
  text-decoration: underline;
}

/* Attachment download button */
.attachment-download-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.attachment-download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Report metadata grid */
.report-metadata-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.report-metadata-item {
  background: white;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.report-metadata-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #6c757d;
  margin-bottom: 0.25rem;
}

.report-metadata-value {
  font-weight: 600;
  color: #2d3748;
}
.avatar-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.1rem;
}

.card {
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

a.text-primary:hover {
  color: #764ba2 !important;
  text-decoration: underline !important;
}

.bg-light {
  background-color: #f8f9fc !important;
}

@keyframes pulse {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }

  100% {
    opacity: 1;
  }
}

.btn-checking {
  animation: pulse 1.5s infinite;
  pointer-events: none;
  opacity: 0.7;
}

/* Link Security Styles */
.security-check-btn {
  position: relative;
  transition: all 0.3s ease;
}

.security-check-btn i {
  transition: transform 0.3s ease;
}

.security-check-btn:hover i {
  transform: scale(1.1);
}

.security-check-btn.btn-checking {
  animation: pulse 1.5s infinite;
  pointer-events: none;
  opacity: 0.7;
}

@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

.security-result {
  transition: all 0.3s ease;
}

.security-alert {
  border-left-width: 4px;
  border-left-style: solid;
}

.security-alert.alert-success {
  border-left-color: #198754;
}

.security-alert.alert-warning {
  border-left-color: #ffc107;
}

.security-alert.alert-danger {
  border-left-color: #dc3545;
}

.security-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.security-details {
  max-width: 300px;
}

/* Link States */
#postLink {
  transition: all 0.3s ease;
}

#postLink:hover {
  color: #764ba2 !important;
  text-decoration: underline !important;
}

#postLinkText {
  color: #6c757d;
  cursor: not-allowed;
}

/* Copy Button States */
#copyLinkBtn.btn-success {
  background-color: #198754;
  border-color: #198754;
  color: white;
}

#copyLinkBtn.btn-success i {
  color: white;
}

/* Card Styles */
.avatar-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.1rem;
}

.card {
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

.bg-light {
  background-color: #f8f9fc !important;
}
/* Security Portal style CSS - exactly matching your security dashboard */
.stats-card {
  transition: all 0.3s ease;
  border: none !important;
  border-radius: 0.75rem !important;
  overflow: hidden;
}

.stats-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.15) !important;
}

.dashboard-link {
  text-decoration: none;
}

.stats-number {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
}

.stats-title {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.stats-subtitle {
  font-size: 0.75rem;
}

.stats-icon {
  opacity: 0.8;
  transition: transform 0.3s ease;
}

.stats-card:hover .stats-icon {
  transform: scale(1.1) translateX(5px);
}

.stats-arrow {
  transition: transform 0.3s ease;
}

.stats-card:hover .stats-arrow {
  transform: translateX(5px);
}

.border-left-primary {
  border-left: 0.25rem solid #4e73df !important;
}

.border-left-success {
  border-left: 0.25rem solid #1cc88a !important;
}

.border-left-info {
  border-left: 0.25rem solid #36b9cc !important;
}

.border-left-warning {
  border-left: 0.25rem solid #f6c23e !important;
}

.table thead th {
  border-bottom-width: 1px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

.table-hover tbody tr:hover {
  background-color: rgba(78, 115, 223, 0.05);
  transform: scale(1.01);
  transition: all 0.2s ease;
}

.progress {
  border-radius: 0.5rem;
  background-color: #eaecf4;
  height: 20px;
}

.progress-bar {
  border-radius: 0.5rem;
  transition: width 0.6s ease;
}

.badge {
  font-weight: 600;
  padding: 6px 12px;
}

.list-group-item {
  border: none;
  padding: 0.75rem 0;
  background-color: transparent;
}

.btn-outline-primary,
.btn-outline-success,
.btn-outline-info,
.btn-outline-warning {
  border-width: 2px;
  transition: all 0.3s ease;
}

.btn-outline-primary:hover,
.btn-outline-success:hover,
.btn-outline-info:hover,
.btn-outline-warning:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}
/* ===== FIXED SIDEBAR TOGGLE - ADD THIS ENTIRE SECTION ===== */
.sidebar-toggle {
  position: fixed !important;
  top: 70px !important;
  left: 20px !important;
  z-index: 1040 !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  background: #2d3748 !important;
  border: 2px solid rgba(255, 255, 255, 0.2) !important;
  color: white !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.sidebar-toggle:hover {
  background: #4a5568 !important;
  transform: scale(1.1) !important;
}

/* Force sidebar toggle to be visible on all devices */
@media (max-width: 767.98px) {
  .sidebar-toggle {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    left: 20px !important;
  }
}

@media (min-width: 768px) {
  .sidebar-toggle {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
}

/* Sidebar states */
.sidebar {
  transform: translateX(0);
  transition: transform 0.3s ease !important;
  will-change: transform;
}

.sidebar.hidden {
  transform: translateX(-280px) !important;
}

.sidebar.mobile-open {
  transform: translateX(0) !important;
}

/* Main content states */
.main-content {
  margin-left: 280px;
  transition:
    margin-left 0.3s ease,
    width 0.3s ease !important;
  width: calc(100% - 280px);
}

.main-content.expanded {
  margin-left: 0 !important;
  width: 100% !important;
}

/* ===== FIXED DASHBOARD CARDS - EQUAL HEIGHT ===== */
.stats-card {
  height: 100% !important;
  min-height: 180px !important;
  display: flex !important;
  flex-direction: column !important;
}

.stats-card .card-body {
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
}

.stats-card .card-footer {
  flex-shrink: 0 !important;
  margin-top: auto !important;
}

/* Ensure all dashboard cards have consistent height */
.row > [class*="col-"] {
  display: flex !important;
  flex-direction: column !important;
}

.row > [class*="col-"] > .dashboard-link,
.row > [class*="col-"] > .card {
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Fix container padding for dashboard */
.main-content .container-fluid {
  padding-left: 20px !important;
  padding-right: 20px !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* Ensure sidebar overlay works */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1030;
}

.sidebar-overlay.active {
  display: block !important;
}

/* Fix for iOS */
@supports (-webkit-touch-callout: none) {
  .sidebar {
    transform: translateX(0);
    -webkit-transform: translateX(0);
  }

  .sidebar.hidden {
    transform: translateX(-280px) !important;
    -webkit-transform: translateX(-280px) !important;
  }
}
/* ===== ULTRA COMPACT SIDEBAR HEADER ===== */
.sidebar .sidebar-header {
  padding: 0.5rem 0.75rem !important;
  min-height: 50px !important;
}

.sidebar .sidebar-header .d-flex {
  gap: 0.25rem !important;
}

.sidebar .sidebar-header i.fa-chart-line {
  font-size: 1.1rem !important;
  margin-right: 0.25rem !important;
}

.sidebar .sidebar-header h5 {
  font-size: 0.8rem !important;
  font-weight: 600 !important;
}

.sidebar .sidebar-header small {
  font-size: 0.6rem !important;
  opacity: 0.8 !important;
}

/* Adjust toggle button */
.sidebar-toggle {
  top: 62px !important;
  width: 32px !important;
  height: 32px !important;
}

/* Make the whole sidebar more compact */
.sidebar {
  width: 260px !important; /* Slightly narrower */
}

.main-content {
  margin-left: 260px !important;
  width: calc(100% - 260px) !important;
}

/* When sidebar is hidden */
.sidebar.hidden {
  transform: translateX(-260px) !important;
}

/* Adjust toggle position when sidebar is hidden */
.sidebar.hidden ~ .sidebar-toggle,
.sidebar.hidden + .sidebar-toggle {
  left: 20px !important;
}

/* Mobile adjustments */
@media (max-width: 767.98px) {
  .sidebar {
    width: 260px !important;
  }

  .sidebar.mobile-open .sidebar-toggle {
    left: 270px !important;
  }
}
/* ===== PRECISE TOGGLE SPACING FIX - MINIMAL MOVEMENT ===== */

/* Just add a small left padding to the header content */
.sidebar .sidebar-header .d-flex {
  padding-left: 10px !important; /* Just 10px of space */
}

/* Or if you prefer margin instead */
.sidebar .sidebar-header .d-flex {
  margin-left: 40px !important;
}

/* Make sure toggle button stays exactly where it is */
.sidebar-toggle {
  left: 20px !important; /* Keep original position */
}
/* ===== MOBILE TOGGLE FIX - ADD THIS ===== */

/* Force toggle button to be visible and clickable on mobile */
@media (max-width: 767.98px) {
  .sidebar-toggle {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 1060 !important;
    left: 20px !important;
    top: 70px !important;
  }

  /* When sidebar is open on mobile, move toggle button with sidebar */
  .sidebar.mobile-open ~ .sidebar-toggle,
  .sidebar.mobile-open + .sidebar-toggle {
    left: 290px !important; /* Position at edge of open sidebar */
    transition: left 0.3s ease !important;
  }

  /* Ensure sidebar overlay is clickable */
  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040 !important;
    cursor: pointer;
  }

  .sidebar-overlay.active,
  .sidebar-overlay[style*="block"] {
    display: block !important;
  }

  /* Prevent body scroll when sidebar is open on mobile */
  body.sidebar-open {
    overflow: hidden !important;
  }
}
/* ===== MODERN LOGIN STYLES - MATCHING SECURITY PORTAL ===== */
.login-container {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  max-width: 430px;
  width: 95%;
  margin: 0 auto;
}

.login-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 2.5rem 2rem;
  text-align: center;
  position: relative;
}

.login-header::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(45deg);
}

.login-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  display: block;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.login-body {
  padding: 2rem;
}

.login-body .form-control {
  border-radius: 12px;
  padding: 0.875rem 1rem;
  border: 2px solid #e2e8f0;
  transition: all 0.3s ease;
}

.login-body .form-control:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #667eea;
  z-index: 5;
}

.input-with-icon {
  padding-left: 45px !important;
}

.btn-login {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 12px;
  padding: 1rem 2rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.btn-login:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.security-info {
  background: linear-gradient(135deg, #f7f9fc 0%, #edf2f7 100%);
  border-radius: 12px;
  padding: 1rem;
  border-left: 4px solid #48bb78;
}

/* Password toggle styling */
.password-toggle {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #667eea;
  cursor: pointer;
  z-index: 6;
  padding: 0.5rem;
  transition: color 0.3s ease;
}

.password-toggle:hover {
  color: #764ba2;
}

.password-toggle:focus {
  outline: none;
  color: #764ba2;
}

.password-input {
  padding-right: 50px !important;
}

/* ===== MODERN HOMEPAGE STYLES - MATCHING SECURITY PORTAL ===== */
.modern-hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 120px 0 100px;
  position: relative;
  overflow: hidden;
}

.modern-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="rgba(255,255,255,0.05)" points="0,1000 1000,0 1000,1000"/></svg>');
  background-size: cover;
}

.hero-badge {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  margin-bottom: 2rem;
  display: inline-block;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.3rem;
  opacity: 0.9;
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.btn-hero {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  padding: 1rem 2.5rem;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  color: white;
}

.btn-hero:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(255, 255, 255, 0.2);
  color: white;
}

/* ===== MODERN FEATURES SECTION ===== */
.modern-features {
  padding: 100px 0;
  background: #f8fafc;
}

.modern-card {
  background: white;
  border-radius: 20px;
  padding: 2.5rem 2rem;
  height: 100%;
  border: none;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.modern-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.modern-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
}

.modern-card:hover::before {
  transform: scaleX(1);
}

.modern-feature-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modern-feature-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #1e293b;
}

.modern-feature-text {
  color: #64748b;
  line-height: 1.6;
}

/* ===== MODERN SYSTEM SECTION ===== */
.modern-system {
  padding: 100px 0;
  background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
  color: white;
}

.btn-system {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  border: none;
  border-radius: 50px;
  padding: 1rem 2.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(245, 87, 108, 0.3);
}

.btn-system:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(245, 87, 108, 0.4);
  color: white;
}

/* ===== FOOTER STYLES ===== */
footer.bg-dark {
  background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%) !important;
}

.text-white-50 {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .modern-hero {
    padding: 100px 0 80px;
  }

  .modern-features,
  .modern-system {
    padding: 80px 0;
  }

  .login-body {
    padding: 2rem 1.5rem;
  }

  .login-header {
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 576px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-badge {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
  }

  .btn-hero,
  .btn-system {
    padding: 0.875rem 2rem;
    font-size: 1rem;
  }
}
/* ===== VIEW REPORT SPECIFIC STYLES - ADD THIS ENTIRE SECTION ===== */

/* Priority Header Colors */
.priority-header {
  padding: 1rem !important;
  border-radius: 0.5rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  border-left-width: 6px !important;
  border-left-style: solid !important;
}

.priority-header.priority-critical {
  background: linear-gradient(135deg, #dc3545 0%, #a71d2a 100%) !important;
  border-left-color: #8b0000 !important;
}

.priority-header.priority-high {
  background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%) !important;
  border-left-color: #b37400 !important;
}

.priority-header.priority-medium {
  background: linear-gradient(135deg, #0dcaf0 0%, #0aa2c0 100%) !important;
  border-left-color: #087990 !important;
}

.priority-header.priority-low {
  background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%) !important;
  border-left-color: #495057 !important;
}

/* Text colors for priority headers */
.priority-header.priority-critical .priority-label,
.priority-header.priority-critical .priority-value,
.priority-header.priority-critical .fa-flag {
  color: white !important;
}

.priority-header.priority-high .priority-label,
.priority-header.priority-high .priority-value,
.priority-header.priority-high .fa-flag {
  color: #333 !important;
}

.priority-header.priority-medium .priority-label,
.priority-header.priority-medium .priority-value,
.priority-header.priority-medium .fa-flag {
  color: #333 !important;
}

.priority-header.priority-low .priority-label,
.priority-header.priority-low .priority-value,
.priority-header.priority-low .fa-flag {
  color: white !important;
}

/* Priority Badge */
.priority-badge {
  background: rgba(255, 255, 255, 0.2) !important;
  font-size: 1rem !important;
}

.priority-badge-critical {
  color: white !important;
}

.priority-badge-high {
  color: #333 !important;
}

.priority-badge-medium {
  color: #333 !important;
}

.priority-badge-low {
  color: white !important;
}

/* Info Box */
.info-box {
  padding: 0.75rem 1rem !important;
  background: #f8f9fc !important;
  border-radius: 0.5rem !important;
  border-left: 4px solid #667eea !important;
}

/* Avatar Circle */
.avatar-circle {
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: bold !important;
  font-size: 1.1rem !important;
}

.avatar-circle.bg-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
}

/* Platform Badge in view_report */
.info-box .platform-badge {
  background-color: #6c757d !important;
  color: white !important;
  padding: 0.5rem 1rem !important;
  font-size: 0.9rem !important;
  display: inline-flex !important;
  align-items: center !important;
}

/* Security Panel */
.security-panel {
  background-color: #f8f9fc !important;
  border-left: 4px solid;
  padding: 1rem !important;
  margin-top: 1rem !important;
  border-radius: 0.5rem !important;
}

/* Link Styles */
.secure-link {
  color: #667eea !important;
  text-decoration: none !important;
  transition: all 0.3s ease !important;
}

.secure-link:hover {
  color: #764ba2 !important;
  text-decoration: underline !important;
}

.disabled-link {
  color: #6c757d !important;
  cursor: not-allowed !important;
}

/* Copy Button States */
#copyLinkBtn.btn-success {
  background-color: #198754 !important;
  border-color: #198754 !important;
  color: white !important;
}

#copyLinkBtn.btn-success i {
  color: white !important;
}

/* Description Box */
.description-box {
  max-height: 300px !important;
  overflow-y: auto !important;
}

/* Attachment Preview */
.attachment-preview {
  max-height: 200px !important;
  border: 3px solid #e3e6f0 !important;
  border-radius: 0.5rem !important;
}

.download-btn {
  border-radius: 10px !important;
}

/* ===== MY REPORTS TABLE STYLES ===== */
.report-date-cell,
.submitted-date-cell {
  white-space: nowrap !important;
  padding: 1rem !important;
  vertical-align: middle !important;
}

.description-cell {
  max-width: 150px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  padding: 1rem !important;
  vertical-align: middle !important;
}

.posted-by {
  max-width: 100px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* Table Header */
.table thead th {
  font-weight: 600 !important;
  color: #5a5c69 !important;
  padding: 1rem !important;
  white-space: nowrap !important;
}

/* Priority Badge Animation */
.priority-badge[data-priority="critical"] {
  animation: pulse 2s infinite !important;
}

/* ===== PAGINATION STYLES ===== */
.pagination {
  gap: 5px !important;
}

.page-link {
  color: #667eea !important;
  border-radius: 8px !important;
  margin: 0 2px !important;
}

.page-item.active .page-link {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  border-color: #667eea !important;
  color: white !important;
}

.page-item.disabled .page-link {
  color: #6c757d !important;
  pointer-events: none !important;
  background-color: #fff !important;
  border-color: #dee2e6 !important;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 767.98px) {
  .pagination .page-link {
    padding: 0.375rem 0.75rem !important;
    font-size: 0.875rem !important;
  }

  .description-cell {
    max-width: 100px !important;
  }

  .posted-by {
    max-width: 80px !important;
  }
}

@media (max-width: 576px) {
  .priority-header {
    flex-direction: column !important;
    text-align: center !important;
    gap: 10px !important;
  }

  .priority-header .d-flex {
    flex-direction: column !important;
  }

  .priority-header .fa-flag {
    margin-right: 0 !important;
    margin-bottom: 10px !important;
  }
}

/* ===== PRIORITY BADGE CELL FIXES ===== */
.priority-badge-cell {
  font-size: 0.85rem !important;
  min-width: 100px !important;
  display: inline-block !important;
  text-align: center !important;
  padding: 0.4rem 0.75rem !important;
  font-weight: 600 !important;
  line-height: 1.5 !important;
  white-space: nowrap !important;
}

/* Ensure all badges in table have consistent sizing */
.badge.rounded-pill {
  padding: 0.4rem 0.75rem !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  min-width: 85px !important;
  display: inline-block !important;
  text-align: center !important;
}

/* Report type badge specific */
.report-type-badge {
  background: #6c757d !important;
  color: white !important;
}

/* Platform badge specific */
.platform-badge {
  min-width: auto !important;
  padding: 0.4rem 0.75rem !important;
}

/* Critical priority animation */
@keyframes pulse {
  0% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4);
  }
  50% {
    opacity: 0.95;
    box-shadow: 0 0 0 6px rgba(220, 53, 69, 0.1);
  }
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
  }
}

/* Priority badge colors - using Bootstrap classes but ensuring consistency */
.badge.bg-danger {
  background: linear-gradient(135deg, #dc3545 0%, #bb2d3b 100%) !important;
  color: white !important;
}

.badge.bg-warning {
  background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%) !important;
  color: #333 !important;
}

.badge.bg-info {
  background: linear-gradient(135deg, #0dcaf0 0%, #0aa2c0 100%) !important;
  color: #333 !important;
}

.badge.bg-secondary {
  background: linear-gradient(135deg, #6c757d 0%, #5c636a 100%) !important;
  color: white !important;
}

/* Table cell alignment */
.table td {
  vertical-align: middle !important;
}

/* Ensure all badges in table have consistent dimensions */
.table .badge {
  min-width: 90px !important;
  max-width: 120px !important;
  margin: 0 auto !important;
}

/* ===== PREMIUM PURPLE GRADIENT TOOLTIP ===== */
.tooltip .tooltip-inner {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
  font-size: 0.9rem !important;
  padding: 12px 18px !important;
  border-radius: 10px !important;
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4) !important;
  text-align: left !important;
  max-width: 350px !important;
  line-height: 1.6 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  font-weight: 400 !important;
}

/* Arrow with matching gradient effect */
.tooltip.bs-tooltip-top .tooltip-arrow::before {
  border-top-color: #764ba2 !important;
}

.tooltip.bs-tooltip-bottom .tooltip-arrow::before {
  border-bottom-color: #667eea !important;
}

.tooltip.bs-tooltip-start .tooltip-arrow::before {
  border-left-color: #667eea !important;
}

.tooltip.bs-tooltip-end .tooltip-arrow::before {
  border-right-color: #764ba2 !important;
}

/* Add a subtle animation */
.tooltip.show .tooltip-inner {
  animation: tooltipFadeIn 0.2s ease-in-out;
}

@keyframes tooltipFadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* ===== BADGE SIZE FIXES ===== */
.badge.rounded-pill {
  min-width: 85px !important;
  max-width: 130px !important;
  padding: 0.4rem 0.75rem !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  text-align: center !important;
  display: inline-block !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Report type badge specific */
.report-type-badge {
  min-width: 100px !important;
  max-width: 130px !important;
}

/* Priority badge specific */
.priority-badge-cell {
  min-width: 100px !important;
  max-width: 120px !important;
}

/* Urgency badge specific */
.urgency-badge {
  min-width: 85px !important;
}

/* Platform badge */
.platform-badge {
  min-width: auto !important;
  max-width: 120px !important;
}
.posted-by {
  max-width: 120px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  display: inline-block !important;
  cursor: help !important;
  font-size: 0.9rem !important;
}

/* Optional: Add a subtle indicator that there's more content */
.posted-by[title]:not([title=""]) {
  border-bottom: 1px dashed #667eea;
}
