/* ========================================
   SocialPost Pro - Main Stylesheet
   RecurPost-identical Design System
   ======================================== */

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

/* ---- CSS Variables ---- */
:root {
    --bg-primary: #f5f7fb;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --bg-active: #e8f0fe;
    --bg-hover: #f8f9fa;
    --bg-input: #ffffff;
    --bg-modal-overlay: rgba(0, 0, 0, 0.4);
    
    --text-primary: #1a1a2e;
    --text-secondary: #6c757d;
    --text-muted: #9ca3af;
    --text-white: #ffffff;
    
    --accent-primary: #0d6efd;
    --accent-primary-hover: #0b5ed7;
    --accent-primary-light: #e8f0fe;
    --accent-warning: #f59e0b;
    --accent-warning-light: #fff3cd;
    --accent-success: #10b981;
    --accent-success-light: #d1fae5;
    --accent-danger: #ef4444;
    --accent-danger-light: #fee2e2;
    --accent-purple: #8b5cf6;
    --accent-orange: #f97316;
    --accent-pink: #ec4899;
    --accent-instagram: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    
    --border-light: #e5e7eb;
    --border-input: #d1d5db;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 10px 40px rgba(0, 0, 0, 0.15);
    
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --radius-full: 50%;
    
    --sidebar-width: 200px;
    --sidebar-collapsed: 60px;
    --header-height: 0px;
    --trial-banner-height: 40px;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.35s ease;
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --z-sidebar: 100;
    --z-modal: 1000;
    --z-toast: 1100;
    --z-dropdown: 500;
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-primary-hover);
}

img {
    max-width: 100%;
    height: auto;
}

/* ---- Trial Banner ---- */
.trial-banner {
    background: var(--accent-warning-light);
    color: #856404;
    text-align: center;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: calc(var(--z-sidebar) + 1);
    border-bottom: 1px solid #ffc107;
}

.trial-banner a {
    color: var(--accent-primary);
    font-weight: 600;
}

body.has-trial-banner {
    --trial-banner-height: 40px;
}

/* ---- App Layout ---- */
.app-layout {
    display: flex;
    min-height: 100vh;
    padding-top: var(--trial-banner-height);
}

/* ---- Sidebar ---- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-light);
    position: fixed;
    top: var(--trial-banner-height);
    left: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: var(--z-sidebar);
    transition: width var(--transition-normal);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.sidebar-header:hover {
    background: var(--bg-hover);
}

.workspace-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--accent-warning);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.workspace-icon svg {
    width: 18px;
    height: 18px;
    color: white;
}

.workspace-info {
    overflow: hidden;
}

.workspace-name {
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.workspace-desc {
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.workspace-toggle {
    margin-left: auto;
    color: var(--text-secondary);
    font-size: 10px;
}

/* Sidebar Nav */
.sidebar-nav {
    flex: 1;
    padding: 8px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    gap: 10px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

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

.nav-item.active {
    background: var(--accent-primary-light);
    color: var(--accent-primary);
    font-weight: 600;
}

.nav-item .nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-item .nav-icon svg {
    width: 16px;
    height: 16px;
}

.nav-item .nav-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-item .nav-arrow {
    font-size: 10px;
    color: var(--text-secondary);
    transition: transform var(--transition-fast);
}

.nav-item .nav-badge {
    background: var(--accent-danger);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Sidebar Dropdown */
.nav-dropdown {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
    background: var(--bg-hover);
}

.nav-dropdown.open {
    max-height: 500px;
}

.nav-dropdown .nav-item {
    padding-left: 44px;
    font-size: 12.5px;
    font-weight: 400;
}

/* Sidebar Footer */
.sidebar-footer {
    border-top: 1px solid var(--border-light);
    padding: 8px 0;
}

.sidebar-user {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    gap: 10px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-avatar-placeholder {
    font-size: 14px;
    color: var(--text-secondary);
}

.user-info {
    overflow: hidden;
}

.user-name {
    font-weight: 600;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.sidebar-collapse-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.sidebar-collapse-btn:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* ---- Main Content ---- */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: calc(100vh - var(--trial-banner-height));
    transition: margin-left var(--transition-normal);
}

.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed);
}

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
}

