/* =========================================================
   WONDER APP — VENDOR APPLICATION
   RESPONSIVE CSS
   File: vendor_app/assets/css/responsive.css

   Purpose:
   - Mobile / Tablet / Desktop responsiveness
   - Sidebar + topbar adaptation
   - Tables -> cards / horizontal scroll
   - Forms -> single column
   - Dashboard grids
   - Modals / drawers
   - Messages / support / analytics
   - Accessibility
   ========================================================= */


/* =========================================================
   1. RESPONSIVE ROOT HELPERS
   ========================================================= */

@media (max-width: 1400px) {

    .container,
    .page-container,
    .content-container,
    .app-container {
        max-width: 100%;
    }

    .dashboard-grid,
    .analytics-grid,
    .stats-grid {
        gap: 18px;
    }

    .main-content {
        padding-left: 24px;
        padding-right: 24px;
    }
}


/* =========================================================
   2. LARGE TABLET / SMALL DESKTOP
   <= 1200px
   ========================================================= */

@media (max-width: 1200px) {

    /* -----------------------------------------------------
       App Layout
       ----------------------------------------------------- */

    .app-layout {
        grid-template-columns: 220px minmax(0, 1fr);
    }

    .sidebar {
        width: 220px;
    }

    .main-content {
        min-width: 0;
        padding: 22px;
    }

    .page-content {
        min-width: 0;
    }


    /* -----------------------------------------------------
       Dashboard
       ----------------------------------------------------- */

    .dashboard-grid,
    .analytics-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .quick-actions-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }


    /* -----------------------------------------------------
       Cards
       ----------------------------------------------------- */

    .card-grid,
    .cards-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }


    /* -----------------------------------------------------
       Forms
       ----------------------------------------------------- */

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

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


    /* -----------------------------------------------------
       Analytics
       ----------------------------------------------------- */

    .analytics-layout {
        grid-template-columns: 1fr;
    }

    .analytics-sidebar {
        display: none;
    }


    /* -----------------------------------------------------
       Support
       ----------------------------------------------------- */

    .support-layout {
        grid-template-columns: 220px minmax(0, 1fr);
    }

    .support-category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }


    /* -----------------------------------------------------
       AI
       ----------------------------------------------------- */

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


/* =========================================================
   3. TABLET
   <= 992px
   ========================================================= */

