/* ═══════════════════════════════════════════
   xFeed Bot V2 — Common Styles
   Shared reset, typography, utilities
   ═══════════════════════════════════════════ */

/* ─── Reset ────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ─── Layout Variables ─────────────────── */
:root {
    --sidebar-width: 260px;
    --header-height: 60px;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition-fast: 0.15s ease;
    --transition: 0.2s ease;
    --transition-slow: 0.3s ease;
}

/* ─── Base ─────────────────────────────── */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
    transition: background-color var(--transition), color var(--transition);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ─── Scrollbar ────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ─── Typography ───────────────────────── */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.25rem;
}

h4 {
    font-size: 1.125rem;
}

.accent {
    color: var(--accent);
}

/* ─── Buttons ──────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
}

.btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.btn-primary {
    background: var(--gradient-accent);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
}

.btn-success {
    background: var(--gradient-success);
    color: white;
}

.btn-success:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--danger-light);
    color: var(--danger);
    border: 1px solid transparent;
}

.btn-danger:hover {
    background: var(--danger);
    color: white;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px;
    border-radius: var(--radius-sm);
}

.btn-ghost:hover {
    background: var(--accent-light);
    color: var(--accent);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: var(--radius);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn:active {
    transform: scale(0.98);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ─── Form Elements ────────────────────── */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 14px;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.form-input-sm,
.form-select-sm {
    padding: 8px 12px;
    font-size: 13px;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ─── Cards ────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: var(--glass-blur);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.card:hover {
    border-color: var(--border-light);
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.card-body {
    padding: 20px 24px;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
}

/* ─── Badges ───────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.badge-success {
    background: var(--success-light);
    color: var(--success);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning);
}

.badge-info {
    background: var(--info-light);
    color: var(--info);
}

.badge-accent {
    background: var(--accent-light);
    color: var(--accent);
}

.badge-neutral {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-secondary);
}

/* ─── Tables ───────────────────────────── */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.data-table th {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--bg-input);
}

.data-table tr:hover td {
    background: var(--bg-card-hover);
}

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

/* ─── Modal ────────────────────────────── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.modal {
    background: var(--bg-card-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color var(--transition);
}

.modal-close:hover {
    color: var(--danger);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ─── Toast Notifications ──────────────── */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    animation: slideInRight 0.3s ease;
    min-width: 280px;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast-success {
    background: var(--success);
    color: white;
}

.toast-error {
    background: var(--danger);
    color: white;
}

.toast-info {
    background: var(--info);
    color: white;
}

.toast-warning {
    background: var(--warning);
    color: white;
}

.toast.removing {
    animation: slideOutRight 0.3s ease forwards;
}

/* ─── Loading ──────────────────────────── */
.loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ─── Empty State ──────────────────────── */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 14px;
}

.empty-state svg {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    color: var(--text-muted);
    opacity: 0.5;
}

/* ─── Stat Cards ───────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    padding: 24px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-glass);
    pointer-events: none;
}

.gradient-blue {
    background: var(--gradient-blue);
}

.gradient-green {
    background: var(--gradient-success);
}

.gradient-purple {
    background: var(--gradient-purple);
}

.gradient-orange {
    background: var(--gradient-orange);
}

.stat-icon svg {
    width: 32px;
    height: 32px;
    color: rgba(255, 255, 255, 0.9);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 28px;
    font-weight: 800;
    color: white;
    line-height: 1.1;
}

.stat-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    margin-top: 2px;
}

/* ─── Pagination ───────────────────────── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.pagination button {
    padding: 8px 14px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition);
}

.pagination button:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.pagination button.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* ─── Toggle Switch ────────────────────── */
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--text-muted);
    border-radius: var(--radius-full);
    transition: var(--transition);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: var(--transition);
}

.toggle-switch input:checked+.toggle-slider {
    background: var(--accent);
}

.toggle-switch input:checked+.toggle-slider::before {
    transform: translateX(20px);
}

/* ─── Theme Toggle Button ──────────────── */
.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

/* ─── Language Selector ────────────────── */
.lang-selector {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 4px;
}

.lang-btn {
    padding: 4px 10px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    background: transparent;
    color: var(--text-secondary);
}

.lang-btn.active {
    background: var(--accent);
    color: white;
}

.lang-btn:hover:not(.active) {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

/* ─── Utility Classes ──────────────────── */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--text-muted);
}