.page-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-header-left h1 {
    font-size: 18px;
    font-weight: 600;
}

.page-header-left .subtitle {
    font-size: 13px;
    color: var(--text-secondary);
}

.page-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Page Content */
.page-content {
    padding: 24px;
}

/* ---- Cards ---- */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

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

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border-light);
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--transition-fast);
    font-family: var(--font-family);
    text-decoration: none;
    white-space: nowrap;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}

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

.btn-primary:hover {
    background: var(--accent-primary-hover);
    color: var(--text-white);
}

.btn-outline {
    background: var(--bg-card);
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

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

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

.btn-danger {
    background: var(--accent-danger);
    color: var(--text-white);
    border-color: var(--accent-danger);
}

.btn-warning {
    background: var(--accent-warning);
    color: var(--text-white);
    border-color: var(--accent-warning);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: transparent;
}

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

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-lg {
    padding: 10px 20px;
    font-size: 15px;
}

.btn-icon {
    padding: 6px;
    border-radius: var(--radius-sm);
}

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

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-input);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-family: var(--font-family);
    color: var(--text-primary);
    background: var(--bg-input);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-primary);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 36px;
    height: 20px;
    display: inline-block;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--border-input);
    border-radius: 20px;
    transition: var(--transition-fast);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background: white;
    border-radius: 50%;
    transition: var(--transition-fast);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--accent-primary);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(16px);
}

/* ---- Tabs ---- */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border-light);
    gap: 0;
}

.tab {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition-fast);
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: var(--font-family);
}

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

.tab.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
    font-weight: 600;
}

/* ---- Badges ---- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.badge-primary {
    background: var(--accent-primary-light);
    color: var(--accent-primary);
}

.badge-success {
    background: var(--accent-success-light);
    color: var(--accent-success);
}

.badge-danger {
    background: var(--accent-danger-light);
    color: var(--accent-danger);
}

.badge-warning {
    background: var(--accent-warning-light);
    color: #92400e;
}

.badge-purple {
    background: #ede9fe;
    color: var(--accent-purple);
}

/* ---- Dropdown ---- */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    z-index: var(--z-dropdown);
    display: none;
    padding: 4px 0;
    margin-top: 4px;
}

.dropdown-menu.show {
    display: block;
    animation: dropdownFade 0.15s ease;
}

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

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    transition: background var(--transition-fast);
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: var(--font-family);
}

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

.dropdown-divider {
    height: 1px;
    background: var(--border-light);
    margin: 4px 0;
}

/* ---- Modal ---- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-modal-overlay);
    z-index: var(--z-modal);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.modal-overlay.show {
    display: flex;
    animation: modalFade 0.2s ease;
}

@keyframes modalFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 1100px;
    box-shadow: var(--shadow-xl);
    margin: auto;
    animation: modalSlide 0.25s ease;
}

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

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

.modal-header h2 {
    font-size: 16px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    line-height: 1;
    transition: all var(--transition-fast);
}

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

.modal-body {
    padding: 0;
}

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

/* ---- Post Composer ---- */
.composer-layout {
    display: flex;
    min-height: 500px;
}

.composer-accounts {
    width: 260px;
    border-right: 1px solid var(--border-light);
    padding: 16px;
    overflow-y: auto;
}

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

.account-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition-fast);
    border: 2px solid transparent;
    margin-bottom: 4px;
}

.account-card:hover {
    background: var(--bg-hover);
}

.account-card.selected {
    background: var(--accent-primary-light);
    border-color: var(--accent-primary);
}

.account-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.account-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.account-avatar .platform-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    border-radius: var(--radius-full);
    border: 1.5px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
}

.platform-badge.instagram {
    background: var(--accent-instagram);
}

.account-info {
    overflow: hidden;
}

