@import url('https://fonts.googleapis.com/css2?family=Google+Sans+Flex:opsz,wght@6..144,1..1000&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Google Sans Flex", sans-serif;
}


:root {
    --primary-color: #ff8432;
    --border: 1.5px solid #e8eaf2;
    --border-color: #e8eaf2;
    --box-shadow: 0 4px 15px rgba(117, 128, 222, .2);
    --sidebar-width: 270px;
    --bg-primary: #ffffff;
    --bg-secondary: #f0f2f5;
    --text-primary: #0a0a0a;
    --text-secondary: #626380cf;
}

[data-theme="dark"] {
    --bg-primary: #111822;
    --bg-secondary: #242526;
    --text-primary: #e4e6eb;
    --text-secondary: #b0b3b8;
    --border-color: #3e4042;
    --border: 1.5px solid var(--border-color);
}

a {
    text-decoration: none;
    color: inherit;
}

html {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

body {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    min-height: 100vh;
    height: auto;
    width: 100%;
    overflow-x: hidden;
}

.sidebar {
    background-color: var(--bg-primary);
    width: var(--sidebar-width);
    position: fixed;
    left: 0;
    top: 0;
    min-height: 100vh;
    height: 100vh;
    border-right: var(--border);
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1100;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    body.dash-has-mobile-nav {
        padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    }
}

.sidebar-brand {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-bottom: var(--border);
}

.logo {
    width: 130px;
}

/* Light/dark logo switching */
.logo-light {
    display: inline-block;
}

.logo-dark {
    display: none;
}

[data-theme="dark"] .logo-light {
    display: none;
}

[data-theme="dark"] .logo-dark {
    display: inline-block;
}

.sidebar-wrapper {
    flex: 1;
    overflow-y: auto;
    height: 100%;
    min-height: 0;
    padding: 20px 0;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
    padding: 0 10px;
}

.sidebar-link {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    height: 45px;
    cursor: pointer;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.sidebar-link i {
    font-size: 18px;
}

.sidebar-link:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.sidebar-link.active {
    background-color: var(--primary-color);
    color: #fff;
}

.sidebar-title {
    padding: 18px 12px 8px;
    color: var(--text-primary);
    text-transform: uppercase;
    font-weight: 700;
    font-size: 11px;
}

.sidebar-wrapper::-webkit-scrollbar {
    width: 5px;
}

.sidebar-wrapper::-webkit-scrollbar-track {
    background-color: var(--border-color);
    border-radius: 4px;
}

.main-content {
    margin-left: var(--sidebar-width);
}

.header {
    position: sticky;
    top: 0;
    z-index: 900;
    background-color: color-mix(in srgb, var(--bg-primary) 85%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    height: 64px;
    border-bottom: var(--border);
    padding: 0 24px;
}

.container {
    padding: 20px;
}

@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
        min-height: 0;
        overflow: visible;
    }

    .container {
        padding: 14px 12px 20px;
    }

    .header {
        padding: 0 15px;
    }
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.menu-icon {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 20px;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.menu-icon:hover {
    color: var(--primary-color);
}

.header-logo {
    display: none;
}

.header-balance {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px 6px 6px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.header-balance:hover {
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.header-balance-icon {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-size: 18px;
}

.header-balance-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.header-balance-meta small {
    font-size: 11px;
    color: var(--text-secondary);
}

.header-balance-meta strong {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.header-profile {
    position: relative;
}

.header-profile-top {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px 5px 5px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.header-profile-top:hover {
    border-color: var(--primary-color);
}

.header-profile-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.header-profile-caret {
    font-size: 16px;
    color: var(--text-secondary);
    transition: transform 0.25s ease;
}

.header-profile.open .header-profile-caret {
    transform: rotate(180deg);
}

.header-profile-image {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--border-color);
}

.header-profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--bg-primary);
    border-radius: 12px;
    box-shadow: var(--box-shadow);
    border: var(--border);
    min-width: 240px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.header-profile.open .header-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header-dropdown-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
}

.header-dropdown-user {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.header-dropdown-user strong {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.header-dropdown-user span {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.header-profile-menu {
    list-style: none;
    margin: 0;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.header-profile-item {
    margin: 0;
    padding: 0;
}

.header-profile-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    font-family: inherit;
}

.header-profile-link:hover {
    background-color: var(--bg-secondary);
}

.header-profile-link i {
    font-size: 18px;
    color: var(--primary-color);
}

.logout-form {
    margin: 0;
    padding: 0;
    display: block;
    width: 100%;
}

.logout-btn {
    color: #dc3545;
}

.logout-btn:hover {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.logout-btn i {
    color: #dc3545;
}

.theme-toggle {
    display: inline-flex;
}

.theme-toggle-input {
    display: none;
}

.theme-toggle-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.theme-toggle-btn:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.theme-icon {
    font-size: 20px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* checked = dark theme -> show sun (switch to light). unchecked = light -> show moon. */
.theme-icon-sun {
    display: none;
}

.theme-toggle-input:checked + .theme-toggle-btn .theme-icon-sun {
    display: block;
    color: #fbbf24;
}

.theme-toggle-input:checked + .theme-toggle-btn .theme-icon-moon {
    display: none;
}

@media (max-width: 768px) {
    .header {
        padding: 0 14px;
    }

    .menu-icon {
        display: flex;
    }

    .header-logo {
        display: block;
    }

    .logo {
        width: 110px;
    }

    .header-left,
    .header-right {
        gap: 10px;
    }

    .header-balance {
        padding: 5px 12px 5px 5px;
    }

    .header-balance-meta small {
        display: none;
    }

    .header-profile-name,
    .header-profile-caret {
        display: none;
    }

    .header-profile-top {
        padding: 3px;
        gap: 0;
    }
}

@media (max-width: 480px) {
    .header-balance {
        display: none;
    }
}

/* ============ Mobile bottom navigation ============ */
.sidebar-backdrop {
    display: none;
}

.dash-mobile-nav {
    display: none;
}

@media (max-width: 768px) {
    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1050;
        background: rgba(15, 23, 42, 0.45);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.25s ease, visibility 0.25s ease;
    }

    .sidebar-backdrop.show {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .dash-mobile-nav {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1000;
        align-items: stretch;
        justify-content: space-around;
        gap: 2px;
        padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
        background: color-mix(in srgb, var(--bg-primary) 92%, transparent);
        backdrop-filter: saturate(180%) blur(14px);
        -webkit-backdrop-filter: saturate(180%) blur(14px);
        border-top: 1px solid var(--border-color);
        box-shadow: 0 -8px 24px rgba(16, 24, 40, 0.08);
    }

    .dash-mobile-nav__item {
        flex: 1;
        min-width: 0;
        max-width: 88px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 6px 4px;
        border: none;
        border-radius: 12px;
        background: transparent;
        color: var(--text-secondary);
        font-size: 11px;
        font-weight: 600;
        text-decoration: none;
        cursor: pointer;
        transition: color 0.2s ease, background 0.2s ease;
    }

    .dash-mobile-nav__item i {
        font-size: 22px;
        line-height: 1;
    }

    .dash-mobile-nav__item span {
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .dash-mobile-nav__item:hover,
    .dash-mobile-nav__item.active {
        color: var(--primary-color);
        background: color-mix(in srgb, var(--primary-color) 10%, transparent);
    }

    .dash-mobile-nav__item.active i {
        color: var(--primary-color);
    }
}

/* ============ Dashboard hero / balance banner ============ */
.dash-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 4px;
    margin-bottom: 20px;
    padding: 28px 32px;
    border-radius: 20px;
    color: #fff;
    background:
        radial-gradient(120% 160% at 100% 0%, color-mix(in srgb, #fff 22%, transparent), transparent 55%),
        linear-gradient(135deg, var(--primary-color), color-mix(in srgb, var(--primary-color) 55%, #000));
    box-shadow: 0 16px 40px color-mix(in srgb, var(--primary-color) 30%, transparent);
}

.dash-hero-orb {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    filter: blur(2px);
    pointer-events: none;
}

.dash-hero-orb.orb-1 {
    width: 180px;
    height: 180px;
    top: -70px;
    right: 18%;
}

.dash-hero-orb.orb-2 {
    width: 120px;
    height: 120px;
    bottom: -60px;
    left: 12%;
}

.dash-hero-main {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 28px;
}

.dash-hero-greet {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dash-hero-avatar {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
}

.dash-hero-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dash-hero-hello {
    font-size: 14px;
    opacity: 0.85;
}

.dash-hero-name {
    font-size: clamp(20px, 3vw, 26px);
    font-weight: 700;
    line-height: 1.15;
}

.dash-hero-balance {
    position: relative;
    padding-left: 28px;
}

.dash-hero-balance::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 1px;
    background: rgba(255, 255, 255, 0.3);
}

.dash-hero-balance-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    opacity: 0.9;
}

.dash-hero-balance-value {
    margin-top: 4px;
    font-size: clamp(26px, 4vw, 34px);
    font-weight: 800;
    line-height: 1;
}

.dash-hero-actions {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.dash-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    transition: transform 0.2s ease, background 0.2s ease;
}

.dash-hero-btn.primary {
    background: #fff;
    color: var(--primary-color);
}

.dash-hero-btn.ghost {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.dash-hero-btn:hover {
    transform: translateY(-2px);
}

.dash-hero-btn.ghost:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ============ Stats ============ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 18px;
    margin-top: 24px;
}

.stat-card {
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 18px;
    border: var(--border);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.stat-card::after {
    content: "";
    position: absolute;
    right: -30px;
    bottom: -30px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--primary-color) 7%, transparent);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(16, 24, 40, 0.1);
    border-color: var(--primary-color);
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    background: color-mix(in srgb, var(--primary-color) 12%, transparent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 22px;
}

.stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #e6f9ee;
    color: #16a34a;
    font-size: 11px;
    font-weight: 600;
}

.stat-pill i {
    font-size: 13px;
}

.stat-pill--info {
    background: color-mix(in srgb, var(--primary-color) 12%, transparent);
    color: var(--primary-color);
}

.stat-pill--danger {
    background: rgba(220, 53, 69, 0.12);
    color: #dc3545;
}

.stat-card-body {
    position: relative;
    z-index: 1;
}

.stat-card-body .value {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
}

.stat-card-body .label {
    margin-top: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* ============ Two-column panel layout ============ */
.dash-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 20px;
    margin-top: 20px;
    align-items: start;
}

.dash-panel {
    margin-top: 0;
}

.dash-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.dash-panel-head .title {
    margin-bottom: 0;
}

.dash-panel-hint {
    font-size: 13px;
    color: var(--text-secondary);
}

.dash-panel-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-color);
}

@media (max-width: 992px) {
    .dash-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .dash-hero {
        padding: 22px 20px;
    }

    .dash-hero-balance {
        padding-left: 0;
    }

    .dash-hero-balance::before {
        display: none;
    }

    .dash-hero-actions {
        width: 100%;
    }

    .dash-hero-btn {
        flex: 1;
        justify-content: center;
    }
}

.card {
    background-color: var(--bg-primary);
    border: var(--border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--box-shadow);
}

.card .title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.mp-20 {
    margin-top: 20px;
}

.container-header {
    margin-bottom: 20px;
}

.container-header .title {
    font-size: 22px;
    color: var(--text-primary);

}

.profile-card {
    text-align: center;
    padding: 24px;
}

.profile-image {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 12px;
    border: 3px solid var(--border-color);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-image-btn {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 25%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0;
    font-size: 14px;
    line-height: 1;
}

.profile-image-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

.profile-image-form {
    margin: 0;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 14px;
}

.action-card {
    position: relative;
    overflow: hidden;
    background: var(--bg-primary);
    border: var(--border);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.action-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--action-accent, var(--primary-color));
    transform: scaleY(0);
    transition: transform 0.25s ease;
}

.action-card:hover {
    border-color: color-mix(in srgb, var(--action-accent, var(--primary-color)) 50%, var(--border-color));
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(16, 24, 40, 0.1);
}

.action-card:hover::before {
    transform: scaleY(1);
}

.action-icon {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    border-radius: 14px;
    background: color-mix(in srgb, var(--action-accent, var(--primary-color)) 14%, transparent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--action-accent, var(--primary-color));
    font-size: 24px;
    transition: transform 0.25s ease;
}

.action-card:hover .action-icon {
    transform: scale(1.08);
}

.action-text {
    flex: 1;
    min-width: 0;
}

.action-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.action-desc {
    margin-top: 2px;
    font-size: 13px;
    color: var(--text-secondary);
}

.action-arrow {
    font-size: 18px;
    color: var(--text-secondary);
    transition: transform 0.25s ease, color 0.25s ease;
}

.action-card:hover .action-arrow {
    color: var(--action-accent, var(--primary-color));
    transform: translateX(3px);
}

/* per-tile accent colors */
.actions-grid .action-card:nth-child(5n+1) { --action-accent: var(--primary-color); }
.actions-grid .action-card:nth-child(5n+2) { --action-accent: #3b82f6; }
.actions-grid .action-card:nth-child(5n+3) { --action-accent: #22c55e; }
.actions-grid .action-card:nth-child(5n+4) { --action-accent: #a855f7; }
.actions-grid .action-card:nth-child(5n+5) { --action-accent: #ec4899; }

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
}

.service-card {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--bg-primary);
    border: var(--border);
    border-radius: 14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.service-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(16, 24, 40, 0.08);
    border-color: var(--primary-color);
}

.service-rank {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
}

.service-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--primary-color) 12%, transparent);
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    margin-left: 14px;
}

.service-info {
    flex: 1;
    min-width: 0;
}

.service-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.service-detail {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.service-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 36px 16px;
    color: var(--text-secondary);
}

.service-empty i {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 8px;
    display: block;
}

@media (max-width: 560px) {
    .service-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        padding: 14px;
        gap: 12px;
    }
}

.btn-buy {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    background: var(--bg-primary);
    color: var(--primary-color);
    border: 1.5px solid var(--primary-color);
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.btn-buy:hover {
    background: var(--primary-color);
    color: #fff;
}

.accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 20px;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 10px;
}

.accordion-icon {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.accordion-body.open {
    max-height: 600px;
    transition: max-height 0.4s ease;
}

.accordion-caret {
    display: inline-block;
    transition: transform 0.3s ease;
}

.accordion-card:has(.accordion-body.open) .accordion-caret {
    transform: rotate(180deg);
}

.tutorial-list {
    display: flex;
    flex-direction: column;
    background-color: var(--bg-primary);
    border-radius: 12px;
    overflow: hidden;
    border: var(--border);
}

.tutorial-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 15px 20px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
    border-bottom: var(--border);
}

.tutorial-item:hover {
    background: var(--primary-color);
    color: #fff;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 769px) {
    .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
}

.form-group {
    min-width: 0;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.required {
    color: red;
}

.tooltip-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.tooltip-wrapper .la-info-circle {
    font-size: 16px;
    cursor: help;
    position: relative;
}

.tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background-color: #fff;
    box-shadow: var(--box-shadow);
    padding: 8px 12px;
    border-radius: var(--border-radius);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    white-space: normal;
    min-width: 200px;
    max-width: 300px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    pointer-events: none;
    z-index: 1000;
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #333;
}

.form-control {
    width: 100%;
    height: 45px;
    border: 1px solid var(--border-color);
    outline: none;
    padding: 0 20px;
    font-size: 14.5px;
    border-radius: 12px;
    transition: border-color 0.3s ease;
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.form-control:focus {
    border-color: var(--primary-color);
}

.select {
    width: 100%;
    position: relative;
}

.select-preview {
    width: 100%;
    height: 50px;
    padding: 0 20px;
    border: var(--border);
    background-color: var(--bg-primary);
    outline: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    position: relative;
    border-radius: 12px;
    color: var(--text-secondary);
}

.select-preview>span {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.select-icon {
    font-size: 12px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.select-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background-color: var(--bg-primary);
    margin-top: 10px;
    box-shadow: var(--box-shadow);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    z-index: 10;
    border-radius: 12px;
}

.select-dropdown.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.select.active .select-icon {
    transform: rotate(180deg);
}

.select-search input {
    font-size: 13px;
}

.select-search input::placeholder {
    font-size: 13px;
}

.select-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: 280px;
    overflow-y: auto;
    min-height: 0;
}

.select-item {
    width: 100%;
    min-height: 50px;
    flex-shrink: 0;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 14px;
    border-radius: var(--border-radius);
}

.select-item.hidden {
    display: none;
}

.select-item:hover {
    color: #fff;
    background-color: var(--primary-color);
}

.select-price .select-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.select-price .select-item.hidden {
    display: none;
}

.select-price .select-item-name {
    flex: 1;
    min-width: 0;
    word-break: break-word;
    overflow-wrap: break-word;
}

.select-price .price {
    flex-shrink: 0;
    font-weight: 600;
}

.form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.btn {
    height: 45px;
    padding: 0 18px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 12px;
}

.btn i {
    font-size: 18px;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: var(--box-shadow);
}

.summary {
    display: flex;
    flex-direction: column;
    color: var(--text-primary);
    gap: 4px;
}

.summary h3 {
    font-size: 20px;
}

.summary span {
    font-size: 16px;
}

.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 20px;
}

@media (min-width: 769px) {
    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
}

.gateway-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

@media (min-width: 769px) {
    .gateway-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.gateway-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    background-color: var(--bg-primary);
    border: var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    transition: border-color 0.2s ease, background-color 0.2s ease;
    cursor: pointer;
}

.gateway-item:hover {
    border-color: var(--primary-color);
}

.gateway-item.active {
    border-color: var(--primary-color);
}

.amount-form .form-control {
    margin-bottom: 20px;
}

.bank-transfer-card .desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 18px;
}

.bank-transfer-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.bank-transfer-status {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.bank-transfer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr);
    gap: 24px;
    margin-top: 10px;
}

.bank-details {
    border-radius: 12px;
    border: var(--border);
    background: var(--bg-secondary);
    padding: 16px 18px;
}

.bank-details-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    font-size: 14px;
}

.bank-details-row .label {
    color: var(--text-secondary);
}

.bank-details-row .value {
    font-weight: 600;
    color: var(--text-primary);
}

.bank-details-row.highlight .value {
    color: var(--primary-color);
    font-size: 15px;
}

.bank-details-row .value.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 13px;
}

.bank-proof .title.small {
    font-size: 16px;
    margin-bottom: 6px;
}

.bank-proof .form-hint {
    display: block;
    margin-top: 6px;
    margin-bottom: 10px;
    font-size: 12px;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .bank-transfer-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .bank-transfer-grid {
        grid-template-columns: 1fr;
    }
}

.gateway-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.gateway-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    border: 1.4px solid var(--border-color);
}

.gateway-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gateway-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gateway-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.gateway-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

.gateway-arrow {
    font-size: 20px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.hint {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.table-responsive {
    overflow-x: auto;
    margin-top: 4px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table thead tr {
    border-bottom: var(--border);
}

.table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.table tbody tr:nth-child(odd) {
    background: var(--bg-secondary);
}

.table tbody tr:nth-child(even) {
    background: var(--bg-primary);
}

.table td {
    padding: 14px 16px;
    color: var(--text-primary);
    font-size: 14px;
}

.table tbody tr {
    border-bottom: var(--border);
}

.table tbody tr:last-child {
    border-bottom: none;
}

.status {
    display: inline-block;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
}

.status.failed {
    background: #dc3545;
    color: #fff;
}

.status.success {
    background: #16a34a;
    color: #fff;
}

.status.pending {
    background: #eab308;
    color: #fff;
}

@media (max-width: 640px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

.api-key-row {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.api-key-row .api-key-field {
    flex: 1 1 200px;
    min-width: 0;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 13px;
}

.api-key-row .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.btn-copy {
    background: #6f42c1;
    color: #fff;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .api-key-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: stretch;
    }

    .api-key-row .api-key-field {
        grid-column: 1 / -1;
        width: 100%;
        font-size: 12px;
        word-break: break-all;
    }

    .api-key-row .btn {
        width: 100%;
        padding: 12px 10px;
        font-size: 13px;
    }
}

/* Table Search & Pagination - Frontend log tables */
.table-search-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    margin-bottom: 16px;
}

.table-search {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.table-search .search-input {
    width: 100%;
    height: 45px;
    padding: 10px 40px 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.3s ease;
}

.table-search .search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 132, 50, 0.15);
}

.table-search .search-input::placeholder {
    color: var(--text-secondary);
}

.table-search i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 16px;
    pointer-events: none;
}

.search-btn {
    padding: 10px 20px;
    height: 45px;
    background: var(--primary-color);
    color: #fff;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.search-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-outline {
    padding: 10px 20px;
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.btn-outline:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
}

.pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-top: 24px;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 15px;
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.pagination-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-links .pagination,
.pagination-links nav .pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pagination-links .pagination li,
.pagination-links nav .pagination li {
    display: inline-block;
}

.pagination-links .pagination li a,
.pagination-links .pagination li span,
.pagination-links nav .pagination li a,
.pagination-links nav .pagination li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    min-width: 40px;
    height: 40px;
    color: var(--text-primary);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination-links .pagination li a:hover,
.pagination-links nav .pagination li a:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
}

.pagination-links .pagination li.active span,
.pagination-links nav .pagination li.active span {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    font-weight: 600;
}

.pagination-links .pagination li.disabled span,
.pagination-links nav .pagination li.disabled span {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-secondary);
    cursor: not-allowed;
    opacity: 0.6;
}

.pagination-links .pagination li:first-child a,
.pagination-links .pagination li:first-child span,
.pagination-links .pagination li:last-child a,
.pagination-links .pagination li:last-child span,
.pagination-links nav .pagination li:first-child a,
.pagination-links nav .pagination li:first-child span,
.pagination-links nav .pagination li:last-child a,
.pagination-links nav .pagination li:last-child span {
    padding: 10px 16px;
    min-width: auto;
}

.card .pagination-wrapper,
.mp-20 .pagination-wrapper,
.social-logs-pagination .pagination-wrapper {
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .table-search-form {
        width: 100%;
    }

    .table-header {
        flex-direction: column;
        align-items: stretch;
    }

    .table-search {
        max-width: 100%;
    }

    .pagination-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 15px 0;
        max-width: 100%;
        text-align: center;
    }

    .pagination-info {
        width: 100%;
        text-align: center;
        font-size: 13px;
        line-height: 1.4;
    }

    .pagination-links {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        padding-bottom: 4px;
    }

    .pagination-links .pagination,
    .pagination-links nav .pagination {
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 6px;
        min-width: min-content;
    }

    .pagination-links .pagination li a,
    .pagination-links .pagination li span,
    .pagination-links nav .pagination li a,
    .pagination-links nav .pagination li span {
        min-width: 36px;
        height: 36px;
        padding: 8px 10px;
        font-size: 13px;
    }
}

