/* ==========================================================================
   SPMB Online — Responsive Overrides (Mobile-First Comprehensive)
   Breakpoints: 360 / 430 / 576 / 768 / 992 / 1200 / 1400 / 1920
   ========================================================================== */


/* ══════════════════════════════════════════════════════════════════════════
   GLOBAL RESPONSIVE FIXES
   ══════════════════════════════════════════════════════════════════════════ */

/* Prevent all horizontal overflow at root level */
html, body {
  max-width: 100%;
  overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

/* Ensure all images and media are responsive */
img, video, iframe, embed, object {
  max-width: 100%;
  height: auto;
}

/* Safe touch targets for interactive elements */
button,
.btn,
.sidebar-link,
.tab-item,
.page-item,
.dropdown-item,
.form-check,
.nav-link {
  min-height: 44px;
  touch-action: manipulation;
}

/* Exception: small action icon buttons in table rows */
.table-action-btn {
  min-height: 36px;
}

/* Prevent table overflow on all pages */
.data-table-responsive,
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

/* Force tables inside responsive containers to not break layout */
.data-table-responsive table,
.table-responsive table {
  min-width: 600px;
}

/* Global modal backdrop: ensure proper padding for content on mobile */
.modal-backdrop {
  padding: var(--space-4);
}

@media (max-width: 575px) {
  .modal-backdrop {
    padding: var(--space-3);
  }

  /* Ensure modal content inside backdrop fills available width */
  .modal-backdrop > div {
    width: 100% !important;
    max-width: calc(100vw - var(--space-6)) !important;
    padding: var(--space-4) !important;
  }
}



/* ══════════════════════════════════════════════════════════════════════════
   XXL: Large Desktop (≥1400px)
   ══════════════════════════════════════════════════════════════════════════ */

@media (min-width: 1400px) {
  .app-content {
    padding: var(--space-8);
  }

  .container {
    max-width: 1320px;
  }

  .grid-stats {
    grid-template-columns: repeat(4, 1fr);
  }
}


/* ══════════════════════════════════════════════════════════════════════════
   XL: Desktop (≥1200px, <1400px)
   ══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1399px) {
  .grid-stats {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
  }
}


/* ══════════════════════════════════════════════════════════════════════════
   LG: Laptop/Small Desktop (≥992px, <1200px)
   ══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1199px) {
  .grid-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .navbar-search input {
    width: 200px;
  }

  .navbar-search input:focus {
    width: 240px;
  }

  .notification-dropdown {
    width: 320px;
  }

  /* Auth layout — hide illustration panel */
  .auth-right {
    display: none;
  }

  .auth-left {
    flex: 1;
  }
}


/* ══════════════════════════════════════════════════════════════════════════
   MD: Tablet (≥768px, <992px)
   ══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 991px) {
  /* ── Sidebar: Becomes off-canvas drawer ── */
  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
    z-index: var(--z-modal);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: var(--shadow-2xl);
  }


  /* ── App Main: Remove left margin on mobile/tablet ── */
  .app-main {
    margin-left: 0 !important;
  }

  /* ── Navbar: Span full width ── */
  .navbar {
    left: 0 !important;
    padding: 0 var(--space-4);
  }

  /* ── Content padding ── */
  .app-content {
    padding: var(--space-5);
  }

  /* ── Grid adjustments ── */
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }

  /* ── Form rows: collapse to single column on tablet and below ── */
  .form-row {
    grid-template-columns: 1fr;
  }

  .form-row-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  /* ── Stepper: vertical on tablet ── */
  .stepper {
    flex-direction: column;
    align-items: flex-start;
    padding-left: var(--space-6);
  }

  .stepper-step {
    flex-direction: row;
    align-items: center;
    gap: var(--space-3);
    text-align: left;
    width: 100%;
  }

  .stepper-step:not(:last-child)::after {
    top: 40px;
    left: 19px;
    width: 2px;
    height: calc(100% - 10px);
  }

  .stepper-label {
    margin-top: 0;
    max-width: none;
  }

  /* ── Page header ── */
  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-actions {
    width: 100%;
  }

  /* ── Table adjustments ── */
  .table-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .table-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .table-footer {
    flex-direction: column;
    gap: var(--space-3);
    align-items: center;
  }

  /* ── Admin table header ── */
  .admin-table-header {
    flex-direction: column;
    align-items: flex-start;
  }

  /* ── Filter bar ── */
  .filter-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-group {
    width: 100%;
    flex-wrap: wrap;
  }

  .filter-bar select,
  .filter-bar input {
    flex: 1;
    min-width: 120px;
  }

  /* ── Landing page ── */
  .landing-nav-links {
    display: none;
  }

  .landing-nav-toggle {
    display: flex;
  }

  .landing-navbar {
    padding: 0 var(--space-4);
  }

  /* ── Dashboard page header ── */
  .admin-header-actions {
    width: 100%;
  }

  /* ── Biodata form header ── */
  .biodata-form-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }
}