@media (max-width: 992px) {

    /* -----------------------------------------------------
       Root
       ----------------------------------------------------- */

    html {
        font-size: 15px;
    }

    body {
        overflow-x: hidden;
    }


    /* -----------------------------------------------------
       Main App Layout
       ----------------------------------------------------- */

    .app-layout {
        display: block;
    }

    .main-content {
        width: 100%;
        padding: 20px;
    }


    /* -----------------------------------------------------
       Sidebar
       ----------------------------------------------------- */

    .sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        bottom: 0;
        width: 280px;
        max-width: 85vw;
        z-index: 1000;
        transition:
            left 0.25s ease,
            transform 0.25s ease;
        overflow-y: auto;
    }

    .sidebar.is-open,
    .sidebar.open,
    body.sidebar-open .sidebar {
        left: 0;
        transform: translateX(0);
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 999;
        background: rgba(0, 0, 0, 0.45);
    }

    .sidebar-overlay.is-visible,
    .sidebar-overlay.active,
    body.sidebar-open .sidebar-overlay {
        display: block;
    }

    .sidebar-toggle {
        display: inline-flex;
    }


    /* -----------------------------------------------------
       Header
       ----------------------------------------------------- */

    .header,
    .topbar {
        width: 100%;
    }

    .header-content,
    .topbar-content {
        gap: 12px;
    }

    .header-search,
    .topbar-search {
        max-width: 320px;
    }

    .header-actions,
    .topbar-actions {
        gap: 8px;
    }


    /* -----------------------------------------------------
       Navigation
       ----------------------------------------------------- */

    .navigation {
        overflow-x: auto;
        white-space: nowrap;
    }

    .navigation-list {
        min-width: max-content;
    }


    /* -----------------------------------------------------
       Page Header
       ----------------------------------------------------- */

    .page-header,
    .section-header {
        flex-wrap: wrap;
        gap: 14px;
    }

    .page-header-actions,
    .section-header-actions {
        width: 100%;
    }


    /* -----------------------------------------------------
       Dashboard
       ----------------------------------------------------- */

    .dashboard-grid,
    .analytics-grid,
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-main-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        width: 100%;
    }

    .quick-actions-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }


    /* -----------------------------------------------------
       Generic Cards
       ----------------------------------------------------- */

    .card-grid,
    .cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }


    /* -----------------------------------------------------
       Forms
       ----------------------------------------------------- */

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

    .form-field-full,
    .field-full {
        grid-column: 1 / -1;
    }


    /* -----------------------------------------------------
       Tables
       ----------------------------------------------------- */

    .table-responsive,
    .responsive-table,
    .table-wrapper {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 700px;
    }

    .data-table {
        min-width: 700px;
    }


    /* -----------------------------------------------------
       Two Column Layout
       ----------------------------------------------------- */

    .two-column-layout,
    .content-grid-2 {
        grid-template-columns: 1fr;
    }

    .three-column-layout,
    .content-grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }


    /* -----------------------------------------------------
       Business
       ----------------------------------------------------- */

    .business-profile-layout {
        grid-template-columns: 1fr;
    }

    .business-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }


    /* -----------------------------------------------------
       Leads / Enquiries
       ----------------------------------------------------- */

    .lead-detail-layout,
    .enquiry-detail-layout {
        grid-template-columns: 1fr;
    }

    .lead-summary-grid,
    .enquiry-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }


    /* -----------------------------------------------------
       Quotes / Orders
       ----------------------------------------------------- */

    .quote-layout,
    .order-layout {
        grid-template-columns: 1fr;
    }

    .quote-summary-grid,
    .order-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }


    /* -----------------------------------------------------
       Customers
       ----------------------------------------------------- */

    .customer-detail-layout {
        grid-template-columns: 1fr;
    }

    .customer-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }


    /* -----------------------------------------------------
       Team
       ----------------------------------------------------- */

    .team-layout {
        grid-template-columns: 1fr;
    }


    /* -----------------------------------------------------
       Billing
       ----------------------------------------------------- */

    .billing-layout {
        grid-template-columns: 1fr;
    }

    .pricing-grid,
    .plans-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }


    /* -----------------------------------------------------
       Analytics
       ----------------------------------------------------- */

    .chart-grid,
    .analytics-chart-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }


    /* -----------------------------------------------------
       Messages
       ----------------------------------------------------- */

    .messages-layout {
        grid-template-columns: 280px minmax(0, 1fr);
    }

    .conversation-list {
        min-width: 0;
    }


    /* -----------------------------------------------------
       Support
       ----------------------------------------------------- */

    .support-layout {
        grid-template-columns: 1fr;
    }

    .support-sidebar {
        width: 100%;
    }

    .support-nav {
        display: flex;
        gap: 6px;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .support-nav-item {
        flex: 0 0 auto;
    }

    .support-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .support-contact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }


    /* -----------------------------------------------------
       AI
       ----------------------------------------------------- */

    .ai-layout {
        grid-template-columns: 1fr;
    }

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


    /* -----------------------------------------------------
       Profile
       ----------------------------------------------------- */

    .profile-layout {
        grid-template-columns: 1fr;
    }


    /* -----------------------------------------------------
       Settings
       ----------------------------------------------------- */

    .settings-layout {
        grid-template-columns: 220px minmax(0, 1fr);
    }


    /* -----------------------------------------------------
       Security
       ----------------------------------------------------- */

    .security-layout {
        grid-template-columns: 1fr;
    }


    /* -----------------------------------------------------
       Modal
       ----------------------------------------------------- */

    .modal-dialog {
        width: min(94vw, 720px);
        max-width: 94vw;
    }

    .modal-lg {
        width: min(94vw, 900px);
    }

    .modal-xl {
        width: min(96vw, 1100px);
    }


    /* -----------------------------------------------------
       Drawer
       ----------------------------------------------------- */

    .drawer {
        max-width: 90vw;
    }
}


/* =========================================================
   4. LARGE MOBILE
   <= 768px
   ========================================================= */