.text-secondary {
    color: var(--text-secondary);
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.text-warning {
    color: var(--warning);
}

.text-accent {
    color: var(--accent);
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-8 {
    gap: 8px;
}

.gap-12 {
    gap: 12px;
}

.gap-16 {
    gap: 16px;
}

.gap-24 {
    gap: 24px;
}

.mt-8 {
    margin-top: 8px;
}

.mt-16 {
    margin-top: 16px;
}

.mt-24 {
    margin-top: 24px;
}

.mb-8 {
    margin-bottom: 8px;
}

.mb-16 {
    margin-bottom: 16px;
}

.mb-24 {
    margin-bottom: 24px;
}

.w-full {
    width: 100%;
}

.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ─── Animations ───────────────────────── */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(0.85);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* ─── Info Banner (Help Text) ─────────── */
.info-banner {
    background: var(--bg-input, #f0f4ff);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent, #6366f1);
    border-radius: var(--radius-sm, 8px);
    margin-bottom: 20px;
    overflow: hidden;
    transition: border-color var(--transition);
}

.info-banner:hover {
    border-left-color: var(--accent-hover, #4f46e5);
}

.info-banner-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    user-select: none;
    gap: 12px;
}

.info-banner-toggle:hover {
    background: rgba(99, 102, 241, 0.04);
}

.info-banner-arrow {
    font-size: 12px;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.info-banner.collapsed .info-banner-arrow {
    transform: rotate(-90deg);
}

.info-banner-body {
    padding: 0 18px 16px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-secondary);
    max-height: 300px;
    transition: max-height 0.35s ease, padding 0.35s ease, opacity 0.25s ease;
    opacity: 1;
}

.info-banner.collapsed .info-banner-body {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
}

.info-banner-body strong {
    color: var(--accent, #6366f1);
    font-weight: 700;
}

/* ─── Responsive Base ──────────────────── */
@media (max-width: 768px) {
    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    h3 {
        font-size: 1.125rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-number {
        font-size: 22px;
    }

    .card-header,
    .card-body {
        padding: 16px;
    }

    .btn-lg {
        padding: 12px 20px;
        font-size: 14px;
    }

    .modal {
        max-width: 100%;
        margin: 10px;
    }

    .toast {
        min-width: auto;
        max-width: calc(100vw - 40px);
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ─── Tweet View Link ──────────────────── */
.btn-tweet-link {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-tweet-link:hover {
    color: #fff;
    background: #000;
    border-color: #000;
}

[data-theme="dark"] .btn-tweet-link:hover {
    background: #e7e9ea;
    color: #0f1419;
    border-color: #e7e9ea;
}

/* ═══════════════════════════════════════════
   Plan Hero Card — Subscription Page
   ═══════════════════════════════════════════ */

.plan-hero-card {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    position: relative;
}

.plan-hero-accent {
    height: 4px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #a855f7, #d946ef);
    background-size: 200% 100%;
    animation: shimmer 3s ease infinite;
}

.plan-hero-accent.free {
    background: linear-gradient(90deg, #64748b, #94a3b8, #64748b);
    background-size: 200% 100%;
    animation: shimmer 3s ease infinite;
}

@keyframes shimmer {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.plan-hero-body {
    padding: 28px;
}

.plan-hero-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.plan-hero-name {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.plan-hero-name.free {
    background: linear-gradient(135deg, #64748b, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.plan-hero-price {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 4px;
}

.plan-hero-price span {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    margin-left: 4px;
}

.plan-hero-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.plan-hero-remaining {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.plan-hero-remaining.urgent {
    color: var(--danger, #ef4444);
    animation: pulse 2s ease infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

.plan-hero-expires {
    font-size: 13px;
    color: var(--text-muted);
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

/* ─── Features Title ───────────────────── */
.plan-features-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent, #6366f1);
    margin: 18px 0 14px;
}

.plan-features-title.free-label {
    color: var(--text-secondary);
}

.plan-features-title svg {
    flex-shrink: 0;
}

/* ─── Features Grid ────────────────────── */
.plan-features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.plan-feature-item {
    text-align: center;
    padding: 16px 8px;
    background: var(--bg-input, #f8fafc);
    border-radius: var(--radius-sm, 8px);
    border: 1px solid var(--border);
    transition: transform var(--transition), border-color var(--transition);
}

.plan-feature-item:hover {
    transform: translateY(-2px);
    border-color: var(--accent, #6366f1);
}

.plan-feature-icon {
    font-size: 20px;
    margin-bottom: 6px;
}

.plan-feature-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--accent, #6366f1);
    line-height: 1.1;
}

.plan-free-tier .plan-feature-value {
    color: var(--text-secondary);
}

.plan-feature-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-top: 4px;
}

/* ─── Plan Selection Cards ─────────────── */
.plan-select-card {
    padding: 24px;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 2px solid var(--border);
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.plan-select-card:hover {
    border-color: var(--accent, #6366f1);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.plan-select-card.featured {
    border-color: var(--accent, #6366f1);
}

.plan-select-popular {
    position: absolute;
    top: 12px;
    right: -28px;
    background: var(--gradient-accent, linear-gradient(135deg, #6366f1, #8b5cf6));
    color: white;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 32px;
    transform: rotate(45deg);
    letter-spacing: 0.05em;
}

.plan-select-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.plan-select-price {
    font-size: 30px;
    font-weight: 800;
    color: var(--accent, #6366f1);
    margin: 12px 0;
}

.plan-select-price span {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
}

.plan-select-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.plan-select-features div {
    display: flex;
    align-items: center;
    gap: 4px;
}

.plan-select-features strong {
    color: var(--text-primary);
}

/* ─── Plan Select Grid (for JS) ────────── */
.plan-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

/* ─── Responsive ───────────────────────── */
@media (max-width: 768px) {
    .plan-hero-top {
        flex-direction: column;
    }

    .plan-hero-status {
        flex-direction: row;
        align-items: center;
    }

    .plan-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .plan-hero-body {
        padding: 20px;
    }

    .plan-hero-name {
        font-size: 20px;
    }

    .plan-hero-price {
        font-size: 24px;
    }

    .plan-select-features {
        grid-template-columns: 1fr;
    }

    .monitor-grid,
    .topics-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

@media (max-width: 480px) {

    /* Data tables: compact for mobile */
    .data-table thead th {
        padding: 10px 12px;
        font-size: 11px;
        letter-spacing: 0.3px;
    }

    .data-table tbody td {
        padding: 10px 12px;
        font-size: 13px;
    }

    /* Grids: single column on small phones */
    .monitor-grid,
    .topics-grid,
    .plan-select-grid {
        grid-template-columns: 1fr;
    }

    .plan-select-features {
        grid-template-columns: 1fr;
    }

    /* Plan feature items: smaller on mobile */
    .plan-feature-value {
        font-size: 22px;
    }

    .plan-feature-item {
        padding: 12px 6px;
    }

    /* Plan select cards: smaller price */
    .plan-select-price {
        font-size: 24px;
    }
}