
* { -webkit-tap-highlight-color: rgba(168, 85, 247, 0.1); }
button, a, [onclick] { touch-action: manipulation; }
html, body { max-width: 100vw; }
.overflow-y-auto, .overflow-auto {
    -webkit-overflow-scrolling: touch;
}
#mobile-menu-sidebar {
    height: 100dvh !important;
    height: 100vh !important;
    overflow-y: auto !important;
    position: absolute !important;
    padding-bottom: 80px !important;
}
#mobile-menu-sidebar.obsidian-panel {
    overflow: auto !important;
}
@media (max-width: 768px) {
    
    .mobile-cards thead { display: none; }
    .mobile-cards tbody tr {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4px 12px;
        padding: 16px;
        margin-bottom: 8px;
        border-radius: 12px;
        background: rgba(255,255,255,0.03);
        border: 1px solid rgba(255,255,255,0.06);
    }
    .mobile-cards tbody tr:hover {
        background: rgba(255,255,255,0.05);
    }
    .mobile-cards tbody tr td {
        padding: 4px 0;
        border: none !important;
        border-bottom: none !important;
        font-size: 12px;
    }
    .mobile-cards tbody tr td:nth-child(1) { 
        grid-column: 1;
        font-size: 10px;
        opacity: 0.5;
    }
    .mobile-cards tbody tr td:nth-child(2) { 
        grid-column: 2;
        text-align: right;
        font-size: 10px;
        opacity: 0.5;
    }
    .mobile-cards tbody tr td:nth-child(3) { 
        grid-column: 1 / -1;
        font-weight: 700;
        font-size: 13px;
        padding-top: 4px;
    }
    .mobile-cards tbody tr td:nth-child(4) { 
        grid-column: 1 / -1;
        font-size: 11px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        opacity: 0.4;
    }
    .mobile-cards tbody tr td:nth-child(5) { 
        grid-column: 1 / -1;
    }
    .mobile-cards tbody tr td:nth-child(6) { 
        grid-column: 1;
        font-weight: 700;
    }
    .mobile-cards tbody tr td:nth-child(7) { 
        grid-column: 2;
        text-align: right;
    }
    .mobile-cards tbody tr td:nth-child(8) { 
        grid-column: 1 / -1;
        text-align: right;
        padding-top: 8px;
        border-top: 1px solid rgba(255,255,255,0.05);
    }
    .mobile-cards { min-width: unset !important; }

    
    .filter-tabs { 
        overflow-x: auto; 
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .filter-tabs::-webkit-scrollbar { display: none; }

    
    .content-area { padding: 16px !important; }
    
    
    .stats-row {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }

    
    .wallet-table { min-width: unset !important; }
    .wallet-table thead { display: none; }
    .wallet-table tbody tr {
        display: flex;
        flex-wrap: wrap;
        gap: 4px 12px;
        padding: 14px;
        margin-bottom: 6px;
        border-radius: 10px;
        background: rgba(255,255,255,0.03);
        border: 1px solid rgba(255,255,255,0.06);
    }
    .wallet-table tbody tr td {
        padding: 2px 0;
        border: none;
        font-size: 12px;
    }

    
    .mo .mc {
        width: 95% !important;
        max-width: 100% !important;
        padding: 20px !important;
        border-radius: 16px !important;
    }

    
    .custom-select .select-list {
        max-height: 50vh;
    }
    
    
    .hero-title {
        font-size: 2.5rem !important;
        line-height: 0.95 !important;
    }
    
    
    .truncate-mobile {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    
    .admin-tbl { min-width: 650px; }
    
    
    .toast { min-width: 240px !important; max-width: calc(100vw - 40px); }
}
@media (max-width: 400px) {
    .hero-title { font-size: 2rem !important; }
    .order-form-card { padding: 20px !important; border-radius: 20px !important; }
    .btn-capture { padding: 14px 20px !important; font-size: 10px !important; }
}
@media (hover: none) and (pointer: coarse) {
    button, a, .nav-item, .select-item, .platform-card, .category-row {
        min-height: 44px;
    }
    
    .nav-item {
        padding: 14px 16px !important;
    }
    
    input, select, textarea {
        font-size: 16px !important; 
    }
    
    .select-item {
        padding: 14px 16px !important;
    }
}
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    body { 
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
    #mobile-menu-sidebar {
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    footer, .pb-6, .pb-8 {
        padding-bottom: calc(1.5rem + env(safe-area-inset-bottom)) !important;
    }
    
    aside .p-4:last-child {
        padding-bottom: calc(1rem + env(safe-area-inset-bottom)) !important;
    }
}
@media (max-height: 500px) and (orientation: landscape) {
    .min-h-screen { min-height: auto; }
    #hero { min-height: auto; padding-top: 80px; padding-bottom: 40px; }
}
@media (max-width: 768px) {
    .select-list {
        max-height: 40vh !important;
    }
    
    #totalPrice {
        font-size: 1.5rem !important;
        word-break: break-all;
    }
    
    .gap-16 { gap: 2rem !important; }
    .gap-12 { gap: 1.5rem !important; }
    
    
    .obsidian.glow-static {
        border-radius: 1.5rem !important;
    }
    
    
    .grid.grid-cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    
    .category-row {
        padding: 14px 16px !important;
    }
    
    
    .platform-card {
        padding: 20px !important;
    }
    
    
    .chat-container {
        max-width: 100% !important;
    }
    
    
    .settings-grid {
        grid-template-columns: 1fr !important;
    }
    
    
    .breadcrumb {
        font-size: 10px !important;
        word-break: break-word;
    }
    
    
    .auth-card {
        margin: 16px !important;
        padding: 24px !important;
        width: calc(100vw - 32px) !important;
        max-width: 100% !important;
    }

    
    .error-code {
        font-size: 6rem !important;
    }

    
    #login-card, #reg-card {
        padding: 24px !important;
        border-radius: 1.5rem !important;
    }

    
    .payment-method {
        padding: 12px 8px !important;
    }
    .payment-method i[data-lucide] {
        width: 24px !important;
        height: 24px !important;
    }

    
    .service-card {
        padding: 16px !important;
    }

    
    .btn-action {
        padding: 6px 10px !important;
        font-size: 9px !important;
        letter-spacing: 0.05em !important;
    }
}
@media (min-width: 769px) {
    .btn-action {
        padding: 10px 20px !important;
        font-size: 10px !important;
    }
}

