/* ============================================
   MARKETING v2 - COMMAND CENTER THEME
   A mission-control inspired dark interface
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&family=Outfit:wght@300;400;500;600;700&display=swap');

/* ========== CSS VARIABLES ========== */
:root {
    /* Core palette */
    --bg-deep: #0a0a0b;
    --bg-primary: #111113;
    --bg-elevated: #1a1a1d;
    --bg-card: #1e1e22;
    --bg-hover: #252529;

    /* Borders & Lines */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-medium: rgba(255, 255, 255, 0.1);
    --border-glow: rgba(0, 212, 255, 0.3);

    /* Text */
    --text-primary: #f0f0f2;
    --text-secondary: #8a8a8f;
    --text-muted: #5a5a5f;

    /* Accent colors */
    --accent-cyan: #00d4ff;
    --accent-cyan-glow: rgba(0, 212, 255, 0.15);
    --accent-emerald: #00ff88;
    --accent-emerald-glow: rgba(0, 255, 136, 0.15);
    --accent-amber: #ffb800;
    --accent-amber-glow: rgba(255, 184, 0, 0.15);
    --accent-rose: #ff4d6a;
    --accent-rose-glow: rgba(255, 77, 106, 0.15);
    --accent-violet: #a855f7;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow-cyan: 0 0 20px rgba(0, 212, 255, 0.3);
    --shadow-glow-emerald: 0 0 20px rgba(0, 255, 136, 0.3);

    /* Typography */
    --font-display: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* Border radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* ========== RESET & BASE ========== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

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

/* Subtle grid pattern overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

/* ========== NAVBAR ========== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(180deg, var(--bg-primary) 0%, rgba(17, 17, 19, 0.95) 100%);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0 var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-brand {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.nav-brand::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--accent-emerald);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-emerald), 0 0 20px var(--accent-emerald);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.9); }
}

.nav-links {
    display: flex;
    list-style: none;
    gap: var(--space-xs);
}

.nav-links a {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    position: relative;
}

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

.nav-links a.active {
    color: var(--accent-cyan);
    background: var(--accent-cyan-glow);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--accent-cyan);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--accent-cyan);
}

/* ========== CONTAINER ========== */
.container {
    position: relative;
    z-index: 1;
    max-width: 1440px;
    margin: 0 auto;
    padding: var(--space-xl);
}

/* ========== TYPOGRAPHY ========== */
h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    margin-bottom: var(--space-xl);
}

h1::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-cyan), transparent);
    margin-top: var(--space-sm);
    border-radius: 2px;
}

h3 {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--space-md);
}

h4 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

/* ========== PAGE HEADER ========== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-xl);
}

.page-header h1 {
    margin-bottom: 0;
}

.page-header h1::after {
    margin-top: var(--space-xs);
}

/* ========== GRID SYSTEM ========== */
.grid {
    display: grid;
    gap: var(--space-lg);
}

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

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .container { padding: var(--space-md); }
}

/* ========== CARDS ========== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-medium), transparent);
}

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

/* ========== TABLES ========== */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.9rem;
}

.table th {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: var(--space-sm) var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
    background: transparent;
}

.table td {
    font-family: var(--font-display);
    padding: var(--space-md);
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-primary);
    vertical-align: middle;
}

.table tbody tr {
    transition: background 0.15s ease;
}

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

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

.table a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: color 0.2s ease;
}

.table a:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

/* ========== FORMS ========== */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group textarea,
.form-group select,
.form-control {
    width: 100%;
    padding: var(--space-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.form-control:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px var(--accent-cyan-glow);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.7;
}

.form-group small {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

.form-inline {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.form-inline .form-control {
    flex: 1;
}

.form-actions {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
    flex-wrap: wrap;
    margin-top: var(--space-lg);
}

/* Checkboxes */
.form-group input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.form-group input[type="checkbox"]:checked {
    background: var(--accent-cyan);
    border-color: var(--accent-cyan);
}

.form-group input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--bg-deep);
    font-size: 12px;
    font-weight: bold;
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-cyan), #0099cc);
    color: var(--bg-deep);
    box-shadow: 0 2px 10px var(--accent-cyan-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--accent-cyan-glow);
}

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

