/* Social Marketing System v3 - Styles */

:root {
    --bg: #0a0a0f;
    --bg-card: #12121a;
    --bg-hover: #1a1a25;
    --border: #252535;
    --text: #ffffff;
    --text-secondary: #888899;
    --text-muted: #555566;
    --primary: #6366f1;
    --primary-hover: #818cf8;
    --success: #22c55e;
    --warning: #eab308;
    --danger: #ef4444;
    --linkedin: #0a66c2;
    --twitter: #1da1f2;
    --radius: 12px;
    --radius-sm: 8px;
}

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

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

/* Layout */
.app {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 220px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
}

.logo {
    padding: 24px;
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border);
}

.nav {
    flex: 1;
    padding: 16px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    transition: all 0.2s;
}

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

.nav-item.active {
    background: var(--primary);
    color: white;
}

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

.platforms {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.platform-icon {
    font-size: 1.5rem;
    opacity: 0.7;
}

.main {
    flex: 1;
    margin-left: 220px;
    padding: 24px;
}

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

.header h1 {
    font-size: 1.75rem;
    font-weight: 700;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    background: var(--bg-hover);
    color: var(--text);
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.btn:hover {
    background: var(--border);
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-hover);
}

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

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

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

.stat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 24px;
}

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

.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

.live {
    color: var(--success);
    font-size: 0.75rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-emoji {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    border-radius: 50%;
}

.activity-content {
    flex: 1;
}

.activity-message {
    font-size: 0.9rem;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Tabs */
.tab {
    display: none;
}

.tab.active {
    display: block;
}

/* Team */
.team-intro {
    text-align: center;
    margin-bottom: 32px;
}

.team-intro h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

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

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.member {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    gap: 16px;
    transition: all 0.2s;
}

.member:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.member.leader {
    background: linear-gradient(135deg, var(--bg-card), rgba(99, 102, 241, 0.1));
    border-color: var(--primary);
    grid-column: 1 / -1;
    max-width: 500px;
}

.member-emoji {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
}

.member-info h4 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.member-info .role {
    color: var(--primary);
    font-size: 0.85rem;
}

.member-info .quote {
    font-style: italic;
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 8px;
}

.member-stats {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    gap: 16px;
}

.member-stats span {
    color: var(--primary);
    font-weight: 600;
}

/* Table */
.toolbar {
    margin-bottom: 16px;
    display: flex;
    gap: 12px;
}

.table-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

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

.table th {
    background: var(--bg-hover);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

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

/* Status badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-pending { background: rgba(234, 179, 8, 0.2); color: var(--warning); }
.badge-processing { background: rgba(99, 102, 241, 0.2); color: var(--primary); }
.badge-ready { background: rgba(34, 197, 94, 0.2); color: var(--success); }
.badge-ready_to_copy { background: rgba(10, 102, 194, 0.2); color: var(--linkedin); }
.badge-approved { background: rgba(34, 197, 94, 0.2); color: var(--success); }
.badge-scheduled { background: rgba(99, 102, 241, 0.2); color: var(--primary); }
.badge-posted { background: rgba(34, 197, 94, 0.3); color: var(--success); }
.badge-failed { background: rgba(239, 68, 68, 0.2); color: var(--danger); }
.badge-revision { background: rgba(239, 68, 68, 0.2); color: var(--danger); }

/* Copies Grid */
.copies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 16px;
}

.copy-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

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

.copy-platform {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.copy-platform.linkedin { color: var(--linkedin); }
.copy-platform.twitter { color: var(--twitter); }

.copy-qa {
    font-size: 0.85rem;
}

.copy-qa.high { color: var(--success); }
.copy-qa.medium { color: var(--warning); }
.copy-qa.low { color: var(--danger); }

.copy-body {
    padding: 16px;
}

.copy-preview {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    max-height: 100px;
    overflow: hidden;
}

.copy-meta {
    margin-top: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.copy-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
}

/* Schedule */
.schedule-list {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.schedule-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.schedule-time {
    font-size: 0.85rem;
    color: var(--text-secondary);
    min-width: 80px;
}

.schedule-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.schedule-dot.scheduled { background: var(--primary); }
.schedule-dot.posted { background: var(--success); }
.schedule-dot.failed { background: var(--danger); }

.schedule-content {
    flex: 1;
}

.schedule-platform {
    font-weight: 600;
}

.schedule-preview {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-header button {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

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

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.9rem;
}

.form-group textarea {
    resize: vertical;
}

.checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.checkboxes label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-weight: normal;
}

/* Toasts */
.toasts {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 20px;
    margin-top: 8px;
    animation: slideIn 0.3s ease;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }

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

/* Empty state */
.empty {
    text-align: center;
    padding: 48px;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar { display: none; }
    .main { margin-left: 0; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .team-grid { grid-template-columns: 1fr; }
    .copies-grid { grid-template-columns: 1fr; }
}

/* Navigation Badge */
.nav-badge {
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
    font-weight: 600;
}

.nav-badge:empty {
    display: none;
}

/* LinkedIn Tab */
.linkedin-intro {
    margin-bottom: 24px;
}

.linkedin-banner {
    background: linear-gradient(135deg, rgba(10, 102, 194, 0.2), rgba(10, 102, 194, 0.05));
    border: 1px solid var(--linkedin);
    border-radius: var(--radius);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.linkedin-banner .icon {
    font-size: 2.5rem;
}

.linkedin-banner h3 {
    margin-bottom: 4px;
    color: var(--linkedin);
}

.linkedin-banner p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.linkedin-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.linkedin-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.linkedin-card.ready {
    border-color: var(--linkedin);
    box-shadow: 0 0 20px rgba(10, 102, 194, 0.1);
}

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

.linkedin-card-header h4 {
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.linkedin-copy-text {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre-wrap;
    max-height: 300px;
    overflow-y: auto;
    cursor: text;
    user-select: all;
}

.linkedin-card-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
    align-items: center;
}

.linkedin-card-footer .meta {
    flex: 1;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.btn-linkedin {
    background: var(--linkedin);
    border-color: var(--linkedin);
}

.btn-linkedin:hover {
    background: #0077b5;
}

/* Copied animation */
.btn-copied {
    background: var(--success) !important;
    border-color: var(--success) !important;
}

/* Platform indicators in copies */
.copy-card .platform-mode {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
}

.platform-mode.auto {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.platform-mode.manual {
    background: rgba(10, 102, 194, 0.2);
    color: var(--linkedin);
}