/* ══════════════════════════════════════════════════════════════════════════
   SM: Mobile Landscape (≥576px, <768px)
   ══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
  /* ── Typography scale down ── */
  h1 { font-size: var(--fs-2xl); }
  h2 { font-size: var(--fs-xl); }
  h3 { font-size: var(--fs-lg); }

  /* ── Content padding ── */
  .app-content {
    padding: var(--space-4);
  }

  /* ── Grid: single column ── */
  .grid-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  /* ── Stat cards ── */
  .stat-card {
    padding: var(--space-4);
  }

  .stat-card-value {
    font-size: var(--fs-2xl);
  }

  /* ── Navbar ── */
  .navbar {
    padding: 0 var(--space-3);
  }

  .navbar-search {
    display: none;
  }

  .breadcrumb {
    display: none;
  }

  .navbar-user-name {
    display: none;
  }

  /* ── Card body padding ── */
  .card-body {
    padding: var(--space-4);
  }

  .card-header {
    padding: var(--space-3) var(--space-4);
  }

  .card-footer {
    padding: var(--space-3) var(--space-4);
  }

  /* ── Table: horizontal scroll container ── */
  .data-table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-lg);
  }

  .data-table thead th,
  .data-table tbody td {
    padding: var(--space-2) var(--space-3);
    font-size: var(--fs-xs);
    white-space: nowrap;
  }

  /* ── Admin table ── */
  .admin-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .admin-table th,
  .admin-table td {
    padding: var(--space-2) var(--space-3);
    font-size: var(--fs-xs);
    white-space: nowrap;
  }

  /* ── Hide less important columns on mobile ── */
  .hide-mobile {
    display: none !important;
  }

  /* ── Modal: full-width on mobile ── */
  .modal {
    width: calc(100% - var(--space-6));
    max-width: none;
    max-height: 90vh;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    border-radius: var(--radius-lg);
  }

  .modal.show {
    transform: translate(-50%, -50%) scale(1);
  }

  .modal-header {
    padding: var(--space-4);
  }

  .modal-body {
    padding: var(--space-4);
  }

  .modal-footer {
    padding: var(--space-3) var(--space-4);
    flex-direction: column-reverse;
    gap: var(--space-2);
  }

  .modal-footer .btn {
    width: 100%;
  }

  /* ── Upload area ── */
  .upload-area {
    padding: var(--space-5) var(--space-3);
  }

  /* ── Pagination ── */
  .pagination {
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-1);
  }

  /* ── Auth layout ── */
  .auth-left {
    padding: var(--space-5) var(--space-4);
  }

  .auth-box {
    max-width: 100%;
  }

  .auth-title {
    font-size: var(--fs-xl);
  }

  /* ── Timeline ── */
  .timeline {
    padding-left: var(--space-6);
  }

  .timeline-content {
    padding: var(--space-3);
  }

  /* ── Tabs: scrollable ── */
  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: none;
  }

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

  .tab-item {
    padding: var(--space-2) var(--space-4);
    flex-shrink: 0;
  }

  /* ── Form rows: all single column on mobile ── */
  .form-row,
  .form-row-3 {
    grid-template-columns: 1fr;
  }

  /* ── Page header ── */
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
  }

  .page-title {
    font-size: var(--fs-xl);
  }

  /* ── Biodata form ── */
  .biodata-form-body {
    padding: var(--space-4);
  }

  .biodata-form-footer {
    flex-direction: column;
    gap: var(--space-3);
    align-items: stretch;
    padding: var(--space-4);
  }

  .biodata-form-footer .btn {
    width: 100%;
    justify-content: center;
  }

  /* ── Welcome card ── */
  .welcome-card {
    padding: var(--space-5) var(--space-4);
  }

  .welcome-name {
    font-size: var(--fs-xl);
  }

  .welcome-content {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
  }

  .welcome-countdown {
    width: 100%;
    text-align: left;
  }

  .welcome-info {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }

  /* ── Quick actions ── */
  .quick-actions {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
  }

  /* ── Settings nav: scrollable ── */
  .settings-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .settings-nav::-webkit-scrollbar {
    display: none;
  }

  .settings-nav-item {
    flex-shrink: 0;
    padding: var(--space-2) var(--space-3);
  }

  /* ── Finance stats ── */
  .finance-stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
  }

  /* ── Filter bar ── */
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-2);
    padding: var(--space-3);
  }

  .filter-group {
    flex-wrap: wrap;
    gap: var(--space-2);
  }

  .filter-bar select,
  .filter-bar input {
    width: 100%;
    min-width: unset;
  }

  /* ── Admin table header ── */
  .admin-table-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
  }

  /* ── Batch toolbar ── */
  .batch-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }

  /* ── Jenjang tabs: scrollable ── */
  .jenjang-filter-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .jenjang-filter-tabs::-webkit-scrollbar {
    display: none;
  }

  /* ── Payment ── */
  .payment-bank-info {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }

  .payment-account-number {
    font-size: var(--fs-xl);
  }

  /* ── Daftar ulang grid ── */
  .daftar-ulang-grid {
    grid-template-columns: 1fr;
  }

  /* ── Dropdown menu: ensure not offscreen ── */
  .dropdown-menu {
    right: 0;
    left: auto;
    max-width: calc(100vw - var(--space-6));
  }

  /* ── Notification dropdown: fixed on mobile ── */
  .notification-dropdown {
    position: fixed;
    top: var(--navbar-height);
    left: var(--space-3);
    right: var(--space-3);
    width: auto;
    max-height: 70vh;
    overflow-y: auto;
  }

  /* ── Page actions ── */
  .page-actions {
    flex-wrap: wrap;
    width: 100%;
    gap: var(--space-2);
  }

  /* ── Verifikasi workspace ── */
  .verifikasi-workspace {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  /* ── Score input table ── */
  .score-input-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}


