/* ZERION HOSTING - Premium SaaS Dark Theme System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
    --bg-dark: #07090e;
    --bg-card: rgba(18, 22, 33, 0.75);
    --bg-card-hover: rgba(26, 32, 48, 0.9);
    --bg-input: #0f131f;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(99, 102, 241, 0.3);
    
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --accent-cyan: #00f2fe;
    --accent-blue: #4facfe;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-dim: #6b7280;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(0, 242, 254, 0.08) 0px, transparent 50%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: rgba(12, 15, 24, 0.85);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    position: fixed;
    height: 100vh;
    z-index: 100;
    backdrop-filter: blur(20px);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 2rem;
}

.brand-logo .logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    color: #fff;
    box-shadow: var(--shadow-glow);
}

.brand-logo .logo-text {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(90deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-badge {
    font-size: 0.65rem;
    background: rgba(99, 102, 241, 0.2);
    color: var(--accent-cyan);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(0, 242, 254, 0.3);
    margin-left: auto;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.nav-item:hover, .nav-item.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.2), transparent);
    border-left: 3px solid var(--primary);
    color: #fff;
}

.svg-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
    display: inline-block;
    vertical-align: middle;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.user-profile-widget {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
}

.user-info {
    flex: 1;
    overflow: hidden;
}

.user-info .name {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-info .role-tag {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Main Content Area */
.main-wrapper {
    margin-left: 260px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.top-bar {
    height: 70px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    background: rgba(12, 15, 24, 0.7);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 90;
}

.page-title {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.balance-pill {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success);
    padding: 0.4rem 1rem;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn {
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: #fff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
}
.btn-danger:hover {
    background: var(--danger);
    color: #fff;
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 6px;
}

/* Page Layout */
.content-body {
    padding: 2rem;
    flex: 1;
}

.page-section {
    display: none;
    animation: fadeIn 0.3s ease-in-out forwards;
}

.page-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Large Grid Category Selector Cards */
.category-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.category-select-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.category-select-card:hover {
    transform: translateY(-3px);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.category-select-card.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(0, 242, 254, 0.1));
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.25);
}

.category-select-card .cat-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.category-select-card .cat-title {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
    color: #fff;
}

.category-select-card .cat-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Dashboard Hosting Large Rectangular Card */
.dashboard-hosting-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.dashboard-hosting-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-2px);
}

/* Grid Layouts */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-glow);
}

.stat-card .label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.stat-card .val {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

/* Tariff Cards Grid */
.tariff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 1.5rem;
}

.tariff-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.25s ease;
    backdrop-filter: blur(10px);
}

.tariff-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.tariff-card.featured {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.15);
}

.tariff-badge {
    position: absolute;
    top: -12px;
    right: 1.25rem;
    background: linear-gradient(90deg, #00f2fe, #4facfe);
    color: #000;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tariff-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.tariff-price {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--accent-cyan);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.tariff-price span {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
}

.tariff-specs {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
    flex: 1;
}

.tariff-specs li {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
    padding-bottom: 0.4rem;
}

.tariff-specs li .spec-label {
    color: var(--text-muted);
}

.tariff-specs li .spec-val {
    font-weight: 600;
    color: var(--text-main);
}

.screenshot-badges-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 1.25rem;
}

.screenshot-pill-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    font-size: 0.68rem;
    padding: 2px 7px;
    border-radius: 4px;
}

/* Status Badges */
.badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-success { background: rgba(16, 185, 129, 0.15); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.3); }

/* Tables */
.table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    backdrop-filter: blur(12px);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.88rem;
}

