/* ============================================================
   ROTARACT SOCIAL HUB — ADMIN DASHBOARD
   Complete CSS Design System
   ============================================================ */

/* ======================== CSS VARIABLES ======================== */
:root {
    /* Brand Colors - Rotary/Rotaract inspired */
    --primary: #1a3a5c;
    --primary-light: #2a5a8c;
    --primary-dark: #0e2240;
    --accent: #f7a823;
    --accent-light: #ffc857;
    --accent-dark: #d48e1a;

    /* Status Colors */
    --success: #10b981;
    --success-light: #d1fae5;
    --success-dark: #065f46;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --warning-dark: #92400e;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --danger-dark: #991b1b;
    --info: #3b82f6;
    --info-light: #dbeafe;
    --info-dark: #1e40af;

    /* Neutrals */
    --bg-primary: #f0f2f5;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f8f9fa;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;

    /* Platform Colors */
    --twitter-color: #000000;
    --linkedin-color: #0077b5;
    --instagram-color: #e4405f;

    /* Layout */
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --topbar-height: 64px;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    --border-radius-xl: 20px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Font */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    color: var(--text-primary);
    line-height: 1.6;
    background: var(--bg-primary);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

input, button, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* ======================== SCROLLBAR ======================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}


/* ================================================================
   LOGIN PAGE
   ================================================================ */

.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    position: relative;
    overflow: hidden;
    padding: 20px;
}

/* Animated Background Shapes */
.login-bg {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.bg-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.07;
    background: var(--accent);
}

.bg-shape-1 {
    width: 600px;
    height: 600px;
    top: -200px;
    right: -150px;
    animation: floatShape 20s ease-in-out infinite;
}

.bg-shape-2 {
    width: 400px;
    height: 400px;
    bottom: -100px;
    left: -100px;
    animation: floatShape 25s ease-in-out infinite reverse;
}

.bg-shape-3 {
    width: 300px;
    height: 300px;
    top: 40%;
    left: 50%;
    animation: floatShape 18s ease-in-out infinite 3s;
}

@keyframes floatShape {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.05); }
    50% { transform: translate(-20px, 30px) scale(0.95); }
    75% { transform: translate(40px, 20px) scale(1.03); }
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 900px;
}

.login-card {
    display: flex;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl), 0 0 60px rgba(0, 0, 0, 0.2);
    min-height: 520px;
}

/* Login Left - Branding */
.login-branding {
    width: 42%;
    background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 48px 36px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.login-branding::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(247, 168, 35, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.branding-content {
    position: relative;
    z-index: 1;
    color: var(--text-inverse);
}

.branding-icon {
    width: 56px;
    height: 56px;
    background: var(--accent);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary-dark);
    margin-bottom: 24px;
    box-shadow: 0 4px 15px rgba(247, 168, 35, 0.4);
}

.branding-content h1 {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
}

.branding-content h1 span {
    color: var(--accent);
}

.branding-content > p {
    font-size: 14px;
    line-height: 1.7;
    opacity: 0.8;
    margin-bottom: 32px;
}

.branding-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    opacity: 0.9;
}

.feature-item i {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--accent);
}

/* Login Right - Form */
.login-form-panel {
    flex: 1;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-header {
    margin-bottom: 32px;
}

.form-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.form-header p {
    color: var(--text-muted);
    font-size: 14px;
}

#home-redirect {
    font-size: 1.1rem;
    color:#1e40af ;
 }
/* ============================================
   GALLERY ADMIN STYLES
============================================ */

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

/* Upload zone (reuse existing but gallery-specific) */
.gallery-upload-zone {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    background: var(--bg-secondary);
}

.gallery-upload-zone:hover,
.gallery-upload-zone.dragover {
    border-color: var(--primary);
    background: rgba(0, 97, 162, 0.04);
}

.gallery-upload-zone .upload-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.gallery-upload-zone .upload-content i {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: block;
}

.gallery-upload-zone .upload-content p {
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.gallery-upload-zone .upload-content small {
    color: var(--text-muted);
    font-size: 12px;
}

.gallery-upload-zone .upload-browse {
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
}

/* Staging Area */
.gallery-staging {
    margin-top: 20px;
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

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

.staging-header h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.staging-actions {
    display: flex;
    gap: 8px;
}

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

.staging-item {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: white;
    transition: box-shadow 0.2s;
}

.staging-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.staging-img {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

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

.staging-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s;
}

.staging-item:hover .staging-remove {
    opacity: 1;
}

.staging-size {
    position: absolute;
    bottom: 6px;
    left: 6px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.staging-description {
    width: 100%;
    border: none;
    border-top: 1px solid var(--border);
    padding: 10px 12px;
    font-size: 13px;
    font-family: inherit;
    resize: none;
    outline: none;
    background: transparent;
}

.staging-description:focus {
    background: var(--bg-secondary);
}

/* Gallery Admin Grid */
.gallery-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.gallery-admin-item {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: white;
    transition: all 0.2s;
    position: relative;
}

.gallery-admin-item:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.gallery-admin-item.selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 97, 162, 0.2);
}

.gallery-select-checkbox {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.9);
    border-radius: 6px;
    color: var(--primary);
    font-size: 16px;
}