.account-name {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-type {
    font-size: 10px;
    color: var(--text-secondary);
}

.account-handle {
    font-size: 11px;
    color: var(--accent-primary);
}

.composer-editor {
    flex: 1;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
}

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

.editor-textarea {
    width: 100%;
    min-height: 150px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    font-family: var(--font-family);
    font-size: 13px;
    resize: vertical;
    color: var(--text-primary);
    line-height: 1.6;
}

.editor-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.editor-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding: 4px 0;
}

.editor-actions-left {
    display: flex;
    gap: 2px;
}

.editor-action-btn {
    padding: 6px 8px;
    border: none;
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    font-size: 15px;
    transition: all var(--transition-fast);
}

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

.write-ai-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--accent-primary);
    font-size: 12px;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.write-ai-btn:hover {
    background: var(--accent-primary-light);
}

.char-counter {
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.char-counter .ig-limit {
    color: var(--accent-primary);
}

.char-counter .hashtag-limit {
    color: var(--accent-orange);
}

/* Instagram Options */
.ig-options {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    margin-top: 16px;
}

.ig-options-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
}

.ig-options-body {
    padding: 0 16px 16px;
}

.post-type-selector {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.post-type-option {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.post-type-option:hover {
    border-color: var(--accent-primary);
}

.post-type-option.active {
    border-color: var(--accent-primary);
    background: var(--accent-primary-light);
}

.post-type-option .icon {
    font-size: 18px;
    margin-bottom: 4px;
}

.post-type-option .label {
    font-size: 12px;
    font-weight: 600;
}

.post-type-option .desc {
    font-size: 10px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Social Preview */
.composer-preview {
    width: 300px;
    border-left: 1px solid var(--border-light);
    padding: 16px;
    background: var(--bg-primary);
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}

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

.preview-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
}

.preview-avatar {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    overflow: hidden;
}

.preview-username {
    font-size: 12px;
    font-weight: 600;
}

.preview-time {
    font-size: 10px;
    color: var(--text-secondary);
}

.preview-media {
    width: 100%;
    aspect-ratio: 1;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 12px;
}

.preview-media img,
.preview-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    font-size: 18px;
    color: var(--text-primary);
}

.preview-actions .save-icon {
    margin-left: auto;
}

.preview-caption {
    padding: 0 12px 12px;
    font-size: 12px;
}

.preview-caption .username {
    font-weight: 600;
}

.preview-placeholder {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 13px;
}

/* ---- Media Upload ---- */
.media-modal {
    max-width: 700px;
}

.media-modal-body {
    display: flex;
    min-height: 400px;
}

.media-sidebar {
    width: 180px;
    border-right: 1px solid var(--border-light);
    padding: 16px;
}

.media-sidebar-section {
    margin-bottom: 16px;
}

.media-sidebar-section h4 {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.media-source-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border: none;
    background: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
    font-size: 13px;
    color: var(--text-primary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    font-family: var(--font-family);
}

.media-source-btn:hover {
    background: var(--bg-hover);
}

.media-source-btn.active {
    background: var(--accent-primary-light);
    color: var(--accent-primary);
    font-weight: 600;
}

.media-dropzone {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.dropzone-area {
    border: 2px dashed var(--accent-primary);
    border-radius: var(--radius-xl);
    padding: 40px;
    text-align: center;
    width: 100%;
    cursor: pointer;
    transition: all var(--transition-fast);
    background: rgba(13, 110, 253, 0.02);
}

.dropzone-area:hover {
    background: rgba(13, 110, 253, 0.05);
}

.dropzone-area .upload-icon {
    font-size: 40px;
    color: var(--accent-primary);
    margin-bottom: 12px;
}

.dropzone-area h3 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.dropzone-area p {
    font-size: 12px;
    color: var(--text-secondary);
}

.supported-formats {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 12px;
}

/* ---- Profile Cards (Social Profiles page) ---- */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 16px;
    position: relative;
}

.profile-card-header {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
    margin-bottom: 12px;
}

.profile-card-body {
    text-align: center;
}

.profile-card .profile-avatar {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    margin: 0 auto 8px;
    overflow: hidden;
    position: relative;
}

.profile-card .profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-card .profile-name {
    font-weight: 600;
    font-size: 14px;
}

.profile-card .profile-type {
    font-size: 11px;
    color: var(--text-secondary);
    margin: 2px 0;
}

.profile-card .profile-handle {
    font-size: 12px;
    color: var(--accent-primary);
}

.profile-card-footer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-secondary);
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 500;
}