/* ══════════════════════════════════════════════════════════════════════════
   XS: Mobile Portrait (<576px)
   ══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 575px) {
  body {
    font-size: var(--fs-sm);
  }

  h1 { font-size: var(--fs-xl); }
  h2 { font-size: var(--fs-lg); }
  h3 { font-size: var(--fs-md); }

  /* ── Content ── */
  .app-content {
    padding: var(--space-3);
  }

  /* ── Page header ── */
  .page-title {
    font-size: var(--fs-lg);
  }

  .page-subtitle {
    font-size: var(--fs-xs);
  }

  /* ── Stat grid: 1 column on tiny screens ── */
  .grid-stats {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  /* ── Stat card compact ── */
  .stat-card-icon {
    width: 40px;
    height: 40px;
    font-size: var(--fs-md);
  }

  .stat-card-label {
    font-size: var(--fs-xs);
  }

  .stat-card-value {
    font-size: var(--fs-xl);
  }

  /* ── Buttons ── */
  .btn {
    padding: var(--space-2) var(--space-4);
    font-size: var(--fs-xs);
    min-height: 40px;
  }

  .btn-xl {
    padding: var(--space-3) var(--space-6);
    font-size: var(--fs-base);
  }

  .btn-lg {
    padding: var(--space-2-5, 10px) var(--space-5);
    font-size: var(--fs-sm);
  }

  /* ── Stack buttons ── */
  .page-actions {
    flex-direction: column;
    width: 100%;
  }

  .page-actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* ── Notification dropdown ── */
  .notification-dropdown {
    position: fixed;
    top: var(--navbar-height);
    left: var(--space-2);
    right: var(--space-2);
    width: auto;
  }

  /* ── Form control: comfortable touch height ── */
  .form-control {
    padding: var(--space-2-5, 10px) var(--space-3);
    font-size: var(--fs-sm);
    min-height: 44px;
  }

  select.form-control {
    min-height: 44px;
  }

  /* ── Checkbox/radio: bigger touch area ── */
  .form-check-input {
    width: 20px;
    height: 20px;
  }

  /* ── Landing page hero ── */
  .landing-nav-actions .btn:not(.btn-primary) {
    display: none;
  }

  /* ── Quick actions: single column ── */
  .quick-actions {
    grid-template-columns: 1fr;
  }

  /* ── Finance stats: single column ── */
  .finance-stats-grid {
    grid-template-columns: 1fr;
  }

  /* ── Table: more compact ── */
  .data-table thead th,
  .data-table tbody td {
    padding: var(--space-1-5) var(--space-2);
    font-size: 11px;
  }

  .admin-table th,
  .admin-table td {
    padding: var(--space-1-5) var(--space-2);
    font-size: 11px;
  }

  /* ── Modal ── */
  .modal {
    width: calc(100% - var(--space-4));
    max-height: 92vh;
    border-radius: var(--radius-md);
  }

  .modal-header {
    padding: var(--space-3);
  }

  .modal-title {
    font-size: var(--fs-base);
  }

  .modal-body {
    padding: var(--space-3);
  }

  /* ── OTP inputs: compact ── */
  .otp-input {
    width: 44px;
    height: 52px;
    font-size: var(--fs-xl);
  }

  /* ── Breadcrumb: hide on very small ── */
  .breadcrumb {
    display: none;
  }

  /* ── Empty state ── */
  .empty-state {
    padding: var(--space-8) var(--space-3);
  }

  .empty-state-icon {
    font-size: 3rem;
  }

  /* ── Alert ── */
  .alert {
    padding: var(--space-3);
    gap: var(--space-2);
  }

  .alert-icon {
    font-size: var(--fs-lg);
  }

  /* ── Auth box spacing ── */
  .auth-left {
    padding: var(--space-4) var(--space-3);
  }

  .auth-header {
    margin-bottom: var(--space-5);
  }

  /* ── Admin stat card ── */
  .stat-card-admin {
    padding: var(--space-4);
  }

  .stat-number {
    font-size: var(--fs-2xl);
  }
}


