/* Dashboard Professional Styles */

/* Proxy Type Cards */
.proxy-type-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.proxy-type-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px;
    text-align: left;
    transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

.proxy-type-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 16px;
    text-align: left;
}

.proxy-type-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    flex-shrink: 0;
}

.proxy-type-card:hover {
    border-color: #3b82f6;
    box-shadow:
        0 10px 24px rgba(15, 23, 42, 0.06),
        0 0 0 3px rgba(59, 130, 246, 0.18);
}

.proxy-type-icon {
    width: 24px;
    height: 24px;
    color: inherit;
}

.proxy-type-icon text {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
}

.proxy-type-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.proxy-type-text h3 {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}

.proxy-type-text p {
    font-size: 12px;
    color: #64748b;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.proxy-count {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 4px 10px;
    white-space: nowrap;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
    cursor: default;
}

/* Hover/focus: blue outline like screenshot */
.proxy-count:hover,
.proxy-count:focus-visible {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
    outline: none;
}

.btn-get-started {
    width: 100%;
    padding: 10px 16px;
    background: #ffffff;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.proxy-type-card-action {
    margin-top: 12px;
}

.btn-get-started-text {
    line-height: 1;
}

.btn-get-started:hover {
    /* Requested: turn into a blue button on hover */
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.btn-get-started:active {
    transform: translateY(1px);
}

.btn-cart-icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

/* Mobile: prevent horizontal overflow by stacking grids */
@media (max-width: 768px) {
    .proxy-type-cards {
        grid-template-columns: 1fr;
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .proxy-type-card,
    .dashboard-card {
        min-width: 0;
        width: 100%;
    }
}

.dashboard-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
}

.dash-plans-scroll {
    max-height: 420px;
    overflow-y: auto;
    padding-right: 6px;
}

.dash-plan-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 14px 14px 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.dash-plan-item:hover {
    border-color: #d1d5db;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.dash-plan-item--used {
    border-color: #bfdbfe;
    background: #ffffff;
}

.dash-plan-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.dash-plan-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dash-plan-icon svg {
    width: 22px;
    height: 22px;
}

.dash-plan-main {
    min-width: 0;
}

.dash-plan-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.dash-plan-title {
    font-size: 15px;
    /* Inter Medium */
    font-weight: 500;
    color: #0f172a;
    line-height: 1.1;
}

.dash-plan-title-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    text-align: left;
}

.dash-plan-title-btn:hover {
    color: #2563eb;
    text-decoration: underline;
}

.dash-plan-title-btn:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
    border-radius: 4px;
}

.dash-plan-badge {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 4px 10px;
    white-space: nowrap;
}

.dash-plan-badge--days {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dash-plan-badge--days svg {
    width: 14px;
    height: 14px;
}

/* Active plans list: light blue bordered row like screenshot */
#active-plans-list .dash-plan-item {
    border-color: #bfdbfe;
}

#active-plans-list .dash-plan-item:hover {
    border-color: #93c5fd;
}

.dash-plan-badge--expired {
    color: #b91c1c;
    background: #fef2f2;
    border-color: #fecaca;
}

