/* ==========================================================
   ADTHRIVE MEDIA — UNIVERSAL MOBILE RESPONSIVE OVERRIDES
   File: CSS/mobile-responsive.css

   Scope:
   - Public pages
   - Dashboard and modules
   - Forms, cards, tables, filters, dialogs
   - Mobile, tablet and compact screens

   EXCLUDED:
   - Header
   - Sidebar
   - Footer

   Existing HTML classes and IDs are preserved.
========================================================== */


/* ==========================================================
   1. RESPONSIVE FOUNDATION
========================================================== */

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    min-width: 0;
    max-width: 100%;
}

main,
section,
article,
aside,
form,
fieldset,
figure {
    min-width: 0;
}

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

img,
video {
    height: auto;
}

input,
select,
textarea,
button {
    max-width: 100%;
    font: inherit;
}

input,
select,
textarea {
    min-width: 0;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

p,
h1,
h2,
h3,
h4,
h5,
h6,
td,
th,
label,
small,
span {
    overflow-wrap: anywhere;
}

table {
    max-width: 100%;
}

[hidden] {
    display: none !important;
}


/* ==========================================================
   2. LARGE TABLETS AND SMALL LAPTOPS
   1024px and below
========================================================== */

@media screen and (max-width: 1024px) {

    /* Main page containers */

    .dashboard-main,
    .profile-main,
    .public-page,
    .billing-page,
    .contacts-page,
    .automations-page,
    .api-keys-module,
    .templates-module,
    .bulk-import-module,
    .messages-page,
    .notifications-page,
    .my-tickets-page,
    .wallet-container,
    .account-page,
    .requests-communication-page,
    .pricing-page {
        max-width: 100%;
        padding-left: 24px;
        padding-right: 24px;
    }

    /* Main dashboard grids */

    .dashboard-panels,
    .dashboard-stats,
    .dashboard-stat-grid,
    .billing-summary,
    .stats-grid,
    .wallet-summary-grid,
    .my-ticket-stats,
    .account-grid,
    .profile-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Public-facing grids */

    .value-grid,
    .service-grid,
    .solution-grid,
    .partner-type-grid,
    .benefits-grid,
    .workflow-grid,
    .help-grid,
    .support-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Hero sections */

    .about-hero,
    .partner-hero,
    .solutions-hero,
    .contact-layout,
    .support-hero,
    .demo-content {
        gap: 28px;
    }

    .hero-copy,
    .about-visual,
    .partner-hero-content,
    .partner-hero-image,
    .solutions-hero-content,
    .support-hero-content,
    .support-hero-image {
        min-width: 0;
    }

    /* Form layouts */

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

    /* Wallet */

    .wallet-summary-grid {
        gap: 16px;
    }

    /* Table cells */

    .billing-table,
    .dashboard-table,
    .wa-table {
        min-width: 680px;
    }
}


/* ==========================================================
   3. TABLETS
   768px and below
========================================================== */

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

    /* General content spacing */

    .dashboard-main,
    .profile-main,
    .public-page,
    .billing-page,
    .contacts-page,
    .automations-page,
    .api-keys-module,
    .templates-module,
    .bulk-import-module,
    .messages-page,
    .notifications-page,
    .my-tickets-page,
    .wallet-container,
    .account-page,
    .requests-communication-page,
    .pricing-page {
        width: 100%;
        max-width: 100%;
        padding: 22px 18px 32px;
        margin-left: auto;
        margin-right: auto;
    }

    /* Page headings */

    .dashboard-heading,
    .profile-heading,
    .page-heading,
    .billing-page .page-heading,
    .automations-heading,
    .my-tickets-heading,
    .wallet-page-heading,
    .notifications-heading,
    .messages-heading,
    .account-heading,
    .wa-heading-actions {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 14px;
    }

    .dashboard-heading h1,
    .profile-heading h1,
    .automations-heading h1,
    .my-tickets-heading h1,
    .wallet-page-heading h1,
    .notifications-heading h1,
    .messages-heading h1 {
        font-size: clamp(23px, 4vw, 29px);
        line-height: 1.3;
    }

    /* Common two-column layouts */

    .dashboard-panels,
    .dashboard-stats,
    .billing-summary,
    .stats-grid,
    .wallet-summary-grid,
    .my-ticket-stats,
    .account-grid,
    .profile-grid,
    .value-grid,
    .service-grid,
    .solution-grid,
    .partner-type-grid,
    .benefits-grid,
    .help-grid,
    .support-cards,
    .dashboard-overview-row,
    .notification-summary,
    .messages-summary,
    .automation-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Hero sections */

    .about-hero,
    .partner-hero,
    .solutions-hero,
    .contact-layout,
    .support-hero,
    .demo-content,
    .platform-content,
    .solution-detail-content,
    .ticket-content,
    .reseller-content {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 26px;
    }

    .about-visual,
    .partner-hero-image,
    .support-hero-image,
    .platform-image,
    .ticket-image,
    .reseller-image {
        width: 100%;
        max-width: 540px;
        margin-left: auto;
        margin-right: auto;
    }

    /* Hero and section typography */

    .hero-copy h1,
    .partner-hero-text h1,
    .solutions-hero h1,
    .support-hero-text h1,
    .platform-title,
    .contact-hero h1,
    .about-hero h1 {
        font-size: clamp(27px, 5vw, 38px);
        line-height: 1.2;
    }

    .section-heading {
        margin-bottom: 22px;
    }

    .section-heading h2,
    .public-section h2 {
        font-size: clamp(21px, 3.5vw, 28px);
        line-height: 1.3;
    }

    /* Cards */

    .dashboard-stat-card,
    .dashboard-panel,
    .billing-card,
    .stat-card,
    .panel,
    .value-card,
    .service-card,
    .solution-card,
    .partner-type-card,
    .benefit-card,
    .help-box,
    .support-card,
    .account-card,
    .profile-card,
    .my-ticket-panel,
    .wallet-card,
    .notification-summary-card,
    .messages-summary-card,
    .automation-summary-card {
        min-width: 0;
        max-width: 100%;
    }

    .dashboard-panel,
    .billing-section,
    .panel,
    .profile-card,
    .account-card,
    .my-ticket-panel {
        padding: 20px;
    }

    /* Forms */

    .form-two-columns,
    .form-row,
    .contact-form-grid,
    .profile-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .form-group,
    .form-field,
    .form-field-full,
    .account-form-group,
    .booking-field,
    .messages-field,
    .automation-field {
        min-width: 0;
        width: 100%;
    }

    input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
    select,
    textarea {
        max-width: 100%;
    }

    textarea {
        min-height: 110px;
        resize: vertical;
    }

    /* Filters and search */

    .billing-filters,
    .filters,
    .automation-filters,
    .messages-filters,
    .notification-controls,
    .templates-filters,
    .bulk-import-controls {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px;
    }

    .billing-filters > *,
    .filters > *,
    .automation-filters > *,
    .messages-filters > *,
    .notification-controls > *,
    .templates-filters > * {
        min-width: 0;
        max-width: 100%;
    }

    /* Tables: retain columns and allow horizontal scrolling */

    .billing-table-wrapper,
    .billing-table-wrap,
    .table-wrap,
    .dashboard-table-wrapper,
    .dashboard-table-wrap,
    .wa-table-wrap,
    .api-keys-table-wrapper,
    .templates-table-wrapper,
    .table-responsive,
    .message-table-wrapper {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
    }

    .billing-table,
    .dashboard-table,
    .wa-table,
    .table-wrap table,
    .api-keys-table-wrapper table,
    .templates-table-wrapper table {
        min-width: 650px;
        width: 100%;
    }

    th,
    td {
        padding: 11px 12px;
        vertical-align: middle;
    }

    /* Pagination */

    .billing-pagination,
    .pagination,
    .automation-pagination,
    .notification-pagination,
    .messages-pagination {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    /* Dialogs and modals */

    .payment-dialog-content,
    .template-dialog-content,
    .modal-content,
    .dialog-content {
        width: min(94vw, 620px);
        max-width: 94vw;
        max-height: 88dvh;
        overflow-y: auto;
        padding: 22px;
    }

    /* Authentication pages */

    .auth-main {
        width: 100%;
        min-height: 100vh;
        min-height: 100dvh;
        padding: 24px 18px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .auth-card {
        width: 100%;
        max-width: 460px;
        margin: auto;
    }

    /* Pricing */

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

    /* Floating WhatsApp button */

    .whatsapp-float {
        max-width: calc(100vw - 24px);
    }
}


/* ==========================================================
   4. MOBILE PHONES
   600px and below
========================================================== */

@media screen and (max-width: 600px) {

    /* Main containers */

    .dashboard-main,
    .profile-main,
    .public-page,
    .billing-page,
    .contacts-page,
    .automations-page,
    .api-keys-module,
    .templates-module,
    .bulk-import-module,
    .messages-page,
    .notifications-page,
    .my-tickets-page,
    .wallet-container,
    .account-page,
    .requests-communication-page,
    .pricing-page {
        padding: 18px 14px 26px;
    }

    /* Page headings */

    .dashboard-heading,
    .profile-heading,
    .page-heading,
    .automations-heading,
    .my-tickets-heading,
    .wallet-page-heading,
    .notifications-heading,
    .messages-heading {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-bottom: 20px;
    }

    .dashboard-heading h1,
    .profile-heading h1,
    .automations-heading h1,
    .my-tickets-heading h1,
    .wallet-page-heading h1,
    .notifications-heading h1,
    .messages-heading h1,
    .api-keys-module h1 {
        font-size: 24px;
        line-height: 1.3;
        letter-spacing: normal;
    }

    .page-heading h1 {
        font-size: 24px;
        line-height: 1.3;
    }

    /* Stack main grids */

    .dashboard-panels,
    .dashboard-stats,
    .dashboard-stat-grid,
    .billing-summary,
    .stats-grid,
    .wallet-summary-grid,
    .my-ticket-stats,
    .account-grid,
    .profile-grid,
    .value-grid,
    .service-grid,
    .solution-grid,
    .partner-type-grid,
    .benefits-grid,
    .help-grid,
    .support-cards,
    .dashboard-overview-row,
    .notification-summary,
    .messages-summary,
    .automation-summary,
    .subscription-prices,
    .cards,
    .solution-workflow,
    .partner-workflow {
        grid-template-columns: minmax(0, 1fr);
    }

    /* Reduce card spacing */

    .dashboard-panel,
    .billing-section,
    .panel,
    .profile-card,
    .account-card,
    .my-ticket-panel,
    .wallet-card,
    .contact-form-card,
    .contact-aside,
    .booking-card,
    .ticket-form-container {
        padding: 16px;
        border-radius: 12px;
    }

    .dashboard-stat-card,
    .stat-card,
    .billing-card,
    .wallet-summary-grid .wallet-card {
        padding: 17px;
    }

    /* Hero sections */

    .about-hero,
    .partner-hero,
    .solutions-hero,
    .contact-layout,
    .support-hero,
    .demo-content,
    .platform-content,
    .solution-detail-content,
    .ticket-content,
    .reseller-content {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
    }

    .hero-copy h1,
    .partner-hero-text h1,
    .solutions-hero h1,
    .support-hero-text h1,
    .platform-title,
    .contact-hero h1,
    .about-hero h1 {
        font-size: clamp(25px, 7vw, 32px);
        line-height: 1.2;
    }

    .hero-actions,
    .partner-hero-buttons,
    .solutions-actions,
    .wallet-heading-actions,
    .form-submit-row,
    .profile-form-actions,
    .template-form-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    .hero-actions > *,
    .partner-hero-buttons > *,
    .solutions-actions > * {
        max-width: 100%;
    }

    .about-visual {
        min-height: 250px;
        overflow: hidden;
    }

    .orbit-ring {
        max-width: 100%;
    }

    /* Two-column form layouts become one column */

    .form-two-columns,
    .form-row,
    .contact-form-grid,
    .profile-form-grid,
    .form-grid,
    .booking-form-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    /* Touch-friendly form controls */

    input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
    select,
    textarea {
        width: 100%;
        min-height: 44px;
        font-size: 16px;
    }

    textarea {
        min-height: 115px;
    }

    input[type="checkbox"],
    input[type="radio"] {
        flex-shrink: 0;
    }

    /* Buttons */

    .dashboard-main .btn,
    .profile-main .btn,
    .billing-page .btn,
    .automations-page .btn,
    .wallet-container .btn,
    .my-tickets-page .btn,
    .account-page .account-button,
    .auth-card .btn,
    .form-submit,
    .submit-ticket {
        min-height: 44px;
        padding: 11px 15px;
        font-size: 14px;
    }

    /* Allow long action rows to wrap */

    .dashboard-panel-heading,
    .panel-heading,
    .section-heading,
    .dashboard-list-heading,
    .dashboard-overview-row,
    .messages-history-heading,
    .my-ticket-details-heading {
        flex-wrap: wrap;
        gap: 10px;
    }

    /* Search/filter controls stack */

    .billing-filters,
    .filters,
    .automation-filters,
    .messages-filters,
    .notification-controls,
    .templates-filters {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .billing-filters input,
    .billing-filters select,
    .filters input,
    .filters select,
    .automation-filters input,
    .automation-filters select,
    .messages-filters input,
    .messages-filters select,
    .notification-controls input,
    .notification-controls select,
    .templates-filters input,
    .templates-filters select {
        width: 100%;
        min-width: 0;
    }

    /* Tables */

    .billing-table-wrapper,
    .billing-table-wrap,
    .table-wrap,
    .dashboard-table-wrapper,
    .dashboard-table-wrap,
    .wa-table-wrap,
    .api-keys-table-wrapper,
    .templates-table-wrapper,
    .table-responsive,
    .message-table-wrapper {
        overflow-x: auto;
        max-width: 100%;
        border-radius: 10px;
        -webkit-overflow-scrolling: touch;
    }

    .billing-table,
    .dashboard-table,
    .wa-table,
    .table-wrap table,
    .api-keys-table-wrapper table,
    .templates-table-wrapper table {
        min-width: 600px;
    }

    th,
    td {
        padding: 10px;
        font-size: 13px;
        white-space: normal;
    }

    /* Keep code and identifiers readable */

    code,
    pre,
    .api-key-value,
    .account-detail,
    .profile-readonly-row {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    pre {
        max-width: 100%;
        overflow-x: auto;
        white-space: pre;
    }

    /* Authentication */

    .auth-main {
        padding: 22px 14px;
    }

    .auth-card {
        max-width: 100%;
        padding: 24px 18px;
        border-radius: 14px;
    }

    .auth-heading {
        font-size: 24px;
        line-height: 1.3;
    }

    /* Pricing and wallet */

    .subscription-prices {
        grid-template-columns: minmax(0, 1fr);
    }

    .amount-presets {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .amount-preset {
        min-width: 0;
    }

    /* Profile and account actions */

    .profile-form-actions,
    .account-danger-zone,
    .form-card-heading {
        align-items: stretch;
    }

    /* Ticket and notification content */

    .my-ticket-list,
    .notification-list-section,
    .messages-history,
    .automation-list-section {
        min-width: 0;
        width: 100%;
    }

    .my-ticket-details,
    .notification-details,
    .automation-config-panel,
    .automation-advanced-config {
        max-width: 100%;
        min-width: 0;
        overflow-wrap: anywhere;
    }

    /* Dialogs */

    .payment-dialog-content,
    .template-dialog-content,
    .modal-content,
    .dialog-content {
        width: calc(100vw - 24px);
        max-width: calc(100vw - 24px);
        max-height: 88dvh;
        padding: 18px;
        margin: 12px;
        overflow-y: auto;
        border-radius: 14px;
    }

    /* Support and FAQ */

    .faq-content {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .faq-sidebar {
        width: 100%;
    }

    .faq-question {
        gap: 10px;
        padding: 15px;
    }

    .faq-answer {
        padding: 0 15px 15px;
    }

    .support-search {
        width: 100%;
    }

    /* Prevent decorative sections from causing overflow */

    .workflow-arrow,
    .partner-arrow {
        max-width: 100%;
    }

    .workflow-step,
    .workflow-card,
    .partner-card {
        min-width: 0;
        max-width: 100%;
    }
}


/* ==========================================================
   5. SMALL PHONES
   480px and below
========================================================== */

@media screen and (max-width: 480px) {

    .dashboard-main,
    .profile-main,
    .public-page,
    .billing-page,
    .contacts-page,
    .automations-page,
    .api-keys-module,
    .templates-module,
    .bulk-import-module,
    .messages-page,
    .notifications-page,
    .my-tickets-page,
    .wallet-container,
    .account-page,
    .requests-communication-page,
    .pricing-page {
        padding: 15px 12px 22px;
    }

    .dashboard-heading h1,
    .profile-heading h1,
    .automations-heading h1,
    .my-tickets-heading h1,
    .wallet-page-heading h1,
    .notifications-heading h1,
    .messages-heading h1,
    .page-heading h1,
    .api-keys-module h1 {
        font-size: 22px;
    }

    .dashboard-stat-card,
    .stat-card,
    .billing-card,
    .wallet-card,
    .value-card,
    .service-card,
    .solution-card,
    .partner-type-card,
    .benefit-card,
    .help-box,
    .support-card,
    .account-card,
    .profile-card {
        padding: 14px;
    }

    .section-heading h2,
    .public-section h2,
    .dashboard-panel-heading h2,
    .panel-heading h2 {
        font-size: 19px;
        line-height: 1.35;
    }

    .dashboard-stat-card h2,
    .dashboard-stat-card h3,
    .stat-card h2,
    .stat-card h3 {
        font-size: 21px;
    }

    .hero-copy h1,
    .partner-hero-text h1,
    .solutions-hero h1,
    .support-hero-text h1,
    .platform-title,
    .contact-hero h1,
    .about-hero h1 {
        font-size: 26px;
    }

    .hero-actions,
    .partner-hero-buttons,
    .solutions-actions,
    .wallet-heading-actions,
    .profile-form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-actions a,
    .partner-hero-buttons a,
    .solutions-actions a,
    .wallet-heading-actions button,
    .profile-form-actions button {
        width: 100%;
        justify-content: center;
    }

    .billing-table,
    .dashboard-table,
    .wa-table,
    .table-wrap table,
    .api-keys-table-wrapper table,
    .templates-table-wrapper table {
        min-width: 560px;
    }

    .pagination button,
    .billing-pagination button,
    .automation-pagination button,
    .notification-pagination button,
    .messages-pagination button {
        min-height: 38px;
        padding: 8px 10px;
    }

    .auth-card {
        padding: 22px 16px;
    }

    .auth-heading {
        font-size: 22px;
    }

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

    .about-visual {
        min-height: 220px;
    }

    .my-ticket-details-heading,
    .notification-list-heading,
    .messages-history-heading {
        align-items: flex-start;
    }

    .status-badge,
    .badge,
    .account-status {
        max-width: 100%;
        white-space: normal;
    }
}


/* ==========================================================
   6. EXTRA-SMALL PHONES
   360px and below
========================================================== */

@media screen and (max-width: 360px) {

    .dashboard-main,
    .profile-main,
    .public-page,
    .billing-page,
    .contacts-page,
    .automations-page,
    .api-keys-module,
    .templates-module,
    .bulk-import-module,
    .messages-page,
    .notifications-page,
    .my-tickets-page,
    .wallet-container,
    .account-page,
    .requests-communication-page,
    .pricing-page {
        padding: 12px 9px 18px;
    }

    .dashboard-heading h1,
    .profile-heading h1,
    .automations-heading h1,
    .my-tickets-heading h1,
    .wallet-page-heading h1,
    .notifications-heading h1,
    .messages-heading h1,
    .page-heading h1,
    .api-keys-module h1 {
        font-size: 20px;
    }

    .dashboard-panel,
    .billing-section,
    .panel,
    .profile-card,
    .account-card,
    .my-ticket-panel,
    .wallet-card,
    .contact-form-card,
    .contact-aside,
    .booking-card {
        padding: 12px;
    }

    .dashboard-stat-card,
    .stat-card,
    .billing-card,
    .value-card,
    .service-card,
    .solution-card,
    .partner-type-card,
    .benefit-card,
    .help-box,
    .support-card {
        padding: 12px;
    }

    .hero-copy h1,
    .partner-hero-text h1,
    .solutions-hero h1,
    .support-hero-text h1,
    .platform-title,
    .contact-hero h1,
    .about-hero h1 {
        font-size: 23px;
    }

    .dashboard-heading p,
    .automations-heading p,
    .wallet-page-heading p {
        font-size: 13px;
    }

    .dashboard-main .btn,
    .profile-main .btn,
    .billing-page .btn,
    .automations-page .btn,
    .wallet-container .btn,
    .my-tickets-page .btn,
    .auth-card .btn {
        width: 100%;
    }

    .amount-presets {
        grid-template-columns: minmax(0, 1fr);
    }

    .billing-table,
    .dashboard-table,
    .wa-table,
    .table-wrap table,
    .api-keys-table-wrapper table,
    .templates-table-wrapper table {
        min-width: 520px;
    }

    .payment-dialog-content,
    .template-dialog-content,
    .modal-content,
    .dialog-content {
        width: calc(100vw - 16px);
        max-width: calc(100vw - 16px);
        margin: 8px;
        padding: 14px;
    }

    .faq-question {
        padding: 12px;
        font-size: 14px;
    }
}


/* ==========================================================
   7. LANDSCAPE PHONES
========================================================== */

@media screen and (max-height: 500px)
    and (orientation: landscape)
    and (max-width: 950px) {

    .auth-main {
        min-height: 100dvh;
        align-items: flex-start;
        padding-top: 16px;
        padding-bottom: 16px;
    }

    .auth-card {
        margin-top: 0;
        margin-bottom: 0;
    }

    .payment-dialog-content,
    .template-dialog-content,
    .modal-content,
    .dialog-content {
        max-height: 82dvh;
        overflow-y: auto;
    }
}


/* ==========================================================
   8. ACCESSIBILITY AND MOTION
========================================================== */

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

    .module-hidden,
    .module-loaded,
    .dashboard-main *,
    .profile-main *,
    .public-page *,
    .billing-page *,
    .automations-page *,
    .wallet-container *,
    .my-tickets-page * {
        scroll-behavior: auto;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==================================================
   MOBILE BUTTON FIX — 480px AND BELOW
================================================== */

@media screen and (max-width: 480px) {

    /* Default button sizing */
    button,
    input[type="button"],
    input[type="submit"],
    input[type="reset"],
    .btn,
    .button,
    .primary-btn,
    .secondary-btn,
    .action-btn {
        box-sizing: border-box;
        min-width: 0;
        max-width: 100%;
        min-height: 42px;
        padding: 10px 14px;
        font-size: 14px;
        line-height: 1.4;
        white-space: normal;
        overflow-wrap: anywhere;
        text-align: center;
    }

    /* Buttons inside action groups */
    .hero-actions,
    .partner-hero-buttons,
    .solutions-actions,
    .wallet-heading-actions,
    .profile-form-actions,
    .form-submit-row,
    .action-buttons,
    .button-group,
    .btn-group {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 10px;
        min-width: 0;
        max-width: 100%;
    }

    /* Avoid forced full width for every button */
    .hero-actions > *,
    .partner-hero-buttons > *,
    .solutions-actions > *,
    .action-buttons > *,
    .button-group > *,
    .btn-group > * {
        flex: 0 1 auto;
        min-width: 0;
        max-width: 100%;
    }

    /* Form submit buttons */
    form button[type="submit"],
    form input[type="submit"],
    .form-submit,
    .submit-ticket {
        width: 100%;
        max-width: 100%;
    }

    /* Keep icon and text aligned */
    button,
    .btn,
    .button,
    .primary-btn,
    .secondary-btn,
    .action-btn {
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    /* Prevent long labels from breaking layout */
    .dashboard-heading button,
    .page-heading button,
    .panel-heading button,
    .section-heading button {
        max-width: 100%;
        flex-shrink: 1;
    }
}

/* Extra-small devices */
@media screen and (max-width: 360px) {

    button,
    input[type="button"],
    input[type="submit"],
    input[type="reset"],
    .btn,
    .button,
    .primary-btn,
    .secondary-btn,
    .action-btn {
        padding: 9px 11px;
        font-size: 13px;
    }
}