.gallery-admin-img {
    aspect-ratio: 4/3;
    overflow: hidden;
    cursor: pointer;
}

.gallery-admin-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-admin-item:hover .gallery-admin-img img {
    transform: scale(1.05);
}

.gallery-admin-info {
    padding: 10px 12px;
    border-top: 1px solid var(--border);
}

.gallery-admin-desc {
    display: block;
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.gallery-admin-date {
    font-size: 11px;
    color: var(--text-muted);
}

.gallery-admin-actions {
    display: flex;
    gap: 4px;
    padding: 6px 12px 10px;
    justify-content: flex-end;
}

.btn-icon-danger {
    color: var(--danger) !important;
}

.btn-icon-danger:hover {
    background: rgba(220, 53, 69, 0.1) !important;
}

/* Gallery Edit Modal */
.gallery-edit-preview {
    width: 100%;
    max-height: 300px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.gallery-edit-preview img {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
}

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

/* Lightbox */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 2;
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.2);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 2;
}

.lightbox-nav:hover {
    background: rgba(255,255,255,0.25);
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 78vh;
    object-fit: contain;
    border-radius: 4px;
    transition: opacity 0.15s;
}

.lightbox-caption {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    margin-top: 12px;
    text-align: center;
    max-width: 600px;
}

/* Responsive */
@media (max-width: 768px) {
    .gallery-admin-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    .staging-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    .staging-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .lightbox-nav {
        width: 40px;
        height: 40px;
    }
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
    .stats-grid-2 {
        grid-template-columns: 1fr;
    }
}
/* ======================== FORM ELEMENTS (SHARED) ======================== */

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

.label-hint {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 12px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: 14px;
    z-index: 1;
    transition: color var(--transition-fast);
}

.input-wrapper input,
.form-input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-secondary);
    transition: all var(--transition-fast);
    outline: none;
}

.input-wrapper input:focus,
.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 58, 92, 0.1);
}

.input-wrapper input:focus ~ .input-icon,
.input-wrapper input:focus + .input-icon {
    color: var(--primary);
}

.form-input {
    padding-left: 14px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
    transition: color var(--transition-fast);
    z-index: 1;
}

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

.field-error {
    display: block;
    font-size: 12px;
    color: var(--danger);
    margin-top: 4px;
    min-height: 16px;
}

.form-hint {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Alerts */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    margin-bottom: 16px;
    animation: slideDown 0.3s ease;
}