.dash-plan-btn--upgrade {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.dash-plan-btn--upgrade:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.dash-plan-btn-icon {
    font-size: 16px;
    line-height: 1;
    transform: translateY(-1px);
}

.dash-plan-meta {
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
}

.dash-plan-user {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.dash-plan-user svg {
    width: 14px;
    height: 14px;
    color: #94a3b8;
    flex-shrink: 0;
}

.dash-plan-sep {
    color: #cbd5e1;
}

.dash-plan-remaining {
    white-space: nowrap;
}

.dash-plan-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.dash-plan-actions .dropdown {
    position: relative;
}

.dash-plan-btn {
    height: 36px;
    border-radius: 10px;
    padding: 0 14px;
    font-size: 13px;
    /* Less bold (Inter Medium) */
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.dash-plan-btn svg {
    width: 16px;
    height: 16px;
}

.dash-plan-btn--secondary {
    background: #ffffff;
    border-color: #e5e7eb;
    color: #0f172a;
}

.dash-plan-btn--secondary:hover {
    background: #f8fafc;
}

.dash-plan-btn--primary {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.dash-plan-btn--primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.dash-actions-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 1000;
    min-width: 220px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
    overflow: hidden;
}

.dash-actions-item {
    width: 100%;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: none;
    background: transparent;
    color: #0f172a;
    font-size: 14px;
    /* Less bold (Inter Medium) */
    font-weight: 500;
    cursor: pointer;
    text-align: left;
}

.dash-actions-item svg {
    width: 16px;
    height: 16px;
    color: #64748b;
    flex-shrink: 0;
}

.dash-actions-item:hover {
    background: #f8fafc;
}

@media (max-width: 960px) {
    .dash-plan-item {
        flex-direction: column;
        align-items: stretch;
    }
    .dash-plan-actions {
        justify-content: flex-end;
    }
}

.dashboard-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.dashboard-card-heading {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dashboard-card-heading-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dashboard-card-heading-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dashboard-card-heading-title {
    font-size: 16px;
    /* Inter Medium */
    font-weight: 500;
    color: var(--text-primary);
}

.dashboard-card-heading-subtitle {
    font-size: 12px;
    /* Inter Regular */
    font-weight: 400;
    color: var(--text-secondary);
}

/* Card Tabs */
.card-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-btn span {
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.tab-btn.active span {
    color: #2563eb;
    background: #eff6ff;
    border-color: #dbeafe;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Proxies Page Header */
.proxies-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.proxies-page-title-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.proxies-page-title-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.proxies-page-icon {
    width: 22px;
    height: 22px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.proxies-page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.proxies-page-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

.btn-purchase-plan {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-purchase-plan:hover {
    background: var(--primary-hover);
}

/* Subscription Cards (New Layout) */
.subscription-card-new {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.subscription-card-new.active {
    border-left: 3px solid var(--primary-color);
}

.subscription-card-header-new {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.subscription-plan-id {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.subscription-days-badge {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border-radius: 999px;
    padding: 4px 10px;
    white-space: nowrap;
}

.subscription-card-body-new {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.subscription-info-row {
    font-size: 13px;
    color: var(--text-secondary);
}

.subscription-info-row-vertical {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.subscription-info-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.subscription-info-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.subscription-bandwidth-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.subscription-bandwidth-text {
    font-size: 12px;
    color: var(--text-secondary);
}

.subscription-bandwidth-progress {
    height: 6px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.subscription-bandwidth-progress-bar {
    height: 100%;
    background: var(--primary-color);
    border-radius: 999px;
}

.subscription-expires-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.subscription-expires-icon {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
}

.subscription-card-footer-new {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-generate-proxy {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.btn-settings-proxy {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.subscription-settings-dropdown {
    min-width: 190px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    overflow: hidden;
}

.subscription-settings-dropdown-item {
    width: 100%;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
}

.subscription-settings-dropdown-item:hover {
    background: var(--bg-secondary);
}

/* Plan Item */
.plan-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 12px;
    transition: background-color 0.3s ease;
}

.plan-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.plan-info {
    flex: 1;
}

.plan-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.plan-details {
    font-size: 14px;
    color: var(--text-secondary);
}

.plan-actions {
    display: flex;
    gap: 8px;
}

.btn-manage, .btn-actions {
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    min-width: 120px;
    justify-content: center;
    box-sizing: border-box;
    height: 40px;
    line-height: 1;
}

.btn-manage {
    border: 1px solid #3b82f6;
    background: var(--card-bg, #ffffff);
    color: #3b82f6;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.btn-manage:hover {
    background: var(--bg-secondary, #f0f7ff);
    border-color: #2563eb;
}

[data-theme="dark"] .btn-manage:hover {
    background: var(--bg-secondary, #1f2937);
}

.btn-actions {
    border: 1px solid #3b82f6;
    background: #3b82f6;
    color: white;
}

.btn-actions:hover {
    background: #2563eb;
    border-color: #2563eb;
}

/* Card Header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.btn-view-all {
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-view-all:hover {
    background: var(--primary-hover);
}

/* Invoices Table */
.invoices-table-container {
    max-height: none;
    overflow-y: visible;
}

.dash-invoices-scroll {
    max-height: 420px;
    overflow-y: auto;
    padding-right: 6px;
}

.dash-invoice-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    margin-bottom: 12px;
    cursor: pointer;
    text-align: left;
}

.dash-invoice-item:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.45);
    outline-offset: 2px;
}

.dash-invoice-item:hover {
    border-color: #d1d5db;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.dash-invoice-left {
    min-width: 0;
}

.dash-invoice-right {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
    /* keep a stable right-side width so swapping doesn't shift layout */
    min-width: 140px;
}

.dash-invoice-view-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 32px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #0f172a;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

.dash-invoice-amount {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.dash-invoice-view-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.dash-invoice-view-icon {
    font-size: 18px;
    line-height: 1;
    color: #475569;
    transform: translateY(-1px);
}

/* Only hide-on-hover on devices that actually support hover (desktop). */
@media (hover: hover) and (pointer: fine) {
    .dash-invoice-view-btn {
        opacity: 0;
        transform: translateY(-50%) translateX(6px);
        pointer-events: none;
    }

    .dash-invoice-item:hover .dash-invoice-view-btn,
    .dash-invoice-item:focus-within .dash-invoice-view-btn {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
        pointer-events: auto;
    }

    /* Replace amount with button on hover (same spot) */
    .dash-invoice-item:hover .dash-invoice-amount,
    .dash-invoice-item:focus-within .dash-invoice-amount {
        opacity: 0;
        pointer-events: none;
    }
}

.dash-invoice-top {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.dash-invoice-number {
    font-size: 14px;
    /* Inter Medium */
    font-weight: 500;
    color: #0f172a;
}

.dash-invoice-status {
    font-size: 12px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    white-space: nowrap;
}

.dash-invoice-status--paid {
    color: #047857;
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.dash-invoice-status--expired {
    color: #b91c1c;
    background: #fef2f2;
    border-color: #fecaca;
}

.dash-invoice-status--failed {
    color: #b91c1c;
    background: #fef2f2;
    border-color: #fecaca;
}

.dash-invoice-status--pending {
    color: #92400e;
    background: #fffbeb;
    border-color: #fde68a;
}

.dash-invoice-sub {
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
}

.dash-invoice-dot {
    color: #cbd5e1;
}

.dash-invoice-amount {
    font-size: 14px;
    /* Inter SemiBold */
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
}

.invoices-table {
    width: 100%;
    border-collapse: collapse;
}

.invoices-table thead {
    background: var(--bg-secondary);
    position: sticky;
    top: 0;
    z-index: 10;
    transition: background-color 0.3s ease;
}

.invoices-table th {
    padding: 12px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.invoices-table td {
    padding: 12px;
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    background: var(--card-bg);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.invoices-table tbody tr:hover {
    background: var(--bg-secondary);
}

.invoice-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.invoice-status.paid {
    background: #d1fae5;
    color: #065f46;
}

.invoice-status.pending {
    background: #fef3c7;
    color: #92400e;
}

.invoice-status.canceled {
    background: #fee2e2;
    color: #991b1b;
}

/* Help Sections */
.help-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Balance page */
#balance .balance-card {
    padding: 28px;
}

#balance .balance-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

#balance .balance-header h2 {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

#balance .balance-subtitle {
    font-size: 13px;
    color: #64748b;
    margin: 6px 0 0;
}

#balance .balance-add-btn {
    height: 40px;
    padding: 0 18px;
    border-radius: 10px;
}

#balance .balance-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    position: relative;
    overflow: hidden;
    margin-bottom: 26px;
}

#balance .balance-summary::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    top: -120px;
    right: -60px;
}

#balance .balance-summary-left {
    position: relative;
    z-index: 1;
}

#balance .balance-summary-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.85;
}

#balance .balance-summary-value {
    font-size: 40px;
    font-weight: 800;
    margin-top: 6px;
}

#balance .balance-summary-note {
    font-size: 13px;
    opacity: 0.85;
    margin-top: 4px;
}

#balance .balance-summary-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

#balance .balance-summary-icon svg {
    width: 24px;
    height: 24px;
    stroke: #ffffff;
}

#balance .balance-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

#balance .balance-table-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

#balance .balance-table-subtitle {
    font-size: 13px;
    color: #64748b;
    margin: 4px 0 0;
}

#balance .balance-table-container {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
}

#balance .data-table {
    width: 100%;
    border-collapse: collapse;
}

#balance .data-table thead th {
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #64748b;
    background: #f8fafc;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
}

#balance .data-table tbody td {
    padding: 14px 16px;
    font-size: 13px;
    color: #0f172a;
    border-bottom: 1px solid #eef2f7;
}

#balance .data-table tbody tr:last-child td {
    border-bottom: none;
}

#balance .data-table tbody tr:hover {
    background: #f8fafc;
}

/* Dashboard help cards (match centered design) */
#dashboard .help-sections {
    gap: 18px;
}

#dashboard .help-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 26px 22px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

#dashboard .help-card h3 {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 10px 0;
}

#dashboard .help-card p {
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    line-height: 1.65;
    margin: 0 auto 18px;
    max-width: 62ch;
}

#dashboard .help-card .btn-contact {
    height: 40px;
    padding: 0 22px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.05s ease;
}

