@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&display=swap");

:root {
  --bg: #F9FAFB;
  --card: #ffffff;
  --txt: #222;
  --muted: #666;
  --pri: #2f6bff;
  --pri-2: #1e4dd0;
  --good: #12a150;
  --ok: #ffc400;
  --bad: #c43b3b;
  --warn: #c43b3b;
  --border: #e5e7ef;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--txt);
}

a {
  color: var(--pri);
  text-decoration: none;
}

.btn {
  border-radius: 8px;
}

/* Responsive Navigation */
.navbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  position: sticky;
  top: 0;
  z-index: 10;
  flex-wrap: wrap;
}

.brand {
  font-weight: 700;
  margin-right: 12px;
}

.nav-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.nav-left a {
  margin-right: 14px;
  white-space: nowrap;
}

.nav-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.user-pill {
  background: #eef2ff;
  padding: 6px 10px;
  border-radius: 8px;
  margin-right: 8px;
  white-space: nowrap;
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .navbar {
    padding: 8px 12px;
  }
  
  .nav-left a {
    margin-right: 8px;
    font-size: 14px;
  }
  
  .user-pill {
    font-size: 12px;
    padding: 4px 8px;
    margin-right: 4px;
  }
  
  .btn {
    font-size: 12px;
    padding: 4px 8px;
  }
}

@media (max-width: 576px) {
  .navbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  
  .nav-left, .nav-right {
    justify-content: center;
  }
  
  .nav-left a {
    margin-right: 6px;
    font-size: 13px;
  }
}

/* Responsive Container */
.container {
  padding-left: 16px;
  padding-right: 16px;
}

