:root {
    --bg-dark: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.85);
    --primary-color: #4f46e5;
    --primary-glow: rgba(79, 70, 229, 0.2);
    --secondary-color: #db2777;
    --secondary-glow: rgba(219, 39, 119, 0.2);
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --border-glass: rgba(0, 0, 0, 0.08);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* Background elements */
.glass-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(100px);
    z-index: -1;
}

.gradient-sphere {
    position: fixed;
    border-radius: 50%;
    filter: blur(150px);
    z-index: -2;
    opacity: 0.25;
}

.sphere-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #818cf8 0%, transparent 70%);
    top: -100px;
    right: -100px;
}

.sphere-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #f472b6 0%, transparent 70%);
    bottom: -150px;
    left: -150px;
}

/* Header & Nav */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 3rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.logo i {
    margin-right: 0.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

nav {
    display: flex;
    gap: 1rem;
}

.nav-link {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.04);
}

.nav-link.active {
    color: var(--primary-color);
    background: rgba(79, 70, 229, 0.08);
    border: 1px solid rgba(79, 70, 229, 0.2);
}

/* Container & Layout */
.container {
    flex: 1;
    padding: 2.5rem 3rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.view-section {
    animation: fadeIn 0.4s ease-out forwards;
}

.view-section.hidden {
    display: none;
}

.grid-layout {
    display: grid;
    grid-template-columns: 1.1fr 1.3fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 1024px) {
    .grid-layout {
        grid-template-columns: 1fr;
    }
}

/* Glass Card */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 2.2rem;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.06), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
}

.card h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1.8rem;
    letter-spacing: -0.3px;
    color: var(--text-primary);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
}

textarea, input[type="text"], input[type="url"], input[type="password"], input[type="datetime-local"], select {
    width: 100%;
    padding: 0.9rem 1.2rem;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
}

textarea:focus, input:focus, select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

textarea {
    resize: vertical;
}

/* Custom Checkboxes */
.checkbox-group {
    display: flex;
    gap: 1.2rem;
}

.checkbox-container {
    flex: 1;
    position: relative;
    cursor: pointer;
    user-select: none;
    margin: 0;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.9rem;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    color: var(--text-secondary);
}

.checkbox-container input:checked ~ .checkmark {
    background: rgba(79, 70, 229, 0.08);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    padding: 2.2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8fafc;
    position: relative;
}

.drop-zone:hover {
    border-color: var(--primary-color);
    background: rgba(79, 70, 229, 0.03);
}

.drop-icon {
    font-size: 2.5rem;
    color: #94a3b8;
    margin-bottom: 0.8rem;
    display: block;
}

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

/* Media Preview */
.preview-container {
    position: relative;
    margin-top: 1rem;
    border-radius: 12px;
    overflow: visible;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.btn-logo-white {
    background: #0f172a !important;
    color: #ffffff !important;
    border: 1px solid #334155 !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.btn-logo-white:hover {
    background: #1e293b !important;
    border-color: #64748b !important;
    transform: translateY(-1px);
}
.btn-logo-white i {
    color: #93c5fd !important;
}

.btn-logo-black {
    background: #f8fafc !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.btn-logo-black:hover {
    background: #e2e8f0 !important;
    border-color: #94a3b8 !important;
    transform: translateY(-1px);
}
.btn-logo-black i {
    color: #475569 !important;
}

.btn-delete-obj {
    background: #fef2f2 !important;
    color: #dc2626 !important;
    border: 1px solid #fecaca !important;
    font-weight: 600 !important;
}
.btn-delete-obj:hover {
    background: #fee2e2 !important;
    border-color: #f87171 !important;
    transform: translateY(-1px);
}

.preview-container img, .preview-container video {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
}

.btn-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35);
    transition: background 0.3s, transform 0.1s;
    z-index: 10;
}

.btn-remove:hover {
    background: #dc2626;
    transform: scale(1.02);
}

/* Buttons */
.btn {
    padding: 0.9rem 1.8rem;
    border-radius: 12px;
    font-weight: 700;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35);
}

.btn-block {
    width: 100%;
}

.hidden {
    display: none !important;
}