#dashboard .help-card .btn-contact:hover {
    background: #f8fafc;
    border-color: #d1d5db;
    color: #0f172a;
}

#dashboard .help-card .btn-contact:active {
    transform: translateY(1px);
}

.help-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
}

.help-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.help-card p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.btn-contact {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-contact:hover {
    background: var(--primary-hover);
}


/* Nav Item Dropdown */
.nav-item-dropdown {
    position: relative;
}

.nav-arrow {
    margin-left: auto;
    font-size: 10px;
    transition: transform 0.3s;
}

.nav-item-dropdown.active .nav-arrow {
    transform: rotate(180deg);
}

/* Responsive */
@media (max-width: 1200px) {
    .proxy-type-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .help-sections {
        grid-template-columns: 1fr;
    }

    #balance .balance-header {
        flex-direction: column;
        align-items: flex-start;
    }

    #balance .balance-summary {
        flex-direction: column;
        align-items: flex-start;
    }

    #balance .balance-summary-value {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    .proxy-type-cards {
        grid-template-columns: 1fr;
        gap: 16px;
        overflow-x: visible;
    }
    
    /* Plan Items - Stack buttons */
    .plan-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .plan-actions {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .plan-actions button {
        flex: 1 1 calc(50% - 4px);
        min-width: calc(50% - 4px);
    }
    
    /* Invoice Table - Horizontal scroll */
    .invoices-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .invoices-table {
        min-width: 600px;
    }
    
    .invoices-table th,
    .invoices-table td {
        padding: 10px 8px;
        font-size: 12px;
    }
    
    /* Card Header - Stack on mobile */
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .btn-view-all {
        width: 100%;
    }
    
    /* Plan Items with inline styles - Override for mobile */
    .plan-item[style*="display: flex"] {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 16px !important;
    }
    
    .plan-item[style*="display: flex"] .plan-info {
        width: 100%;
    }
    
    .plan-item[style*="display: flex"] .plan-actions {
        width: 100% !important;
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
    }
    
    .plan-item[style*="display: flex"] .plan-actions > button {
        flex: 1 1 calc(50% - 5px) !important;
        min-width: calc(50% - 5px) !important;
        font-size: 13px !important;
        padding: 10px 12px !important;
    }
    
    .plan-item[style*="display: flex"] .plan-actions .dropdown {
        flex: 1 1 calc(50% - 5px) !important;
        min-width: calc(50% - 5px) !important;
    }
    
    .plan-item[style*="display: flex"] .plan-actions .dropdown > button {
        width: 100% !important;
        font-size: 13px !important;
        padding: 10px 12px !important;
    }
    
    .plan-details[style*="word-wrap: break-word"] {
        font-size: 12px !important;
        line-height: 1.6;
    }
    
    /* Subscription Cards - Mobile */
    .subscription-card {
        margin-bottom: 20px;
    }
    
    .subscription-card-footer {
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    .subscription-card-footer > button {
        width: 100% !important;
        margin: 0 !important;
    }
    
    /* Card Header with View All button */
    .card-header {
        flex-wrap: wrap;
    }
    
    .card-header h3 {
        flex: 1 1 100%;
        margin-bottom: 12px;
    }
    
    .card-header .btn-view-all {
        width: 100%;
        margin-top: 0;
    }
}

/* Dropdown Item Icons */
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dropdown-item-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dropdown-item-icon svg {
    width: 16px;
    height: 16px;
}

.dropdown-item-icon svg * {
    stroke: #6b7280 !important;
    fill: none !important;
}

.dropdown-item-icon svg path,
.dropdown-item-icon svg rect,
.dropdown-item-icon svg circle,
.dropdown-item-icon svg line {
    stroke: #6b7280 !important;
    fill: none !important;
}

/* Account Page Layout */
#account.account-page {
    padding: 8px 40px 40px;
}