/* ========== Social logs page (account products) ========== */
.social-logs-page {
    padding: 24px;
}

.social-logs-header {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.social-logs-header-icon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: color-mix(in srgb, var(--primary-color) 12%, transparent);
    color: var(--primary-color);
    font-size: 26px;
}

.social-logs-header-text {
    flex: 1;
    min-width: 0;
}

.social-logs-header .title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.social-logs-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.social-logs-count {
    flex-shrink: 0;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .social-logs-header {
        display: grid;
        grid-template-columns: 52px 1fr;
        column-gap: 16px;
        row-gap: 10px;
    }

    .social-logs-header-icon {
        grid-column: 1;
        grid-row: 1;
    }

    .social-logs-header-text {
        grid-column: 2;
        grid-row: 1;
        min-width: 0;
    }

    .social-logs-count {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}

.social-logs-search {
    margin-bottom: 28px;
}

.logs-search {
    margin: 0 0 16px;
    width: 100%;
}

.table-header .logs-search {
    flex: 1 1 100%;
    min-width: 0;
}

.logs-search-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 6px 6px 16px;
    background: var(--bg-primary);
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.logs-search-bar:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 15%, transparent);
}

.logs-search-icon {
    font-size: 19px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.logs-search-input {
    flex: 1;
    min-width: 0;
    height: 44px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
}

.logs-search-input::placeholder {
    color: var(--text-secondary);
}

.logs-search-divider {
    width: 1px;
    height: 26px;
    background: var(--border-color);
    flex-shrink: 0;
}

.logs-search-select {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logs-search-select > i:first-child {
    position: absolute;
    left: 12px;
    font-size: 16px;
    color: var(--text-secondary);
    pointer-events: none;
}

.logs-search-select select {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    height: 44px;
    padding: 0 32px 0 34px;
    cursor: pointer;
    outline: none;
    max-width: 180px;
}

.logs-search-caret {
    position: absolute;
    right: 12px;
    font-size: 16px;
    color: var(--text-secondary);
    pointer-events: none;
}

.logs-search-submit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 44px;
    padding: 0 22px;
    flex-shrink: 0;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.logs-search-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px color-mix(in srgb, var(--primary-color) 35%, transparent);
}

.logs-search-clear {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.logs-search-clear:hover {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .logs-search-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        width: 100%;
        padding: 0;
        background: transparent;
        border: none;
        box-shadow: none;
    }

    .logs-search-bar:focus-within {
        border: none;
        box-shadow: none;
    }

    .logs-search-icon,
    .logs-search-divider {
        display: none;
    }

    .logs-search-input {
        display: block;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        flex: none;
        height: 50px;
        padding: 0 16px;
        font-size: 16px;
        border: 1.5px solid var(--border-color);
        border-radius: 12px;
        background: var(--bg-primary);
    }

    .logs-search-select {
        width: 100%;
    }

    .logs-search-select select {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        height: 50px;
        padding: 0 16px;
        font-size: 16px;
        border: 1.5px solid var(--border-color);
        border-radius: 12px;
        background: var(--bg-primary);
    }

    .logs-search-submit {
        width: 100%;
        max-width: 100%;
        justify-content: center;
        height: 50px;
        border-radius: 12px;
        font-size: 15px;
    }
}

.social-logs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}