.status-badge.connected {
    color: var(--accent-success);
}

.status-badge.expired {
    color: var(--accent-danger);
}

.status-badge.paused {
    color: var(--accent-warning);
}

/* ---- Inbox Layout ---- */
.inbox-layout {
    display: flex;
    height: calc(100vh - var(--trial-banner-height) - 60px);
}

.inbox-profiles {
    width: 240px;
    border-right: 1px solid var(--border-light);
    background: var(--bg-card);
    overflow-y: auto;
}

.inbox-profiles-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
}

.inbox-profile-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background var(--transition-fast);
    border-left: 3px solid transparent;
}

.inbox-profile-item:hover {
    background: var(--bg-hover);
}

.inbox-profile-item.active {
    background: var(--accent-primary-light);
    border-left-color: var(--accent-primary);
}

.inbox-messages {
    flex: 1;
    overflow-y: auto;
    background: var(--bg-primary);
}

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

.message-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin: 8px 16px;
    transition: box-shadow var(--transition-fast);
}

.message-card:hover {
    box-shadow: var(--shadow-md);
}

.message-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.message-sender {
    font-weight: 600;
    font-size: 13px;
}

.message-time {
    font-size: 11px;
    color: var(--text-secondary);
    margin-left: auto;
}

.message-body {
    font-size: 13px;
    color: var(--text-secondary);
    margin-left: 42px;
}

.message-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.message-action-btn {
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    background: none;
    border: none;
    font-size: 14px;
}

.message-action-btn:hover {
    color: var(--accent-primary);
    background: var(--accent-primary-light);
}

.inbox-detail {
    width: 350px;
    border-left: 1px solid var(--border-light);
    background: var(--bg-card);
    overflow-y: auto;
}

/* ---- Reports / Metrics ---- */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 16px;
}

.metric-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.metric-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.metric-change {
    font-size: 11px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.metric-change.positive {
    color: var(--accent-success);
}

.metric-change.negative {
    color: var(--accent-danger);
}

/* ---- Summary Cards (Social Profiles) ---- */
.summary-cards {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.summary-card {
    flex: 1;
    padding: 16px;
    border-radius: var(--radius-lg);
    text-align: center;
}

.summary-card.all {
    background: var(--accent-primary-light);
    border: 1px solid var(--accent-primary);
}

.summary-card.expired {
    background: var(--accent-danger-light);
    border: 1px solid var(--accent-danger);
}

.summary-card.paused {
    background: var(--accent-warning-light);
    border: 1px solid var(--accent-warning);
}

.summary-card .count {
    font-size: 28px;
    font-weight: 700;
}

.summary-card .label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ---- Empty State ---- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state .illustration {
    width: 200px;
    height: 160px;
    margin: 0 auto 20px;
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.empty-state h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* ---- Settings Layout ---- */
.settings-layout {
    display: flex;
    gap: 0;
}

.settings-sidebar {
    width: 250px;
    background: var(--bg-card);
    border-right: 1px solid var(--border-light);
    min-height: calc(100vh - var(--trial-banner-height));
}

.settings-nav {
    padding: 16px 0;
}

.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: var(--font-family);
}

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

.settings-nav-item.active {
    background: var(--accent-primary-light);
    color: var(--accent-primary);
    font-weight: 600;
    border-left: 3px solid var(--accent-primary);
}

.settings-content {
    flex: 1;
    padding: 24px;
    max-width: 900px;
}

.settings-section {
    margin-bottom: 32px;
}

.settings-section h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

/* ---- Library Cards ---- */
.library-templates {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.library-template-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.library-template-card .template-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.library-template-card .template-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.library-template-card .template-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* ---- Toast Notifications ---- */
.toast-container {
    position: fixed;
    top: 60px;
    right: 20px;
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 300px;
    max-width: 450px;
    animation: toastSlide 0.3s ease;
    border-left: 4px solid var(--accent-primary);
}

.toast.success { border-left-color: var(--accent-success); }
.toast.error { border-left-color: var(--accent-danger); }
.toast.warning { border-left-color: var(--accent-warning); }

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

.toast-title {
    font-weight: 600;
    font-size: 13px;
}

.toast-message {
    font-size: 12px;
    color: var(--text-secondary);
}

.toast-close {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
}

/* ---- Upload Progress ---- */
.upload-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    margin-top: 8px;
}

.upload-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
}

.upload-thumbnail img,
.upload-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.progress-bar-container {
    flex: 1;
}

.progress-bar {
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
    overflow: hidden;
}

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

.progress-text {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ---- Floating Chat Widget ---- */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--accent-warning);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    z-index: 99;
    transition: transform var(--transition-fast);
    border: none;
    font-size: 20px;
}