#account .account-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
    align-items: start;
}

#account .account-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

#account .account-nav-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#account .account-nav-title {
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 600;
    margin-bottom: 6px;
}

#account .account-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

#account .account-nav-link:hover {
    background: #f1f5f9;
    color: #1f2937;
}

#account .account-nav-link.active {
    background: #eef2ff;
    color: #1d4ed8;
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.15);
}

#account .account-nav-link--external {
    text-decoration: none;
}

#account .account-nav-external {
    width: 14px;
    height: 14px;
    margin-left: auto;
    flex-shrink: 0;
}

#account .account-nav-icon {
    width: 16px;
    height: 16px;
    color: #64748b;
    flex-shrink: 0;
}

#account .account-nav-link.active .account-nav-icon {
    color: #1d4ed8;
}

#account .account-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

#account .account-section {
    display: none;
}

#account .account-section.active {
    display: block;
}

#account .account-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

#account .account-section-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
}

#account .account-section-header p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 14px;
}

#account .account-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

#account .account-card-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

#account .account-show-all-btn {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: none;
}

#account .account-list-scroll {
    max-height: 320px;
    overflow-y: auto;
    padding-right: 6px;
}

#account .account-list-scroll.is-expanded {
    max-height: none;
    overflow: visible;
    padding-right: 0;
}