.social-logs-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    border: var(--border);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.05);
}

.social-logs-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 16px 34px rgba(16, 24, 40, 0.12);
}

.social-logs-card-media {
    position: relative;
    width: 100%;
    height: 170px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.social-logs-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.social-logs-card:hover .social-logs-card-media img {
    transform: scale(1.05);
}

.social-logs-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 44px;
    background:
        radial-gradient(120% 120% at 50% 0%, color-mix(in srgb, var(--primary-color) 10%, transparent), transparent 60%),
        var(--bg-secondary);
}

.social-logs-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    backdrop-filter: blur(6px);
}

.social-logs-badge.in {
    background: rgba(22, 163, 74, 0.9);
    color: #fff;
}

.social-logs-badge.out {
    background: rgba(220, 53, 69, 0.9);
    color: #fff;
}

.social-logs-chip {
    position: absolute;
    bottom: 12px;
    left: 12px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
}

.social-logs-card-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.social-logs-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.social-logs-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.social-logs-card-price {
    font-size: 19px;
    font-weight: 800;
    color: var(--text-primary);
}

.social-logs-card-stock {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.social-logs-card-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 16px;
    background: color-mix(in srgb, var(--primary-color) 12%, transparent);
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    transition: background 0.2s ease, color 0.2s ease, gap 0.2s ease;
}