@media (max-width: 768px) {
    
    .btn-reorder, .btn-refill {
        min-height: 38px;
        padding: 8px 12px !important;
    }
    .mobile-cards tbody tr td:nth-child(8) {
        display: flex !important;
        gap: 8px;
        flex-wrap: wrap;
    }
    .mobile-cards tbody tr td:nth-child(8) .btn-reorder,
    .mobile-cards tbody tr td:nth-child(8) .btn-refill {
        flex: 1;
        justify-content: center;
        min-width: 80px;
    }

    
    #bulkSection .flex.gap-2 {
        flex-direction: column;
    }
    #bulkSection .flex.gap-2 > * {
        flex: none !important;
        width: 100%;
    }
    #bulkSection textarea {
        min-height: 100px;
    }
    #bulkSection label,
    #bulkSection button {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    
    #twofa-code, #totpCodeInput, #twofa-dis-code {
        width: 100% !important;
        max-width: 100% !important;
    }

    
    #twofa-disable .btn-save,
    #twofa-setup .btn-save {
        width: 100%;
        min-height: 44px;
    }

    
    .mobile-cards .w-32 {
        width: 100% !important;
    }

    
    footer .flex-wrap {
        justify-content: center;
        text-align: center;
    }
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    background: rgba(168, 85, 247, 0.25);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(168, 85, 247, 0.45);
}
::-webkit-scrollbar-corner {
    background: transparent;
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(168, 85, 247, 0.25) rgba(255, 255, 255, 0.02);
}
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(168,85,247,0.6)' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    padding-right: 36px !important;
    cursor: pointer;
    transition: all 0.2s ease;
}
select:hover {
    border-color: rgba(168, 85, 247, 0.4) !important;
    background-color: rgba(168, 85, 247, 0.05);
}
select:focus {
    border-color: rgba(168, 85, 247, 0.6) !important;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
    outline: none;
}
select option {
    background: #13131a;
    color: #fff;
    padding: 8px 12px;
}
select option:hover,
select option:checked {
    background: rgba(168, 85, 247, 0.2);
}