#account .account-recurring-count {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

#account .account-recurring-count span:last-child {
    padding: 4px 10px;
    border-radius: 999px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

#account .account-subscription-item {
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #ffffff;
}

#account .account-subscription-item + .account-subscription-item {
    margin-top: 12px;
}

#account .account-subscription-title {
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 4px;
}

#account .account-subscription-meta {
    font-size: 13px;
    color: #64748b;
}

#account .account-subscription-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

#account .account-subscription-cancel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #0f172a;
}

#account .account-subscription-cancel:hover {
    background: #f1f5f9;
}

#account .account-card + .account-card {
    margin-top: 20px;
}

#account .account-card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

#account .account-card--highlight {
    background: #f8fafc;
    border-color: #e2e8f0;
}

#account .account-card--danger {
    border-color: #fecaca;
    background: #fff1f2;
}

#account .account-score-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    font-weight: 600;
}

#account .account-score-value {
    font-size: 18px;
    font-weight: 700;
    color: #ef4444;
}

#account .account-card-subtitle {
    color: #64748b;
    margin: 6px 0 0;
    font-size: 13px;
}

#account .account-profile-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

#account .account-profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f59e0b;
    color: #ffffff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

#account .account-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#account .account-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 18px;
}

#account .account-form-span {
    grid-column: span 2;
}

#account .account-note {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #94a3b8;
}

#account .account-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 4px;
}

#account .account-actions-left {
    justify-content: flex-start;
}

#account .account-toggle-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

#account .account-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

#account .account-toggle-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#account .account-toggle-title {
    font-weight: 600;
    color: #0f172a;
    font-size: 14px;
}

#account .account-toggle-sub {
    color: #64748b;
    font-size: 12px;
}

#account .account-live-badge {
    background: #dcfce7;
    color: #16a34a;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

#account .account-metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

#account .account-metric-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

#account .account-metric-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
    font-weight: 600;
}

#account .account-metric-value {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
}

#account .account-filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

#account .account-filter-input {
    flex: 1;
}

#account .account-filter-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

#account .account-view-all {
    text-align: right;
    margin-top: 12px;
}

#account .account-view-all a {
    color: #2563eb;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

#account .account-metric-grid--invoices {
    margin-bottom: 18px;
}

#account .account-metric-card--invoices {
    justify-content: flex-start;
    gap: 14px;
    padding: 18px;
}

#account .account-metric-card--invoices .account-metric-value {
    font-size: 22px;
}