@media (max-width: 576px) {
  .container {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* Center Card - Login/Forms */
.center-card {
  background: var(--card);
  max-width: 420px;
  margin: 56px auto;
  padding: 24px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

@media (max-width: 576px) {
  .center-card {
    margin: 20px auto;
    padding: 16px;
    max-width: 95%;
  }
}

.center {
  text-align: center;
}

.text-muted,
.muted {
  color: var(--muted);
}

/* Responsive Grid System */
.grid {
  display: grid;
  gap: 16px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid-5 {
  grid-template-columns: repeat(5, 1fr);
}

/* Mobile Grid Adjustments */
@media (max-width: 1024px) {
  .grid-5 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .grid {
    gap: 12px;
  }
  
  .grid-5,
  .grid-4,
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .grid {
    gap: 8px;
  }
  
  .grid-5,
  .grid-4,
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.mt {
  margin-top: 16px;
}

/* Responsive Cards */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -2px rgba(0, 0, 0, .1);
  transition: box-shadow 0.2s ease-in-out, border 0.05s ease-in-out;
}

.card:hover {
  box-shadow: 0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);
}

@media (max-width: 576px) {
  .card {
    padding: 12px;
  }
}

/* KPI Cards */
.kpi .kpi-title {
  color: var(--muted);
  font-size: 14px;
}

.kpi .kpi-value {
  font-size: 28px;
  font-weight: 700;
  margin-top: 6px;
}

@media (max-width: 768px) {
  .kpi .kpi-title {
    font-size: 12px;
  }
  
  .kpi .kpi-value {
    font-size: 24px;
  }
}

@media (max-width: 576px) {
  .kpi .kpi-title {
    font-size: 11px;
  }
  
  .kpi .kpi-value {
    font-size: 20px;
  }
}

/* Form Elements */
.input,
.textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  margin-bottom: 10px;
}

.textarea {
  min-height: 120px;
}

@media (max-width: 576px) {
  .input,
  .textarea,
  select {
    padding: 8px 10px;
    font-size: 14px;
  }
  
  .textarea {
    min-height: 100px;
  }
}

label {
  display: block;
  font-size: 14px;
  margin: 6px 0;
  color: #444;
}

@media (max-width: 576px) {
  label {
    font-size: 13px;
  }
}

/* Flash Messages */
.flash-wrap {
  margin-bottom: 16px;
}

.flash {
  padding: 10px 12px;
  border-radius: 8px;
  margin: 6px 0;
}

@media (max-width: 576px) {
  .flash {
    padding: 8px 10px;
    font-size: 14px;
  }
}

.flash-success {
  background: #e6f7ee;
  border: 1px solid #b4e5c8;
}

.flash-danger {
  background: #ffe8e8;
  border: 1px solid #f5b3b3;
}

.flash-warning {
  background: #fff7e6;
  border: 1px solid #ffe3a6;
}

.flash-info {
  background: #eef2ff;
  border: 1px solid #c8d1ff;
}

/* Responsive Flex Layout */
.row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .row {
    gap: 8px;
    padding: 6px 0;
  }
}

@media (max-width: 576px) {
  .row {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
}

.col-8 {
  flex: 8;
}

.col-4 {
  flex: 4;
}

.col-2 {
  flex: 2;
}

@media (max-width: 576px) {
  .col-8,
  .col-4,
  .col-2 {
    flex: 1;
  }
}

.right {
  text-align: right;
}

@media (max-width: 576px) {
  .right {
    text-align: left;
  }
}

.form {
  margin-top: 10px;
}

/* Customer Cards */
.customer .meta span {
  margin-right: 12px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 576px) {
  .customer .meta span {
    margin-right: 8px;
    font-size: 12px;
  }
}

.zebra:nth-child(odd) {
  background: #fafbff;
  border-radius: 6px;
}

.error {
  color: #b00020;
  font-size: 13px;
  margin-bottom: 6px;
}

/* Badges */
.badge {
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 12px;
}

@media (max-width: 576px) {
  .badge {
    padding: 3px 6px;
    font-size: 11px;
  }
}

.badge.good {
  background: #e6f7ee;
  color: var(--good);
  border: 1px solid #b4e5c8;
}

.badge.ok {
  background: #fffbe6;
  color: #ffc100;
  border: 1px solid #ffeb84;
}

.badge.bad {
  background: #fff0f0;
  color: #ff4d4d;
  border: 1px solid #ffccc7;
}

.badge.warn {
  background: #ffe8e8;
  color: var(--warn);
  border: 1px solid #f5b3b3;
}

/* Flex Between */
.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 768px) {
  .flex-between {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
}

/* Dashboard Specific Responsive Styles */
.dashboard-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .dashboard-header img {
    height: 60px !important;
  }
}

@media (max-width: 576px) {
  .dashboard-header img {
    height: 50px !important;
  }
}

/* Customer List Responsive Styles */
.customer-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

@media (max-width: 576px) {
  .customer-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .customer-info img {
    height: 30px !important;
  }
}

.customer-stats {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin: 15px 0;
}

@media (max-width: 768px) {
  .customer-stats {
    flex-direction: column;
    gap: 8px;
  }
}

.customer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

@media (max-width: 768px) {
  .customer-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 576px) {
  .customer-actions {
    flex-direction: column;
  }
  
  .customer-actions .btn {
    width: 100%;
    margin: 2px 0;
  }
}

/* Rankings Dashboard Responsive Styles */
.rankings-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
}

@media (max-width: 1024px) {
  .rankings-header {
    flex-direction: column;
    align-items: stretch;
  }
}

.rankings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 768px) {
  .rankings-actions {
    flex-direction: column;
  }
  
  .rankings-actions .btn {
    width: 100%;
  }
}

/* Table Responsive Styles */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  min-width: 600px;
}

@media (max-width: 768px) {
  .table {
    font-size: 14px;
  }
  
  .table th,
  .table td {
    padding: 8px 4px;
  }
}

@media (max-width: 576px) {
  .table {
    font-size: 12px;
    min-width: 500px;
  }
  
  .table th,
  .table td {
    padding: 6px 3px;
  }
}

/* Rankings Table Specific */
.rankings-table-container {
  position: relative;
  overflow: hidden;
}

.query-column {
  width: 40%;
  min-width: 250px;
  flex-shrink: 0;
}

.history-column {
  flex-grow: 1;
  position: relative;
  max-width: 60%;
  overflow: hidden;
  display: flex;
  align-items: center;
}

@media (max-width: 1024px) {
  .query-column {
    width: 50%;
    min-width: 200px;
  }
  
  .history-column {
    max-width: 50%;
  }
}

@media (max-width: 768px) {
  .rankings-table-container .d-flex {
    flex-direction: column;
  }
  
  .query-column,
  .history-column {
    width: 100%;
    max-width: 100%;
  }
}