.social-logs-card:hover .social-logs-card-cta {
    background: var(--primary-color);
    color: #fff;
    gap: 10px;
}

.social-logs-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 56px 24px;
    color: var(--text-secondary);
}

.social-logs-empty i {
    font-size: 48px;
    margin-bottom: 12px;
    color: var(--primary-color);
    opacity: 0.7;
    display: block;
}

.social-logs-empty p {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px;
}

.social-logs-empty span {
    font-size: 14px;
}

.social-logs-pagination {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

@media (max-width: 640px) {
    .social-logs-page {
        padding: 16px;
    }

    .social-logs-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== Product detail (Social log – Buy now page) ========== */
.product-detail-page {
    padding: 0;
}

.product-detail-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 18px;
    padding: 8px 16px;
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    transition: color 0.2s, border-color 0.2s, gap 0.2s;
}

.product-detail-back:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    gap: 10px;
}

.product-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr);
    gap: 24px;
    align-items: start;
}

.product-detail-info {
    min-width: 0;
}

.product-detail-media {
    display: block;
}

.product-detail-image-wrap {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-secondary);
    margin-bottom: 20px;
}

.product-detail-image-wrap img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
}

.product-detail-image-placeholder {
    width: 100%;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 56px;
    background:
        radial-gradient(120% 120% at 50% 0%, color-mix(in srgb, var(--primary-color) 10%, transparent), transparent 60%),
        var(--bg-secondary);
}