.btn-secondary:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-medium);
}

.btn-success {
    background: linear-gradient(135deg, var(--accent-emerald), #00cc6a);
    color: var(--bg-deep);
    box-shadow: 0 2px 10px var(--accent-emerald-glow);
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--accent-emerald-glow);
}

.btn-danger {
    background: linear-gradient(135deg, var(--accent-rose), #cc3355);
    color: white;
    box-shadow: 0 2px 10px var(--accent-rose-glow);
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--accent-rose-glow);
}

.btn-sm {
    padding: var(--space-xs) var(--space-md);
    font-size: 0.8rem;
}

.btn-block {
    width: 100%;
}

/* ========== BADGES ========== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-success {
    background: var(--accent-emerald-glow);
    color: var(--accent-emerald);
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.badge-success::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent-emerald);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--accent-emerald);
}

.badge-secondary {
    background: rgba(138, 138, 143, 0.15);
    color: var(--text-secondary);
    border: 1px solid rgba(138, 138, 143, 0.3);
}

.badge-warning {
    background: rgba(255, 183, 0, 0.12);
    color: #ffb700;
    border: 1px solid rgba(255, 183, 0, 0.3);
}

.badge-warning::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #ffb700;
    border-radius: 50%;
    box-shadow: 0 0 6px #ffb700;
}

.badge-error {
    background: var(--accent-rose-glow);
    color: var(--accent-rose);
    border: 1px solid rgba(255, 77, 106, 0.3);
}

.badge-error::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent-rose);
    border-radius: 50%;
    animation: pulse-error 1.5s ease-in-out infinite;
}

@keyframes pulse-error {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ========== ALERTS ========== */
.alert {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.alert::before {
    font-size: 1.2rem;
}

.alert-success {
    background: var(--accent-emerald-glow);
    color: var(--accent-emerald);
    border: 1px solid rgba(0, 255, 136, 0.2);
}

.alert-success::before {
    content: '✓';
}

.alert-error {
    background: var(--accent-rose-glow);
    color: var(--accent-rose);
    border: 1px solid rgba(255, 77, 106, 0.2);
}

.alert-error::before {
    content: '✕';
}

/* ========== STATUS INDICATORS ========== */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.status-running {
    background: var(--accent-emerald-glow);
    color: var(--accent-emerald);
    border: 1px solid rgba(0, 255, 136, 0.3);
    box-shadow: var(--shadow-glow-emerald);
}

.status-running::before {
    content: '';
    width: 10px;
    height: 10px;
    background: var(--accent-emerald);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-emerald), 0 0 20px var(--accent-emerald);
    animation: pulse-glow 2s ease-in-out infinite;
}

.status-stopped {
    background: var(--accent-rose-glow);
    color: var(--accent-rose);
    border: 1px solid rgba(255, 77, 106, 0.3);
}

.status-stopped::before {
    content: '';
    width: 10px;
    height: 10px;
    background: var(--accent-rose);
    border-radius: 50%;
}

/* ========== STAT NUMBERS ========== */
.stat-number {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========== TEXT UTILITIES ========== */
.text-muted {
    color: var(--text-muted);
    font-size: 0.85rem;
}

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

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

/* ========== TAG GRID ========== */
.tag-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-sm);
    max-height: 350px;
    overflow-y: auto;
    padding: var(--space-sm);
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.tag-grid::-webkit-scrollbar {
    width: 6px;
}

.tag-grid::-webkit-scrollbar-track {
    background: var(--bg-elevated);
}

.tag-grid::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 3px;
}

.tag-checkbox {
    display: flex;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.85rem;
}

.tag-checkbox:hover {
    background: var(--bg-hover);
}

.tag-checkbox input {
    margin-right: var(--space-sm);
}

