/* Social Growth Hub - Dashboard Styles */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* Navbar */
.navbar {
    background: var(--text);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 56px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand a {
    color: white;
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
}

.nav-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    padding: 16px 12px;
    font-size: 14px;
    transition: color 0.2s;
}

.nav-links a:hover, .nav-links a.active {
    color: white;
    border-bottom: 2px solid var(--primary);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

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

.page-header h1 { font-size: 24px; }
.page-header p { color: var(--text-muted); margin-top: 4px; }

/* Flash Messages */
.flash-messages { margin-bottom: 16px; }
.flash {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 8px;
    font-size: 14px;
}
.flash-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.flash-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.flash-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}
.btn:hover { background: var(--bg); }
.btn-primary { background: var(--primary); color: white; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: white; border-color: var(--success); }
.btn-danger { background: var(--danger); color: white; border-color: var(--danger); }
.btn-sm { padding: 4px 10px; font-size: 12px; }

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

.stat-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--border);
    text-align: center;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.stat-follows { border-left-color: var(--success); }
.stat-unfollows { border-left-color: var(--danger); }
.stat-likes { border-left-color: #ec4899; }
.stat-comments { border-left-color: var(--warning); }
.stat-growth { border-left-color: var(--info); }
.stat-posts { border-left-color: var(--primary); }

.positive { color: var(--success); }
.negative { color: var(--danger); }

/* Business Card */
.business-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

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

.business-header h2 { font-size: 20px; margin-bottom: 4px; }

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

.account-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border-top: 3px solid var(--primary);
}

.account-card.disabled {
    border-top-color: var(--border);
    opacity: 0.7;
}

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

.account-card h3 { font-size: 16px; margin-bottom: 8px; }

.account-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 12px;
}

/* Platform Accounts Chips */
.platform-accounts {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.account-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg);
    border-radius: 20px;
    font-size: 13px;
}

.account-chip.disabled { opacity: 0.5; }
.account-chip a { font-size: 12px; color: var(--primary); }

.platform-icon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background: var(--primary);
    color: white;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
}
.status-dot.active { background: var(--success); }

/* Badges */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    background: var(--bg);
    color: var(--text-muted);
}

.badge-outline { background: transparent; border: 1px solid var(--border); }
.badge-vodka { background: #ede9fe; color: #6d28d9; }
.badge-trading { background: #dbeafe; color: #1d4ed8; }
.badge-fitness { background: #dcfce7; color: #15803d; }

.platform-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    color: white;
}

.platform-instagram { background: #e4405f; }
.platform-twitter { background: #1da1f2; }
.platform-tiktok { background: #010101; }
.platform-facebook { background: #1877f2; }
.platform-linkedin { background: #0a66c2; }

.status-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
}
.status-badge.active { background: #dcfce7; color: #166534; }
.status-badge.inactive { background: #f1f5f9; color: #64748b; }

/* Hashtags */
.hashtags { display: flex; gap: 4px; flex-wrap: wrap; margin: 8px 0; }
.tag {
    background: var(--bg);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--primary);
}

/* Tables */
.table-container { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
th {
    background: var(--bg);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* Forms */
.form-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}
.form-group small { color: var(--text-muted); font-size: 12px; }

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

.form-actions { display: flex; gap: 8px; margin-top: 8px; }

/* Chart */
.chart-container {
    background: var(--card);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

/* Two Column Layout */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 24px;
}

/* Activity Log */
.activity-log { max-height: 400px; overflow-y: auto; }

.activity-item {
    padding: 10px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.activity-type {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    background: var(--bg);
}
.activity-engagement .activity-type { background: #dbeafe; color: #1d4ed8; }
.activity-reply .activity-type { background: #dcfce7; color: #166534; }

.activity-text { flex: 1; color: var(--text); }
.activity-target { color: var(--primary); font-weight: 500; }
.activity-time { color: var(--text-muted); font-size: 11px; }

/* Actions Bar */
.actions-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

/* Post Items */
.post-item {
    padding: 12px;
    border-bottom: 1px solid var(--border);
}
.post-header { display: flex; justify-content: space-between; margin-bottom: 4px; }
.post-item h4 { font-size: 14px; }
.post-status.posted { color: var(--success); }
.post-status.failed { color: var(--danger); }

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.content-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
}

.content-header { display: flex; gap: 8px; margin-bottom: 8px; }
.content-card h3 { font-size: 15px; margin-bottom: 8px; }

.content-preview {
    font-size: 12px;
    color: var(--text-muted);
    white-space: pre-wrap;
    background: var(--bg);
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 8px;
    max-height: 120px;
    overflow: hidden;
    font-family: inherit;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}
.empty-state h2 { color: var(--text); margin-bottom: 8px; }
.empty-state .btn { margin-top: 16px; }

/* Utilities */
.text-muted { color: var(--text-muted); }
.link-muted { color: var(--text-muted); font-size: 13px; }
hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* Date Range */
.date-range { display: flex; gap: 4px; }

/* Responsive */
@media (max-width: 768px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .two-col { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .page-header { flex-direction: column; align-items: flex-start; }
    .accounts-grid { grid-template-columns: 1fr; }
}