/* ══════════════════════════════════════════════════════════════════════════
   VERY SMALL: 360px-375px (Budget Android)
   ══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 390px) {
  .app-content {
    padding: var(--space-2) var(--space-2-5, 10px);
  }

  .navbar-toggle,
  .btn-icon {
    width: 40px;
    height: 40px;
  }

  .page-title {
    font-size: var(--fs-md);
  }

  .card-body {
    padding: var(--space-3);
  }

  .biodata-form-body {
    padding: var(--space-3);
  }

  .sidebar {
    width: 280px;
  }

  .otp-input {
    width: 38px;
    height: 46px;
    font-size: var(--fs-lg);
  }

  .otp-inputs {
    gap: var(--space-2);
  }
}


/* ══════════════════════════════════════════════════════════════════════════
   LANDING PAGE — Mobile Responsive
   ══════════════════════════════════════════════════════════════════════════ */

/* Large tablet and below */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: var(--space-8);
    padding: var(--space-6);
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
    order: 1;
  }

  .hero-visual {
    order: 0;
    max-width: 500px;
    margin: 0 auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
    gap: var(--space-6);
  }
}

/* Mobile */
@media (max-width: 767px) {
  .hero {
    min-height: auto;
    padding-top: calc(var(--navbar-height) + var(--space-6));
    padding-bottom: var(--space-8);
  }

  .hero-container {
    padding: var(--space-4);
    gap: var(--space-6);
  }

  .hero-title {
    font-size: 2rem;
    letter-spacing: -0.02em;
  }

  .hero-description {
    font-size: var(--fs-base);
    margin-bottom: var(--space-6);
  }

  .hero-actions {
    flex-direction: column;
    gap: var(--space-3);
    align-items: center;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }

  .hero-float-card {
    display: none;
  }

  .hero-stats {
    flex-direction: column;
    gap: var(--space-4);
    align-items: center;
  }

  .hero-stat-value {
    font-size: var(--fs-2xl);
  }

  .hero-visual {
    max-width: 280px;
  }

  /* Section spacing */
  .section-gelombang {
    padding: var(--space-12) var(--space-4);
  }
}

@media (max-width: 575px) {
  .hero-title {
    font-size: var(--fs-2xl);
  }

  .landing-navbar {
    padding: 0 var(--space-3);
  }
}


/* ══════════════════════════════════════════════════════════════════════════
   TABLE RESPONSIVE ENHANCEMENT
   ══════════════════════════════════════════════════════════════════════════ */

/* Horizontal scroll wrapper for all tables */
@media (max-width: 767px) {
  /* Table container must have overflow, not the page */
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-lg);
  }

  /* Ensure table is at minimum readable width */
  .table-container .data-table,
  .table-container .admin-table {
    min-width: 560px;
  }

  /* Admin table wrapper */
  .admin-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .admin-table-container .admin-table {
    min-width: 700px;
  }

  /* User cell compact */
  .user-cell {
    gap: var(--space-2);
  }

  .user-avatar-sm {
    width: 28px;
    height: 28px;
    font-size: 10px;
  }

  .table-user-avatar {
    width: 28px;
    height: 28px;
    font-size: var(--fs-xs);
  }

  /* Action buttons in table: tighter */
  .table-action-btn {
    padding: var(--space-1) var(--space-2);
    font-size: 11px;
    min-height: 28px;
  }

  /* RBAC table */
  .rbac-table {
    font-size: var(--fs-xs);
  }
}


/* ══════════════════════════════════════════════════════════════════════════
   MODAL RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════ */