/* ========== ACTIONS ========== */
.actions {
    white-space: nowrap;
    display: flex;
    gap: var(--space-xs);
}

/* ========== MODAL ========== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: modal-fade-in 0.2s ease;
}

@keyframes modal-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: auto;
    box-shadow: var(--shadow-lg);
    animation: modal-slide-up 0.3s ease;
}

@keyframes modal-slide-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    text-transform: none;
    letter-spacing: normal;
    color: var(--text-primary);
}

.modal-header .close {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.modal-header .close:hover {
    background: var(--accent-rose-glow);
    border-color: var(--accent-rose);
    color: var(--accent-rose);
}

.modal-body {
    padding: var(--space-lg);
}

/* ========== LOGIN PAGE ========== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-deep);
    position: relative;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 80%, var(--accent-cyan-glow) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, var(--accent-violet) 0%, transparent 40%);
    opacity: 0.3;
}

.login-container {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    padding: var(--space-2xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
}

.login-container h1 {
    text-align: center;
    margin-bottom: var(--space-xl);
    font-size: 1.5rem;
}

.login-container h1::after {
    margin-left: auto;
    margin-right: auto;
}

/* ========== PRE/CODE ========== */
pre {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    background: var(--bg-elevated);
    padding: 2px 6px;
    border-radius: 4px;
}

/* ========== HR ========== */
hr {
    border: none;
    border-top: 1px solid var(--border-subtle);
    margin: var(--space-lg) 0;
}

/* ========== PLACEHOLDER BUTTONS ========== */
.placeholder-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.btn-placeholder {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    border: 1px solid var(--border-subtle);
    padding: 4px 8px;
}

.btn-placeholder:hover {
    background: var(--accent-cyan-glow);
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
}

/* ========== SELECT STYLING ========== */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238a8a8f' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 4px;
}

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

/* ========== ANIMATIONS ========== */
@keyframes fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    animation: fade-in 0.4s ease backwards;
}

.grid .card:nth-child(1) { animation-delay: 0s; }
.grid .card:nth-child(2) { animation-delay: 0.05s; }
.grid .card:nth-child(3) { animation-delay: 0.1s; }
.grid .card:nth-child(4) { animation-delay: 0.15s; }
.grid .card:nth-child(5) { animation-delay: 0.2s; }
.grid .card:nth-child(6) { animation-delay: 0.25s; }

/* ========== CAMPAIGN CARDS ========== */
.campaign-active {
    border-left: 3px solid var(--accent-emerald);
}

.campaign-inactive {
    border-left: 3px solid var(--text-muted);
}

/* ========== CHANNEL BADGES ========== */
.badge-channel {
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.badge-whatsapp {
    background: rgba(37, 211, 102, 0.15);
    color: #25d366;
    border: 1px solid rgba(37, 211, 102, 0.3);
}

.badge-instagram {
    background: rgba(225, 48, 108, 0.15);
    color: #e1306c;
    border: 1px solid rgba(225, 48, 108, 0.3);
}

.badge-instagram-story {
    background: rgba(168, 85, 247, 0.15);
    color: var(--accent-violet);
    border: 1px solid rgba(168, 85, 247, 0.3);
}

/* ========== CHANNEL CARDS ========== */
.channel-header {
    margin-bottom: var(--space-md);
}

.channel-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
}

.channel-section {
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-subtle);
}

/* ========== IMAGE UPLOAD PREVIEW ========== */
.image-preview {
    margin-top: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.image-preview img {
    max-width: 300px;
    max-height: 300px;
    border-radius: var(--radius-sm);
    object-fit: contain;
}

/* ========== IMAGE GALLERY (multi-image) ========== */
.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.image-gallery-item {
    position: relative;
    width: 140px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-xs);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
}