/* Search Input */
.search-container {
  margin-bottom: 15px;
}

@media (max-width: 576px) {
  .search-container .form-control {
    font-size: 14px;
  }
}

/* Performance Stats */
.performance-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  padding: 15px;
  background: var(--bg);
  border-radius: 10px;
  margin: 15px 0;
}

@media (max-width: 768px) {
  .performance-stats {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

.performance-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Button Groups */
.btn-group-responsive {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 576px) {
  .btn-group-responsive {
    flex-direction: column;
  }
  
  .btn-group-responsive .btn {
    width: 100%;
  }
}

/* Utility Classes for Mobile */
@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }
  
  .show-mobile {
    display: block !important;
  }
}

@media (min-width: 769px) {
  .hide-desktop {
    display: none !important;
  }
  
  .show-desktop {
    display: block !important;
  }
}

/* Text Responsive */
@media (max-width: 576px) {
  h1 {
    font-size: 1.5rem;
  }
  
  h2 {
    font-size: 1.3rem;
  }
  
  h3 {
    font-size: 1.1rem;
  }
  
  h4 {
    font-size: 1rem;
  }
  
  h5 {
    font-size: 0.9rem;
  }
  
  h6 {
    font-size: 0.8rem;
  }
}

/* Spacing Adjustments for Mobile */
@media (max-width: 576px) {
  .mb-3 {
    margin-bottom: 1rem !important;
  }
  
  .mb-5 {
    margin-bottom: 2rem !important;
  }
  
  .mt-3 {
    margin-top: 1rem !important;
  }
  
  .mt-5 {
    margin-top: 2rem !important;
  }
  
  .p-3 {
    padding: 0.75rem !important;
  }
  
  .p-4 {
    padding: 1rem !important;
  }
  
  .p-5 {
    padding: 1.25rem !important;
  }
}