#account .account-metric-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#account .account-metric-icon svg {
    width: 18px;
    height: 18px;
}

#account .account-metric-icon--blue {
    background: #e0f2fe;
    color: #2563eb;
}

#account .account-metric-icon--green {
    background: #dcfce7;
    color: #16a34a;
}

#account .account-metric-icon--amber {
    background: #fef3c7;
    color: #d97706;
}

#account .account-metric-icon--red {
    background: #fee2e2;
    color: #dc2626;
}

#account .account-invoices-filters-card {
    margin-bottom: 20px;
}

#account .account-invoices-filters {
    display: grid;
    grid-template-columns: minmax(240px, 1.6fr) 180px 170px auto;
    gap: 12px;
    align-items: center;
    margin-top: 12px;
}

#account .account-input-with-icon {
    position: relative;
}

#account .account-input-with-icon .account-input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
}

#account .account-input-with-icon .account-input-icon svg {
    width: 16px;
    height: 16px;
}

#account .account-input-with-icon .form-control {
    padding-left: 38px;
}

#account .account-invoices-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

#account .account-invoices-title-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
}

#account .account-invoices-title-icon svg {
    width: 18px;
    height: 18px;
}

#account .account-view-all-link {
    color: #2563eb;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

#account .account-view-all-link:hover {
    text-decoration: underline;
}

#account .account-invoices-list {
    margin-top: 14px;
}

#account .account-invoices-list .dash-invoices-scroll {
    max-height: 320px;
    overflow-y: auto;
    padding-right: 6px;
}

#account .account-empty-state {
    text-align: center;
    padding: 24px;
    color: #64748b;
    font-size: 14px;
}

#account .account-invoices-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
}

#account .account-invoices-summary {
    color: #64748b;
    font-size: 13px;
}

#account .account-invoices-pagination-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

#account .account-pagination {
    display: flex;
    align-items: center;
    gap: 6px;
}

#account .account-pagination-btn {
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #0f172a;
    border-radius: 10px;
    padding: 6px 10px;
    min-width: 32px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

#account .account-pagination-btn.is-active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

#account .account-pagination-btn.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#account .account-pagination-ellipsis {
    color: #94a3b8;
    font-size: 13px;
}

#account .account-code-block {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 12px;
    color: #0f172a;
    word-break: break-all;
}

#account .account-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

#account .account-input-group .form-control {
    flex: 1;
}

#account .account-validate-btn {
    white-space: nowrap;
    padding: 8px 14px;
}

#account .account-password-reqs {
    margin-top: 16px;
    font-size: 12px;
    color: #64748b;
}

#account .account-password-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.9fr);
    gap: 24px;
    align-items: start;
    margin-top: 12px;
}

#account .account-password-layout .account-form {
    margin: 0;
}

#account .account-password-layout .password-input-wrapper,
#account .account-password-layout .form-control {
    width: 100%;
}

#account .account-password-reqs {
    margin-top: 0;
    padding: 16px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

#account .account-password-reqs p {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
}

#account .account-password-reqs ul {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 6px;
}

#account .account-password-reqs li {
    line-height: 1.35;
}

#account .account-password-reqs ul {
    margin: 8px 0 0;
    padding-left: 18px;
}

@media (max-width: 1100px) {
    #account .account-layout {
        grid-template-columns: 1fr;
    }
    #account .account-invoices-filters {
        grid-template-columns: 1fr;
    }
    #account .account-invoices-pagination {
        flex-direction: column;
        align-items: flex-start;
    }
    #account .account-invoices-pagination-controls {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }
    #account .account-password-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    #account.account-page {
        padding: 8px 24px 32px;
    }
}

@media (max-width: 900px) {
    #account .account-form-grid {
        grid-template-columns: 1fr;
    }
    #account .account-form-span {
        grid-column: span 1;
    }
    #account .account-toggle-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    #account .account-filters {
        flex-direction: column;
        align-items: stretch;
    }
    #account .account-filter-actions {
        justify-content: flex-end;
        width: 100%;
    }
    #account .account-card-header-row {
        flex-direction: column;
        align-items: flex-start;
    }
    #account .account-actions {
        flex-direction: column;
        align-items: stretch;
    }
}


