:root {
    --bg-main: #090B0E;
    --bg-surface: #11141B;
    --bg-surface-elevated: #161B24;
    --bg-sidebar: #0C0F15;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-hover: rgba(255, 255, 255, 0.16);
    
    --text-primary: #F3F4F6;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    
    --accent-primary: #38BDF8; /* Subtle Sky / Linear Accent */
    --accent-hover: #0EA5E9;
    --accent-glow: transparent;
    
    --purple: #94A3B8;
    --amber: #F59E0B;
    --emerald: #10B981;
    --coral: #EF4444;
    
    /* Standardized Spacing Scale */
    --space-xxs: 2px;
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 20px;
    --space-xl: 24px;
    --space-2xl: 32px;
    
    /* Standardized Radii */
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    
    /* Standardized Heights */
    --topbar-height: 72px;
    --control-height-sm: 30px;
    --control-height-md: 38px;
    --control-height-lg: 44px;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
    
    --transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

:root[data-theme="light"],
html[data-theme="light"] {
    --bg-main: #F8FAFC;
    --bg-surface: #FFFFFF;
    --bg-surface-elevated: #F1F5F9;
    --bg-sidebar: #FFFFFF;
    --border-color: rgba(0, 0, 0, 0.08);
    --border-color-hover: rgba(0, 0, 0, 0.16);
    
    --text-primary: #0F172A;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    line-height: 1.5;
}

/* App Layout */
.app-layout {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    flex-shrink: 0;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px 24px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.brand-logo {
    position: relative;
    width: 42px;
    height: 42px;
    background: transparent;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: inherit;
    display: block;
}

.sparkle-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    font-size: 11px;
    background: #F59E0B;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-text h2 {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.brand-text span {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: var(--transition);
}

.nav-item i {
    font-size: 15px;
    width: 20px;
    text-align: center;
    color: var(--text-muted);
    opacity: 0.85;
    transition: color 0.2s ease, opacity 0.2s ease, filter 0.2s ease;
}

.nav-item:hover {
    color: var(--text-primary);
    background-color: var(--bg-surface);
}

.nav-item:hover i {
    color: var(--text-primary);
    opacity: 1;
}

.nav-item.active {
    color: var(--text-primary);
    background-color: var(--bg-surface-elevated);
    border-left: 2px solid var(--accent-primary);
    font-weight: 600;
}

.nav-item.active i {
    color: var(--accent-primary);
    opacity: 1;
    filter: drop-shadow(0 0 6px var(--accent-glow));
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 5px;
    background: var(--bg-surface-elevated);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
}

.nav-item .badge {
    margin-left: auto;
}

.badge.ai-badge {
    background: rgba(29, 155, 240, 0.08);
    color: var(--accent-primary);
    border-color: rgba(29, 155, 240, 0.2);
    font-weight: 500;
}

.badge.alert,
.badge.warning {
    background: rgba(245, 158, 11, 0.08);
    color: #FBBF24;
    border-color: rgba(245, 158, 11, 0.2);
    font-weight: 500;
}

.badge.success {
    background: rgba(16, 185, 129, 0.08);
    color: #34D399;
    border-color: rgba(16, 185, 129, 0.2);
    font-weight: 500;
}

.badge.danger {
    background: rgba(239, 68, 68, 0.08);
    color: #F87171;
    border-color: rgba(239, 68, 68, 0.2);
    font-weight: 500;
}

.sidebar-footer {
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-status-theme-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background-color: var(--emerald);
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 10px var(--emerald);
}

.pulse-dot::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: inherit;
    border-radius: 50%;
    animation: ripple 1.8s infinite;
}

@keyframes ripple {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(2.6); opacity: 0; }
}

.status-info small {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
}

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

.theme-toggle-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: var(--bg-surface);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.theme-toggle-btn:hover {
    color: var(--text-primary);
    background: var(--bg-surface-elevated);
}

/* Main Content */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
    background-color: var(--bg-main);
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    height: var(--topbar-height);
    min-height: var(--topbar-height);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 9;
}

.topbar-title h1 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.2;
    margin: 0;
}

.topbar-title p {
    font-size: 12.5px;
    color: var(--text-secondary);
    margin: 2px 0 0 0;
    line-height: 1.3;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: var(--control-height-md);
    padding: 0 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    outline: none;
    transition: var(--transition);
    font-family: inherit;
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
    user-select: none;
    vertical-align: middle;
}

.btn i, .btn svg {
    font-size: 13px;
    line-height: 1;
    flex-shrink: 0;
}

.icon-x-original,
.icon-x-reply {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:hover .icon-x-original,
.btn:hover .icon-x-reply {
    transform: scale(1.08);
}

.btn-primary {
    background-color: #EDEDED;
    color: #0B0E14;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
    background-color: #FFFFFF;
    color: #000000;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

:root[data-theme="light"] .btn-primary,
html[data-theme="light"] .btn-primary {
    background-color: #18181B;
    color: #FFFFFF;
    border-color: #18181B;
}

:root[data-theme="light"] .btn-primary:hover,
html[data-theme="light"] .btn-primary:hover {
    background-color: #000000;
    color: #FFFFFF;
}

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

.btn-outline:hover {
    background-color: var(--bg-surface-elevated);
    color: var(--text-primary);
    border-color: var(--border-color-hover);
}

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

.btn-secondary:hover {
    background-color: var(--border-color-hover);
    border-color: rgba(255, 255, 255, 0.18);
}

.btn-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: #34D399;
    border: 1px solid rgba(16, 185, 129, 0.25);
    font-weight: 500;
}

.btn-success:hover {
    background-color: rgba(16, 185, 129, 0.18);
    color: #6EE7B7;
    border-color: rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: #F87171;
    border: 1px solid rgba(239, 68, 68, 0.25);
    font-weight: 500;
}

.btn-danger:hover {
    background-color: rgba(239, 68, 68, 0.18);
    color: #FCA5A5;
    border-color: rgba(239, 68, 68, 0.4);
}

.btn-sm {
    height: var(--control-height-sm);
    padding: 0 12px;
    font-size: 12px;
    gap: 6px;
    border-radius: var(--radius-sm);
}

.btn-sm i, .btn-sm svg {
    font-size: 11.5px;
}

.btn-lg {
    height: var(--control-height-lg);
    padding: 0 20px;
    font-size: 14px;
    gap: 10px;
    border-radius: var(--radius-md);
}

.btn-lg i, .btn-lg svg {
    font-size: 15px;
}

.w-100 { width: 100%; }

/* Content Body */
.content-body {
    padding: 28px 32px;
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
}

.view-section {
    display: none;
    animation: fadeIn 0.22s ease-out;
}

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

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

/* Cards */
.card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    min-height: 56px;
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.card-title i, .card-title svg {
    color: var(--text-secondary);
    font-size: 15px;
    width: 18px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-title h3 {
    font-size: 15.5px;
    font-weight: 600;
    margin: 0;
    line-height: 1.25;
}

.card-body {
    padding: 20px;
    flex: 1 1 auto;
}

.card-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

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

.stat-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    min-height: 94px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}

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

.stat-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: var(--transition);
}