/* Scrollable Content */
.scrollable-x {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.scrollable-x::-webkit-scrollbar {
  height: 6px;
}

.scrollable-x::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.scrollable-x::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.scrollable-x::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Focus States for Accessibility */
.btn:focus,
.input:focus,
.textarea:focus,
select:focus {
  outline: 2px solid var(--pri);
  outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  :root {
    --border: #000;
    --muted: #333;
  }
  
  .card {
    border-width: 2px;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .btn,
  .flash-wrap {
    display: none !important;
  }
  
  .card {
    box-shadow: none !important;
    border: 1px solid #000 !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
}

/***** App Navbar (matches screenshot styling) *****/
.app-nav { height: 64px; }
.app-name { font-size: 16px; letter-spacing: 0.1px; }


.app-primary-nav .nav-link {
  color: #616D7E;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 500;
}
.app-primary-nav .nav-link:hover { color: #111827; background: #F3F4F6; }
.app-primary-nav .nav-link.active {
  background: #EEF2FF;
  color: #3949AB;
  box-shadow: inset 0 0 0 1px #C7D2FE;
}

.app-user-btn {
  border-radius: 10px;
  border: 1px solid #E5E7EB;
  padding: 6px 10px;
}
.app-user-btn .avatar { width: 28px; height: 28px; font-weight: 600; font-size: 14px; }
.extra-small { font-size: 11.5px; }

.app-user-menu { min-width: 260px; }
.app-user-menu .dropdown-item { padding: 8px 14px; }
.app-user-menu .dropdown-item:active { background: #EEF2FF; color: #3949AB; }

.app-agency-badge { font-weight: 500; }
@media (max-width: 768px) {
  .app-primary-nav { display: none !important; }   /* keep header clean on mobile like screenshot */
}

/* ========================================
   MOBILE SIDEBAR & HAMBURGER MENU
   ======================================== */

.mobile-menu-toggle {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--txt);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.2s;
}

.mobile-menu-toggle:hover {
  background: #F3F4F6;
}

.mobile-sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.mobile-sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-sidebar {
  position: fixed;
  top: 0;
  left: -300px;
  width: 280px;
  height: 100%;
  background: white;
  z-index: 1000;
  transition: left 0.3s ease-in-out;
  overflow-y: auto;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.mobile-sidebar.active {
  left: 0;
}

.mobile-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.mobile-sidebar-close {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--txt);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background 0.2s;
}

.mobile-sidebar-close:hover {
  background: #F3F4F6;
}

.mobile-sidebar-content {
  padding: 16px;
}

.mobile-user-info {
  text-align: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.mobile-user-info .avatar {
  width: 48px;
  height: 48px;
  font-size: 20px;
  font-weight: 600;
}

.mobile-sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--txt);
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.2s;
  margin-bottom: 4px;
}

.mobile-sidebar-item:hover {
  background: #F3F4F6;
  color: var(--txt);
}

.mobile-sidebar-item.active {
  background: #EEF2FF;
  color: #3949AB;
  font-weight: 500;
}

.mobile-sidebar-item i {
  font-size: 18px;
  width: 20px;
  text-align: center;
}

.mobile-sidebar-item.text-danger:hover {
  background: #FEE2E2;
}

.mobile-agency-context {
  padding: 12px;
  background: var(--bg);
  border-radius: 8px;
  margin-bottom: 16px;
}

.mobile-avatar {
  width: 36px;
  height: 36px;
  font-size: 16px;
  font-weight: 600;
}

/* ========================================
   RESPONSIVE DASHBOARD IMPROVEMENTS
   ======================================== */

/* Dashboard Website Cards - Mobile Optimized */
@media (max-width: 992px) {
  .d-flex.flex-row.flex-between.px-5.mx-auto.mt-3.w-75 {
    flex-direction: column !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    gap: 12px;
  }

  .d-flex.flex-row.flex-between.px-5.mx-auto.mt-3.w-75 > div {
    width: 100%;
  }
}

@media (max-width: 768px) {
  /* Dashboard Header */
  .d-flex.flex-row.flex-between h3 {
    font-size: 1.2rem;
  }

  .d-flex.flex-row.flex-between .btn {
    font-size: 0.875rem;
    padding: 6px 12px;
  }

  /* Website Card Images */
  .d-flex.flex-row img[style*="height: 50px"] {
    height: 40px !important;
  }

  /* Site Dashboard Button */
  .btn.btn-outline-primary.btn-sm[style*="position: absolute"] {
    position: static !important;
    margin-top: 12px;
    width: 100%;
  }

  .d-flex.flex-row.flex-between > .d-flex.flex-row {
    flex-direction: column;
    align-items: flex-start !important;
  }
}

@media (max-width: 576px) {
  /* Stack everything vertically on mobile */
  .d-flex.flex-row {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .d-flex.flex-row > * {
    width: 100% !important;
  }

  /* Adjust padding for mobile */
  .p-3.mb-3[style*="background-color"] {
    padding: 16px !important;
  }
}

/* ========================================
   RANKINGS DASHBOARD RESPONSIVE
   ======================================== */

@media (max-width: 992px) {
  /* Rankings Header */
  .flex-between > div {
    width: 100%;
  }

  .flex-between > div:last-child {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .flex-between > div:last-child .btn,
  .flex-between > div:last-child form {
    width: 100%;
  }

  .flex-between > div:last-child form button {
    width: 100%;
  }

  /* Rankings Logo */
  img[style*="height: 80px"] {
    height: 60px !important;
  }
}

@media (max-width: 768px) {
  /* Search and Filter Row */
  .mb-3.d-flex.flex-between.flex-row {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .mb-3.d-flex.flex-between.flex-row input[type="text"] {
    width: 100% !important;
    margin-bottom: 12px;
  }

  .mb-3.d-flex.flex-between.flex-row label {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  /* Rankings Table */
  .card[style*="overflow-x: hidden"] > .d-flex {
    flex-direction: column !important;
  }

  .card[style*="overflow-x: hidden"] table[style*="width: 40%"] {
    width: 100% !important;
    min-width: 100% !important;
  }

  .card[style*="overflow-x: hidden"] > .d-flex > div[style*="max-width: 60%"] {
    max-width: 100% !important;
    width: 100% !important;
  }

  /* Muted text under header */
  p.muted[style*="margin-left: 90px"] {
    margin-left: 0 !important;
    margin-top: 8px;
  }
}

@media (max-width: 576px) {
  /* Rankings Logo */
  img[style*="height: 80px"],
  img[style*="height: 60px"] {
    height: 50px !important;
    margin-right: 8px !important;
  }

  /* Rankings Title */
  .flex-between h2 {
    font-size: 1.3rem;
  }

  .flex-between h2 span {
    font-size: 1rem;
  }
}

/* ========================================
   BUTTON RESPONSIVE IMPROVEMENTS
   ======================================== */

@media (max-width: 768px) {
  /* Make all buttons in action groups full width */
  .flex-between .btn,
  .rankings-actions .btn,
  .customer-actions .btn {
    width: 100%;
    margin: 4px 0;
  }

  /* Inline forms should also be full width */
  .d-inline,
  form[style*="display:inline"],
  form[style*="display: inline"] {
    display: block !important;
    width: 100%;
  }
}

/* ========================================
   FORM RESPONSIVE IMPROVEMENTS
   ======================================== */

@media (max-width: 576px) {
  /* Form controls */
  .form-control,
  .form-select,
  input[type="text"],
  input[type="email"],
  input[type="password"],
  textarea,
  select {
    font-size: 16px !important; /* Prevents zoom on iOS */
  }

  /* Form labels */
  label {
    font-size: 14px;
    margin-bottom: 6px;
  }

  /* Form buttons */
  .btn {
    padding: 10px 16px;
    font-size: 14px;
  }
}

/* ========================================
   TABLE RESPONSIVE IMPROVEMENTS
   ======================================== */

@media (max-width: 768px) {
  /* Make tables scrollable */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    font-size: 13px;
  }

  table th,
  table td {
    padding: 8px 6px !important;
    white-space: nowrap;
  }
}

@media (max-width: 576px) {
  table {
    font-size: 12px;
  }

  table th,
  table td {
    padding: 6px 4px !important;
  }

  /* Badge sizes */
  .badge {
    font-size: 10px;
    padding: 2px 6px;
  }
}

/* ========================================
   CARD RESPONSIVE IMPROVEMENTS
   ======================================== */

@media (max-width: 768px) {
  .card {
    margin-bottom: 16px;
  }

  .card.p-4 {
    padding: 16px !important;
  }

  .card.p-3 {
    padding: 12px !important;
  }
}

@media (max-width: 576px) {
  .card {
    border-radius: 8px;
  }

  .card.p-4,
  .card.p-3 {
    padding: 12px !important;
  }
}

/* ========================================
   NAVIGATION RESPONSIVE IMPROVEMENTS
   ======================================== */

@media (max-width: 992px) {
  .app-nav {
    height: auto;
    min-height: 64px;
    padding: 12px 0;
  }

  .app-name {
    font-size: 15px;
  }

  .navbar-brand img {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 576px) {
  .app-nav {
    padding: 10px 0;
  }

  .app-name {
    font-size: 14px;
  }

  .navbar-brand img {
    width: 32px;
    height: 32px;
  }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

/* Hide on mobile */
@media (max-width: 992px) {
  .hide-mobile-lg {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .hide-mobile-md {
    display: none !important;
  }
}

@media (max-width: 576px) {
  .hide-mobile-sm {
    display: none !important;
  }
}

/* Show only on mobile */
.show-mobile {
  display: none !important;
}

@media (max-width: 768px) {
  .show-mobile {
    display: block !important;
  }
}

/* ========================================
   ACCESSIBILITY & TOUCH IMPROVEMENTS
   ======================================== */

/* Larger touch targets for mobile */
@media (max-width: 768px) {
  .btn,
  a.btn,
  button {
    min-height: 44px;
    min-width: 44px;
  }

  .nav-link {
    padding: 12px 16px;
  }
}

/* Prevent text selection on buttons */
.btn,
button {
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* ========================================
   LOADING & ANIMATION STATES
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  .mobile-sidebar,
  .mobile-sidebar-overlay {
    transition: none !important;
  }
}

/* Force favicon images to be square */
img[src*="faviconV2"] {
  object-fit: cover !important;
  border-radius: 8px !important;
  flex-shrink: 0 !important;
}

.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1050;
  background: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
  padding: 0.75rem;
}

.cookie-consent-inner {
  max-width: 960px;
  margin: 0 auto;
  font-size: 0.875rem;
}