@media (max-width: 768px) {

    /* -----------------------------------------------------
       Base
       ----------------------------------------------------- */

    html {
        font-size: 14px;
    }

    body {
        min-width: 320px;
    }

    .main-content {
        padding: 16px;
    }


    /* -----------------------------------------------------
       Header
       ----------------------------------------------------- */

    .header-content,
    .topbar-content {
        min-height: 58px;
    }

    .header-search,
    .topbar-search {
        display: none;
    }

    .header-actions,
    .topbar-actions {
        margin-left: auto;
    }

    .header-title,
    .topbar-title {
        max-width: 55vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }


    /* -----------------------------------------------------
       Page Header
       ----------------------------------------------------- */

    .page-header {
        display: block;
        margin-bottom: 18px;
    }

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

    .page-subtitle {
        font-size: 0.9rem;
    }

    .page-header-actions {
        margin-top: 14px;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }


    /* -----------------------------------------------------
       Buttons
       ----------------------------------------------------- */

    .btn-group {
        flex-wrap: wrap;
    }

    .btn {
        max-width: 100%;
    }


    /* -----------------------------------------------------
       Dashboard
       ----------------------------------------------------- */

    .dashboard-grid,
    .analytics-grid,
    .stats-grid,
    .card-grid,
    .cards-grid,
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        min-height: auto;
    }

    .stat-card-value {
        font-size: 1.45rem;
    }


    /* -----------------------------------------------------
       Forms
       ----------------------------------------------------- */

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

    .form-field-full,
    .field-full {
        grid-column: auto;
    }

    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .form-actions .btn {
        width: 100%;
    }


    /* -----------------------------------------------------
       Cards
       ----------------------------------------------------- */

    .card-header,
    .card-footer {
        flex-wrap: wrap;
        gap: 10px;
    }

    .card-body {
        padding: 16px;
    }


    /* -----------------------------------------------------
       Tables
       ----------------------------------------------------- */

    .table-card {
        overflow: hidden;
    }

    .table-responsive,
    .responsive-table,
    .table-wrapper {
        margin-left: -1px;
        margin-right: -1px;
    }

    table {
        min-width: 650px;
    }


    /* -----------------------------------------------------
       Optional Mobile Table Card Mode
       ----------------------------------------------------- */

    .mobile-table {
        display: block;
    }

    .mobile-table thead {
        display: none;
    }

    .mobile-table tbody,
    .mobile-table tr,
    .mobile-table td {
        display: block;
        width: 100%;
    }

    .mobile-table tr {
        margin-bottom: 12px;
        border: 1px solid var(--border-color, #e5e7eb);
        border-radius: 10px;
        overflow: hidden;
    }

    .mobile-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        padding: 10px 14px;
        border-bottom: 1px solid var(--border-color, #e5e7eb);
    }

    .mobile-table td:last-child {
        border-bottom: 0;
    }


    /* -----------------------------------------------------
       Layouts
       ----------------------------------------------------- */

    .three-column-layout,
    .content-grid-3,
    .business-info-grid,
    .lead-summary-grid,
    .enquiry-summary-grid,
    .quote-summary-grid,
    .order-summary-grid,
    .customer-summary-grid,
    .chart-grid,
    .analytics-chart-grid,
    .pricing-grid,
    .plans-grid {
        grid-template-columns: 1fr;
    }


    /* -----------------------------------------------------
       Filters
       ----------------------------------------------------- */

    .filters,
    .filter-bar,
    .table-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-item,
    .filter-control,
    .filter-search {
        width: 100%;
    }

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


    /* -----------------------------------------------------
       Search
       ----------------------------------------------------- */

    .search-box {
        width: 100%;
    }

    .search-box input {
        width: 100%;
    }


    /* -----------------------------------------------------
       Tabs
       ----------------------------------------------------- */

    .tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .tab {
        flex: 0 0 auto;
        white-space: nowrap;
    }


    /* -----------------------------------------------------
       Leads
       ----------------------------------------------------- */

    .lead-card,
    .enquiry-card,
    .quote-card,
    .order-card {
        padding: 14px;
    }

    .lead-actions,
    .enquiry-actions,
    .quote-actions,
    .order-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
    }


    /* -----------------------------------------------------
       Messages
       ----------------------------------------------------- */

    .messages-layout {
        display: block;
    }

    .conversation-list {
        display: none;
    }

    .messages-layout.is-list-open .conversation-list {
        display: block;
    }

    .messages-layout.is-list-open .conversation-view {
        display: none;
    }

    .message-composer {
        padding: 10px;
    }

    .message-composer-actions {
        flex-wrap: wrap;
    }


    /* -----------------------------------------------------
       Support
       ----------------------------------------------------- */

    .support-header {
        display: block;
    }

    .support-header-actions {
        margin-top: 14px;
        width: 100%;
    }

    .support-category-grid,
    .support-contact-grid {
        grid-template-columns: 1fr;
    }

    .support-ticket-toolbar {
        display: block;
    }

    .support-ticket-filters {
        margin-top: 12px;
        width: 100%;
    }

    .support-ticket {
        display: block;
    }

    .support-ticket-actions {
        margin-top: 12px;
    }

    .support-ticket-detail-top {
        display: block;
    }

    .support-ticket-detail-actions {
        margin-top: 14px;
        width: 100%;
    }

    .support-message {
        max-width: 92%;
    }

    .support-reply {
        padding: 10px;
    }


    /* -----------------------------------------------------
       AI
       ----------------------------------------------------- */

    .ai-grid {
        grid-template-columns: 1fr;
    }

    .ai-chat {
        min-height: 420px;
    }


    /* -----------------------------------------------------
       Profile
       ----------------------------------------------------- */

    .profile-header {
        text-align: center;
    }

    .profile-avatar {
        margin-left: auto;
        margin-right: auto;
    }

    .profile-actions {
        justify-content: center;
        flex-wrap: wrap;
    }


    /* -----------------------------------------------------
       Settings
       ----------------------------------------------------- */

    .settings-layout {
        display: block;
    }

    .settings-sidebar {
        width: 100%;
        margin-bottom: 16px;
    }

    .settings-nav {
        display: flex;
        overflow-x: auto;
        gap: 6px;
    }

    .settings-nav-item {
        flex: 0 0 auto;
        white-space: nowrap;
    }


    /* -----------------------------------------------------
       Modal
       ----------------------------------------------------- */

    .modal-dialog,
    .modal-lg,
    .modal-xl {
        width: calc(100vw - 24px);
        max-width: none;
        max-height: calc(100vh - 24px);
        margin: 12px;
    }

    .modal-body {
        overflow-y: auto;
    }


    /* -----------------------------------------------------
       Drawer
       ----------------------------------------------------- */

    .drawer {
        width: 100%;
        max-width: 100%;
    }


    /* -----------------------------------------------------
       Pagination
       ----------------------------------------------------- */

    .pagination {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 4px;
    }

    .pagination-list {
        flex-wrap: nowrap;
    }


    /* -----------------------------------------------------
       Empty State
       ----------------------------------------------------- */

    .empty-state {
        padding: 36px 18px;
    }


    /* -----------------------------------------------------
       Footer
       ----------------------------------------------------- */

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
    }
}