.product-detail-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary-color) 12%, transparent);
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.product-detail-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 14px 0;
    line-height: 1.25;
}

.product-detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    font-size: 14px;
}

.product-detail-price {
    font-weight: 800;
    font-size: 24px;
    color: var(--text-primary);
}

.product-detail-price small {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.product-detail-stock {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}

.product-detail-stock.in {
    background: rgba(22, 163, 74, 0.12);
    color: #16a34a;
}

.product-detail-stock.out {
    background: rgba(220, 53, 69, 0.12);
    color: #dc3545;
}

.product-detail-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.product-detail-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px;
}

.product-detail-section-title i {
    color: var(--primary-color);
}

.product-detail-description {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0;
}

.product-detail-buy-wrap {
    position: sticky;
    top: 90px;
    min-width: 0;
}

.product-detail-buy-card {
    background: var(--bg-primary);
    border: var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(16, 24, 40, 0.08);
}

.product-detail-buy-card .card-body {
    padding: 24px;
}

.product-detail-buy-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 20px 0;
}

.product-detail-buy-title i {
    color: var(--primary-color);
}

.product-detail-buy-form .form-group {
    margin-bottom: 18px;
}

.product-detail-buy-form .form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.qty-stepper {
    display: flex;
    align-items: stretch;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.qty-stepper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 20%, transparent);
}

.qty-btn {
    width: 46px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: none;
    color: var(--text-primary);
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.qty-btn:hover {
    background: var(--primary-color);
    color: #fff;
}

.product-detail-buy-form .qty-stepper .form-control {
    flex: 1;
    width: auto;
    min-width: 0;
    padding: 12px;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    border: none;
    border-radius: 0;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.product-detail-buy-form .qty-stepper .form-control:focus {
    outline: none;
    box-shadow: none;
}

.product-detail-buy-form .text-muted {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.product-detail-summary {
    list-style: none;
    margin: 0 0 20px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 12px;
}

.product-detail-summary li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-secondary);
    padding: 6px 0;
}

.product-detail-summary li.total {
    margin-top: 6px;
    padding-top: 12px;
    border-top: 1px dashed var(--border-color);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.product-detail-total-amount {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary-color);
}

.product-detail-purchase-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 700;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.product-detail-purchase-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px color-mix(in srgb, var(--primary-color) 40%, transparent);
}

