@media (max-width: 760px) {
    html,
    body {
        width: 100%;
        overflow-x: hidden;
        background: #0b1220;
    }

    body {
        font-size: 15px;
    }

    .app-shell {
        display: block !important;
        min-height: 100vh;
        width: 100%;
    }

    .sidebar {
        position: relative !important;
        inset: auto !important;
        display: flex !important;
        flex-direction: column;
        gap: 10px;
        width: 100%;
        padding: 12px 12px 14px !important;
        background: #080f1f !important;
        border-right: 0 !important;
        border-bottom: 1px solid rgba(148, 163, 184, 0.14);
        box-shadow: 0 10px 24px rgba(2, 6, 23, 0.3);
    }

    .brand {
        width: 100%;
        min-width: 0;
        font-size: 0.86rem !important;
        letter-spacing: 0.08em !important;
        line-height: 1.2;
    }

    .brand-dot {
        width: 12px;
        height: 12px;
        flex: 0 0 12px;
    }

    .brand strong {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .sidebar .primary-btn.full {
        width: 100%;
        min-height: 40px;
        padding: 9px 14px;
        border-radius: 14px;
        box-shadow: 0 10px 22px rgba(124, 58, 237, 0.25);
    }

    .sidebar .menu {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 6px;
        width: 100%;
        overflow: visible !important;
        padding: 0 !important;
    }

    .menu-item {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 100% !important;
        min-height: 34px;
        padding: 7px 4px !important;
        border-radius: 12px !important;
        background: rgba(148, 163, 184, 0.07);
        color: #b7c2d5;
        font-size: 0.75rem;
        line-height: 1.15;
        text-align: center;
        white-space: normal !important;
    }

    .menu-item.active,
    .menu-item:hover {
        background: rgba(124, 58, 237, 0.32) !important;
        color: #fff;
    }

    .sidebar-footer {
        display: none !important;
    }

    .content {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        padding: 14px 12px 28px !important;
        background: linear-gradient(180deg, #0c1426 0%, #111c32 48%, #0b1220 100%) !important;
    }

    .page-header {
        margin: 0 0 12px !important;
    }

    .summary-inline {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px;
        width: 100%;
    }

    .summary-card,
    .summary-card.small {
        width: 100%;
        min-width: 0 !important;
        min-height: 72px;
        padding: 12px 13px !important;
        border-radius: 14px !important;
        background: #17233a !important;
        box-shadow: none !important;
    }

    .summary-card:first-child {
        grid-column: 1 / -1;
        min-height: 82px;
        background: linear-gradient(135deg, #17233a, #1f2a41) !important;
    }

    .summary-label {
        margin: 0 0 8px !important;
        color: #9aa7ba;
        font-size: 0.64rem !important;
        letter-spacing: 0.14em !important;
    }

    .summary-card strong {
        font-size: clamp(1.05rem, 4.6vw, 1.34rem) !important;
        line-height: 1.1;
    }

    .transactions-board,
    .card-block,
    .table-wrapper {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin: 10px 0 0 !important;
        padding: 12px !important;
        border-radius: 18px !important;
        background: rgba(23, 35, 58, 0.92) !important;
        box-shadow: none !important;
    }

    .transactions-header {
        display: grid !important;
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 12px !important;
    }

    .section-pill {
        width: 100%;
        min-height: 36px;
        justify-content: center;
        padding: 8px 12px !important;
        border-radius: 12px !important;
        font-size: 0.72rem;
        letter-spacing: 0.14em !important;
    }

    .month-nav {
        width: 100%;
        gap: 8px;
        justify-content: space-between;
        padding: 8px;
        border: 1px solid rgba(148, 163, 184, 0.14);
        border-radius: 14px;
        background: rgba(15, 23, 42, 0.42);
    }

    .month-label {
        flex: 1;
        text-align: center;
        font-size: 0.72rem !important;
        letter-spacing: 0.1em !important;
    }

    .nav-arrow {
        width: 32px !important;
        height: 32px !important;
        border-radius: 10px !important;
        background: rgba(148, 163, 184, 0.1) !important;
    }

    .header-actions {
        display: block !important;
        width: 100%;
    }

    .header-actions .primary-btn.outline {
        display: none !important;
    }

    .nature-toggle {
        width: 100%;
        padding: 4px;
        border-radius: 14px !important;
        background: rgba(15, 23, 42, 0.48) !important;
    }

    .nature-toggle__btn {
        flex: 1;
        min-height: 32px;
        border-radius: 11px !important;
        font-size: 0.68rem !important;
        letter-spacing: 0.14em !important;
        text-align: center;
    }

    .transactions-table {
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
    }

    .table-header {
        padding: 2px 2px 12px !important;
        border-bottom: 0 !important;
    }

    .table-header h2 {
        margin: 0 0 4px;
        font-size: 1.04rem;
        line-height: 1.25;
    }

    .legend {
        gap: 12px;
        font-size: 0.82rem;
    }

    .table-scroll {
        overflow: visible !important;
    }

    .transactions-table table {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    .transactions-table thead {
        display: none !important;
    }

    .transactions-table tbody {
        display: grid !important;
        gap: 10px;
        width: 100%;
    }

    .transactions-table tr {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "desc value"
            "date status"
            "cat actions";
        gap: 10px 12px;
        width: 100%;
        margin: 0 !important;
        padding: 14px !important;
        border: 1px solid rgba(148, 163, 184, 0.14) !important;
        border-radius: 16px !important;
        background: #1a253d !important;
        box-shadow: 0 10px 24px rgba(2, 6, 23, 0.18);
    }

    .transactions-table td {
        display: block !important;
        width: auto !important;
        min-width: 0;
        padding: 0 !important;
        border: 0 !important;
        text-align: left !important;
    }

    .transactions-table td::before {
        content: none !important;
        display: none !important;
    }

    .transactions-table td:nth-child(1) {
        grid-area: status;
        align-self: center;
        justify-self: end;
    }

    .transactions-table td:nth-child(2) {
        grid-area: date;
        align-self: center;
        color: #cbd5e1;
        font-size: 0.86rem;
    }

    .transactions-table td:nth-child(2)::after {
        content: ' venc.';
        color: #7f8da3;
        font-size: 0.72rem;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

    .transactions-table td:nth-child(3) {
        grid-area: desc;
    }

    .transactions-table td:nth-child(3) strong {
        display: block;
        margin-bottom: 4px;
        font-size: 0.98rem;
        line-height: 1.18;
    }

    .transactions-table td:nth-child(3) .muted {
        display: block;
        font-size: 0.78rem;
        line-height: 1.25;
    }

    .transactions-table td:nth-child(4) {
        grid-area: cat;
        align-self: center;
    }

    .transactions-table td:nth-child(5) {
        grid-area: value;
        align-self: start;
        justify-self: end;
        color: #f8fafc;
        font-size: 1rem;
        font-weight: 700;
        white-space: nowrap;
    }

    .transactions-table td:nth-child(6) {
        grid-area: actions;
        justify-self: end;
    }

    .status-pill {
        min-width: 0 !important;
        padding: 5px 10px !important;
        border-radius: 999px !important;
        font-size: 0.72rem !important;
    }

    .category-tag {
        max-width: 100%;
        padding: 5px 9px !important;
        border-radius: 999px !important;
        font-size: 0.75rem !important;
        white-space: normal !important;
    }

    .action-buttons {
        justify-content: flex-end;
        gap: 7px !important;
        width: auto !important;
    }

    .icon-btn {
        width: 34px !important;
        height: 34px !important;
        border-radius: 12px !important;
    }

    .modal__panel {
        background: #1a253d !important;
    }
}

@media (max-width: 380px) {
    .content {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .menu-item {
        font-size: 0.72rem;
    }

    .transactions-table tr {
        grid-template-columns: 1fr;
        grid-template-areas:
            "status"
            "desc"
            "value"
            "date"
            "cat"
            "actions";
    }

    .transactions-table td:nth-child(1),
    .transactions-table td:nth-child(5),
    .transactions-table td:nth-child(6) {
        justify-self: start;
    }
}

@media (max-width: 900px) {
    .ride-summary-strip,
    .ride-report-grid,
    .ride-month-content {
        grid-template-columns: 1fr;
    }

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

    .ride-live-card {
        position: static;
    }

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

@media (max-width: 760px) {
    .ride-page-header {
        align-items: stretch !important;
        gap: 12px !important;
    }

    .ride-page-header h1 {
        font-size: 1.45rem !important;
    }

    .ride-date-switch,
    .ride-month-form {
        display: grid !important;
        grid-template-columns: 1fr;
        width: 100%;
        gap: 8px;
    }

    .ride-date-switch label,
    .ride-month-form input,
    .ride-date-switch .primary-btn,
    .ride-month-form .ghost-btn,
    .ride-month-form .primary-btn {
        width: 100%;
        min-width: 0;
    }

    .ride-summary-strip {
        gap: 8px;
        margin-bottom: 12px;
    }

    .ride-kpi,
    .ride-panel,
    .ride-report-card {
        box-shadow: none !important;
    }

    .ride-kpi {
        min-height: 92px;
        border-radius: 16px;
        padding: 14px;
    }

    .ride-kpi strong {
        font-size: 1.2rem;
    }

    .ride-panel {
        border-radius: 18px;
        padding: 14px;
    }

    .ride-panel__head {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .ride-panel__head .primary-btn {
        width: 100%;
    }

    .ride-form-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

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

    .ride-form-grid--quick {
        grid-template-columns: 1fr;
    }

    .ride-big-field {
        padding: 14px;
        border-radius: 18px;
    }

    .ride-big-field input {
        min-height: 62px;
        font-size: 1.55rem;
    }

    .ride-form-section h3 {
        font-size: 1.15rem;
    }

    .ride-advanced {
        padding: 13px;
        border-radius: 16px;
    }

    .ride-save-footer {
        padding-top: 12px;
    }

    .ride-save-footer .primary-btn {
        width: 100%;
        min-height: 58px;
        border-radius: 18px;
        font-size: 1.05rem;
    }

    .ride-live-total {
        border-radius: 16px;
        padding: 16px;
    }

    .ride-live-total strong {
        font-size: 1.65rem;
    }

    .ride-live-grid {
        grid-template-columns: 1fr;
    }

    .ride-live-grid div {
        padding: 12px;
        border-radius: 14px;
    }

    .ride-report-card {
        border-radius: 16px;
        padding: 14px;
    }

    .ride-report-card header,
    .ride-breakdown-row > div:first-child {
        align-items: flex-start;
        flex-direction: column;
    }

    .ride-report-card dl {
        grid-template-columns: 1fr;
    }

    .ride-month-panel {
        margin-top: 12px;
    }

    .ride-breakdown,
    .ride-days-list {
        border-radius: 16px;
        padding: 12px;
    }

    .ride-day-card {
        grid-template-columns: 1fr;
        border-radius: 14px;
        padding: 12px;
    }

    .ride-day-card > div:nth-child(2) {
        text-align: left;
    }

    .ride-day-card footer {
        justify-content: stretch;
    }

    .ride-day-card footer .ghost-btn,
    .ride-day-card footer form {
        width: 100%;
    }
}

@media (max-width: 380px) {
    .ride-live-grid {
        grid-template-columns: 1fr;
    }
}