.alert-error {
    background: var(--danger-light);
    color: var(--danger-dark);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-success {
    background: var(--success-light);
    color: var(--success-dark);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-warning {
    background: var(--warning-light);
    color: var(--warning-dark);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.alert-info {
    background: var(--info-light);
    color: var(--info-dark);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

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

/* ======================== BUTTONS ======================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: 2px solid transparent;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    outline: none;
    white-space: nowrap;
    text-decoration: none;
}

.btn:active {
    transform: scale(0.97);
}

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

.btn-primary:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
}

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

.btn-outline:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-muted);
}

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

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

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

.btn-full {
    width: 100%;
}

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

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.btn-content,
.btn-loader {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.form-footer {
    margin-top: 28px;
    text-align: center;
}

.form-footer p {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}


/* ================================================================
   DASHBOARD LAYOUT
   ================================================================ */

.dashboard-body {
    display: flex;
    min-height: 100vh;
}

/* ======================== SIDEBAR ======================== */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform var(--transition-base);
}

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

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 17px;
    font-weight: 700;
    color: var(--primary);
}

.sidebar-logo i {
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: var(--text-inverse);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 0 12px;
    margin-bottom: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-fast);
    position: relative;
    margin-bottom: 2px;
}

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

.nav-item.active {
    background: rgba(26, 58, 92, 0.08);
    color: var(--primary);
    font-weight: 600;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 15px;
}

.nav-badge {
    margin-left: auto;
    padding: 2px 8px;
    background: var(--accent);
    color: var(--primary-dark);
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.nav-count {
    margin-left: auto;
    padding: 2px 8px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

.nav-count.warning {
    background: var(--danger-light);
    color: var(--danger);
}

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

.platform-status-bar {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.platform-dot-sm {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.platform-dot-sm.connected {
    color: var(--text-inverse);
}

.platform-dot-sm.connected#twitterDot { background: var(--twitter-color); }
.platform-dot-sm.connected#linkedinDot { background: var(--linkedin-color); }
.platform-dot-sm.connected#instagramDot { background: var(--instagram-color); }

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

.user-avatar-sm {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-inverse);
    font-size: 14px;
    flex-shrink: 0;
}

.user-info-sm {
    flex: 1;
    min-width: 0;
}

.user-name-sm {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role-sm {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
}

/* Sidebar Overlay (mobile) */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* ======================== MAIN WRAPPER ======================== */
.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    width: calc(100% - var(--sidebar-width));
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition-base);
}

/* ======================== TOPBAR ======================== */
.topbar {
    height: var(--topbar-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sidebar-toggle {
    display: none;
}

.topbar-title h1 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.topbar-title p {
    font-size: 12px;
    color: var(--text-muted);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ======================== CONTENT AREA ======================== */
.content-area {
    flex: 1;
    padding: 24px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

/* Sections show/hide */
.section {
    display: none;
    animation: fadeInSection 0.3s ease;
}

.section.active {
    display: block;
}

@keyframes fadeInSection {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ======================== CARDS ======================== */
.card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    overflow: hidden;
    transition: box-shadow var(--transition-fast);
}

.card:hover {
    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;
    gap: 12px;
}

.card-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header h3 i {
    color: var(--primary);
    font-size: 14px;
}

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

.card-link {
    font-size: 13px;
    color: var(--primary);
    font-weight: 500;
    transition: color var(--transition-fast);
}

.card-link:hover {
    color: var(--primary-light);
}

.card-body {
    padding: 20px;
}

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

.card-full-width {
    grid-column: 1 / -1;
}

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

.stat-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all var(--transition-fast);
}

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

.stat-card-inner {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-inverse);
    flex-shrink: 0;
}

.stat-published .stat-icon { background: linear-gradient(135deg, var(--success), #059669); }
.stat-scheduled .stat-icon { background: linear-gradient(135deg, var(--info), #2563eb); }
.stat-failed .stat-icon { background: linear-gradient(135deg, var(--danger), #dc2626); }
.stat-total .stat-icon { background: linear-gradient(135deg, var(--primary), var(--primary-light)); }
.stat-gallery .stat-icon { background: linear-gradient(135deg, #10b981, #059669); }

.stat-data {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    color: var(--text-primary);
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 4px;
}

.stat-footer {
    padding: 8px 20px;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-light);
    font-size: 11px;
    color: var(--text-muted);
}

.stat-footer i {
    margin-right: 4px;
}

/* ======================== PLATFORM STATUS GRID ======================== */
.platform-status-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.platform-status-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.platform-status-card .platform-icon-lg {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-inverse);
    flex-shrink: 0;
}

.platform-status-card.twitter .platform-icon-lg { background: var(--twitter-color); }
.platform-status-card.linkedin .platform-icon-lg { background: var(--linkedin-color); }
.platform-status-card.instagram .platform-icon-lg { background: var(--instagram-color); }

.platform-status-info {
    flex: 1;
}

.platform-status-info strong {
    display: block;
    font-size: 14px;
    margin-bottom: 2px;
}

.platform-status-info span {
    font-size: 12px;
    color: var(--text-muted);
}

.platform-status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

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

.platform-status-badge.disconnected {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

/* ======================== 2 COLUMN GRID ======================== */
.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* ======================== CTA CARD ======================== */
.cta-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--border-radius);
    padding: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    color: var(--text-inverse);
}

.cta-content h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.cta-content p {
    opacity: 0.8;
    font-size: 14px;
}

.cta-card .btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--primary-dark);
    flex-shrink: 0;
}

.cta-card .btn-primary:hover {
    background: var(--accent-light);
    border-color: var(--accent-light);
}


/* ======================== COMPOSE LAYOUT ======================== */
.compose-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    align-items: start;
}

/* Textarea */
.textarea-wrapper {
    position: relative;
}

.textarea-wrapper textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-secondary);
    resize: vertical;
    min-height: 160px;
    outline: none;
    transition: border-color var(--transition-fast);
    line-height: 1.7;
    font-family: var(--font-family);
}

.textarea-wrapper textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 58, 92, 0.1);
}

.char-counters {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 8px;
}

.char-counter {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.char-counter.over {
    color: var(--danger);
    font-weight: 600;
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--primary);
    background: rgba(26, 58, 92, 0.02);
}

.upload-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-content i {
    font-size: 36px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.upload-content p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.upload-browse {
    color: var(--primary);
    font-weight: 600;
}

.upload-content small {
    font-size: 12px;
    color: var(--text-muted);
}

.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.image-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

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

.image-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: background var(--transition-fast);
}

.image-preview-remove:hover {
    background: var(--danger);
}

/* Platform Toggles */
.platform-toggles {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.platform-toggle {
    cursor: pointer;
}

.platform-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.platform-toggle-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
    font-size: 14px;
    font-weight: 500;
}

.platform-toggle-card i {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.platform-toggle input:checked + .platform-toggle-card {
    border-color: var(--primary);
    background: rgba(26, 58, 92, 0.04);
}

#toggleTwitter .platform-toggle-card i { color: var(--twitter-color); }
#toggleLinkedin .platform-toggle-card i { color: var(--linkedin-color); }
#toggleInstagram .platform-toggle-card i { color: var(--instagram-color); }

.platform-config-status {
    margin-left: auto;
    font-size: 11px;
    font-weight: 600;
}

.platform-config-status.ready {
    color: var(--success);
}

.platform-config-status.not-ready {
    color: var(--text-muted);
}

.platform-note {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 12px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.platform-note i {
    margin-top: 2px;
    flex-shrink: 0;
}

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

.radio-card {
    cursor: pointer;
}

.radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-card-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition-fast);
    color: var(--text-secondary);
}

.radio-card input:checked + .radio-card-content {
    border-color: var(--primary);
    background: rgba(26, 58, 92, 0.04);
    color: var(--primary);
}

.schedule-datetime {
    animation: slideDown 0.3s ease;
}

.schedule-datetime input[type="datetime-local"] {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    outline: none;
    transition: border-color var(--transition-fast);
}

.schedule-datetime input:focus {
    border-color: var(--primary);
}

/* Publish Result */
.publish-result {
    margin-top: 16px;
    padding: 16px;
    border-radius: var(--border-radius-sm);
    animation: slideDown 0.3s ease;
}

.publish-result.success {
    background: var(--success-light);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.publish-result.partial {
    background: var(--warning-light);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.publish-result.error {
    background: var(--danger-light);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.publish-result-header {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.publish-result-platforms {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.publish-platform-result {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    padding: 6px 0;
}

.publish-platform-result i:first-child {
    width: 18px;
    text-align: center;
}

.publish-platform-result .result-icon {
    margin-left: auto;
}

.result-icon.success { color: var(--success); }
.result-icon.failed { color: var(--danger); }


/* ======================== POST LIST ITEMS ======================== */
.post-list-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition-fast);
    cursor: pointer;
}

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

.post-list-item:hover {
    background: var(--bg-tertiary);
    margin: 0 -20px;
    padding: 14px 20px;
    border-radius: var(--border-radius-sm);
}

.post-status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 7px;
}

.post-status-indicator.published { background: var(--success); }
.post-status-indicator.scheduled { background: var(--info); }
.post-status-indicator.failed { background: var(--danger); }
.post-status-indicator.partially_published { background: var(--warning); }
.post-status-indicator.draft { background: var(--text-muted); }

.post-list-content {
    flex: 1;
    min-width: 0;
}

.post-list-text {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.post-list-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.post-meta-item {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

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

.post-meta-platforms i {
    font-size: 12px;
}

.post-meta-platforms i.success { color: var(--success); }
.post-meta-platforms i.failed { color: var(--danger); }
.post-meta-platforms i.pending { color: var(--text-muted); }

.post-list-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}

.post-list-thumbnail {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
}

.post-list-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.status-badge.published {
    background: var(--success-light);
    color: var(--success-dark);
}

.status-badge.scheduled {
    background: var(--info-light);
    color: var(--info-dark);
}

.status-badge.failed {
    background: var(--danger-light);
    color: var(--danger-dark);
}

.status-badge.partially_published {
    background: var(--warning-light);
    color: var(--warning-dark);
}

.status-badge.draft {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}


/* ======================== EMPTY STATES ======================== */
.empty-state-sm {
    text-align: center;
    padding: 32px 20px;
    color: var(--text-muted);
}

.empty-state-sm i {
    font-size: 36px;
    margin-bottom: 12px;
    opacity: 0.4;
}

.empty-state-sm p {
    font-size: 13px;
}

.loading-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.loading-state i {
    font-size: 28px;
    margin-bottom: 12px;
    color: var(--primary);
}

.loading-state p {
    font-size: 13px;
}


/* ======================== SETTINGS ======================== */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.profile-info {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.profile-avatar-lg {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-inverse);
    font-size: 24px;
    flex-shrink: 0;
}

.profile-details p {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 6px 0;
    border-bottom: 1px solid var(--border-light);
}

.profile-details p:last-child {
    border-bottom: none;
}

.profile-details strong {
    color: var(--text-primary);
    margin-right: 8px;
    display: inline-block;
    min-width: 90px;
}

.text-muted {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 16px;
}


/* ======================== SELECT ======================== */
.form-select-sm {
    padding: 6px 28px 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

.form-select-sm:focus {
    border-color: var(--primary);
}


/* ======================== PAGINATION ======================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pagination-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-muted);
}

.pagination-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-inverse);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}


/* ======================== MODAL ======================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.modal {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease;
}

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

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

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

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-detail-row {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
}

.modal-detail-row:last-child {
    border-bottom: none;
}

.modal-detail-label {
    color: var(--text-muted);
    font-weight: 500;
    min-width: 100px;
    font-size: 13px;
}

.modal-detail-value {
    flex: 1;
    color: var(--text-primary);
    word-break: break-word;
}

.modal-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.modal-images-grid img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.modal-platform-results {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-platform-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    font-size: 13px;
}

.modal-platform-item i:first-child {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.modal-platform-item .platform-result-status {
    margin-left: auto;
    font-weight: 600;
    font-size: 12px;
}

.modal-platform-item .platform-result-status.success { color: var(--success); }
.modal-platform-item .platform-result-status.failed { color: var(--danger); }
.modal-platform-item .platform-result-status.pending { color: var(--text-muted); }

.modal-platform-error {
    font-size: 12px;
    color: var(--danger);
    margin-top: 4px;
    padding-left: 30px;
}


/* ======================== TOAST NOTIFICATIONS ======================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--text-muted);
    min-width: 320px;
    max-width: 440px;
    pointer-events: all;
    animation: toastSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transition: all 0.3s ease;
}

.toast.removing {
    opacity: 0;
    transform: translateX(100%);
}

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

.toast-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.toast.success .toast-icon { color: var(--success); }
.toast.error .toast-icon { color: var(--danger); }
.toast.warning .toast-icon { color: var(--warning); }
.toast.info .toast-icon { color: var(--info); }

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.toast-message {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px;
    font-size: 14px;
    flex-shrink: 0;
    transition: color var(--transition-fast);
}

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

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


/* ================================================================
   RESPONSIVE DESIGN
   ================================================================ */

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

    .grid-2col {
        grid-template-columns: 1fr;
    }

    .compose-layout {
        grid-template-columns: 1fr;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .platform-status-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile */
@media (max-width: 768px) {
    /* Sidebar becomes off-canvas */
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-xl);
    }

    .sidebar-close {
        display: block;
    }

    .sidebar-toggle {
        display: flex;
    }

    .main-wrapper {
        margin-left: 0;
        width: 100%;
    }

    .sidebar-overlay.active {
        display: block;
    }

    /* Login */
    .login-card {
        flex-direction: column;
        min-height: auto;
    }

    .login-branding {
        width: 100%;
        padding: 32px 28px;
    }

    .branding-features {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .login-form-panel {
        padding: 32px 28px;
    }

    /* Topbar */
    .topbar {
        padding: 0 16px;
    }

    .topbar-title h1 {
        font-size: 16px;
    }

    .topbar-right .btn span {
        display: none;
    }

    /* Content */
    .content-area {
        padding: 16px;
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stat-card-inner {
        padding: 14px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .stat-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .stat-number {
        font-size: 22px;
    }

    /* CTA */
    .cta-card {
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }

    /* Compose */
    .compose-layout {
        grid-template-columns: 1fr;
    }

    .compose-sidebar {
        order: -1;
    }

    .schedule-options {
        grid-template-columns: 1fr 1fr;
    }

    /* Post items */
    .post-list-item {
        flex-wrap: wrap;
    }

    .card-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .card-header-actions {
        width: 100%;
    }

    .card-header-actions .form-select-sm {
        flex: 1;
    }

    /* Modal */
    .modal {
        max-height: 90vh;
        margin: 10px;
    }

    /* Profile */
    .profile-info {
        flex-direction: column;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .login-branding {
        display: none;
    }

    .login-form-panel {
        padding: 36px 24px;
    }

    .form-header h2 {
        font-size: 22px;
    }

    .branding-features {
        display: none;
    }
}