.product-detail-purchase-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.product-detail-trust {
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-detail-trust li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.product-detail-trust i {
    color: var(--primary-color);
    font-size: 16px;
}

.product-detail-out-of-stock {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: rgba(234, 179, 8, 0.12);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
}

/* Related products */
.product-detail-related {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.product-detail-related-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 20px 0;
}

.product-detail-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.product-detail-related-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    border: var(--border);
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.product-detail-related-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(16, 24, 40, 0.12);
}

.product-detail-related-card .card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-detail-related-card img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    display: block;
}

.product-detail-related-placeholder {
    width: 100%;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 32px;
    background:
        radial-gradient(120% 120% at 50% 0%, color-mix(in srgb, var(--primary-color) 8%, transparent), transparent 60%),
        var(--bg-secondary);
}

.product-detail-related-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-detail-related-meta {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

@media (max-width: 900px) {
    .product-detail-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .product-detail-buy-wrap {
        position: static;
    }
}

@media (max-width: 768px) {
    .product-detail-image-wrap img {
        height: 240px;
    }

    .product-detail-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .product-detail-related-grid {
        grid-template-columns: 1fr;
    }
}

.number-card .title {
    font-size: 20px;
    color: var(--text-primary);
}

.number-card .desc {
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

.activation-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.action-card {
    background-color: var(--bg-primary);
}

.activation-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px 20px 14px;
}

.activation-image {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.activation-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.activation-info {
    flex: 1;
    min-width: 0;
}

.activation-number {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.activation-number .copy-number {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    font-size: 15px;
}

.activation-meta {
    font-size: 14px;
    color: var(--text-primary);
}

.activation-status {
    margin: 0 20px 16px;
    background: var(--bg-secondary);
    border: 1.4px solid var(--border-color);
    border-radius: 12px;
    padding: 18px 16px 44px;
    position: relative;
    min-height: 72px;
}

.activation-status-text {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
    text-align: left;
}

.activation-status-text.code-received {
    color: var(--text-primary);
    font-weight: 600;
}

.activation-timer {
    position: absolute;
    right: 12px;
    bottom: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
}

.activation-timer i {
    font-size: 13px;
}

.activation-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 0 20px 20px;
}

.btn-done {
    border: 1.4px solid #7c3aed;
    color: var(--text-primary);
}

.btn-done:hover:not(:disabled) {
    background: #7c3aed;
    color: var(--text-primary);
}

.btn-cancel {
    border: 1.5px solid #dc2626;
    color: #dc2626;
    background-color: transparent;
}

.activation-actions .btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .activation-grid {
        grid-template-columns: repeat(1, 1fr);
    }

    .activation-actions {
        flex-direction: column;
    }

    .activation-actions .btn {
        width: 100%;
    }
}

.smm-card .title {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.tab-buttons {
    width: 100%;
    display: flex;
    align-items: stretch;
    gap: 15px;
    justify-content: space-between;
    background-color: var(--bg-secondary);
    padding: 5px;
    border-radius: 10px;
    border: 1.4px solid var(--border-color);
}

.tab-btn {
    background-color: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 10px 10px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.tab-btn.active {
    background-color: var(--bg-primary);
    border: 1.4px solid var(--border-color);
}

.tab-content {
    display: none;
    padding-top: 10px;
}
.tab-content.active {
    display: block;
}

/* SMM — network grid + order summary sidebar */
.smm-order-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

@media (min-width: 992px) {
    .smm-order-layout {
        flex-direction: row;
        align-items: flex-start;
    }

    .smm-order-form {
        flex: 1;
        min-width: 0;
    }

    .smm-order-summary {
        width: 300px;
        flex-shrink: 0;
        position: sticky;
        top: 20px;
    }
}

.network-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
}

.network-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 8px;
    border: 1.4px solid var(--border-color);
    border-radius: 12px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 12.5px;
    font-weight: 500;
    text-align: center;
    line-height: 1.3;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.network-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.network-item i {
    font-size: 22px;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.network-item:hover {
    border-color: var(--primary-color);
}

.network-item.active {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
    color: #fff;
}

.network-item.active i {
    color: #fff;
}

.smm-order-summary {
    border: 1.4px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    background-color: var(--bg-secondary);
}

.order-summary-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.order-summary-empty {
    font-size: 13px;
    color: var(--text-secondary);
}

.order-summary-service {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 14px;
    word-break: break-word;
}

.order-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 16px;
}

.order-summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.order-summary-label {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
}

.order-summary-value {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
}

.order-summary-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1.4px solid var(--border-color);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.order-summary-total strong {
    color: var(--primary-color);
    font-size: 17px;
}

.textarea {
    width: 100%;
    border: 1.4px solid var(--border-color);
    height: 120px;
    padding: 15px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border-radius: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.text-muted {
    color: var(--text-secondary);
}

.d-none {
    display: none !important;
}

.empty {
    padding: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-primary);
}

.empty .icon {
    font-size: 32px;
}

.empty span {
    font-size: 15px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
}

.status-badge.success {
    background: rgba(22, 163, 74, 0.12);
    color: #16a34a;
}

.status-badge.info {
    background: color-mix(in srgb, var(--primary-color) 14%, transparent);
    color: var(--primary-color);
}

.status-badge.warning {
    background: rgba(234, 179, 8, 0.16);
    color: #b45309;
}

.status-badge.danger {
    background: rgba(220, 53, 69, 0.12);
    color: #dc3545;
}

.smm-link-cell a {
    color: var(--primary-color);
    text-decoration: none;
    word-break: break-all;
}

.smm-link-cell a:hover {
    text-decoration: underline;
}

.smm-order-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.smm-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.smm-action-btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.smm-action-btn.cancel:hover:not(:disabled) {
    border-color: #dc3545;
    color: #dc3545;
}

.smm-action-btn.refill:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.smm-action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Developer API page */
.api-dev-card .title {
    font-size: 20px;
    color: var(--text-primary);
}

.api-dev-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.api-dev-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--primary-soft, rgba(255, 132, 50, 0.12));
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.api-dev-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 6px;
}

.api-dev-warning {
    font-size: 13px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.api-dev-tabs {
    margin-top: 8px;
}

.api-docs-intro,
.api-docs-flow {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.api-docs-flow strong {
    color: var(--text-primary);
}

.api-docs-intro code {
    font-size: 13px;
    color: var(--text-primary);
}

.api-docs-note {
    font-size: 13px;
    margin-top: 8px;
}

.api-dev-footer {
    margin-top: 24px;
    font-size: 14px;
}

.api-dev-footer a {
    color: var(--primary-color);
}

.api-dev-card .endpoint {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}

.api-dev-card .endpoint-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-primary);
}