.chat-widget:hover {
    transform: scale(1.1);
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 3px;
}

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

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .composer-layout {
        flex-direction: column;
    }
    
    .composer-accounts {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-light);
    }
    
    .composer-preview {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--border-light);
    }
    
    .inbox-layout {
        flex-direction: column;
    }
    
    .inbox-profiles {
        width: 100%;
        max-height: 200px;
    }
    
    .settings-layout {
        flex-direction: column;
    }
    
    .settings-sidebar {
        width: 100%;
    }
    
    .settings-form-row {
        grid-template-columns: 1fr;
    }
    
    .post-type-selector {
        flex-direction: column;
    }
}

/* ---- Auth Pages ---- */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    padding: 20px;
}

.auth-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 440px;
    padding: 40px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 24px;
}

.auth-logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-primary);
}

.auth-logo p {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 4px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-light);
}

/* ---- Calendar Styles ---- */
.calendar-container {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    padding: 16px;
}

/* ---- Pill Buttons (Labels, Customize) ---- */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pill-primary {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.pill-outline {
    background: white;
    color: var(--text-primary);
    border-color: var(--border-input);
}

.pill-outline:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* ---- Media Warning ---- */
.media-warning {
    background: var(--accent-danger-light);
    border: 1px solid var(--accent-danger);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    font-size: 12px;
    color: var(--accent-danger);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

/* ---- Tab content toggle ---- */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ---- Search Input ---- */
.search-input-wrapper {
    position: relative;
}

.search-input-wrapper .search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-input-wrapper input {
    padding-left: 34px;
}

/* ---- First Comment Accordion ---- */
.accordion {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    margin-top: 16px;
}

.accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
}

.accordion-body {
    display: none;
    padding: 0 16px 16px;
}

.accordion.open .accordion-body {
    display: block;
}

.accordion-arrow {
    transition: transform var(--transition-fast);
}

.accordion.open .accordion-arrow {
    transform: rotate(180deg);
}

/* ---- Auth Pages ---- */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    padding: 24px;
}

.auth-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 40px;
    width: 100%;
    max-width: 420px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-primary);
}

.auth-logo p {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 4px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-light);
}

/* ---- Settings Layout ---- */
.settings-layout {
    display: flex;
    min-height: calc(100vh - var(--trial-banner-height));
}

.settings-sidebar {
    width: 260px;
    background: var(--bg-card);
    border-right: 1px solid var(--border-light);
    flex-shrink: 0;
}

.settings-nav {
    padding: 8px 0;
}

.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    font-size: 13px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

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

.settings-nav-item.active {
    background: var(--accent-primary-light);
    color: var(--accent-primary);
    font-weight: 600;
    border-right: 3px solid var(--accent-primary);
}

.settings-nav-item i {
    width: 16px;
    text-align: center;
}

.settings-content {
    flex: 1;
    padding: 24px 40px;
    overflow-y: auto;
}

.settings-section h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

/* ---- Profile Grid (Social Profiles page) ---- */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-normal);
}

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

.profile-card-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    padding: 12px 16px;
}

.profile-card-body {
    text-align: center;
    padding: 0 16px 16px;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 12px;
    border: 3px solid var(--border-light);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 2px;
}