/* Queue Card & Filter */
.queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.queue-header h2 {
    margin-bottom: 0;
}

.queue-header-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.sync-indicator {
    font-size: 0.75rem;
    font-weight: 600;
    color: #16a34a;
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    padding: 3px 8px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.sync-indicator i {
    font-size: 0.7rem;
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.9); }
}

#btn-refresh-queue {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: var(--text-secondary);
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

#btn-refresh-queue:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: #f1f5f9;
}

.filter-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.filter-btn {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.filter-btn:hover {
    color: var(--text-primary);
    background: #f8fafc;
}

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

/* Post Queue List */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.post-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.2rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.2rem;
    align-items: start;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.post-item:hover {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.post-media-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
}

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

.post-media-thumb i {
    font-size: 1.5rem;
    color: var(--text-secondary);
}

.post-details {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.post-caption {
    font-size: 0.95rem;
    line-height: 1.4;
    word-break: break-word;
    color: var(--text-primary);
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 600;
    color: var(--text-primary);
}

.status-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-pending { background: rgba(245, 158, 11, 0.15); color: #b45309; }
.status-publishing { background: rgba(79, 70, 229, 0.15); color: #4338ca; }
.status-published { background: rgba(16, 185, 129, 0.15); color: #047857; }
.status-failed { background: rgba(239, 68, 68, 0.15); color: #b91c1c; }

.post-actions {
    display: flex;
    align-items: center;
}

.btn-icon {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.btn-icon:hover {
    color: var(--error-color);
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    transform: scale(1.05);
}

.error-details {
    font-size: 0.8rem;
    color: var(--error-color);
    background: rgba(239, 68, 68, 0.05);
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    margin-top: 0.4rem;
    border: 1px solid rgba(239, 68, 68, 0.1);
}

/* Settings Description */
.settings-desc {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.5;
}

.helper-text {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Loading & Empty States */
.loading-state, .empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.empty-state i {
    font-size: 2.2rem;
    color: #cbd5e1;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
    margin-top: auto;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Canvas Editor Styles */
#canvas-container {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    background: #f1f5f9;
}

.canvas-container {
    margin: 0 auto;
}

.editor-controls {
    width: 100%;
    background: #ffffff;
    padding: 0.8rem;
    border-top: 1px solid #e2e8f0;
}

.editor-toolbar {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.editor-toolbar input[type="color"] {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
}

.editor-toolbar select {
    width: auto;
    padding: 0.5rem 1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-secondary {
    background: #ffffff;
    color: var(--text-primary);
    border: 1px solid #cbd5e1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

/* Emoji / Icon Popover Styles */
.emoji-popover {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 330px;
    max-width: 90vw;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    z-index: 50;
    display: flex;
    flex-direction: column;
    padding: 0.6rem;
    animation: fadeIn 0.2s ease-out;
}

.emoji-popover.hidden {
    display: none !important;
}

.emoji-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 6px;
    margin-bottom: 8px;
    overflow-x: auto;
}

.emoji-tab-btn {
    background: transparent;
    border: none;
    font-size: 1.1rem;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    line-height: 1;
}

.emoji-tab-btn:hover {
    background: #f1f5f9;
}

.emoji-tab-btn.active {
    background: rgba(79, 70, 229, 0.12);
    outline: 1px solid var(--primary-color);
}

.emoji-search-box {
    margin-bottom: 8px;
}

.emoji-search-box input {
    width: 100%;
    padding: 6px 10px;
    font-size: 0.85rem;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 4px;
}

.emoji-item-btn {
    background: transparent;
    border: none;
    font-size: 1.3rem;
    padding: 6px 0;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, background 0.15s;
    user-select: none;
}

.emoji-item-btn:hover {
    background: #f1f5f9;
    transform: scale(1.2);
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.3s ease;
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    z-index: 10;
    width: 90vw;
    max-width: 1100px;
    height: 85vh;
    max-height: 850px;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    overflow: hidden;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

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

.modal-header h3 {
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-primary);
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

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

/* Filters Bar */
.shopify-filters-bar {
    display: flex;
    gap: 0.8rem;
    padding: 1rem 0;
    align-items: center;
    flex-wrap: wrap;
    border-bottom: 1px solid #e2e8f0;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
    min-width: 220px;
}

.search-input-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-input-wrapper input {
    width: 100%;
    padding: 0.65rem 1rem 0.65rem 2.6rem;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.search-input-wrapper input:focus {
    border-color: var(--primary-color);
    background: #ffffff;
    outline: none;
}

.vendor-select-wrapper select {
    padding: 0.65rem 1rem;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: var(--text-primary);
    font-size: 0.95rem;
    min-width: 180px;
    cursor: pointer;
}

.vendor-select-wrapper select:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Results Grid */
.shopify-results-container {
    flex: 1;
    overflow-y: auto;
    padding: 1.2rem 0.2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.shopify-loading-state, .shopify-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.shopify-product-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.2rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.shopify-product-card:hover {
    border-color: #94a3b8;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.shopify-product-info {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.8rem;
    gap: 1rem;
}

.shopify-product-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}

.shopify-product-vendor {
    font-size: 0.85rem;
    color: #047857;
    background: rgba(16, 185, 129, 0.12);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    white-space: nowrap;
    font-weight: 600;
}

.shopify-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 1.2rem;
}

.shopify-image-item {
    position: relative;
    aspect-ratio: 2 / 3;
    background: #f1f5f9;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid #e2e8f0;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shopify-image-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.shopify-image-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.shopify-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.85), transparent);
    padding: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s;
    display: flex;
    justify-content: center;
}

.shopify-image-item:hover .shopify-image-overlay {
    opacity: 1;
}

.shopify-image-overlay span {
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    background: var(--primary-color);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

/* Modal Footer */
.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

/* Multi-Media Strip (Carousel Preview) */
.multi-media-strip {
    margin-top: 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1rem;
}

.strip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.strip-count {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 600;
}

.strip-hint {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.strip-thumbnails {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.strip-thumb-item {
    position: relative;
    width: 72px;
    height: 90px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    background: #f1f5f9;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.strip-thumb-item:hover {
    border-color: rgba(79, 70, 229, 0.5);
    transform: translateY(-2px);
}

.strip-thumb-item.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-color), 0 4px 10px rgba(79, 70, 229, 0.25);
}

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

.strip-thumb-remove {
    position: absolute;
    top: 3px;
    right: 3px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 5;
}

.strip-thumb-item:hover .strip-thumb-remove {
    opacity: 1;
}

.strip-thumb-move-bar {
    position: absolute;
    bottom: 3px;
    right: 3px;
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 5;
}

.strip-thumb-item:hover .strip-thumb-move-bar {
    opacity: 1;
}

.strip-btn-move {
    background: rgba(15, 23, 42, 0.85);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    width: 20px;
    height: 20px;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

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

.strip-thumb-number {
    position: absolute;
    top: 3px;
    left: 3px;
    background: rgba(15, 23, 42, 0.8);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
}

/* Badge for multiple photos in Shopify selector */
.shopify-image-item.selected-in-batch {
    border-color: #10b981;
}

.shopify-image-item.selected-in-batch .shopify-image-overlay {
    opacity: 1;
}

.shopify-image-item.selected-in-batch .shopify-image-overlay span {
    background: #10b981;
}

/* --- TOKEN STATUS PILL & HEALTH CARD --- */
.token-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: var(--text-secondary);
}

.token-status-pill.valid {
    background: #dcfce7;
    border-color: #86efac;
    color: #15803d;
}

.token-status-pill.warning {
    background: #fef3c7;
    border-color: #fde047;
    color: #b45309;
}

.token-status-pill.expired {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #b91c1c;
}

.token-health-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1rem 1.2rem;
    margin-bottom: 1.5rem;
}

.token-health-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0081fb, #0064e0);
    color: white;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.token-health-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
}

.token-health-info strong {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.token-health-info span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* --- TEMPLATES POPOVER --- */
.templates-popover {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 320px;
    max-width: 90vw;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    z-index: 50;
    display: flex;
    flex-direction: column;
    padding: 0.8rem;
    animation: fadeIn 0.2s ease-out;
}

.templates-popover.hidden {
    display: none !important;
}

.templates-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.6rem;
    margin-bottom: 0.6rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
}

.btn-text-action {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
}

.btn-text-action:hover {
    text-decoration: underline;
    background: rgba(79, 70, 229, 0.08);
}

.templates-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-height: 240px;
    overflow-y: auto;
}

.template-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.5rem 0.7rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.template-item:hover {
    background: #f1f5f9;
    border-color: var(--primary-color);
}

.template-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    overflow: hidden;
}

.template-item-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.template-item-preview {
    font-size: 0.72rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.template-item-remove {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 2px 6px;
    font-size: 0.8rem;
    border-radius: 4px;
}

.template-item-remove:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* --- FIRST COMMENT SECTION --- */
.first-comment-container {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 0.8rem 1rem;
}

.first-comment-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.first-comment-hint {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.tag-badge {
    background: #fdf2f8;
    color: #db2777;
    border: 1px solid #fbcfe8;
    font-size: 0.68rem;
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: 700;
    margin-left: 4px;
}

/* --- SMART SCHEDULE PILLS --- */
.smart-schedule-pills {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.smart-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.smart-time-pill {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.smart-time-pill:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* --- SHOPIFY OPTIONS SUBBAR (PUNTO 3) --- */
.shopify-options-subbar {
    background: #f0fdf4;
    border-bottom: 1px solid #bbf7d0;
    padding: 0.6rem 1.2rem;
}

.checkbox-container-sm {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
    font-size: 0.85rem;
    font-weight: 600;
    color: #166534;
}

.checkbox-container-sm input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark-sm {
    width: 18px;
    height: 18px;
    background: #ffffff;
    border: 1px solid #86efac;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: transparent;
    transition: all 0.2s;
}

.checkbox-container-sm input:checked ~ .checkmark-sm {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

/* --- INSTAGRAM FEED PREVIEW 3X3 MODAL --- */
.feed-modal-card {
    max-width: 480px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.feed-sim-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 1rem;
}

.feed-sim-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.6rem;
    flex-shrink: 0;
}

.feed-sim-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    overflow: hidden;
}

.feed-sim-username {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.feed-sim-stats {
    display: flex;
    gap: 0.8rem;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.feed-sim-stats strong {
    color: var(--text-primary);
}

.feed-sim-bio {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

.feed-sim-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    background: #e2e8f0;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

.feed-sim-cell {
    position: relative;
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    background: #f1f5f9;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feed-sim-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feed-sim-cell.is-staged {
    box-shadow: inset 0 0 0 3px #10b981;
}

.feed-sim-cell.is-staged .staged-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(16, 185, 129, 0.9);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 4px;
    z-index: 2;
}

.feed-sim-empty-cell {
    color: #cbd5e1;
    font-size: 1.5rem;
}

/* --- LOGO PICKER POPOVER STYLES --- */
.logo-popover {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 320px;
    max-width: 90vw;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.12);
    z-index: 60;
    display: flex;
    flex-direction: column;
    padding: 0.85rem;
    animation: fadeIn 0.2s ease-out;
}

.logo-popover.hidden {
    display: none !important;
}

.logo-popover-header {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.5rem;
    margin-bottom: 0.7rem;
    text-align: left;
}

.logo-popover-header strong {
    font-size: 0.86rem;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 6px;
}

.logo-options-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.logo-option-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.65rem;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.logo-option-item:hover {
    background: #f8fafc;
    border-color: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.12);
}

.logo-preview-box {
    width: 68px;
    height: 42px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    flex-shrink: 0;
    overflow: hidden;
}

.logo-preview-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.logo-preview-box.preview-dark {
    background: #0f172a;
    border: 1px solid #334155;
}

.logo-preview-box.preview-light {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
}

.logo-option-text {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.logo-option-text strong {
    font-size: 0.82rem;
    color: #0f172a;
    font-weight: 600;
}

.logo-option-text small {
    font-size: 0.7rem;
    color: #64748b;
    line-height: 1.25;
    margin-top: 2px;
}