.image-gallery-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.image-remove-check {
    font-size: 0.75rem;
    color: var(--accent-rose);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.image-remove-check input[type="checkbox"] {
    accent-color: var(--accent-rose);
}

/* File input styling */
.form-group input[type="file"] {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-elevated);
    border: 1px dashed var(--border-medium);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: var(--font-display);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-group input[type="file"]:hover {
    border-color: var(--accent-cyan);
    background: var(--accent-cyan-glow);
}

/* ========== MOBILE NAVIGATION ========== */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: var(--space-sm);
    border: none;
    background: none;
    z-index: 101;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

@media (max-width: 1024px) {
    .nav-toggle { display: flex; }

    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        border-bottom: 1px solid var(--border-subtle);
        flex-direction: column;
        padding: var(--space-md);
        gap: var(--space-xs);
        box-shadow: var(--shadow-lg);
    }

    .nav-links.open { display: flex; }

    .nav-links a {
        padding: var(--space-md);
        border-radius: var(--radius-sm);
    }
}

/* ========== TOAST NOTIFICATIONS ========== */
.toast-container {
    position: fixed;
    top: 80px;
    right: var(--space-lg);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 300px;
    max-width: 450px;
    pointer-events: auto;
    animation: toast-in 0.3s ease, toast-out 0.3s ease forwards;
    animation-delay: 0s, var(--toast-duration, 4s);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(12px);
}

.toast-success {
    background: rgba(0, 50, 25, 0.95);
    color: var(--accent-emerald);
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.toast-error {
    background: rgba(50, 10, 15, 0.95);
    color: var(--accent-rose);
    border: 1px solid rgba(255, 77, 106, 0.3);
}

.toast-info {
    background: rgba(0, 25, 50, 0.95);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.toast-warning {
    background: rgba(50, 35, 0, 0.95);
    color: var(--accent-amber);
    border: 1px solid rgba(255, 184, 0, 0.3);
}

.toast-icon { font-size: 1.1rem; flex-shrink: 0; }
.toast-message { flex: 1; }

.toast-close {
    background: none;
    border: none;
    color: inherit;
    opacity: 0.5;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0 0 0 var(--space-sm);
    flex-shrink: 0;
    transition: opacity 0.2s;
}

.toast-close:hover { opacity: 1; }

@keyframes toast-in {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toast-out {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(40px); }
}

/* ========== INLINE STATUS CLASSES ========== */
.status-ok { color: var(--accent-emerald); }
.status-error { color: var(--accent-rose); }
.status-active { color: var(--accent-emerald); }
.status-inactive { color: var(--text-muted); }
.status-pending { color: var(--accent-amber); }
.status-info { color: var(--accent-cyan); }

/* ========== BUTTON LOADING STATE ========== */
.btn.is-loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}

.btn.is-loading .btn-text { visibility: hidden; }

.btn.is-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: btn-spin 0.6s linear infinite;
}

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

/* ========== BUTTON DISABLED ========== */
.btn:disabled, .btn.disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

/* ========== CONFIRMATION MODAL ========== */
.confirm-modal .modal-content {
    max-width: 440px;
}

.confirm-modal .modal-body {
    text-align: center;
    padding: var(--space-xl);
}

.confirm-modal .confirm-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
}

.confirm-modal .confirm-text {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    line-height: 1.6;
}

.confirm-modal .confirm-actions {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
}

/* ========== BADGE ADDITIONS ========== */
.badge-info {
    background: var(--accent-cyan-glow);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.badge-info::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent-cyan);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--accent-cyan);
}

.badge-running {
    background: var(--accent-cyan-glow);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.badge-running::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent-cyan);
    border-radius: 50%;
    animation: pulse-glow 2s ease-in-out infinite;
}

/* ========== SEARCH BAR ========== */
.search-bar {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-xs) var(--space-md);
    transition: all 0.2s ease;
    max-width: 300px;
}

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

.search-bar input {
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 0.9rem;
    outline: none;
    width: 100%;
    padding: var(--space-xs) 0;
}

.search-bar input::placeholder { color: var(--text-muted); }

.search-icon {
    color: var(--text-muted);
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
    opacity: 0.4;
}

.empty-state-text {
    font-size: 1rem;
    margin-bottom: var(--space-lg);
}