.profile-type {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.profile-handle {
    font-size: 12px;
    color: var(--accent-primary);
    text-decoration: none;
}

.profile-handle:hover {
    text-decoration: underline;
}

.profile-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-top: 1px solid var(--border-light);
    font-size: 11px;
    color: var(--text-secondary);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
}

.status-badge.connected {
    background: var(--accent-success-light);
    color: var(--accent-success);
}

.status-badge.expired {
    background: var(--accent-danger-light);
    color: var(--accent-danger);
}

.status-badge.paused {
    background: var(--accent-warning-light);
    color: var(--accent-warning);
}

/* ---- Summary Cards ---- */
.summary-cards {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.summary-card {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 16px;
    text-align: center;
}

.summary-card .count {
    font-size: 24px;
    font-weight: 700;
}

.summary-card .label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ---- Metrics Grid (Reports) ---- */
.metrics-grid {
    display: grid;
    gap: 16px;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 16px;
}

.metric-label {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.metric-value {
    font-size: 28px;
    font-weight: 700;
    margin: 8px 0;
}

.metric-change {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.metric-change.positive {
    color: var(--accent-success);
}

.metric-change.negative {
    color: var(--accent-danger);
}

/* ---- Library Templates ---- */
.library-templates {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.library-template-card {
    background: var(--bg-card);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 20px;
    cursor: pointer;
    text-align: center;
    transition: all var(--transition-normal);
}

.library-template-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.template-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.template-name {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 4px;
}

.template-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* ---- Inbox Layout ---- */
.inbox-layout {
    display: flex;
    min-height: calc(100vh - var(--trial-banner-height));
}

.inbox-profiles {
    width: 240px;
    background: var(--bg-card);
    border-right: 1px solid var(--border-light);
    flex-shrink: 0;
}

.inbox-profiles-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
}

.inbox-profile-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    transition: background var(--transition-fast);
}

.inbox-profile-item:hover {
    background: var(--bg-hover);
}

.inbox-profile-item.active {
    background: var(--accent-primary-light);
}

.inbox-messages {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.inbox-messages-header {
    padding: 16px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
}

.inbox-detail {
    width: 350px;
    background: var(--bg-card);
    border-left: 1px solid var(--border-light);
}

/* ---- Message Cards ---- */
.message-card {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition-fast);
}

.message-card:hover {
    background: var(--bg-hover);
}

.message-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.message-sender {
    font-weight: 600;
    font-size: 13px;
}

.message-time {
    font-size: 11px;
    color: var(--text-muted);
}

.message-body {
    font-size: 13px;
    color: var(--text-secondary);
    padding-left: 40px;
    line-height: 1.5;
}

.message-actions {
    display: flex;
    gap: 4px;
    padding-left: 40px;
    margin-top: 6px;
}

.message-action-btn {
    background: none;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 3px 8px;
    font-size: 11px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.message-action-btn:hover {
    background: var(--bg-hover);
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

/* ---- Tabs ---- */
.tabs {
    display: flex;
    gap: 0;
}

.tab {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tab:hover {
    color: var(--accent-primary);
}

.tab.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
    font-weight: 600;
}

/* ---- Account card in Composer ---- */
.account-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition-fast);
    margin-bottom: 2px;
}

.account-card:hover {
    background: var(--bg-hover);
}

.account-card.selected {
    background: var(--accent-primary-light);
    border: 1px solid var(--accent-primary);
}

.account-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.account-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.platform-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.platform-badge.instagram {
    background: linear-gradient(45deg, #f09433, #dc2743, #bc1888);
}

.account-info {
    overflow: hidden;
}

.account-name {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

/* ---- Badge Variants ---- */
.badge-purple {
    background: #f3e8ff;
    color: var(--accent-purple);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -200px;
        transition: left var(--transition-normal);
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .settings-layout,
    .inbox-layout {
        flex-direction: column;
    }
    
    .settings-sidebar,
    .inbox-profiles,
    .inbox-detail {
        width: 100%;
    }
    
    .settings-form-row {
        grid-template-columns: 1fr;
    }
    
    .profile-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-cards {
        flex-direction: column;
    }
}
