/* ============ CSS Variables (Modern Slate Theme) ============ */
:root {
    --bg-primary: #0f172a;     /* Deep slate blue */
    --bg-secondary: #1e293b;   /* Lighter slate for panels */
    --bg-card: rgba(30, 41, 59, 0.7);
    --bg-card-hover: rgba(51, 65, 85, 0.8);
    --border-color: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --accent-primary: #0ea5e9; /* Sky blue */
    --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #0ea5e9 50%, #14b8a6 100%); /* Blue to Teal */
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --glass-bg: rgba(30, 41, 59, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* ============ Reset & Base ============ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Background gradient effect - Updated to cool blue/teal */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(20, 184, 166, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.app {
    position: relative;
    z-index: 1;
}

/* ============ Header ============ */
.header {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.logo-icon svg {
    width: 100%;
    height: 100%;
    color: white;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 600;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.status-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.status-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-time {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ============ Buttons ============ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-primary.loading .btn-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.btn-add {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.btn-add:hover {
    background: rgba(16, 185, 129, 0.3);
}

.btn-remove {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
}

.btn-remove:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* ============ Main Content ============ */
.main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* ============ Add Section ============ */
.add-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.add-form {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 200px;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.input-wrapper {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color 0.2s;
}

.input-wrapper:focus-within {
    border-color: rgba(14, 165, 233, 0.5);
}

.input-prefix {
    padding: 0 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.75rem;
    padding-left: 0;
    color: var(--text-primary);
    font-size: 0.9375rem;
    outline: none;
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
}

select {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9375rem;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

select:focus {
    border-color: rgba(14, 165, 233, 0.5);
}

select option {
    background: var(--bg-secondary);
}

/* ============ Accounts Section ============ */
.accounts-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ============ Group Tabs ============ */
.group-tabs {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(20, 184, 166, 0.1));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 0.75rem;
}

.group-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--glass-bg);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.group-tab:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--glass-border);
}

.group-tab.active {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.group-tab .tab-count {
    font-size: 0.8125rem;
    opacity: 0.8;
}

/* ============ Category Tabs ============ */
.category-tabs {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    margin-bottom: 0.5rem;
}

.category-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.category-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.category-tab.active {
    color: var(--tab-color);
    font-weight: 600;
    background: color-mix(in srgb, var(--tab-color) 15%, transparent);
    border-color: var(--tab-color);
}

.tab-indicator {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid currentColor;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.category-tab.active .tab-indicator {
    border-color: transparent;
}

.tab-indicator-inner {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s;
}

.category-tab.active .tab-indicator-inner {
    opacity: 1;
}

.tab-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.tab-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 0.25rem;
}

/* ============ Status Sub-Tabs ============ */
.status-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.status-tab {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.status-tab:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.status-tab.active {
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

.status-tab-all.active {
    background: rgba(14, 165, 233, 0.15);
    border-color: var(--accent-primary);
}

.status-tab-valid.active {
    background: rgba(16, 185, 129, 0.15);
    border-color: #10b981;
    color: #10b981;
}

.status-tab-boosted.active {
    background: rgba(245, 158, 11, 0.15);
    border-color: #f59e0b;
    color: #f59e0b;
}

.status-tab-flagged.active {
    background: rgba(139, 92, 246, 0.15);
    border-color: #8b5cf6;
    color: #8b5cf6;
}

.status-tab-suspended.active {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
    color: #ef4444;
}

.status-tab-new.active {
    background: rgba(59, 130, 246, 0.15);
    border-color: #3b82f6;
    color: #3b82f6;
}

.status-icon {
    font-size: 0.875rem;
}

/* ============ Sort Controls ============ */
.sort-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 400px;
}

.search-box .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

.search-box input {
    width: 100%;
    padding: 0.625rem 2.5rem 0.625rem 2.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.25);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.clear-search {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.clear-search:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.clear-search.hidden {
    display: none;
}

.sort-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-wrapper label {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    white-space: nowrap;
}

.sort-wrapper select {
    padding: 0.375rem 0.75rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.2s;
}

.sort-wrapper select:hover {
    border-color: var(--accent-primary);
}

.sort-wrapper select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.25);
}

.sort-wrapper select option {
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* ============ Accounts Grid ============ */
.accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

.empty-accounts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
    font-style: italic;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

/* ============ Account Card ============ */
.account-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    transition: all 0.3s ease;
    position: relative;
}

.account-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Status card styling */
.account-card.status-valid { border-left: 3px solid #10b981; }
.account-card.status-boosted { border-left: 3px solid #f59e0b; background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), transparent); }
.account-card.status-flagged { border-left: 3px solid #8b5cf6; background: linear-gradient(135deg, rgba(139, 92, 246, 0.05), transparent); }
.account-card.status-suspended { border-left: 3px solid #ef4444; opacity: 0.75; }
.account-card.status-new { border-left: 3px solid #3b82f6; background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), transparent); }

/* Status selector */
.status-selector { margin-bottom: 1rem; }

.status-dropdown {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.status-dropdown:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-primary);
}

.status-dropdown:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.25);
}

.status-dropdown option {
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 0.5rem;
}

.account-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.account-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.avatar-placeholder {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
}

/* Remove Button */
.remove-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 28px;
    height: 28px;
    padding: 0;
    background: rgba(239, 68, 68, 0.2);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s;
}

.account-card:hover .remove-btn { opacity: 1; }
.remove-btn:hover { background: rgba(239, 68, 68, 0.8); }
.remove-btn svg { width: 14px; height: 14px; stroke: #ef4444; stroke-width: 2.5; }
.remove-btn:hover svg { stroke: white; }

.account-info {
    flex: 1;
    min-width: 0;
}

.account-username {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.account-username::before {
    content: '@';
    color: var(--text-muted);
}

.account-username a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.account-username a:hover {
    color: var(--accent-primary);
    text-decoration: underline;
}

.account-name {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-handler {
    color: #f59e0b;
    font-weight: 500;
    margin-left: 0.25rem;
}

/* ============ Stats ============ */
.account-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.stat {
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    padding: 0.75rem;
}

.stat-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.125rem;
    font-weight: 600;
}

.stat-comparison {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.stat-yesterday { color: var(--text-muted); }
.stat-arrow { font-size: 0.875rem; }
.stat-change { font-weight: 500; }
.stat-change.positive { color: var(--success); }
.stat-change.negative { color: var(--danger); }
.stat-change.neutral { color: var(--text-muted); }

/* Status indicators */
.stat.posted .stat-value { color: var(--success); }
.stat.not-posted .stat-value { color: var(--text-muted); }
.stat.has-stories .stat-value { color: #f59e0b; }

/* Account Notes */
.account-notes {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--glass-border);
}

.notes-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.375rem;
}

.notes-input {
    width: 100%;
    min-height: 50px;
    max-height: 100px;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.8125rem;
    line-height: 1.4;
    resize: vertical;
    transition: border-color 0.2s;
}

.notes-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.notes-input::placeholder { color: var(--text-muted); }

/* Remove button display logic */
.account-card .btn-remove {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.account-card:hover .btn-remove { opacity: 1; }

/* ============ Toast ============ */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-lg);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.visible {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.1);
}

.toast.error {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.1);
}

.hidden { display: none !important; }

/* ============ Loading State ============ */
.loading-skeleton {
    background: linear-gradient(90deg,
            var(--bg-card) 25%,
            rgba(255, 255, 255, 0.08) 50%,
            var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============ Responsive ============ */
@media (max-width: 768px) {
    .header-content { flex-direction: column; gap: 1rem; text-align: center; padding: 1rem; }
    .header-actions { width: 100%; justify-content: center; flex-wrap: wrap; gap: 0.75rem; }
    .logo h1 { font-size: 1.25rem; }
    .main { padding: 1rem; }
    .add-section { padding: 1rem; }
    .add-form { flex-direction: column; }
    .form-group { width: 100%; min-width: unset; }
    .btn-add { width: 100%; justify-content: center; }
    .group-tabs, .category-tabs, .status-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .group-tab, .category-tab, .status-tab { white-space: nowrap; flex-shrink: 0; }
    .sort-controls { flex-direction: column; align-items: stretch; }
    .search-box { max-width: none; }
    .accounts-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .header-content { padding: 0.75rem; }
    .logo-icon { width: 32px; height: 32px; }
    .logo h1 { font-size: 1.125rem; }
    .btn-primary { padding: 0.625rem 1rem; font-size: 0.8125rem; }
    .status-info { display: none; }
    .main { padding: 0.75rem; }
    .account-stats { grid-template-columns: 1fr 1fr; }
}

/* ============ Handler Input ============ */
.handler-input {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 0.25rem 0.5rem;
    color: #f59e0b;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    width: 120px;
    transition: all 0.2s;
}

.handler-input:focus {
    outline: none;
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.handler-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

/* ============ Category Modal ============ */
.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover { background: rgba(255, 255, 255, 0.1); }

.modal {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex; align-items: center; justify-content: center;
    opacity: 1; transition: opacity 0.3s ease;
}

.modal.hidden { opacity: 0; pointer-events: none; }

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%; max-width: 500px;
    box-shadow: var(--shadow-lg);
    transform: translateY(0); transition: transform 0.3s ease;
}

.modal.hidden .modal-content { transform: translateY(20px); }

.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border-color);
}

.close-btn { background: none; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; transition: color 0.2s; }
.close-btn:hover { color: var(--text-primary); }

.modal-body { padding: 1.5rem; }

.modal-form { display: flex; gap: 0.5rem; }
.modal-form input[type="text"], .modal-form select {
    flex: 1; background: var(--bg-primary); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); padding: 0.5rem 0.75rem; color: var(--text-primary);
    font-family: inherit; outline: none;
}
.modal-form input[type="text"]:focus, .modal-form select:focus { border-color: var(--accent-primary); }

.modal-divider { border: 0; border-top: 1px solid var(--border-color); margin: 1.5rem 0; }

/* ============ Reports Modal ============ */
.report-modal-wide { max-width: 800px; width: 95%; }
.report-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.stat-mini { background: rgba(0, 0, 0, 0.2); padding: 1rem; border-radius: var(--radius-md); text-align: center; border: 1px solid var(--border-color); }
.stat-mini .label { display: block; font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; margin-bottom: 0.25rem; }
.stat-mini .value { font-size: 1.25rem; font-weight: 700; }
.chart-container { height: 300px; position: relative; margin-top: 1rem; }

/* ============ Platform Tags ============ */
.account-platform-tag {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 4px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.account-platform-tag.threads { color: #fff; background: rgba(0, 0, 0, 0.3); }
.account-platform-tag.instagram { color: var(--accent-primary); border-color: rgba(14, 165, 233, 0.3); }
.account-platform-tag.twitter { color: #fff; background: #000; border: 1px solid rgba(255, 255, 255, 0.2); }