/* Dodosweb - Digital Marketing Suite */

:root {
    --primary-color: #1B9CFC;
    --primary-dark: #0984e3;
    --primary-light: #E3F2FD;
    --accent-color: #7CB342;
    --accent-dark: #689F38;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --white: #ffffff;
    --sidebar-width: 240px;
    --header-height: 60px;
    --border-radius: 8px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
    --transition: all 0.2s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}

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

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

/* Auth Layout */
.auth-wrapper {
    display: flex;
    min-height: 100vh;
}

.auth-left {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--white);
}

.auth-right {
    flex: 1;
    background: linear-gradient(135deg, #1B9CFC 0%, #7CB342 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icons-bg {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 40px;
    opacity: 0.12;
    transform: rotate(-10deg) scale(1.8);
    padding: 50px;
}

.social-icons-bg i {
    font-size: 50px;
    color: white;
}

.auth-form-container {
    width: 100%;
    max-width: 400px;
}

.auth-logo {
    margin-bottom: 30px;
}

.auth-logo .logo-text {
    display: none;
}

.auth-logo img {
    height: 96px;
    width: auto;
}

.auth-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition);
    background: var(--white);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 179, 244, 0.1);
}

.form-control::placeholder {
    color: #aaa;
}

.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-check-input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.form-check-label {
    font-size: 14px;
    color: #666;
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.forgot-link {
    font-size: 14px;
    color: var(--primary-color);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    width: 100%;
}

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

.btn-secondary {
    background: var(--secondary-color);
    color: var(--white);
}

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

.btn-outline {
    background: transparent;
    border: 1px solid #ddd;
    color: #666;
}

.btn-outline:hover {
    background: #f5f5f5;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.signup-link {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-top: 20px;
}

.signup-link a {
    color: var(--primary-color);
    font-weight: 500;
}

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

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--white);
    border-right: 1px solid #eee;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.sidebar-logo {
    display: block;
    text-decoration: none;
}

.sidebar-logo img {
    height: 64px;
    width: auto;
}

.sidebar-logo span {
    display: none;
}

.create-post-btn {
    margin: 20px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #1B9CFC 0%, #7CB342 100%);
    color: var(--white);
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    text-decoration: none;
}

.create-post-btn:hover {
    background: linear-gradient(135deg, #0984e3 0%, #689F38 100%);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(27, 156, 252, 0.4);
}

.sidebar-nav {
    flex: 1;
    padding: 10px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #666;
    font-size: 14px;
    transition: var(--transition);
    text-decoration: none;
}

.nav-item:hover, .nav-item.active {
    color: #333;
    background: #f8f9fa;
}

.nav-item.active {
    border-left: 3px solid var(--primary-color);
    padding-left: 17px;
}

.nav-item i {
    width: 20px;
    font-size: 16px;
}

.nav-section-title {
    padding: 20px 20px 10px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #eee;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--primary-color);
}

.user-info {
    flex: 1;
    overflow: hidden;
}

.user-name {
    font-weight: 500;
    font-size: 14px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 12px;
    color: #999;
}

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

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

.page-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.date-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f5f7fa;
    padding: 5px;
    border-radius: 25px;
}