.stat-icon svg {
    display: block;
}

.stat-card:hover .stat-icon {
    color: var(--text-primary);
    border-color: var(--border-color-hover);
}

.icon-purple, .icon-blue, .icon-amber, .icon-emerald, .icon-cyan {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.code-pill {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    background: var(--bg-surface-elevated);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.stat-data {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.stat-data h3 {
    font-size: 12.5px;
    color: var(--text-secondary);
    font-weight: 500;
    margin: 0;
    line-height: 1.2;
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    margin: 3px 0 2px 0;
    color: var(--text-primary);
    line-height: 1.15;
}

.stat-subtext {
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.2;
}

/* Grid Layouts */
.two-columns-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: stretch;
}

/* Filters & Search */
.filter-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 16px 20px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    height: var(--control-height-md);
    padding: 0 14px;
    border-radius: var(--radius-md);
    flex-grow: 1;
    min-width: 280px;
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.search-box i {
    color: var(--text-secondary);
    font-size: 13px;
    flex-shrink: 0;
}

.search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    width: 100%;
    font-size: 13.5px;
    height: 100%;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.custom-select, .custom-input {
    height: var(--control-height-md);
    background-color: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0 12px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
    vertical-align: middle;
}

.custom-textarea {
    background-color: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
    line-height: 1.5;
}

.custom-select:focus, .custom-input:focus, .custom-textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

/* Tweet Feed & Cards */
.tweets-feed {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tweet-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px;
    transition: var(--transition);
    position: relative;
    box-shadow: var(--shadow-sm);
}

.tweet-card:hover {
    border-color: rgba(29, 155, 240, 0.4);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    transform: translateY(-2px);
}

.tweet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.tweet-author-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tweet-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-surface-elevated);
    border: 2px solid var(--border-color);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.tweet-author-names strong {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.tweet-author-names span {
    font-size: 13px;
    color: var(--text-secondary);
    margin-left: 4px;
}

.tweet-badge-category {
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 5px;
    background: var(--bg-surface-elevated);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.tweet-text {
    font-size: 15px;
    line-height: 1.65;
    margin-bottom: 18px;
    white-space: pre-line;
    color: var(--text-primary);
    word-break: break-word;
}

.tweet-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
    font-size: 12.5px;
    color: var(--text-secondary);
    gap: 12px;
}

.tweet-metrics {
    display: flex;
    align-items: center;
    gap: 18px;
}

.metric-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    font-size: 12px;
    color: var(--text-muted);
    transition: var(--transition);
    cursor: default;
    line-height: 1;
}

.metric-item i {
    color: var(--text-muted);
    font-size: 13px;
    transition: color 0.15s ease, transform 0.15s ease;
}

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

.metric-item:hover i {
    color: var(--text-primary);
}

.tweet-actions {
    display: flex;
    align-items: center;
}

.tweet-reply-controls {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.tweet-reply-controls select.custom-select {
    height: var(--control-height-sm);
    padding: 0 10px;
    font-size: 12px;
    background-color: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.tweet-reply-controls select.custom-select:hover,
.tweet-reply-controls select.custom-select:focus {
    border-color: var(--accent-primary);
}

.tweet-reply-controls .btn {
    white-space: nowrap;
    height: var(--control-height-sm);
    padding: 0 12px;
    font-size: 12px;
}

/* Copilot Layout */
.copilot-layout {
    display: grid;
    grid-template-columns: 480px 1fr;
    gap: 20px;
    align-items: start;
}

.writing-tips {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
}

.writing-tips h4 {
    font-size: 13px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.writing-tips ul {
    list-style: none;
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-left: 0;
    margin: 0;
}

.writing-tips li::before {
    content: "•";
    color: var(--accent-primary);
    margin-right: 6px;
    font-weight: bold;
}

/* Variations Cards */
.variation-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    margin-bottom: 16px;
    position: relative;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.variation-card:hover {
    border-color: var(--border-color-hover);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

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

.variation-tag {
    font-size: 10.5px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 4px;
    background: var(--bg-surface-elevated);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    line-height: 1.2;
}

.char-counter {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
    font-weight: 600;
    padding: 2px 8px;
    background: var(--bg-main);
    border-radius: 6px;
    border: 1px solid var(--border-color);
    line-height: 1.3;
}

.char-counter.safe { color: #34D399; }
.char-counter.warning { color: #FBBF24; }
.char-counter.exceeded { color: #F87171; }

.variation-content {
    font-size: 14.5px;
    line-height: 1.6;
    margin-bottom: 14px;
    white-space: pre-line;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid transparent;
    transition: var(--transition);
}

.variation-content:focus {
    background: var(--bg-main);
    border-color: var(--border-color-hover);
    outline: none;
}

.variation-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

/* Queue List */
.queue-header-banner {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.queue-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    gap: 20px;
}

.queue-filter-tabs {
    display: flex;
    background: var(--bg-surface-elevated);
    padding: 4px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    gap: 4px;
}

.tab-btn {
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 0 14px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
    white-space: nowrap;
}

.tab-btn.active {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.queue-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}

.queue-card.published { border-color: var(--border-color); }
.queue-card.rejected { border-color: var(--border-color); opacity: 0.6; }

.original-tweet-box {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.original-tweet-box strong {
    color: var(--text-primary);
    font-size: 14px;
}

.ai-reply-box {
    margin-bottom: 16px;
}

.ai-reply-box label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.reply-editable-textarea {
    width: 100%;
    background: var(--bg-main);
    border: 1px solid var(--border-color-hover);
    color: var(--text-primary);
    padding: 12px 14px;
    border-radius: var(--radius-md);
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

.reply-editable-textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

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

.custom-table th, .custom-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 12.5px;
    vertical-align: middle;
}

.custom-table th {
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.custom-table tr:hover td {
    background-color: var(--bg-surface-elevated);
}

/* Forms & Toggles */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0;
}

.input-with-prefix {
    display: flex;
    align-items: center;
    height: var(--control-height-md);
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0 12px;
    transition: var(--transition);
}

.input-with-prefix:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.input-with-prefix span {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 13.5px;
    margin-right: 4px;
}

.input-with-prefix input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 0;
    height: 100%;
    width: 100%;
    outline: none;
    font-size: 13.5px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.profile-add-form-modern {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profile-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
    align-items: stretch;
}

.form-hint {
    display: block;
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.3;
}

.profile-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    gap: 16px;
    flex-wrap: wrap;
}

.profile-form-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    max-width: 650px;
}

.profile-card-elevated {
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.profile-field-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 0 !important;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 110px;
    transition: var(--transition);
}

.profile-field-card:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.profile-field-card label {
    font-size: 12px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.profile-search-inline {
    position: relative;
    display: flex;
    align-items: center;
}

.profile-search-inline i {
    position: absolute;
    left: 10px;
    font-size: 11px;
    color: var(--text-secondary);
    pointer-events: none;
}

.profile-search-inline input {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 5px 10px 5px 28px;
    font-size: 12px;
    color: var(--text-primary);
    width: 170px;
    transition: var(--transition);
}

.profile-search-inline input:focus {
    width: 210px;
    border-color: var(--accent-primary);
    outline: none;
}

.btn-add-radar {
    padding: 8px 18px;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.btn-add-radar:hover {
    transform: translateY(-1px);
}

/* Switch Toggle */
.toggle-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--bg-surface-elevated);
    border: 1px solid var(--border-color-hover);
    transition: 0.2s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-muted);
    transition: 0.2s;
}

input:checked + .slider {
    background-color: var(--text-primary);
    border-color: var(--text-primary);
}

input:checked + .slider:before {
    transform: translateX(18px);
    background-color: var(--bg-main);
}

.slider.round {
    border-radius: 20px;
}

.slider.round:before {
    border-radius: 50%;
}

.divider {
    border: 0;
    height: 1px;
    background: var(--border-color);
    margin: 20px 0;
}

/* Utilities */
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-amber { color: var(--text-secondary); }
.text-emerald { color: #34D399; }
.text-purple { color: var(--text-secondary); }
.text-coral { color: #F87171; }
.text-blue { color: var(--text-secondary); }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 14px; }
.mt-4 { margin-top: 20px; }
.mb-4 { margin-bottom: 20px; }

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
}

.link-nav {
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
}

.toast {
    padding: 12px 18px;
    border-radius: var(--radius-md);
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.25s ease-out;
}

.toast.success { border-left: 4px solid var(--emerald); }
.toast.error { border-left: 4px solid var(--coral); }
.toast.info { border-left: 4px solid var(--accent-primary); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Configurações Globais */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    align-items: stretch;
}

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

.settings-card {
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
}

.settings-card .card-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    height: 100%;
}

.settings-feature-box {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 15px 18px;
    transition: var(--transition);
}

.settings-feature-box:hover {
    border-color: rgba(29, 155, 240, 0.35);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.settings-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    border-radius: 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.settings-credentials-section {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 15px 18px;
    transition: var(--transition);
}

.settings-credentials-section:hover {
    border-color: rgba(29, 155, 240, 0.3);
}

.settings-inputs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 600px) {
    .settings-inputs-grid {
        grid-template-columns: 1fr;
    }
}

/* Multi-Account Switcher no Painel Lateral (Sidebar Footer) */
.account-switcher-dropdown-wrap {
    position: relative;
    width: 100%;
}

.btn-account-switcher {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 10px;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.btn-account-switcher:hover {
    background: var(--bg-surface-elevated);
    border-color: var(--accent-primary);
    box-shadow: 0 2px 10px rgba(29, 155, 240, 0.15);
}

.account-switcher-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--border-color);
    background: var(--bg-surface-elevated);
    flex-shrink: 0;
}

.account-switcher-meta {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.2;
    flex-grow: 1;
    min-width: 0;
    overflow: hidden;
}

.account-switcher-handle {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-switcher-badge {
    font-size: 11px;
    color: var(--accent-primary);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-switcher-chevron {
    font-size: 13px;
    color: var(--text-muted);
    margin-left: auto;
    transition: var(--transition);
    flex-shrink: 0;
}

.account-switcher-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    width: 100%;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    display: none;
    flex-direction: column;
    overflow: visible;
    animation: zoomIn 0.18s ease-out;
}

.account-switcher-menu.show {
    display: flex;
}

.account-switcher-menu-header {
    padding: 10px 14px 6px;
    border-bottom: 1px solid var(--border-color);
}

.account-switcher-list {
    max-height: 220px;
    overflow-y: auto;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.account-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    width: 100%;
}

.account-menu-item:hover {
    background: var(--bg-surface);
    border-color: var(--border-color);
}

.account-menu-item.active {
    background: var(--bg-surface-elevated);
    border-color: var(--border-color-hover);
}

.account-switcher-footer {
    padding: 6px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-surface);
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.btn-menu-action {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    font-size: 11.5px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    width: 100%;
}

.btn-menu-action:hover {
    background: var(--bg-surface-elevated);
    color: var(--accent-primary);
}

/* Submenus em cascata (Flyout ao passar o mouse) */
.menu-flyout-wrap {
    position: relative;
    width: 100%;
}

.btn-menu-flyout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.flyout-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.flyout-arrow {
    font-size: 10px;
    color: var(--text-muted);
    transition: transform 0.2s ease, color 0.2s ease;
}

.menu-flyout-wrap:hover .flyout-arrow {
    transform: translateX(2px);
    color: var(--accent-primary);
}

.menu-flyout-submenu {
    position: absolute;
    left: calc(100% + 8px);
    bottom: -6px;
    min-width: 220px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    padding: 6px;
    display: none;
    flex-direction: column;
    gap: 3px;
    z-index: 1010;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    transform: translateX(-4px);
}

/* Exibir ao passar o mouse */
.menu-flyout-wrap:hover .menu-flyout-submenu,
.menu-flyout-submenu:hover {
    display: flex;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.submenu-header {
    padding: 6px 10px 4px;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 3px;
}

.submenu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    font-size: 11.5px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.submenu-item:hover {
    background: var(--bg-surface);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.submenu-item.active {
    background: var(--bg-surface-elevated);
    border-color: var(--border-color-hover);
    color: var(--text-primary);
}

.submenu-item .check-indicator {
    margin-left: auto;
    font-size: 11px;
    color: var(--text-primary);
    opacity: 0;
    transition: opacity 0.15s ease;
}

.submenu-item.active .check-indicator {
    opacity: 1;
}

.pulse-dot-sm {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--emerald);
    box-shadow: 0 0 6px var(--emerald);
    flex-shrink: 0;
}

.btn-menu-action:hover {
    background: var(--bg-surface-elevated);
}

@media (max-width: 1024px) {
    .copilot-layout {
        grid-template-columns: 1fr;
    }
    .two-columns-grid {
        grid-template-columns: 1fr;
    }
    .profile-form-grid {
        grid-template-columns: 1fr;
    }
    .profile-form-footer {
        flex-direction: column;
        align-items: stretch;
    }
    .profile-form-info {
        max-width: 100%;
    }
    .btn-add-radar {
        width: 100%;
    }
}

/* Modal de Personalidades & Memórias */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.custom-modal.show {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-dialog {
    position: relative;
    width: 90%;
    max-width: 760px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    z-index: 2;
    animation: zoomIn 0.22s ease-out;
}

.modal-dialog .modal-content {
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    overflow: hidden;
    margin-bottom: 0;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header {
    height: 64px;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    background: var(--bg-surface);
}

.modal-footer {
    height: 60px;
    min-height: 60px;
    padding: 0 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
    background: var(--bg-surface-elevated);
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
}

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

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1 1 auto;
}

.modal-dialog-md {
    max-width: 580px !important;
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.btn-close-modal:hover {
    color: var(--text-primary);
    background: var(--bg-surface-elevated);
}

.category-card-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    margin-bottom: 6px;
}

.category-card-header label {
    margin-bottom: 0 !important;
    font-size: 12.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-manage-categories-link {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--accent-primary);
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    transition: var(--transition);
}

.btn-manage-categories-link:hover {
    background: rgba(29, 155, 240, 0.1);
    border-color: var(--accent-primary);
}

.modal-header-category {
    padding: 0 24px;
}

.category-header-title-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}

.category-modal-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: var(--radius-sm);
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.category-modal-icon i {
    color: var(--text-secondary);
}

.category-header-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

.category-modal-heading {
    margin: 0;
    font-size: 15.5px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-primary);
}

.category-modal-subheading {
    font-size: 12px;
    line-height: 1.35;
    color: var(--text-secondary);
}

.modal-dialog-lg {
    max-width: 880px !important;
    width: 92% !important;
}

.category-modal-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
    align-items: stretch;
}

@media (max-width: 768px) {
    .category-modal-layout {
        grid-template-columns: 1fr;
    }
}

.category-form-box {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.category-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 14px;
}

.category-color-picker-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-color-picker {
    width: 36px;
    height: 30px;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: transparent;
}

.category-color-code {
    font-size: 11.5px;
    font-family: monospace;
    color: var(--text-secondary);
    margin-left: 6px;
}

.color-presets-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.color-preset-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}

.color-preset-dot:hover {
    transform: scale(1.15);
    border-color: #fff;
}

.category-modal-list-pane {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.categories-list-scroll {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 330px;
    overflow-y: auto;
    padding-right: 4px;
}

.category-row-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.category-row-item:hover {
    border-color: rgba(29, 155, 240, 0.4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.category-row-info {
    min-width: 0;
    flex: 1 1 auto;
}

.category-row-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.category-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
}

.category-row-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* ===================================================
   MODAL: GERENCIAR CONTAS DO X (X-ACCOUNTS MANAGER)
   =================================================== */

.x-account-modal-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: var(--radius-sm);
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    box-shadow: none;
}

.x-account-modal-icon i {
    color: var(--text-primary);
}

.x-account-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.x-account-items-scroll {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 4px;
}

.x-account-row-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.x-account-row-item:hover {
    border-color: var(--border-color-hover);
    background: var(--bg-surface-elevated);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.x-account-row-item.is-active {
    border-color: rgba(255, 255, 255, 0.2);
    background: var(--bg-surface-elevated);
}

.x-account-row-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex-grow: 1;
}

.x-account-avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    background: var(--bg-surface-elevated);
    flex-shrink: 0;
}

.x-account-row-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex-grow: 1;
    gap: 2px;
}

.x-account-row-top {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.x-account-row-handle {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.x-account-row-name {
    font-size: 11.5px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.x-account-active-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-surface-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 10.5px;
    font-weight: 500;
    padding: 2px 7px;
    flex-shrink: 0;
}

.x-account-row-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.btn-account-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 30px;
    padding: 0 9px;
    font-size: 11.5px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 1px solid var(--border-color);
    background: var(--bg-surface-elevated);
    color: var(--text-primary);
    transition: var(--transition);
}

.btn-account-action:hover {
    background: var(--bg-surface);
    border-color: var(--border-color-hover);
    color: var(--text-primary);
}

.btn-account-action.btn-delete:hover {
    border-color: rgba(239, 68, 68, 0.4);
    color: #F87171;
    background: rgba(239, 68, 68, 0.1);
}

.btn-account-action.btn-use {
    background: var(--bg-surface-elevated);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-account-action.btn-use:hover {
    background: var(--border-color-hover);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.x-account-modal-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    background: var(--bg-surface-elevated);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.persona-modal-tabs {
    display: flex;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    padding: 4px;
    border-radius: var(--radius-md);
    gap: 6px;
}

.persona-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 14px;
    transition: var(--transition);
}

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

.persona-card.active-default {
    border-color: rgba(255, 255, 255, 0.18);
    background: var(--bg-surface);
}

.persona-active-badge {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 14px;
}

.persona-memory-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    margin-top: 6px;
    font-size: 12.5px;
}

.persona-memory-chip button {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

.persona-memory-chip button:hover {
    color: var(--coral);
}

/* Copilot Editor Enhancements */
.copilot-editor-wrapper {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

.copilot-editor-wrapper:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.copilot-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
}

.copilot-textarea {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    width: 100%;
    resize: vertical;
    min-height: 110px;
    font-size: 13.5px;
    line-height: 1.55;
    padding: 10px 12px;
}

/* Media Box & Tabs */
.copilot-media-box {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 14px;
}

.media-tabs-pills {
    display: flex;
    gap: 6px;
    background: var(--bg-main);
    padding: 4px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.media-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 11.5px;
    font-weight: 600;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

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

.media-tab-btn.active {
    background: var(--bg-surface);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.media-subpanel {
    margin-top: 10px;
}

.copilot-link-wrapper {
    position: relative;
}

.copilot-link-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.copilot-link-icon {
    position: absolute;
    left: 12px;
    color: var(--text-secondary);
    font-size: 13px;
    pointer-events: none;
}

.copilot-link-field:focus + .copilot-link-icon,
.copilot-link-input-group:focus-within .copilot-link-icon {
    color: var(--accent-primary);
}

.copilot-body-modern {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.copilot-section-box {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: var(--transition);
    margin-top: 0 !important;
}

.copilot-section-box:focus-within {
    border-color: var(--border-color-hover);
}

.copilot-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
}

.copilot-step-badge {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    flex-shrink: 0;
}

.copilot-section-content {
    display: flex;
    flex-direction: column;
}

/* Length Presets Grid */
.length-presets-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.length-preset-btn {
    height: 34px;
    font-size: 11.5px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.length-preset-btn.active {
    background: var(--bg-surface);
    border-color: var(--border-color-hover);
    color: var(--text-primary);
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Range Inputs */
.copilot-range-inputs {
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0 14px;
    margin-top: 4px;
}

.range-input-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.range-label {
    font-size: 11.5px;
    color: var(--text-secondary);
    font-weight: 600;
}

.range-input {
    width: 70px !important;
    font-size: 12px !important;
    padding: 0 4px !important;
    text-align: center;
    height: 26px !important;
}

.range-unit {
    font-size: 11px;
    color: var(--text-secondary);
}

.range-divider {
    font-size: 11px;
    color: var(--text-secondary);
}

.btn-generate-copilot-main {
    height: var(--control-height-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.1px;
    transition: var(--transition);
}

.btn-generate-copilot-main:hover {
    transform: translateY(-1px);
}

.media-ai-expanded-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.media-ai-instructions-banner {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
}

.media-style-chips-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.style-chip {
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 11.5px;
    padding: 0 12px;
    border-radius: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.style-chip:hover {
    border-color: var(--border-color-hover);
    color: var(--text-primary);
}

.style-chip.active {
    background: var(--bg-surface-elevated);
    border-color: var(--border-color-hover);
    color: var(--text-primary);
    font-weight: 600;
}

.upload-dropzone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    cursor: pointer;
    background: var(--bg-main);
    transition: var(--transition);
}

.upload-dropzone:hover {
    border-color: var(--accent-primary);
    background: rgba(29, 155, 240, 0.05);
}

.media-preview-container {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px;
}

.media-preview-box {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.media-preview-box img,
.media-preview-box video {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    display: block;
}

.media-preview-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 4px 2px 4px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Variation Media Attachment Badge */
.variation-media-preview {
    margin-top: 10px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    max-height: 160px;
    position: relative;
    border: 1px solid var(--border-color);
}

.variation-media-preview img,
.variation-media-preview video {
    width: 100%;
    max-height: 160px;
    object-fit: cover;
    display: block;
}

/* ==========================================================================
   Skeleton Screens (Carregamento Fluido de Interface)
   ========================================================================== */
.skeleton {
    background: linear-gradient(90deg, var(--bg-hover) 25%, var(--bg-surface) 37%, var(--bg-hover) 63%);
    background-size: 400% 100%;
    animation: skeleton-loading 1.4s ease infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

.skeleton-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
}

.skeleton-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-line {
    height: 12px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.skeleton-line.short {
    width: 40%;
}

.skeleton-line.medium {
    width: 70%;
}

.skeleton-line.full {
    width: 100%;
}

/* ==========================================================================
   Radar de Comentários & Árvore Hierárquica (Design Minimalista / Linear)
   ========================================================================== */

.thread-tweet-card {
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.thread-expand-chevron {
    transition: transform 0.2s ease-in-out;
}

.thread-tree-wrapper {
    animation: fadeIn 0.2s ease-out;
}

.thread-nodes-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

/* Estrutura e Guias da Árvore Hierárquica */
.thread-children-branch {
    position: relative;
    padding-left: 20px;
    margin-left: 12px;
    border-left: 1.5px solid var(--border-color);
}

.thread-node {
    position: relative;
}

.thread-node.from-me .comment-bubble {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.02);
}

.comment-bubble {
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition-fast);
}

.comment-bubble:hover {
    border-color: var(--border-color-hover);
}

.comment-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.reply-input-box-wrap {
    animation: fadeIn 0.15s ease-out;
}

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

.history-item-bubble {
    border: 1px solid var(--border-color);
    background: var(--bg-surface-elevated);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 10px;
}

.history-item-bubble.is-root {
    border-left: 3px solid var(--text-muted);
}

.history-item-bubble.is-me {
    border-left: 3px solid var(--accent-primary);
    background: rgba(255, 255, 255, 0.02);
}

.history-item-bubble.is-current-target {
    border-left: 3px solid #38bdf8;
    background: rgba(56, 189, 248, 0.04);
}

.my-comment-quote-preview {
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--accent-primary);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
}




/* ==========================================================================
   Stripe Billing & Pricing Plans Modal
   ========================================================================== */

/* Topbar Plan Indicator & CTA */
.user-plan-topbar-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-plan-current-tag {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color, #2e2e38);
    color: var(--text-secondary, #94a3b8);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: var(--radius-full, 9999px);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.btn-upgrade-action {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.25) 0%, rgba(245, 158, 11, 0.25) 100%);
    border: 1px solid rgba(245, 158, 11, 0.45);
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: var(--radius-full, 9999px);
    cursor: pointer;
    transition: var(--transition, all 0.2s ease);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.btn-upgrade-action:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.4) 0%, rgba(245, 158, 11, 0.4) 100%);
    border-color: #f59e0b;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.35);
    transform: translateY(-1px);
}

.btn-upgrade-action.is-active-subscriber {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
}

.btn-upgrade-action.is-active-subscriber:hover {
    background: rgba(16, 185, 129, 0.22);
    border-color: #10b981;
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.3);
}

.btn-upgrade-pill {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 13px;
    padding: 6px 14px;
    border-radius: var(--radius-full, 9999px);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: var(--transition, all 0.2s ease);
}

.btn-upgrade-pill:hover {
    background: rgba(245, 158, 11, 0.16);
    border-color: rgba(245, 158, 11, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

.btn-upgrade-pill.plan-pro {
    background: rgba(168, 85, 247, 0.1);
    border-color: rgba(168, 85, 247, 0.4);
    color: #c084fc;
}

.btn-upgrade-pill.plan-agency {
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.4);
    color: #38bdf8;
}

/* Grace Period Alert Banner */
.billing-grace-alert {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: var(--radius-md, 8px);
    padding: 12px 18px;
    margin: 12px 24px 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: #fde68a;
    font-size: 13.5px;
    animation: fadeIn 0.3s ease-out;
}

.billing-grace-alert .grace-alert-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.billing-grace-alert .grace-alert-content i {
    font-size: 18px;
    color: #f59e0b;
}

/* Modal Dialog */
.modal-billing-dialog {
    max-width: 980px !important;
    width: 95% !important;
}

.modal-billing-dialog .modal-content {
    background: var(--bg-surface-elevated, #18181b);
    border: 1px solid var(--border-color);
}

.pricing-plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 15px;
    margin-bottom: 20px;
}

@media (max-width: 860px) {
    .pricing-plans-grid {
        grid-template-columns: 1fr;
    }
}

.pricing-plan-card {
    background: var(--bg-surface, #1e1e24);
    border: 1px solid var(--border-color, #2e2e38);
    border-radius: var(--radius-lg, 12px);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: var(--transition, all 0.2s ease);
}

.pricing-plan-card:hover {
    border-color: var(--border-color-hover, #444);
    transform: translateY(-2px);
}

.pricing-plan-card.featured {
    border-color: #8b5cf6;
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.08) 0%, var(--bg-surface, #1e1e24) 100%);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.15);
}

.pricing-plan-card.is-current {
    border-color: #10b981;
}

.popular-ribbon {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    background: #8b5cf6;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 12px;
    border-radius: 9999px;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
}

.plan-card-header {
    text-align: center;
    border-bottom: 1px solid var(--border-color, #2e2e38);
    padding-bottom: 18px;
    margin-bottom: 18px;
}

.plan-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary, #94a3b8);
    margin-bottom: 8px;
}

.plan-badge.badge-pro {
    background: rgba(139, 92, 246, 0.15);
    color: #c084fc;
}

.plan-badge.badge-agency {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
}

.plan-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary, #fff);
}

.plan-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 3px;
    margin-bottom: 8px;
}

.plan-price .currency {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary, #94a3b8);
}

.plan-price .amount {
    font-size: 34px;
    font-weight: 800;
    color: var(--text-primary, #fff);
}

.plan-price .period {
    font-size: 13px;
    color: var(--text-muted, #64748b);
}

.plan-desc {
    font-size: 12px;
    color: var(--text-muted, #64748b);
    line-height: 1.4;
    min-height: 34px;
    margin: 0;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.plan-features li {
    font-size: 12.5px;
    color: var(--text-secondary, #cbd5e1);
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.35;
}

.plan-features li i {
    font-size: 12px;
    margin-top: 2px;
    flex-shrink: 0;
}

.plan-features li.disabled {
    color: var(--text-muted, #64748b);
    opacity: 0.6;
}

.plan-features li.disabled i {
    color: var(--text-muted, #64748b);
}

.plan-card-footer {
    margin-top: auto;
}

.billing-portal-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color, #2e2e38);
    border-radius: var(--radius-md, 8px);
    padding: 14px 18px;
}

.border-coral {
    border-color: rgba(239, 68, 68, 0.4) !important;
}

.btn.border-coral:hover {
    background: rgba(239, 68, 68, 0.12) !important;
    border-color: #ef4444 !important;
    color: #f87171 !important;
}

/* Botões de Downgrade e Outline no Modal de Planos */
.pricing-plan-card .btn-downgrade,
.pricing-plan-card .btn-outline {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: var(--text-primary, #ffffff);
    font-weight: 600;
    transition: all 0.2s ease;
}

.pricing-plan-card .btn-downgrade:hover,
.pricing-plan-card .btn-outline:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.45);
    color: #ffffff;
    transform: translateY(-1px);
}


/* ==========================================================================
   UI/UX Update — Phase 1, 2 & 3: Tokens, Accessibility, Responsive, Quotas,
   Compact Copilot, Standardized States & Custom Confirm Modal
   ========================================================================== */

:root {
    --bg-card: var(--bg-surface);
    --text-muted: #7C8BA1;
    --accent-glow: rgba(56, 189, 248, 0.2);
    --purple: #A78BFA;

    /* Semantic Status Surfaces & Borders */
    --surface-subtle: rgba(255, 255, 255, 0.03);
    --surface-overlay: rgba(0, 0, 0, 0.72);
    --surface-accent-soft: rgba(56, 189, 248, 0.12);
    --border-accent-soft: rgba(56, 189, 248, 0.3);
    --surface-success-soft: rgba(16, 185, 129, 0.12);
    --border-success-soft: rgba(16, 185, 129, 0.3);
    --text-success: #34D399;
    --surface-warning-soft: rgba(245, 158, 11, 0.12);
    --border-warning-soft: rgba(245, 158, 11, 0.32);
    --text-warning: #FBBF24;
    --surface-danger-soft: rgba(239, 68, 68, 0.12);
    --border-danger-soft: rgba(239, 68, 68, 0.32);
    --text-danger: #F87171;

    /* Focus Ring & Radii */
    --focus-ring-color: #38BDF8;
    --focus-ring-shadow: 0 0 0 3px rgba(56, 189, 248, 0.35);
    --radius-full: 9999px;
    --transition-fast: 0.15s ease;
}

:root[data-theme="light"],
html[data-theme="light"] {
    --bg-card: var(--bg-surface);
    --border-color: rgba(15, 23, 42, 0.1);
    --border-color-hover: rgba(15, 23, 42, 0.2);
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #64748B;

    --accent-primary: #0284C7;
    --accent-hover: #0369A1;
    --accent-glow: rgba(2, 132, 199, 0.18);

    --surface-subtle: rgba(15, 23, 42, 0.03);
    --surface-overlay: rgba(15, 23, 42, 0.48);
    --surface-accent-soft: rgba(2, 132, 199, 0.1);
    --border-accent-soft: rgba(2, 132, 199, 0.28);
    --surface-success-soft: rgba(5, 150, 105, 0.1);
    --border-success-soft: rgba(5, 150, 105, 0.28);
    --text-success: #059669;
    --surface-warning-soft: rgba(217, 119, 6, 0.1);
    --border-warning-soft: rgba(217, 119, 6, 0.28);
    --text-warning: #B45309;
    --surface-danger-soft: rgba(220, 38, 38, 0.08);
    --border-danger-soft: rgba(220, 38, 38, 0.26);
    --text-danger: #DC2626;

    --focus-ring-color: #0284C7;
    --focus-ring-shadow: 0 0 0 3px rgba(2, 132, 199, 0.28);
}

.is-hidden {
    display: none !important;
}

/* Global Accessible Focus Ring */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 2px solid var(--focus-ring-color);
    outline-offset: 2px;
    box-shadow: var(--focus-ring-shadow);
}

.btn:focus-visible {
    outline: 2px solid var(--focus-ring-color);
    outline-offset: 2px;
    box-shadow: var(--focus-ring-shadow);
}

/* Semantic Status Text Overrides */
.text-emerald,
.text-success {
    color: var(--text-success) !important;
}

.text-coral,
.text-danger {
    color: var(--text-danger) !important;
}

.text-amber,
.text-warning {
    color: var(--text-warning) !important;
}

.text-blue {
    color: var(--accent-primary) !important;
}

.badge.ai-badge {
    background: var(--surface-accent-soft);
    color: var(--accent-primary);
    border-color: var(--border-accent-soft);
}

.badge.alert,
.badge.warning {
    background: var(--surface-warning-soft);
    color: var(--text-warning);
    border-color: var(--border-warning-soft);
}

.badge.success {
    background: var(--surface-success-soft);
    color: var(--text-success);
    border-color: var(--border-success-soft);
}

.badge.danger {
    background: var(--surface-danger-soft);
    color: var(--text-danger);
    border-color: var(--border-danger-soft);
}

.badge-subtle {
    font-size: 10.5px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
}

/* Brand & Sidebar Cleanup */
.brand-logo-clean {
    background: transparent;
    box-shadow: none;
}

.brand-logo-img {
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(56, 189, 248, 0.28);
    display: block;
}

.account-menu-section-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    color: var(--text-muted);
}

/* Native Button Reset for .account-menu-item & .dropzone-content */
button.account-menu-item {
    font-family: inherit;
    color: var(--text-primary);
}

button.dropzone-content {
    width: 100%;
    background: transparent;
    border: none;
    font-family: inherit;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 16px 12px;
    cursor: pointer;
    text-align: center;
}

.dropzone-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Topbar Hierarchy & Mobile Drawer Controls */
.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.topbar-title {
    min-width: 0;
}

.topbar-title h1,
.topbar-title p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-account-group,
.topbar-workspace-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-divider {
    width: 1px;
    height: 24px;
    background: var(--border-color);
    flex-shrink: 0;
}

.btn-sidebar-toggle,
.btn-sidebar-close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition);
}

.btn-sidebar-toggle:hover,
.btn-sidebar-close:hover {
    border-color: var(--border-color-hover);
    background: var(--bg-main);
}

.btn-sidebar-close {
    margin-left: auto;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--surface-overlay);
    backdrop-filter: blur(2px);
    z-index: 998;
}

.sidebar-backdrop.show {
    display: block;
}

/* Light Mode Refinements for Billing & Topbar */
:root[data-theme="light"] .user-plan-current-tag,
html[data-theme="light"] .user-plan-current-tag {
    background: var(--bg-surface-elevated);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

:root[data-theme="light"] .btn-upgrade-action,
html[data-theme="light"] .btn-upgrade-action {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.12) 0%, rgba(245, 158, 11, 0.18) 100%);
    border-color: rgba(217, 119, 6, 0.45);
    color: #0F172A;
}

:root[data-theme="light"] .btn-upgrade-action.is-active-subscriber,
html[data-theme="light"] .btn-upgrade-action.is-active-subscriber {
    background: var(--surface-success-soft);
    border-color: var(--border-success-soft);
    color: var(--text-success);
}

:root[data-theme="light"] .billing-grace-alert,
html[data-theme="light"] .billing-grace-alert {
    color: #92400E;
    background: var(--surface-warning-soft);
    border-color: var(--border-warning-soft);
}

:root[data-theme="light"] .pricing-plan-card .btn-downgrade,
html[data-theme="light"] .pricing-plan-card .btn-downgrade,
:root[data-theme="light"] .pricing-plan-card .btn-outline,
html[data-theme="light"] .pricing-plan-card .btn-outline {
    background: var(--bg-surface-elevated);
    border-color: var(--border-color-hover);
    color: var(--text-primary);
}

:root[data-theme="light"] .pricing-plan-card .btn-downgrade:hover,
html[data-theme="light"] .pricing-plan-card .btn-downgrade:hover,
:root[data-theme="light"] .pricing-plan-card .btn-outline:hover,
html[data-theme="light"] .pricing-plan-card .btn-outline:hover {
    background: #E2E8F0;
    color: #0F172A;
}

/* Sidebar Quota Widget & Billing Usage Summary */
.sidebar-quota-card {
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    color: var(--text-primary);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-quota-card:hover {
    border-color: var(--accent-primary);
    background: var(--bg-surface-elevated);
}

.sidebar-quota-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 11px;
}

.sidebar-quota-title {
    font-weight: 700;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.sidebar-quota-plan {
    font-weight: 700;
    color: var(--accent-primary);
}

.sidebar-quota-bars {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.quota-bar-row {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.quota-bar-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--text-secondary);
}

.quota-bar-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    color: var(--text-primary);
    font-weight: 600;
}

.quota-bar-track {
    width: 100%;
    height: 5px;
    border-radius: var(--radius-full);
    background: var(--bg-surface-elevated);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.quota-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: var(--accent-primary);
    transition: width 0.3s ease;
}

.quota-bar-fill.is-warning {
    background: var(--amber);
}

.quota-bar-fill.is-danger {
    background: var(--coral);
}

.billing-usage-summary {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
}

.billing-usage-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 10px;
}

/* Feature Gating Badges & Banners */
.plan-gate-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    cursor: pointer;
    border: 1px solid transparent;
    line-height: 1.3;
    transition: var(--transition);
}

.plan-gate-pro {
    background: rgba(167, 139, 250, 0.16);
    border-color: rgba(167, 139, 250, 0.4);
    color: #C4B5FD;
}

:root[data-theme="light"] .plan-gate-pro,
html[data-theme="light"] .plan-gate-pro {
    color: #6D28D9;
}

.plan-gate-agency {
    background: var(--surface-accent-soft);
    border-color: var(--border-accent-soft);
    color: var(--accent-primary);
}

.plan-gate-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: var(--surface-warning-soft);
    border: 1px solid var(--border-warning-soft);
    font-size: 12px;
    color: var(--text-primary);
}

.plan-gate-banner-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Compact Copilot & Auto-Resizing Variation Textarea */
.copilot-body-compact {
    padding: 16px;
}

.copilot-body-compact .copilot-section-box {
    padding: 12px 14px;
}

.copilot-label {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.copilot-persona-select {
    font-size: 13px;
    font-weight: 600;
}

.copilot-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    flex-wrap: wrap;
}

.link-nav-sm {
    font-size: 11.5px;
}

.copilot-link-field {
    font-size: 12px;
    padding-left: 36px;
}

.copilot-sub-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    font-size: 11.5px;
    font-weight: 600;
}

.copilot-sub-hint {
    font-weight: 400;
    font-size: 10.5px;
}

.copilot-img-textarea {
    font-size: 12px;
    line-height: 1.45;
    min-height: 60px;
}

.writing-tips-desc {
    font-size: 11.5px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

.copilot-media-accordion summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.copilot-media-accordion summary::-webkit-details-marker {
    display: none;
}

.copilot-accordion-chevron {
    font-size: 11px;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.copilot-media-accordion[open] .copilot-accordion-chevron {
    transform: rotate(180deg);
}

.variation-textarea {
    width: 100%;
    min-height: 76px;
    resize: vertical;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--surface-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    font-size: 14px;
    line-height: 1.55;
    margin-bottom: 12px;
    overflow: hidden;
    transition: var(--transition);
}

.variation-textarea:focus {
    background: var(--bg-main);
    border-color: var(--accent-primary);
}

/* Settings Helpers */
.settings-feature-title {
    font-size: 13px;
    color: var(--text-primary);
    display: block;
}

.settings-feature-desc {
    font-size: 11.5px;
}

.settings-dot-icon {
    font-size: 8px;
}

.settings-status-text {
    font-size: 11.5px;
    font-weight: 600;
}

/* Billing Modal Helpers */
.modal-subheading {
    font-size: 13px;
    margin-top: 2px;
}

.modal-body-scroll {
    overflow-y: auto;
}

.billing-cancel-box {
    padding: 14px 18px;
    background: var(--surface-danger-soft);
    border: 1px solid var(--border-danger-soft);
    border-radius: var(--radius-md);
}

.billing-box-title {
    font-size: 13px;
}

.billing-box-desc {
    font-size: 11.5px;
}

/* Standardized Empty State & Error State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 36px 20px;
    gap: 8px;
    color: var(--text-secondary);
}

.empty-state-compact {
    padding: 22px 16px;
}

.empty-state-icon,
.error-state-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 4px;
}

.empty-state-icon {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

.empty-state-icon i,
.error-state-icon i {
    font-size: 20px;
    margin: 0;
}

.empty-state-title,
.error-state-title {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.empty-state-desc,
.error-state-desc {
    font-size: 12.5px;
    color: var(--text-secondary);
    max-width: 420px;
    margin: 0;
    line-height: 1.45;
}

.empty-state-cta,
.error-state-retry {
    margin-top: 8px;
}

.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 28px 20px;
    gap: 8px;
    border-radius: var(--radius-md);
    background: var(--surface-danger-soft);
    border: 1px solid var(--border-danger-soft);
}

.error-state-icon {
    background: rgba(239, 68, 68, 0.16);
    color: var(--text-danger);
}

/* Skeleton Utilities */
.skeleton-meta-col {
    flex: 1;
}

.skeleton-line-last {
    margin-bottom: 0;
}

.skeleton-card-compact {
    padding: 14px;
    margin-bottom: 10px;
}

.skeleton-billing-card {
    min-height: 280px;
}

/* Reusable Confirmation Modal */
.modal-dialog-confirm {
    max-width: 440px !important;
    width: 92% !important;
}

.confirm-modal-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.confirm-modal-icon.is-danger {
    background: var(--surface-danger-soft);
    color: var(--text-danger);
    border: 1px solid var(--border-danger-soft);
}

.confirm-modal-icon.is-warning {
    background: var(--surface-warning-soft);
    color: var(--text-warning);
    border: 1px solid var(--border-warning-soft);
}

.confirm-modal-icon.is-primary {
    background: var(--surface-accent-soft);
    color: var(--accent-primary);
    border: 1px solid var(--border-accent-soft);
}

.confirm-modal-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.confirm-modal-message {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0;
    white-space: pre-line;
}

/* ==========================================================================
   Auth Page Styles (Migrated from inline styles, Dark + Light compatible)
   ========================================================================== */
body.auth-page {
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background-image:
        radial-gradient(circle at 15% 20%, rgba(56, 189, 248, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(167, 139, 250, 0.08) 0%, transparent 40%);
}

.auth-container {
    width: 100%;
    max-width: 440px;
    animation: zoomIn 0.25s ease-out;
}

.auth-card {
    position: relative;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    box-shadow: var(--shadow-lg);
}

.auth-card-toolbar {
    position: absolute;
    top: 14px;
    right: 14px;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 18px;
}

.auth-brand-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-logo-img {
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(56, 189, 248, 0.32);
    display: block;
}

.auth-brand-title {
    font-size: 22px;
    font-weight: 800;
    margin: 0;
    line-height: 1.1;
}

.auth-brand-subtitle {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-primary);
    letter-spacing: 1px;
}

.auth-subtitle {
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 22px;
}

.auth-tabs {
    display: flex;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 4px;
    gap: 4px;
    margin-bottom: 22px;
}

.auth-tab-btn {
    flex: 1;
    padding: 9px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.auth-tab-btn.active {
    background: var(--bg-surface);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 11px 16px;
    background: #FFFFFF;
    color: #1F2937;
    border: 1px solid #D1D5DB;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 13.5px;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.btn-google:hover {
    background: #F9FAFB;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-google svg {
    width: 18px;
    height: 18px;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.auth-divider span {
    padding: 0 12px;
}

.auth-field-label {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
    color: var(--text-primary);
}

.auth-input {
    padding: 10px 12px;
    font-size: 13px;
}

.auth-submit-btn {
    height: var(--control-height-lg);
    font-weight: 700;
    font-size: 13.5px;
}

.auth-verify-box {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 18px;
    text-align: center;
}

.auth-verify-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--surface-accent-soft);
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 16px;
}

.auth-verify-title {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 4px;
}

.auth-verify-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.45;
}

.auth-verify-email {
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 12.5px;
}

.auth-verify-sender {
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-muted);
}

.auth-verify-tip {
    margin-top: 8px;
    font-size: 11.5px;
    color: var(--accent-primary);
    background: var(--surface-accent-soft);
    border: 1px solid var(--border-accent-soft);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    line-height: 1.4;
}

.auth-code-preview {
    background: var(--surface-warning-soft);
    border: 1px dashed var(--border-warning-soft);
    border-radius: var(--radius-sm);
    padding: 10px;
    margin-bottom: 16px;
    text-align: center;
}

.auth-code-preview-label {
    font-size: 11.5px;
    color: var(--text-warning);
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.auth-code-preview-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 4px;
    color: var(--text-warning);
}

.auth-code-label {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    justify-content: center;
}

.auth-code-input {
    font-family: 'JetBrains Mono', monospace;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 8px;
    padding: 10px;
    width: 220px;
    margin: 0 auto;
    display: block;
}

.auth-code-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
    display: block;
}

.auth-step-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    gap: 8px;
}

.auth-resend-btn {
    color: var(--accent-primary);
    font-weight: 600;
}

.auth-footer {
    text-align: center;
    margin-top: 22px;
    font-size: 12.5px;
    color: var(--text-muted);
}

.btn-link-inline {
    background: none;
    border: none;
    padding: 0 2px;
    color: var(--accent-primary);
    font-weight: 600;
    font-size: inherit;
    font-family: inherit;
    cursor: pointer;
}

.btn-link-inline:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Responsive Breakpoints (1024px Drawer, 768px Topbar & Cards Table, 480px Modals)
   ========================================================================== */

@media (max-width: 1024px) {
    .btn-sidebar-toggle,
    .btn-sidebar-close {
        display: inline-flex;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 272px;
        max-width: 85vw;
        z-index: 999;
        transform: translateX(-100%);
        transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: var(--shadow-lg);
        overflow-y: auto;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .topbar {
        padding: 0 20px;
    }

    .content-body {
        padding: 20px;
    }

    .billing-usage-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .topbar {
        height: auto;
        min-height: 60px;
        padding: 10px 14px;
        gap: 8px;
        flex-wrap: nowrap;
    }

    .topbar-title h1 {
        font-size: 16px;
    }

    .topbar-title p {
        display: none;
    }

    .topbar-divider,
    .user-plan-current-tag {
        display: none;
    }

    .topbar-actions {
        gap: 6px;
        flex-shrink: 0;
    }

    .topbar-actions .btn-label-responsive,
    .topbar-actions #topbar-cta-label {
        display: none;
    }

    .topbar-actions .btn {
        padding: 0 10px;
        min-width: 36px;
        height: 36px;
    }

    .content-body {
        padding: 14px;
    }

    .queue-banner-content {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px 16px;
    }

    .queue-filter-tabs {
        width: 100%;
        overflow-x: auto;
    }

    .filter-controls {
        padding: 12px 14px;
    }

    .search-box {
        min-width: 100%;
    }

    /* Responsive Stacked Cards for #table-profiles */
    .responsive-cards-table,
    .responsive-cards-table tbody {
        display: block;
        width: 100%;
    }

    .responsive-cards-table thead {
        display: none;
    }

    .responsive-cards-table tbody {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }

    .responsive-cards-table tr {
        display: flex;
        flex-direction: column;
        background: var(--bg-surface-elevated);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        padding: 12px 14px;
        gap: 8px;
    }

    .responsive-cards-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 4px 0;
        border-bottom: 1px dashed var(--border-color);
        text-align: right;
    }

    .responsive-cards-table td:last-child {
        border-bottom: none;
        padding-top: 8px;
        justify-content: flex-end;
    }

    .responsive-cards-table td[data-label]::before {
        content: attr(data-label);
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.4px;
        color: var(--text-muted);
        text-align: left;
        flex-shrink: 0;
    }

    .responsive-cards-table td[colspan] {
        display: block;
        border-bottom: none;
        text-align: center;
    }

    .responsive-cards-table td[colspan]::before {
        display: none;
    }

    .toast-container {
        left: 12px;
        right: 12px;
        bottom: 12px;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 26px 20px;
    }

    .modal-dialog,
    .modal-dialog-lg,
    .modal-billing-dialog,
    .modal-dialog-confirm {
        width: 96% !important;
        max-height: 92vh;
    }

    .modal-dialog .modal-content {
        max-height: 92vh;
    }

    .modal-header {
        height: auto;
        min-height: 54px;
        padding: 12px 16px;
    }

    .modal-body {
        padding: 14px 16px;
    }

    .modal-footer {
        height: auto;
        min-height: 52px;
        padding: 10px 16px;
        flex-wrap: wrap;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