th {
    background: rgba(255, 255, 255, 0.02);
    padding: 1rem 1.25rem;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-box {
    background: #0f131f;
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 520px;
    padding: 2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    transform: translateY(15px);
    transition: transform 0.25s ease;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-box {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 700;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
}
.close-btn:hover { color: #fff; }

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.form-control {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    color: #fff;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position-x: 96%;
    background-position-y: 50%;
}

/* Payment Cards Preview */
.payment-card-item {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payment-card-item .card-number {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--accent-cyan);
}

/* Terminal Console for Bots */
.terminal-box {
    background: #05070a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #10b981;
    height: 220px;
    overflow-y: auto;
    white-space: pre-wrap;
    line-height: 1.5;
}

/* ============================================================
   RESPONSIVE & MOBILE OPTIMIZATION
   ============================================================ */

/* Tablet (< 900px) */
@media (max-width: 900px) {
    .sidebar {
        width: 70px;
        padding: 1rem 0.5rem;
    }
    .brand-logo .logo-text, .brand-badge, .user-info {
        display: none;
    }
    .main-wrapper {
        margin-left: 70px;
    }
    .top-bar {
        padding: 0 1rem;
    }
    .content-body {
        padding: 1rem;
    }
}

/* ============================================================
   MOBILE EXPERIENCE (< 768px) — Native App Feel
   ============================================================ */
@media (max-width: 768px) {

    /* --- GLOBAL OVERRIDES --- */
    html, body {
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
        -webkit-text-size-adjust: 100% !important;
    }

    body {
        display: block !important;
    }

    /* --- BOTTOM NAVIGATION BAR (iOS/Android Style) --- */
    .sidebar {
        position: fixed;
        bottom: 0;
        top: auto;
        left: 0;
        width: 100%;
        height: 64px;
        flex-direction: row;
        align-items: center;
        justify-content: space-around;
        padding: 0;
        border-right: none;
        border-top: 1px solid rgba(255,255,255,0.06);
        background: rgba(7, 9, 14, 0.97);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        z-index: 9999;
        box-shadow: 0 -2px 24px rgba(0,0,0,0.6);
        border-radius: 0;
    }

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

    .nav-menu {
        flex-direction: row;
        justify-content: space-around;
        width: 100%;
        gap: 0;
        padding: 0 0.25rem;
    }

    .nav-item {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 6px 4px;
        font-size: 0.6rem;
        border-left: none !important;
        border-bottom: none !important;
        border-radius: 10px;
        flex: 1;
        text-align: center;
        min-height: 44px;
        background: transparent !important;
        border: none !important;
        transition: all 0.2s ease;
    }

    .nav-item.active {
        color: var(--accent-cyan) !important;
        background: rgba(0, 242, 254, 0.08) !important;
        border: none !important;
    }

    .nav-item span {
        display: block !important;
        font-size: 0.58rem;
        font-weight: 600;
        line-height: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 60px;
    }

    .nav-item .svg-icon {
        width: 20px;
        height: 20px;
    }

    /* --- MAIN CONTENT WRAPPER --- */
    .main-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
        padding-bottom: 72px;
        min-height: 100vh;
    }

    /* --- TOP BAR (Compact Mobile Header) --- */
    .top-bar {
        padding: 0 0.75rem !important;
        height: 52px !important;
        min-height: 52px !important;
        max-height: 52px !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        background: rgba(7, 9, 14, 0.95) !important;
        border-bottom: 1px solid rgba(255,255,255,0.05) !important;
        backdrop-filter: blur(20px) !important;
        position: sticky;
        top: 0;
        z-index: 100;
    }

    .page-title {
        font-size: 1rem !important;
        white-space: nowrap !important;
        flex-shrink: 0;
    }

    .page-title > div:first-child {
        width: 24px !important;
        height: 24px !important;
        font-size: 0.75rem !important;
        border-radius: 6px !important;
    }

    .page-title > span {
        font-size: 1.05rem !important;
    }

    .top-actions {
        display: flex !important;
        align-items: center !important;
        gap: 0.35rem !important;
        width: auto !important;
        margin-top: 0 !important;
        flex-wrap: nowrap !important;
        flex-shrink: 1;
        min-width: 0;
    }

    .balance-pill {
        padding: 0.2rem 0.55rem !important;
        font-size: 0.7rem !important;
        white-space: nowrap !important;
        border-radius: 20px !important;
        gap: 0.25rem !important;
    }

    .top-actions .btn-primary.btn-sm {
        padding: 0.3rem 0.6rem !important;
        font-size: 0.68rem !important;
        white-space: nowrap !important;
        border-radius: 6px !important;
    }

    /* --- CONTENT BODY --- */
    .content-body {
        padding: 0.85rem 0.65rem !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* --- PAGE SECTION HEADINGS --- */
    .page-section h1 {
        font-size: 1.35rem !important;
    }

    .page-section h2 {
        font-size: 1.2rem !important;
    }

    .page-section h3 {
        font-size: 1rem !important;
    }

    .page-section > div > p {
        font-size: 0.8rem !important;
    }

    /* --- STATS GRID (Dashboard Cards) --- */
    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.6rem !important;
    }

    .stat-card {
        padding: 0.85rem 0.75rem !important;
        border-radius: 12px !important;
    }

    .stat-card .label {
        font-size: 0.68rem !important;
        margin-bottom: 0.3rem !important;
    }

    .stat-card .val {
        font-size: 1.15rem !important;
    }

    .stat-card h3 {
        font-size: 0.92rem !important;
    }

    .stat-card p {
        font-size: 0.75rem !important;
    }

    /* --- CATEGORY SELECTOR CARDS (2 per row) --- */
    .category-cards-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
    }

    .category-select-card {
        padding: 0.75rem 0.6rem !important;
        border-radius: 10px !important;
    }

    .category-select-card .cat-icon-svg {
        margin-bottom: 0.3rem !important;
    }

    .category-select-card .cat-icon-svg .svg-icon {
        width: 22px !important;
        height: 22px !important;
    }

    .category-select-card .cat-title {
        font-size: 0.82rem !important;
        margin-bottom: 0.2rem !important;
    }

    .category-select-card .cat-desc {
        font-size: 0.65rem !important;
        line-height: 1.3 !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* --- TARIFF CARDS GRID (2 per row, compact) --- */
    .tariff-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.55rem !important;
        margin-top: 1rem !important;
    }

    .tariff-card {
        padding: 0.75rem 0.6rem !important;
        border-radius: 10px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
    }

    .tariff-badge {
        top: -8px !important;
        right: 8px !important;
        font-size: 0.55rem !important;
        padding: 2px 6px !important;
    }

    .tariff-title {
        font-size: 0.85rem !important;
        margin-bottom: 0.2rem !important;
    }

    .tariff-price {
        font-size: 0.9rem !important;
        margin-bottom: 0.4rem !important;
        flex-wrap: wrap !important;
    }

    .tariff-price span {
        font-size: 0.58rem !important;
        display: block !important;
        width: 100% !important;
    }

    .tariff-specs {
        margin-bottom: 0.5rem !important;
        gap: 0.2rem !important;
    }

    .tariff-specs li {
        font-size: 0.62rem !important;
        padding-bottom: 0.2rem !important;
    }

    .screenshot-badges-container {
        display: none !important;
    }

    .tariff-card .btn {
        padding: 0.4rem 0.3rem !important;
        font-size: 0.68rem !important;
        border-radius: 6px !important;
    }

    /* --- PAYMENT METHOD TABS --- */
    #btn-paytab-auto, #btn-paytab-manual {
        flex: 1;
        padding: 0.55rem 0.35rem !important;
        font-size: 0.7rem !important;
        justify-content: center;
        white-space: nowrap;
        border-radius: 8px !important;
    }

    #btn-paytab-auto svg, #btn-paytab-manual svg {
        width: 14px !important;
        height: 14px !important;
    }

    /* --- PAYMETHOD GRIDS (stack vertically) --- */
    #paymethod-auto-view, 
    #paymethod-manual-view {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }

    /* --- PAYMENT CARD ITEMS (Vertical Mobile Layout) --- */
    .card-item-box {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.6rem !important;
        padding: 0.85rem !important;
        border-radius: 10px !important;
        width: 100% !important;
    }

    .card-item-box > div {
        width: 100% !important;
    }

    .card-item-box button {
        width: 100% !important;
        text-align: center !important;
        justify-content: center !important;
    }

    /* --- FORM CONTROLS (Touch-friendly) --- */
    .form-group {
        margin-bottom: 1rem !important;
    }

    .form-label {
        font-size: 0.75rem !important;
    }

    .form-control {
        padding: 0.7rem 0.85rem !important;
        font-size: 0.85rem !important;
        border-radius: 8px !important;
        min-height: 44px;
    }

    /* --- TABLES (Responsive Scroll) --- */
    .table-container {
        border-radius: 10px !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        margin-bottom: 1rem;
        width: 100% !important;
    }

    table {
        font-size: 0.75rem !important;
        min-width: 500px;
    }

    th {
        padding: 0.6rem 0.5rem !important;
        font-size: 0.68rem !important;
        white-space: nowrap !important;
    }

    td {
        padding: 0.6rem 0.5rem !important;
        font-size: 0.72rem !important;
    }

    /* --- BUTTONS (Touch Targets) --- */
    .btn {
        padding: 0.55rem 0.85rem !important;
        font-size: 0.78rem !important;
        min-height: 40px;
        border-radius: 8px !important;
    }

    .btn-sm {
        padding: 0.35rem 0.6rem !important;
        font-size: 0.7rem !important;
        min-height: 34px;
        border-radius: 6px !important;
    }

    /* --- MODALS (Full-width on mobile) --- */
    .modal-box {
        width: 94% !important;
        max-width: 94% !important;
        padding: 1.15rem !important;
        border-radius: 16px !important;
        max-height: 85vh !important;
    }

    .modal-title {
        font-size: 1.05rem !important;
    }

    /* --- BADGES --- */
    .badge {
        font-size: 0.62rem !important;
        padding: 2px 6px !important;
    }

    /* --- DASHBOARD HOSTING CARDS --- */
    .dashboard-hosting-card {
        padding: 0.85rem !important;
        border-radius: 10px !important;
    }

    /* --- DASHBOARD FLEX ROWS (Stack on Mobile) --- */
    div[style*="justify-content:space-between"] {
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
    }

    /* --- INLINE STYLES OVERFLOW FIXES --- */
    [style*="display:flex"][style*="gap:1rem"] {
        flex-wrap: wrap !important;
    }

    /* --- TERMINAL BOX --- */
    .terminal-box {
        font-size: 0.7rem !important;
        padding: 0.75rem !important;
        height: 160px !important;
    }
}