.date-filter button, .date-filter a {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    background: transparent;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.date-filter button.active,
.date-filter button:hover,
.date-filter a.active,
.date-filter a:hover {
    background: var(--white);
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.content-body {
    padding: 30px;
}

/* Social Accounts Row */
.social-accounts-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 0;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.social-account {
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}

.social-account:hover {
    transform: scale(1.05);
}

.social-account.selected .account-avatar {
    border: 3px solid var(--primary-color);
}

.account-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid transparent;
    overflow: hidden;
}

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

.account-avatar i {
    font-size: 20px;
}

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

.platform-badge.instagram { background: #E4405F; }
.platform-badge.facebook { background: #1877F2; }
.platform-badge.linkedin { background: #0A66C2; }
.platform-badge.youtube { background: #FF0000; }
.platform-badge.twitter { background: #000000; }
.platform-badge.tiktok { background: #000000; }

/* Stats Cards */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow-sm);
}

.stat-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    margin-top: 8px;
}

.stat-change.up { color: var(--success-color); }
.stat-change.down { color: var(--danger-color); }

/* Chart Container */
.chart-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
}

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

.chart-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.chart-subtitle {
    font-size: 13px;
    color: #999;
    margin-top: 4px;
}

/* Posts Table */
.posts-table-wrapper {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.table-title {
    font-size: 16px;
    font-weight: 600;
}

.table-actions {
    display: flex;
    gap: 10px;
}

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

.posts-table th,
.posts-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.posts-table th {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #999;
    background: #fafafa;
}

.posts-table tbody tr:hover {
    background: #f8f9fa;
}

.post-content-preview {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-platforms {
    display: flex;
    gap: 5px;
}

.post-platforms i {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.draft { background: #f0f0f0; color: #666; }
.status-badge.scheduled { background: #e3f2fd; color: #1976d2; }
.status-badge.publishing { background: #fff3e0; color: #f57c00; }
.status-badge.published { background: #e8f5e9; color: #388e3c; }
.status-badge.failed { background: #ffebee; color: #d32f2f; }
.status-badge.trash { background: #fce4ec; color: #c2185b; }

.action-btns {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background: #f5f5f5;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

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

.action-btn.delete:hover {
    background: var(--danger-color);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--white);
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: var(--transition);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

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

.modal-title {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #eee;
}

/* Account Selection */
.account-select {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.account-checkbox {
    display: none;
}

.account-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 2px solid #eee;
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
}

.account-checkbox:checked + .account-label {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.account-label i {
    font-size: 16px;
}

/* Content Editor */
.content-editor {
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 20px;
}

.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px;
    background: #fafafa;
    border-bottom: 1px solid #eee;
}

.toolbar-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    color: #666;
    transition: var(--transition);
}

.toolbar-btn:hover {
    background: #eee;
    color: #333;
}

.editor-textarea {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    border: none;
    resize: vertical;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.6;
}

.editor-textarea:focus {
    outline: none;
}

.char-counter {
    padding: 10px 15px;
    font-size: 12px;
    color: #999;
    text-align: right;
    border-top: 1px solid #eee;
}

/* Media Upload */
.media-upload {
    border: 2px dashed #ddd;
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 20px;
}

.media-upload:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.media-upload i {
    font-size: 32px;
    color: #ccc;
    margin-bottom: 10px;
    display: block;
}

.media-upload p {
    color: #666;
    font-size: 14px;
}

.media-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.media-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
}

.media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-item .remove-media {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    cursor: pointer;
}

/* Schedule Options */
.schedule-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

/* Calendar */
.calendar-wrapper {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 20px;
}

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

.calendar-month {
    font-size: 18px;
    font-weight: 600;
}

.calendar-nav {
    display: flex;
    gap: 10px;
}

.calendar-nav button {
    width: 36px;
    height: 36px;
    border: 1px solid #eee;
    background: white;
    border-radius: 50%;
    cursor: pointer;
}

.calendar-nav button:hover {
    background: #f5f5f5;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day-name {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #999;
    padding: 10px;
}

.calendar-day {
    min-height: 80px;
    display: flex;
    flex-direction: column;
    padding: 8px;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.calendar-day:hover {
    border-color: var(--primary-color);
}

.calendar-day.today {
    background: var(--primary-light);
    border-color: var(--primary-color);
}

.calendar-day.other-month {
    opacity: 0.4;
}

.day-number {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.day-posts {
    font-size: 10px;
    color: var(--primary-color);
}

.day-post-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-color);
    display: inline-block;
    margin-right: 3px;
}

/* Media Library */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.media-card {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    background: #f5f5f5;
}

.media-card:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow);
}

.media-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.media-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
}

.media-card-name {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Social Accounts Page */
.accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.account-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 15px;
}

.account-card-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.account-card-avatar i {
    font-size: 24px;
}

.account-card-info {
    flex: 1;
}

.account-card-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
}

.account-card-handle {
    font-size: 13px;
    color: #666;
}

.account-card-status {
    font-size: 12px;
    color: var(--success-color);
    margin-top: 5px;
}

.account-card-status.disconnected {
    color: var(--danger-color);
}

.account-card-actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
}

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

.empty-state i {
    font-size: 64px;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
}

.empty-state p {
    color: #666;
    margin-bottom: 20px;
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.tab {
    padding: 12px 24px;
    border: none;
    background: none;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    text-decoration: none;
}

.tab.active,
.tab:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}

.page-item {
    width: 36px;
    height: 36px;
    border: 1px solid #eee;
    background: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: #333;
}

.page-item:hover,
.page-item.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Card */
.card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-toggle {
        display: block !important;
    }
}

@media (max-width: 768px) {
    .auth-right {
        display: none;
    }
    
    .stats-row {
        grid-template-columns: 1fr;
    }
    
    .schedule-options {
        grid-template-columns: 1fr;
    }
    
    .content-body {
        padding: 15px;
    }
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 101;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    cursor: pointer;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: #999; }
.text-primary { color: var(--primary-color); }
.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.w-100 { width: 100%; }

/* Toast Notifications */
.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    margin-bottom: 10px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

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

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

.toast-info {
    border-left: 4px solid var(--primary-color);
}

.toast-warning {
    border-left: 4px solid var(--warning-color);
}

/* Status Info */
.status-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: var(--border-radius);
}

/* Drag over state for media upload */
.media-upload.dragover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

/* Pinterest and Threads platform colors */
.platform-badge.pinterest { background: #BD081C; }
.platform-badge.threads { background: #000000; }

/* Form control invalid state */
.form-control.is-invalid {
    border-color: var(--danger-color);
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

/* Better button focus states */
.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 179, 244, 0.3);
}

.btn-primary:focus {
    box-shadow: 0 0 0 3px rgba(74, 179, 244, 0.3);
}

.btn-success:focus {
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.3);
}

.btn-danger:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.3);
}

/* Improved scrollbar styles */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Loading spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Btn loading state */
.btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn.loading::after {
    content: '';
    width: 14px;
    height: 14px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
}

/* ===================== v2: clients, accounts, publish results ===================== */
.ws-switcher { position: relative; margin: 0 15px 14px; }
.ws-current { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--light-color);
    border: 1px solid #e6e8eb; border-radius: var(--border-radius); cursor: pointer; text-align: left; font: inherit; color: var(--dark-color); }
.ws-current:hover { border-color: var(--primary-color); }
.ws-current .fa-chevron-down { font-size: 11px; color: #999; margin-left: auto; transition: var(--transition); }
.ws-switcher.open .fa-chevron-down { transform: rotate(180deg); }
.ws-name { min-width: 0; font-weight: 600; font-size: 13px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-name small { display: block; font-weight: 500; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: #999; }
.ws-dot { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 8px; color: #fff; font-weight: 700; font-size: 13px;
    display: inline-flex; align-items: center; justify-content: center; }
.ws-dot.sm { flex-basis: 22px; width: 22px; height: 22px; border-radius: 6px; font-size: 11px; }
.ws-dot.lg { flex-basis: 44px; width: 44px; height: 44px; border-radius: 10px; font-size: 18px; }
.ws-menu { display: none; position: absolute; z-index: 50; left: 0; right: 0; top: calc(100% + 4px); background: #fff;
    border: 1px solid #e6e8eb; border-radius: var(--border-radius); box-shadow: var(--shadow-lg); max-height: 320px; overflow-y: auto; padding: 4px; }
.ws-switcher.open .ws-menu { display: block; }
.ws-menu a { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 6px; font-size: 13px; color: var(--dark-color); text-decoration: none; }
.ws-menu a:hover, .ws-menu a.active { background: var(--primary-light); }
.ws-menu a.ws-manage { color: var(--primary-dark); font-weight: 500; }
.ws-menu a.ws-manage:first-of-type { border-top: 1px solid #eee; margin-top: 4px; }

.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.client-card { background: #fff; border: 1px solid #e9ecef; border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.client-card.current { border-color: var(--primary-color); box-shadow: 0 0 0 3px var(--primary-light); }
.client-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.client-head h3 { font-size: 16px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.client-head p { margin: 0; font-size: 12px; color: #888; }
.client-stats { display: flex; gap: 8px; }
.client-stats div { flex: 1; background: var(--light-color); border-radius: 8px; padding: 8px; text-align: center; font-size: 11px; color: #777; }
.client-stats strong { display: block; font-size: 18px; color: var(--dark-color); }
.client-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }

.acct-list { display: flex; flex-direction: column; gap: 10px; }
.acct-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid #e9ecef; border-radius: 10px; background: #fff; flex-wrap: wrap; }
.acct-row.paused { opacity: .6; }
.acct-avatar { position: relative; flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; background: var(--light-color) center/cover no-repeat;
    display: flex; align-items: center; justify-content: center; font-size: 18px; }
.acct-avatar .net { position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; border-radius: 50%; color: #fff; font-size: 10px;
    display: flex; align-items: center; justify-content: center; border: 2px solid #fff; }
.acct-main { flex: 1 1 200px; min-width: 0; }
.acct-main strong { display: block; font-size: 14px; }
.acct-main span { font-size: 12px; color: #888; }
.acct-actions { display: flex; gap: 6px; align-items: center; }
.acct-actions form { display: inline; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; line-height: 1.6; }
.pill.ok { background: #e6f6ea; color: #1e7e34; }
.pill.warn { background: #fff5d6; color: #8a6100; }
.pill.bad { background: #fde8ea; color: #b02a37; }
.pill.muted { background: #eef0f2; color: #6c757d; }

.connect-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.connect-card { border: 1px solid #e9ecef; border-radius: 12px; padding: 18px; background: #fff; display: flex; flex-direction: column; gap: 10px; }
.connect-card h4 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.connect-card p { margin: 0; font-size: 13px; color: #777; flex: 1; }
.soon-row { display: flex; flex-wrap: wrap; gap: 8px; }
.soon-row span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px dashed #d5d9dd; border-radius: 999px; font-size: 12px; color: #888; }

.pick-row { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid #e9ecef; border-radius: 10px; cursor: pointer; margin-bottom: 8px; }
.pick-row:hover { border-color: var(--primary-color); }
.pick-row input { width: 18px; height: 18px; }

.setup-steps { margin: 0 0 0 18px; padding: 0; font-size: 13px; color: #555; line-height: 1.7; }
.copy-box { display: flex; gap: 6px; }
.copy-box input { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; background: var(--light-color); }

.result-row { display: flex; gap: 14px; padding: 14px; border: 1px solid #e9ecef; border-radius: 10px; margin-bottom: 10px; align-items: flex-start; flex-wrap: wrap; }
.result-row .err { flex-basis: 100%; background: #fde8ea; color: #842029; border-radius: 8px; padding: 10px 12px; font-size: 13px; word-break: break-word; }
.post-preview { white-space: pre-wrap; word-break: break-word; background: var(--light-color); border-radius: 10px; padding: 14px; font-size: 14px; line-height: 1.55; }
.post-media-strip { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.post-media-strip img, .post-media-strip .vid { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; background: #222; color: #fff;
    display: flex; align-items: center; justify-content: center; }

.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; max-height: 210px; overflow-y: auto; padding: 2px; }
.lib-item { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; cursor: pointer; border: 2px solid transparent; background: #222; }
.lib-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lib-item .vid { position: absolute; inset: 0; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.lib-item input { position: absolute; opacity: 0; }
.lib-item:has(input:checked) { border-color: var(--primary-color); }
.lib-item:has(input:checked)::after { content: "\2713"; position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%;
    background: var(--primary-color); color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.lib-item:has(input:focus-visible) { outline: 2px solid var(--primary-dark); outline-offset: 2px; }
.net-hints { font-size: 12px; color: #777; margin-top: 8px; }
.net-hints div { display: none; } .net-hints div.on { display: block; }
.btn-danger-outline { background: #fff; color: var(--danger-color); border: 1px solid var(--danger-color); }
.btn-danger-outline:hover { background: var(--danger-color); color: #fff; }
.status-badge.partial { background: #fff5d6; color: #8a6100; }
.status-badge.publishing { background: #e3f2fd; color: #0b63b0; }
.alert-error { background: #fde8ea; color: #842029; }

/* Composer buttons: one line each, sized to their text */
.post-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.post-actions .btn { flex: 0 0 auto; width: auto; white-space: nowrap; }

/* ===================== v2.2: composer layout, action bar, live preview ===================== */
.composer-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
.composer-form { min-width: 0; }
@media (max-width: 1200px) { .composer-layout { grid-template-columns: minmax(0, 1fr); } }

/* action bar — own classes so no other .btn rule can stretch these */
.post-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 28px; padding-top: 20px; border-top: 1px solid #eef0f2; }
.pa-main { display: flex; gap: 10px; margin-left: auto; flex-wrap: wrap; }
.pa-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: auto; flex: 0 0 auto; white-space: nowrap;
    height: 44px; padding: 0 20px; border-radius: 10px; border: 1px solid transparent; font: inherit; font-size: 14px; font-weight: 600;
    cursor: pointer; transition: background .15s, box-shadow .15s, transform .1s, border-color .15s; }
.pa-btn:active { transform: translateY(1px); }
.pa-btn:focus-visible { outline: 3px solid rgba(27,156,252,.35); outline-offset: 2px; }
.pa-draft { background: #fff; color: #444; border-color: #dfe3e8; }
.pa-draft:hover { border-color: #b8c0c8; background: #f8f9fa; }
.pa-schedule { background: #fff; color: var(--primary-dark); border-color: var(--primary-color); }
.pa-schedule:hover { background: var(--primary-light); }
.pa-publish { background: var(--primary-color); color: #fff; box-shadow: 0 4px 12px rgba(27,156,252,.3); }
.pa-publish:hover { background: var(--primary-dark); box-shadow: 0 6px 16px rgba(27,156,252,.38); }
.pa-hint { margin: 10px 0 0; font-size: 13px; color: #8a6100; background: #fff5d6; padding: 8px 12px; border-radius: 8px; }
@media (max-width: 600px) {
    .pa-main { margin-left: 0; width: 100%; }
    .pa-btn { flex: 1 1 100%; }
}

/* preview */
.composer-preview { position: sticky; top: 20px; background: #f5f7fa; border: 1px solid #e9ecef; border-radius: 14px; padding: 14px; }
.pv-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.pv-title { font-weight: 600; font-size: 14px; color: #333; display: flex; align-items: center; gap: 7px; }
.pv-tabs { display: flex; gap: 6px; }
.pv-tab { width: 34px; height: 34px; border-radius: 50%; border: 1px solid #dfe3e8; background: #fff; color: #9aa3ab; cursor: pointer; position: relative; transition: all .15s; }
.pv-tab.selected::after { content: ""; position: absolute; right: -1px; top: -1px; width: 9px; height: 9px; border-radius: 50%; background: #28a745; border: 2px solid #f5f7fa; }
.pv-tab[data-net="facebook"].active { background: #1877F2; border-color: #1877F2; color: #fff; }
.pv-tab[data-net="instagram"].active { background: linear-gradient(45deg,#f09433,#dc2743,#bc1888); border-color: transparent; color: #fff; }
.pv-tab[data-net="linkedin"].active { background: #0A66C2; border-color: #0A66C2; color: #fff; }
.pv-card { background: #fff; border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.08); overflow: hidden; font-size: 14px; color: #1c1e21; }
.pv-top { display: flex; align-items: center; gap: 10px; padding: 12px 14px 8px; }
.pv-top b { display: block; font-size: 14px; }
.pv-top small { display: block; font-size: 12px; color: #65676b; }
.pv-dim { margin-left: auto; color: #8a8d91; }
.pv-avatar { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%; color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.net-instagram .pv-avatar { flex-basis: 32px; width: 32px; height: 32px; font-size: 13px; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #dc2743; }
.net-linkedin .pv-avatar { border-radius: 6px; }
.pv-text { margin: 0; padding: 0 14px 10px; line-height: 1.45; word-wrap: break-word; }
.net-instagram .pv-text { padding-top: 2px; }
.pv-link { color: #1a5fb4; }
.net-instagram .pv-link { color: #00376b; }
.pv-more-btn { border: 0; background: none; padding: 0; color: #65676b; font: inherit; cursor: pointer; }
.pv-time { margin: 0; padding: 2px 14px 12px; font-size: 11px; color: #8e8e8e; text-transform: uppercase; letter-spacing: .02em; }
.pv-media { position: relative; background: #000; }
.pv-media img, .pv-media video { display: block; width: 100%; height: 100%; object-fit: cover; }
.pv-media.single img, .pv-media.single video { height: auto; max-height: 420px; object-fit: contain; background: #000; }
.pv-media.ig { aspect-ratio: 1; }
.pv-media.grid { display: grid; gap: 2px; aspect-ratio: 1; }
.pv-media.g2 { grid-template-columns: 1fr 1fr; aspect-ratio: 2 / 1.2; }
.pv-media.g3 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.pv-media.g3 .cell:first-child { grid-row: span 2; }
.pv-media.g4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.pv-media .cell { position: relative; overflow: hidden; min-height: 0; background: #222; }
.pv-play { position: absolute; inset: 0; margin: auto; width: 52px; height: 52px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.pv-more { position: absolute; inset: 0; background: rgba(0,0,0,.5); color: #fff; font-size: 26px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.pv-count { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; padding: 3px 9px; border-radius: 99px; }
.pv-dots { position: absolute; bottom: -18px; left: 0; right: 0; display: flex; justify-content: center; gap: 4px; }
.pv-dots i { width: 6px; height: 6px; border-radius: 50%; background: #c7c7c7; }
.pv-dots i.on { background: #0095f6; }
.pv-missing { background: #fafafa; color: #b0b0b0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-size: 13px; border-top: 1px solid #efefef; border-bottom: 1px solid #efefef; }
.pv-missing i { font-size: 34px; }
.pv-actions { display: flex; justify-content: space-around; border-top: 1px solid #e4e6eb; margin: 0 12px; padding: 6px 0; color: #65676b; font-size: 13px; font-weight: 600; }
.pv-actions span { display: flex; align-items: center; gap: 6px; padding: 6px 8px; }
.pv-actions.ig { justify-content: flex-start; gap: 16px; border: 0; margin: 0; padding: 22px 14px 6px; font-size: 22px; color: #262626; }
.pv-empty { padding: 44px 24px; text-align: center; color: #9aa3ab; }
.pv-empty i { font-size: 28px; margin-bottom: 10px; }
.pv-empty p { margin: 0; font-size: 13px; }
.pv-notes { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.pv-notes span { font-size: 12.5px; padding: 7px 10px; border-radius: 8px; line-height: 1.4; }
.pv-notes .warn { background: #fff5d6; color: #8a6100; }
.pv-notes .bad { background: #fde8ea; color: #b02a37; }
.pv-foot { margin: 10px 2px 0; font-size: 11.5px; color: #98a1aa; }