/* =========================================================
   5. MOBILE
   <= 576px
   ========================================================= */

@media (max-width: 576px) {

    /* -----------------------------------------------------
       Root
       ----------------------------------------------------- */

    html {
        font-size: 14px;
    }

    .main-content {
        padding: 12px;
    }


    /* -----------------------------------------------------
       Header
       ----------------------------------------------------- */

    .header-content,
    .topbar-content {
        padding-left: 12px;
        padding-right: 12px;
    }

    .logo-text {
        max-width: 140px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .header-title,
    .topbar-title {
        max-width: 45vw;
        font-size: 0.95rem;
    }

    .header-action-text {
        display: none;
    }


    /* -----------------------------------------------------
       Page Header
       ----------------------------------------------------- */

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

    .section-title {
        font-size: 1.05rem;
    }


    /* -----------------------------------------------------
       Cards
       ----------------------------------------------------- */

    .card {
        border-radius: 10px;
    }

    .card-header,
    .card-body,
    .card-footer {
        padding: 12px;
    }


    /* -----------------------------------------------------
       Buttons
       ----------------------------------------------------- */

    .btn-sm {
        min-height: 34px;
        padding: 7px 10px;
    }

    .mobile-full-width {
        width: 100%;
    }


    /* -----------------------------------------------------
       Stats
       ----------------------------------------------------- */

    .stat-card {
        padding: 14px;
    }

    .stat-card-label {
        font-size: 0.8rem;
    }

    .stat-card-value {
        font-size: 1.3rem;
    }


    /* -----------------------------------------------------
       Forms
       ----------------------------------------------------- */

    .form-control,
    .form-select,
    textarea {
        max-width: 100%;
    }

    .input-group {
        flex-direction: column;
    }

    .input-group > * {
        width: 100%;
        border-radius: 8px !important;
    }


    /* -----------------------------------------------------
       Table
       ----------------------------------------------------- */

    table {
        min-width: 600px;
    }


    /* -----------------------------------------------------
       Action Groups
       ----------------------------------------------------- */

    .action-group,
    .actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .action-group .btn,
    .actions .btn {
        flex: 1 1 auto;
    }


    /* -----------------------------------------------------
       Support
       ----------------------------------------------------- */

    .support-page {
        --support-radius-lg: 10px;
        --support-radius-xl: 12px;
    }

    .support-hero {
        padding: 20px 14px;
    }

    .support-hero-title {
        font-size: 1.35rem;
    }

    .support-search {
        display: block;
    }

    .support-search-input {
        width: 100%;
    }

    .support-search-button {
        width: 100%;
        margin-top: 8px;
    }

    .support-ticket-tab {
        padding: 8px 10px;
    }

    .support-ticket-number {
        font-size: 0.78rem;
    }

    .support-message {
        max-width: 96%;
    }


    /* -----------------------------------------------------
       Messages
       ----------------------------------------------------- */

    .message {
        max-width: 92%;
    }

    .message-actions {
        flex-wrap: wrap;
    }


    /* -----------------------------------------------------
       Notifications
       ----------------------------------------------------- */

    .notification-panel {
        position: fixed;
        top: 60px;
        right: 8px;
        left: 8px;
        width: auto;
        max-width: none;
    }


    /* -----------------------------------------------------
       Dropdown
       ----------------------------------------------------- */

    .dropdown-menu {
        max-width: calc(100vw - 20px);
    }


    /* -----------------------------------------------------
       Modal
       ----------------------------------------------------- */

    .modal-dialog,
    .modal-lg,
    .modal-xl {
        width: calc(100vw - 16px);
        margin: 8px;
        max-height: calc(100vh - 16px);
        border-radius: 10px;
    }

    .modal-header,
    .modal-footer {
        padding: 12px;
    }


    /* -----------------------------------------------------
       Toast
       ----------------------------------------------------- */

    .toast-container {
        left: 10px;
        right: 10px;
        bottom: 10px;
    }

    .toast {
        width: 100%;
        max-width: none;
    }


    /* -----------------------------------------------------
       Pagination
       ----------------------------------------------------- */

    .pagination-item:not(.is-active):not(.pagination-prev):not(.pagination-next) {
        display: none;
    }
}


/* =========================================================
   6. EXTRA SMALL DEVICES
   <= 400px
   ========================================================= */

@media (max-width: 400px) {

    .main-content {
        padding: 10px;
    }

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

    .header-content,
    .topbar-content {
        padding-left: 8px;
        padding-right: 8px;
    }

    .sidebar {
        width: 270px;
    }

    .btn {
        font-size: 0.85rem;
    }

    .card-body {
        padding: 10px;
    }

    .support-category,
    .support-contact-card {
        padding: 12px;
    }

    .support-ticket {
        padding: 12px;
    }
}


/* =========================================================
   7. LANDSCAPE MOBILE
   ========================================================= */

@media (max-width: 768px) and (orientation: landscape) {

    .sidebar {
        max-height: 100vh;
    }

    .modal-dialog {
        max-height: calc(100vh - 16px);
    }

    .main-content {
        padding-top: 12px;
        padding-bottom: 12px;
    }
}


/* =========================================================
   8. TOUCH DEVICES
   ========================================================= */

@media (hover: none) and (pointer: coarse) {

    .btn,
    button,
    input[type="button"],
    input[type="submit"],
    input[type="reset"],
    .nav-link,
    .sidebar-link,
    .tab,
    .pagination-item {
        min-height: 42px;
    }

    .dropdown-item {
        min-height: 42px;
        display: flex;
        align-items: center;
    }

    .table-responsive,
    .responsive-table,
    .navigation,
    .tabs,
    .settings-nav,
    .support-nav {
        scrollbar-width: none;
    }

    .table-responsive::-webkit-scrollbar,
    .responsive-table::-webkit-scrollbar,
    .navigation::-webkit-scrollbar,
    .tabs::-webkit-scrollbar,
    .settings-nav::-webkit-scrollbar,
    .support-nav::-webkit-scrollbar {
        display: none;
    }
}


/* =========================================================
   9. PRINT RESPONSIVE / PRINT OPTIMIZATION
   ========================================================= */

@media print {

    .sidebar,
    .topbar,
    .header,
    .navigation,
    .sidebar-overlay,
    .mobile-only,
    .no-print,
    .page-header-actions,
    .section-header-actions,
    .table-filters,
    .filters,
    .pagination,
    .modal,
    .drawer,
    .toast-container,
    .notification-panel {
        display: none !important;
    }

    .app-layout,
    .main-content,
    .page-content {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .card,
    .support-card,
    .support-ticket-detail {
        box-shadow: none !important;
        break-inside: avoid;
    }

    table {
        min-width: 0 !important;
    }

    a {
        color: inherit !important;
        text-decoration: none !important;
    }
}


/* =========================================================
   10. ACCESSIBILITY
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


/* =========================================================
   11. HIGH CONTRAST SUPPORT
   ========================================================= */

@media (prefers-contrast: more) {

    .card,
    .support-card,
    .modal-dialog,
    .dropdown-menu,
    .form-control,
    .form-select {
        border-width: 2px;
    }

    .btn {
        border-width: 2px;
    }
}


/* =========================================================
   12. MOBILE UTILITY CLASSES
   ========================================================= */

.desktop-only {
    display: initial;
}

.mobile-only {
    display: none;
}

.tablet-only {
    display: none;
}


@media (max-width: 992px) {

    .desktop-only {
        display: none !important;
    }

    .tablet-only {
        display: initial !important;
    }
}


@media (max-width: 768px) {

    .tablet-only {
        display: none !important;
    }

    .mobile-only {
        display: initial !important;
    }

    .mobile-hidden {
        display: none !important;
    }

    .mobile-block {
        display: block !important;
    }

    .mobile-flex {
        display: flex !important;
    }

    .mobile-full {
        width: 100% !important;
    }
}


/* =========================================================
   13. RESPONSIVE FLEX UTILITIES
   ========================================================= */

@media (max-width: 768px) {

    .responsive-flex {
        flex-direction: column;
        align-items: stretch;
    }

    .responsive-flex-center {
        align-items: center;
    }

    .responsive-flex-start {
        align-items: flex-start;
    }

    .responsive-gap {
        gap: 10px;
    }
}


/* =========================================================
   14. RESPONSIVE TEXT
   ========================================================= */

@media (max-width: 768px) {

    .text-responsive-lg {
        font-size: 1.15rem;
    }

    .text-responsive-md {
        font-size: 1rem;
    }

    .text-responsive-sm {
        font-size: 0.85rem;
    }
}


/* =========================================================
   15. RESPONSIVE SPACING
   ========================================================= */

@media (max-width: 768px) {

    .mt-responsive {
        margin-top: 12px;
    }

    .mb-responsive {
        margin-bottom: 12px;
    }

    .p-responsive {
        padding: 12px;
    }

    .px-responsive {
        padding-left: 12px;
        padding-right: 12px;
    }

    .py-responsive {
        padding-top: 12px;
        padding-bottom: 12px;
    }
}


/* =========================================================
   16. RESPONSIVE WIDTH UTILITIES
   ========================================================= */

@media (max-width: 768px) {

    .w-md-100,
    .w-lg-100 {
        width: 100% !important;
    }
}


/* =========================================================
   17. SAFE MEDIA ELEMENTS
   ========================================================= */

img,
video,
iframe,
svg {
    max-width: 100%;
}

@media (max-width: 768px) {

    img,
    video,
    iframe {
        height: auto;
    }

    .responsive-video {
        width: 100%;
        aspect-ratio: 16 / 9;
        height: auto;
    }
}


/* =========================================================
   18. RESPONSIVE GRID FALLBACK
   ========================================================= */

@media (max-width: 768px) {

    [class*="grid-cols-4"],
    [class*="grid-4"] {
        grid-template-columns: 1fr !important;
    }

    [class*="grid-cols-3"],
    [class*="grid-3"] {
        grid-template-columns: 1fr !important;
    }

    [class*="grid-cols-2"],
    [class*="grid-2"] {
        grid-template-columns: 1fr !important;
    }
}


/* =========================================================
   19. RESPONSIVE DETAIL / SUMMARY PANELS
   ========================================================= */

@media (max-width: 768px) {

    .detail-grid,
    .summary-grid,
    .info-grid {
        grid-template-columns: 1fr !important;
    }

    .detail-sidebar,
    .summary-sidebar,
    .info-sidebar {
        width: 100%;
    }

    .detail-actions,
    .summary-actions {
        width: 100%;
        flex-wrap: wrap;
    }
}


/* =========================================================
   20. RESPONSIVE STICKY ACTION BAR
   ========================================================= */

@media (max-width: 576px) {

    .mobile-sticky-actions {
        position: sticky;
        bottom: 0;
        z-index: 100;
        display: flex;
        gap: 8px;
        padding: 10px;
        margin-left: -12px;
        margin-right: -12px;
        background: var(--surface, #ffffff);
        border-top: 1px solid var(--border-color, #e5e7eb);
    }

    .mobile-sticky-actions .btn {
        flex: 1 1 0;
    }
}


/* =========================================================
   21. SAFE OVERFLOW
   ========================================================= */

@media (max-width: 768px) {

    .overflow-x-auto {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .overflow-hidden-mobile {
        overflow: hidden;
    }

    .text-nowrap-mobile {
        white-space: nowrap;
    }

    .text-wrap-mobile {
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: break-word;
    }
}


/* =========================================================
   22. RESPONSIVE AVATARS
   ========================================================= */

@media (max-width: 576px) {

    .avatar-lg {
        width: 48px;
        height: 48px;
    }

    .avatar-xl {
        width: 64px;
        height: 64px;
    }
}


/* =========================================================
   23. RESPONSIVE FILE / ATTACHMENT LISTS
   ========================================================= */

@media (max-width: 576px) {

    .attachment-item,
    .file-item {
        flex-wrap: wrap;
    }

    .attachment-info,
    .file-info {
        min-width: 0;
        flex: 1 1 calc(100% - 50px);
    }

    .attachment-actions,
    .file-actions {
        width: 100%;
        justify-content: flex-end;
    }
}


/* =========================================================
   24. RESPONSIVE NOTIFICATION LIST
   ========================================================= */

@media (max-width: 576px) {

    .notification-item {
        display: grid;
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 10px;
    }

    .notification-actions {
        grid-column: 2;
        width: 100%;
    }
}


/* =========================================================
   25. RESPONSIVE FOOTER
   ========================================================= */

@media (max-width: 768px) {

    .footer {
        padding: 18px 12px;
    }

    .footer-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 14px;
    }
}


/* =========================================================
   26. VERY WIDE DESKTOP
   >= 1600px
   ========================================================= */

@media (min-width: 1600px) {

    .main-content {
        padding-left: 32px;
        padding-right: 32px;
    }

    .dashboard-grid,
    .analytics-grid {
        gap: 24px;
    }

    .stats-grid {
        gap: 22px;
    }
}


/* =========================================================
   27. DARK THEME SAFE RESPONSIVE SURFACES
   ========================================================= */

@media (max-width: 768px) {

    html[data-theme="dark"] .mobile-sticky-actions,
    .theme-dark .mobile-sticky-actions {
        background: var(--surface-dark, #111827);
        border-color: var(--border-dark, #374151);
    }
}


/* =========================================================
   END OF RESPONSIVE.CSS
   ========================================================= */