/* ========== SETTINGS TABS ========== */
.settings-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: var(--space-xl);
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    padding: 3px;
    overflow-x: auto;
}

.settings-tab {
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    border: none;
    background: none;
    font-family: var(--font-display);
}

.settings-tab:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.settings-tab.active {
    color: var(--accent-cyan);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

.settings-panel { display: none; }
.settings-panel.active { display: block; }

/* ========== PROGRESS BAR ========== */
.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-elevated);
    border-radius: 3px;
    overflow: hidden;
    margin-top: var(--space-xs);
}

.progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-emerald));
}

.progress-fill.progress-warning {
    background: linear-gradient(90deg, var(--accent-amber), #ff8800);
}

.progress-fill.progress-full {
    background: linear-gradient(90deg, var(--accent-emerald), #00cc6a);
}

/* ========== TABLE RESPONSIVE ========== */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
}

/* ========== SECTION SPACING ========== */
.section { margin-top: var(--space-xl); }
.section-lg { margin-top: var(--space-2xl); }

/* ========== STAT CARD IMPROVEMENTS ========== */
.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

/* ========== CARD VARIANTS ========== */
.card-danger {
    border: 1px solid rgba(255, 77, 106, 0.3);
}

.card-danger h3 {
    color: var(--accent-rose);
}

/* ========== ALERT IMPROVEMENTS ========== */
.alert-warning {
    background: var(--accent-amber-glow);
    color: var(--accent-amber);
    border: 1px solid rgba(255, 184, 0, 0.2);
}

.alert-warning::before {
    content: '!';
}

.alert-info {
    background: var(--accent-cyan-glow);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.alert-info::before {
    content: 'i';
}

/* ========== FILTER BAR ========== */
.filter-bar {
    display: flex;
    gap: var(--space-md);
    align-items: center;
    flex-wrap: wrap;
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

.filter-bar label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.filter-bar select,
.filter-bar input {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 0.85rem;
    padding: var(--space-xs) var(--space-md);
    padding-right: 32px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* ========== TOOLTIP ========== */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: var(--space-xs) var(--space-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    z-index: 50;
    box-shadow: var(--shadow-md);
}

[data-tooltip]:hover::after {
    opacity: 1;
}

/* ========== FORM VALIDATION ========== */
.form-group input:invalid:not(:placeholder-shown),
.form-group textarea:invalid:not(:placeholder-shown) {
    border-color: var(--accent-rose);
}

.form-error {
    color: var(--accent-rose);
    font-size: 0.8rem;
    margin-top: var(--space-xs);
    display: none;
}

.form-group.has-error .form-error { display: block; }
.form-group.has-error input,
.form-group.has-error textarea,
.form-group.has-error select {
    border-color: var(--accent-rose);
    box-shadow: 0 0 0 3px var(--accent-rose-glow);
}

/* ========== RESPONSIVE IMPROVEMENTS ========== */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        gap: var(--space-md);
        align-items: stretch;
    }

    .page-header .btn { text-align: center; }

    .filter-bar { flex-direction: column; align-items: stretch; }
    .filter-group { justify-content: space-between; }

    .actions {
        flex-direction: column;
        gap: var(--space-xs);
        white-space: normal;
    }

    .stat-number { font-size: 2rem; }

    h1 { font-size: 1.5rem; }

    .toast-container {
        right: var(--space-sm);
        left: var(--space-sm);
    }

    .toast { min-width: auto; }
}

/* ========== KEYBOARD FOCUS ========== */
:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 2px;
}

/* ========== SKELETON LOADING ========== */
.skeleton {
    background: linear-gradient(90deg,
        var(--bg-elevated) 25%,
        var(--bg-hover) 50%,
        var(--bg-elevated) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease infinite;
    border-radius: var(--radius-sm);
}

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

.skeleton-text {
    height: 1em;
    margin-bottom: var(--space-sm);
}

.skeleton-number {
    height: 2.5rem;
    width: 80px;
}

/* ========== GRID-4 ========== */
.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1200px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

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