.api-dev-card .endpoint-method {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(255, 132, 50, 0.15);
    color: var(--primary-color);
}

.api-dev-card .endpoint-path {
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 13px;
    color: var(--text-primary);
    word-break: break-all;
}

.api-dev-card .endpoint-body {
    padding: 16px 18px;
}

.api-dev-card .endpoint-body p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.api-dev-card .code-block {
    background: #0d1117;
    color: #e6edf3;
    border-radius: 10px;
    padding: 14px 16px;
    overflow-x: auto;
}

.api-dev-card .code-block code {
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 12px;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 640px) {
    .api-dev-header {
        flex-direction: column;
        gap: 12px;
    }

    .api-dev-warning {
        flex-wrap: wrap;
    }
}
/* ========== Marketplace (user dashboard) ========== */

/* Marketplace — store, cart, seller hub (frontend public + user dashboard) */

.mp-store-page {
    padding: 24px;
}

.mp-store-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.mp-store-header-icon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: color-mix(in srgb, var(--primary-color) 12%, transparent);
    color: var(--primary-color);
    font-size: 26px;
}

.mp-store-header-text {
    flex: 1;
    min-width: 0;
}

@media (min-width: 769px) {
    .mp-store-header-text {
        min-width: 200px;
    }
}

.mp-store-header .title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px;
}

.mp-store-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.mp-store-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

@media (max-width: 768px) {
    .mp-store-header {
        display: grid;
        grid-template-columns: 52px 1fr;
        column-gap: 16px;
        row-gap: 12px;
    }

    .mp-store-header-icon {
        grid-column: 1;
        grid-row: 1;
    }

    .mp-store-header-text {
        grid-column: 2;
        grid-row: 1;
    }

    .mp-store-header-actions {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
    }
}

.mp-store-count {
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.mp-store-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mp-store-btn.primary {
    background: var(--primary-color);
    color: #fff;
    border: none;
}

.mp-store-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px color-mix(in srgb, var(--primary-color) 35%, transparent);
}

.mp-store-btn.ghost {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.mp-store-search {
    margin-bottom: 28px;
}

.mp-search-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    background: var(--bg-primary);
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
}

.mp-search-bar:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 15%, transparent);
}

.mp-search-bar input[type="text"],
.mp-search-bar select {
    flex: 1;
    min-width: 120px;
    height: 44px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    padding: 0 12px;
}

.mp-search-bar select {
    max-width: 180px;
    cursor: pointer;
}

.mp-search-submit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 44px;
    padding: 0 20px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
}

.mp-search-clear {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 10px;
    display: inline-flex;
    gap: 4px;
}

.mp-filter-selects {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 16px;
    align-items: end;
    margin-bottom: 8px;
}

.mp-filter-selects .form-group {
    margin-bottom: 0;
}

.mp-filter-selects .select-preview {
    height: 44px;
    padding: 0 14px;
}

.mp-seller-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

/* Seller order card: allow the status dropdown to escape the card edge */
.mp-store-page .mp-store-card--order {
    overflow: visible;
}

.mp-order-card-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
}

.mp-seller-fulfill-form {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) 1fr auto;
    gap: 12px;
    align-items: end;
    margin-top: 12px;
}

.mp-seller-fulfill-form .form-group {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .mp-filter-selects,
    .mp-seller-fulfill-form {
        grid-template-columns: 1fr;
    }
}

/* User dashboard marketplace data tables */
.mp-store-page .table-responsive {
    margin-top: 8px;
}

.mp-store-page .table th:last-child,
.mp-store-page .table td:last-child {
    text-align: right;
    white-space: nowrap;
}

.dash-table-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.dash-table-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.dash-table-btn.edit {
    border-color: color-mix(in srgb, var(--primary-color) 40%, var(--border-color));
    background: color-mix(in srgb, var(--primary-color) 14%, var(--bg-primary));
    color: var(--primary-color);
}

.dash-table-btn.edit:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 10px color-mix(in srgb, var(--primary-color) 35%, transparent);
}

.dash-table-btn.danger {
    border-color: color-mix(in srgb, #dc3545 40%, var(--border-color));
    background: color-mix(in srgb, #dc3545 12%, var(--bg-primary));
    color: #dc3545;
}

.dash-table-btn.danger:hover {
    background: #dc3545;
    border-color: #dc3545;
    color: #fff;
    box-shadow: 0 4px 10px rgba(220, 53, 69, 0.35);
}

.dash-table-btn.view {
    border-color: color-mix(in srgb, #0ea5e9 40%, var(--border-color));
    background: color-mix(in srgb, #0ea5e9 12%, var(--bg-primary));
    color: #0284c7;
}

.dash-table-btn.view:hover {
    background: #0ea5e9;
    border-color: #0ea5e9;
    color: #fff;
    box-shadow: 0 4px 10px rgba(14, 165, 233, 0.35);
}

.dash-table-btn i {
    font-size: 18px;
    line-height: 1;
}

.mp-image-input-hidden {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

.mp-image-upload-box {
    padding: 16px;
    border-radius: 14px;
    border: 1px dashed color-mix(in srgb, var(--primary-color) 45%, var(--border-color));
    background: var(--bg-primary);
}

.mp-image-upload-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.mp-image-tile {
    position: relative;
    width: 96px;
    height: 96px;
    flex-shrink: 0;
    border-radius: 14px;
    overflow: hidden;
    border: none;
    padding: 0;
    background: var(--bg-secondary);
}

.mp-image-tile.is-hidden {
    display: none !important;
}

.mp-image-tile-preview img,
.mp-image-uploading-blur {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mp-image-tile-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    font-size: 14px;
    line-height: 1;
    transition: background 0.2s ease;
}

.mp-image-tile-remove:hover {
    background: #dc3545;
}

.mp-image-tile-uploading .mp-image-uploading-blur {
    filter: blur(6px);
    transform: scale(1.08);
}

.mp-image-uploading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    background: rgba(15, 23, 42, 0.45);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

.mp-image-progress {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    overflow: hidden;
}

.mp-image-progress-bar {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: #22c55e;
    transition: width 0.12s ease;
}

.mp-image-tile-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px dashed color-mix(in srgb, var(--primary-color) 40%, var(--border-color));
    background: var(--bg-primary);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.mp-image-tile-add:hover {
    border-color: var(--primary-color);
    background: color-mix(in srgb, var(--primary-color) 6%, var(--bg-primary));
}

.mp-image-add-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--text-secondary) 18%, var(--bg-secondary));
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.mp-image-tile-add:hover .mp-image-add-icon {
    color: var(--primary-color);
    background: color-mix(in srgb, var(--primary-color) 12%, var(--bg-secondary));
}

.mp-product-field-hint {
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.mp-product-type-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, #0ea5e9 35%, var(--border-color));
    background: color-mix(in srgb, #0ea5e9 8%, var(--bg-primary));
    font-size: 14px;
    color: var(--text-secondary);
}

.mp-product-type-note i {
    font-size: 20px;
    color: #0284c7;
    flex-shrink: 0;
    margin-top: 1px;
}

.mp-store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}

.mp-store-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.05);
}

.mp-store-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 16px 34px rgba(16, 24, 40, 0.12);
}