/* ============================================================
   EXTRA SMALL SCREENS (< 420px) — Narrow Phones
   ============================================================ */
@media (max-width: 420px) {

    .top-bar {
        padding: 0 0.5rem !important;
    }

    .content-body {
        padding: 0.65rem 0.45rem !important;
    }

    .page-title > span {
        font-size: 0.92rem !important;
    }

    .balance-pill {
        font-size: 0.62rem !important;
        padding: 0.15rem 0.45rem !important;
    }

    .top-actions .btn-primary.btn-sm {
        font-size: 0.6rem !important;
        padding: 0.25rem 0.45rem !important;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.45rem !important;
    }

    .stat-card .val {
        font-size: 1rem !important;
    }

    .category-cards-grid {
        gap: 0.4rem !important;
    }

    .category-select-card .cat-title {
        font-size: 0.75rem !important;
    }

    .category-select-card .cat-desc {
        font-size: 0.6rem !important;
        -webkit-line-clamp: 2;
    }

    .tariff-grid {
        gap: 0.4rem !important;
    }

    .tariff-title {
        font-size: 0.78rem !important;
    }

    .tariff-price {
        font-size: 0.82rem !important;
    }

    .tariff-specs li {
        font-size: 0.58rem !important;
    }

    .tariff-card .btn {
        font-size: 0.62rem !important;
        padding: 0.35rem 0.25rem !important;
    }

    .nav-item span {
        font-size: 0.52rem !important;
        max-width: 50px !important;
    }

    .nav-item .svg-icon {
        width: 18px !important;
        height: 18px !important;
    }

    table {
        font-size: 0.68rem !important;
    }

    .modal-box {
        width: 96% !important;
        padding: 1rem !important;
    }
}