/* Large modal on all screens */
.modal-lg {
  max-width: 780px;
}

.modal-sm {
  max-width: 400px;
}

@media (max-width: 767px) {
  .modal-lg,
  .modal-sm {
    max-width: none;
    width: calc(100% - var(--space-6));
  }
}


/* ══════════════════════════════════════════════════════════════════════════
   FORM RESPONSIVE IMPROVEMENTS
   ══════════════════════════════════════════════════════════════════════════ */

/* Ensure inputs are always tall enough for touch */
.form-control {
  min-height: 44px;
}

select.form-control {
  min-height: 44px;
}

textarea.form-control {
  min-height: 100px;
  height: auto;
}

.btn, .btn-sm {
  min-height: 44px;
}

/* Make all form groups responsive */
@media (max-width: 991px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .form-row-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575px) {
  .form-row,
  .form-row-3 {
    grid-template-columns: 1fr;
  }

  .form-group {
    margin-bottom: var(--space-4);
  }
}


/* ══════════════════════════════════════════════════════════════════════════
   DASHBOARD RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════ */

/* Admin stat cards */
@media (max-width: 991px) {
  .admin-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575px) {
  .admin-stats-grid {
    grid-template-columns: 1fr;
  }
}

/* Chart containers */
.chart-container {
  position: relative;
  width: 100%;
  max-width: 100%;
}

@media (max-width: 767px) {
  .chart-container canvas {
    max-height: 280px !important;
  }
}

@media (max-width: 575px) {
  .chart-container canvas {
    max-height: 220px !important;
  }
}


/* ══════════════════════════════════════════════════════════════════════════
   SIDEBAR PESERTA SPECIFIC
   ══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 991px) {
  .sidebar-peserta {
    transform: translateX(-100%);
    z-index: var(--z-modal);
  }

  .sidebar-peserta.mobile-open {
    transform: translateX(0);
  }
}


/* ══════════════════════════════════════════════════════════════════════════
   FLOATING WIDGETS — MOBILE ADJUSTMENT
   ══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 575px) {
  .floating-actions {
    bottom: 16px !important;
    right: 16px !important;
  }

  #btn-wa-help {
    width: 44px !important;
    height: 44px !important;
  }

  #btn-wa-help i {
    width: 22px !important;
    height: 22px !important;
  }

  .floating-tooltip {
    display: none !important;
  }
}


/* ══════════════════════════════════════════════════════════════════════════
   DROPDOWN RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
  /* User dropdown: prevent overflow */
  .navbar-right > .dropdown > .dropdown-menu {
    position: fixed;
    top: var(--navbar-height);
    right: var(--space-3);
    left: auto;
    min-width: 200px;
    max-width: calc(100vw - var(--space-6));
  }
}


/* ══════════════════════════════════════════════════════════════════════════
   PRINT STYLES
   ══════════════════════════════════════════════════════════════════════════ */

@media print {
  .sidebar,
  .navbar,
  .sidebar-overlay,
  .floating-actions,
  .page-actions,
  .table-actions,
  .admin-table-header .btn,
  .notification-dropdown,
  .no-print {
    display: none !important;
  }

  .app-main {
    margin-left: 0 !important;
  }

  .app-content {
    margin-top: 0 !important;
    padding: 0 !important;
  }

  body {
    background: white !important;
    color: black !important;
    font-size: 11pt;
  }

  .card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    break-inside: avoid;
  }

  .data-table,
  .admin-table {
    font-size: 9pt;
  }

  .badge {
    border: 1px solid currentColor;
  }

  a {
    color: black;
    text-decoration: underline;
  }

  .page-title {
    font-size: 16pt;
    margin-bottom: 12pt;
  }

  /* Show print-only elements */
  .print-only {
    display: block !important;
  }

  /* Result card for print */
  .result-card {
    border: 1px solid #000 !important;
    box-shadow: none !important;
    background: none !important;
  }

  /* Table overflow for print */
  .data-table-responsive,
  .admin-table-container {
    overflow: visible !important;
  }

  .data-table,
  .admin-table {
    min-width: unset !important;
    width: 100% !important;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   CRITICAL MOBILE FIX FOR NAVBAR
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 991px) {
  .navbar {
    z-index: 9999 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    pointer-events: auto !important;
  }
  .navbar-toggle, .navbar-user, .navbar-notification {
    pointer-events: auto !important;
    position: relative;
    z-index: 10000 !important;
  }
  .navbar-right .dropdown-menu {
    z-index: 10001 !important;
  }
  .sidebar-overlay {
    z-index: 9997 !important;
  }
  .sidebar {
    z-index: 9998 !important;
  }
}