.mp-store-card-media {
    position: relative;
    height: 170px;
    background: var(--bg-secondary);
    overflow: hidden;
}

.mp-store-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.mp-store-card:hover .mp-store-card-media img {
    transform: scale(1.05);
}

.mp-store-card-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    color: var(--text-secondary);
    background: radial-gradient(120% 120% at 50% 0%, color-mix(in srgb, var(--primary-color) 10%, transparent), transparent 60%), var(--bg-secondary);
}

.mp-store-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
}

.mp-store-badge.in { background: rgba(22, 163, 74, 0.92); }
.mp-store-badge.out { background: rgba(220, 53, 69, 0.92); }

.mp-store-type {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
}

.mp-store-chip {
    position: absolute;
    bottom: 12px;
    left: 12px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 12px;
}

.mp-store-card-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.mp-store-card-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-primary);
}

.mp-store-card-seller {
    font-size: 12px;
    color: var(--text-secondary);
}

.mp-store-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.mp-store-card-price {
    font-size: 19px;
    font-weight: 800;
    color: var(--text-primary);
}

.mp-store-card-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 16px;
    background: color-mix(in srgb, var(--primary-color) 12%, transparent);
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
}

.mp-store-card:hover .mp-store-card-cta {
    background: var(--primary-color);
    color: #fff;
}

.mp-store-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 56px 24px;
}

.mp-store-empty i {
    font-size: 48px;
    color: var(--primary-color);
    opacity: 0.7;
    display: block;
    margin-bottom: 12px;
}

.mp-store-pagination {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

/* Public page hero */
.mp-public-hero {
    padding: 48px 0 32px;
    background: var(--section-tint, color-mix(in srgb, var(--primary-color) 4%, var(--bg-primary)));
    border-bottom: 1px solid var(--border-color);
}

.mp-public-hero .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.mp-public-hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 800;
    margin: 0 0 8px;
    color: var(--text-primary);
}

.mp-public-hero p {
    margin: 0;
    color: var(--text-secondary);
    max-width: 520px;
}

/* Cart */
.mp-cart-table {
    width: 100%;
    border-collapse: collapse;
}

.mp-cart-table th,
.mp-cart-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.mp-cart-table th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    font-weight: 600;
}

.mp-cart-product {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mp-cart-product img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
}

.mp-cart-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 20px 0 0;
}

.mp-cart-total {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
}

/* Seller apply banner (dashboard) */
.mp-seller-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    padding: 22px 24px;
    margin-bottom: 20px;
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--primary-color) 25%, var(--border-color));
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary-color) 8%, var(--bg-primary)), var(--bg-primary));
}

.mp-seller-cta-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--primary-color);
    background: color-mix(in srgb, var(--primary-color) 14%, transparent);
}

.mp-seller-cta-text {
    flex: 1;
    min-width: 200px;
}

.mp-seller-cta-text h3 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.mp-seller-cta-text p {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.mp-seller-cta.pending { border-color: #f59e0b; background: color-mix(in srgb, #f59e0b 8%, var(--bg-primary)); }
.mp-seller-cta.active { border-color: #16a34a; }

/* Seller hub stats */
.mp-seller-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

@media (max-width: 600px) {
    .mp-seller-stats {
        grid-template-columns: 1fr;
    }
}

.mp-seller-stat {
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
}

.mp-seller-stat strong {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
}

.mp-seller-stat span {
    font-size: 13px;
    color: var(--text-secondary);
}

.mp-status-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.mp-status-pill.pending { background: #fef3c7; color: #92400e; }
.mp-status-pill.active, .mp-status-pill.approved, .mp-status-pill.paid { background: #dcfce7; color: #166534; }
.mp-status-pill.rejected, .mp-status-pill.suspended, .mp-status-pill.cancelled { background: #fee2e2; color: #991b1b; }
.mp-status-pill.digital { background: #dbeafe; color: #1e40af; }
.mp-status-pill.physical { background: #f3e8ff; color: #6b21a8; }

@media (max-width: 640px) {
    .mp-store-page { padding: 16px; }
    .mp-store-grid { grid-template-columns: 1fr; }
    .mp-cart-table thead { display: none; }
    .mp-cart-table tr { display: block; margin-bottom: 16px; border: 1px solid var(--border-color); border-radius: 12px; }
    .mp-cart-table td { display: block; border: none; }
}

/* Credentials modal — frontend dashboard */
.dash-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(10, 10, 10, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.dash-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.dash-modal-content {
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    border: var(--border);
    border-radius: 12px;
    box-shadow: var(--box-shadow);
    transform: translateY(12px);
    transition: transform 0.25s ease;
}

.dash-modal.is-open .dash-modal-content {
    transform: translateY(0);
}

.dash-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: var(--border);
}

.dash-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.dash-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.dash-modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.dash-modal-body {
    padding: 20px;
    overflow: auto;
}

.dash-modal-credentials {
    margin: 0;
    padding: 14px 16px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: var(--border);
    border-radius: 8px;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 50vh;
    overflow: auto;
}

.dash-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    border-top: var(--border);
}

body.dash-modal-open {
    overflow: hidden;
}

.impersonation-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 16px;
    background: #b91c1c;
    color: #fff;
}

.impersonation-bar__btn {
    padding: 6px 14px;
    border-radius: 6px;
    background: #fff;
    color: #b91c1c;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
