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

body {
    font-family: 'Arial', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.card {
    background: #fff;
    border-radius: 24px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin-bottom: 40px;
}

/* Content area inside card — below the nav */
.card-body {
    padding: 20px 32px 40px;
}

/* ── App-wide Tab Navigation ── */
.app-nav {
    display: flex;
    background: #fff;
    border-bottom: 1.5px solid #e8e8e8;
    overflow-x: auto;
    scrollbar-width: none;
    border-radius: 24px 24px 0 0;
}
.app-nav::-webkit-scrollbar { display: none; }
.app-nt {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1;
    padding: 10px 4px 9px;
    border: none;
    border-bottom: 2.5px solid transparent;
    background: none;
    font-family: inherit;
    font-size: 10px;
    font-weight: 700;
    color: #aaa;
    cursor: pointer;
    white-space: nowrap;
    min-height: 52px;
    transition: color .15s;
}
.app-nt.on { color: #1a56db; border-bottom-color: #1a56db; }
.app-nt svg { flex-shrink: 0; }

.auth-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
}
.auth-bar #auth-user-label {
    color: #333;
    margin-right: auto;
}
.auth-bar a {
    color: #1e88e5;
    text-decoration: none;
    font-weight: 600;
}
.auth-bar-logout {
    background: transparent;
    border: 1px solid #999;
    color: #333;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}
.auth-bar-logout:hover {
    background: #e0e0e0;
}

.title {
    font-size: 32px;
    font-weight: 900;
    color: #1a1a1a;
    text-align: center;
    margin-bottom: 40px;
}

.upload-section {
    margin-bottom: 24px;
    text-align: center;
}

.upload-label {
    display: block;
    text-align: center;
    color: #1e88e5;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    padding: 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.upload-label:hover {
    background: rgba(30, 136, 229, 0.1);
}

.preview-container {
    position: relative;
    margin-top: 16px;
    border-radius: 12px;
    overflow: hidden;
    background: #e0e0e0;
    padding: 16px;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.file-icon {
    font-size: 24px;
}

.file-name {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    word-break: break-word;
}

.remove-btn {
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    flex-shrink: 0;
}

.remove-btn:hover {
    background: rgba(255, 0, 0, 1);
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
    background: #e0e0e0;
    border-radius: 12px;
}

.checkbox {
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: #1e88e5;
}

.checkbox-container label {
    font-size: 16px;
    color: #333;
    cursor: pointer;
    user-select: none;
}

.text-input-section {
    margin-bottom: 24px;
}

.text-input {
    width: 100%;
    padding: 20px;
    border: none;
    border-radius: 16px;
    background: #e0e0e0;
    font-size: 16px;
    color: #333;
    resize: vertical;
    font-family: inherit;
}

.text-input::placeholder {
    color: #666;
}

.text-input:focus {
    outline: 2px solid #1e88e5;
    outline-offset: 2px;
}

.access-code-section {
    margin-bottom: 32px;
}

.access-code-input {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    background: #e0e0e0;
    font-size: 16px;
    color: #333;
    text-align: center;
}

.access-code-input::placeholder {
    color: #666;
}

.access-code-input:focus {
    outline: 2px solid #1e88e5;
    outline-offset: 2px;
}

.step-header {
    font-weight: 700;
    font-style: italic;
    text-align: center;
    margin-bottom: 8px;
    margin-top: 18px;
    font-size: 16px;
    color: #1a1a1a;
}
.step-header:first-child { margin-top: 0; }
.step-header em { color: #e74c3c; font-style: italic; }

.select-footage-btn {
    display: inline-block;
    color: #fff;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border-radius: 50px;
    padding: 12px 32px;
    text-decoration: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    transition: all 0.3s ease;
}
.select-footage-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.5);
}

.generate-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #ffc857 0%, #ffb143 100%);
    border: none;
    border-radius: 50px;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 200, 87, 0.4);
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 200, 87, 0.6);
}

.generate-btn:active {
    transform: translateY(0);
}

.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.progress-section {
    text-align: center;
    padding: 60px 20px;
    background: #f5f5f5;
    border-radius: 24px;
    margin: 20px 0;
    min-height: 200px;
}

.progress-section[style*="display: block"] {
    display: block !important;
    visibility: visible !important;
}

/* Hide section descriptions and autofill buttons when progress is shown (on mobile mainly) */
@media (max-width: 768px) {
    .progress-section[style*="display: block"] ~ .card .section-description-promo,
    .progress-section[style*="display: block"] ~ .card .section-description-compilation,
    .progress-section[style*="display: block"] ~ .card .autofill-btn-promo,
    .progress-section[style*="display: block"] ~ .card .autofill-btn-compilation {
        display: none !important;
    }
    
    /* Alternative method: hide when progress section is visible */
    body:has(.progress-section[style*="display: block"]) .section-description-promo,
    body:has(.progress-section[style*="display: block"]) .section-description-compilation,
    body:has(.progress-section[style*="display: block"]) .autofill-btn-promo,
    body:has(.progress-section[style*="display: block"]) .autofill-btn-compilation {
        display: none !important;
    }
}

.spinner {
    border: 5px solid #e0e0e0;
    border-top: 5px solid #1e88e5;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    animation: spin 1s linear infinite;
    margin: 0 auto 30px;
    display: block;
}

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

#progress-text {
    font-size: 20px;
    font-weight: 700;
    color: #1e88e5;
    margin-top: 20px;
    animation: pulse 2s ease-in-out infinite;
    display: block;
    min-height: 30px;
}

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

.result-section {
    text-align: center;
}

.download-link {
    display: block;
    color: #1e88e5;
    font-size: 18px;
    font-weight: 600;
    text-decoration: underline;
    margin-bottom: 24px;
    transition: color 0.3s ease;
}

.download-link:hover {
    color: #1565c0;
}

.result-video {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 12px;
    margin: 0 auto 24px;
    background: #000;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.footer {
    text-align: center;
    color: white;
}

.footer-title {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 12px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.footer-subtitle {
    font-size: 20px;
    font-weight: 400;
    opacity: 0.95;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #1e88e5;
    background: rgba(30, 136, 229, 0.05);
}

.tab-btn.active {
    color: #1e88e5;
    border-bottom-color: #1e88e5;
    background: rgba(30, 136, 229, 0.1);
}

.tab-content {
    /* Content is shown/hidden via JavaScript */
}

/* Section Description */
.section-description {
    background: white;
    border: 2px solid #1e88e5;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    text-align: center;
}

.section-description p {
    font-size: 16px;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.6;
}

.section-description a {
    color: #1e88e5;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.section-description a:hover {
    color: #1565c0;
    text-decoration: underline;
}

/* Slide Section */
.slide-section {
    margin-bottom: 32px;
    padding: 20px;
    background: #e0e0e0;
    border-radius: 12px;
}

.slide-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 16px;
}

.slide-input {
    width: 100%;
    padding: 16px;
    margin-bottom: 12px;
    border: none;
    border-radius: 8px;
    background: #f5f5f5;
    font-size: 15px;
    color: #333;
    font-family: inherit;
}

.slide-input:last-child {
    margin-bottom: 0;
}

.slide-input::placeholder {
    color: #999;
}

.slide-input:focus {
    outline: 2px solid #1e88e5;
    outline-offset: 2px;
    background: #fff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .card {
        padding: 24px;
    }

    .title {
        font-size: 26px;
    }

    .footer-title {
        font-size: 36px;
    }

    .footer-subtitle {
        font-size: 16px;
    }
    
    .tab-btn {
        font-size: 14px;
        padding: 10px 12px;
    }
    
    .slide-section {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .card-body {
        padding: 16px 16px 32px;
    }

    .title {
        font-size: 22px;
    }

    .generate-btn {
        font-size: 18px;
    }
}

/* Stock Video Search Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: #f5f5f5;
    border-radius: 16px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid #ddd;
    position: relative;
    background: white;
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f44336;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.2s;
    z-index: 10;
}

.modal-close-btn:hover {
    background: #d32f2f;
}

/* Mobile improvements for modal close button */
@media (max-width: 768px) {
    .modal-close-btn {
        width: 44px;
        height: 44px;
        font-size: 24px;
        top: 16px;
        right: 16px;
        /* Larger touch target for mobile */
    }
    
    /* Make modal header have more padding on mobile to avoid text overlap */
    .modal-header {
        padding: 24px 60px 24px 24px;
    }
}

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

.search-section {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: #1e88e5;
}

.search-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.search-btn:hover {
    transform: translateY(-2px);
}

.search-btn:active {
    transform: translateY(0);
}

.video-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.video-result-item {
    position: relative;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid transparent;
}

.video-result-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.video-result-item.selected {
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.3);
}

.video-thumbnail {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.video-preview {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: none;
}

.video-result-item.playing .video-thumbnail {
    display: none;
}

.video-result-item.playing .video-preview {
    display: block;
}

.video-info {
    padding: 12px;
}

.video-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 4px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-info p {
    font-size: 12px;
    color: #666;
    margin: 0;
}

.select-video-btn {
    width: 100%;
    margin-top: 8px;
    padding: 8px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.select-video-btn:hover {
    background: #45a049;
}

.loading-message,
.error-message {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

.error-message {
    color: #f44336;
}

@media (max-width: 768px) {
    .modal-content {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .video-results-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }
}

/* Caption Section Styles */
.caption-textarea {
    width: 100%;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: #f5f5f5;
    font-size: 16px;
    color: #333;
    resize: vertical;
    font-family: inherit;
    line-height: 1.6;
    min-height: 200px;
}

.caption-textarea:focus {
    outline: 2px solid #1e88e5;
    outline-offset: 2px;
    border-color: #1e88e5;
    background: #fff;
}

.copy-caption-btn {
    width: 100%;
    margin-top: 12px;
    padding: 12px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.copy-caption-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.copy-caption-btn:active {
    transform: translateY(0);
}

/* Instagram Handles Section Styles */
.instagram-handles-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.instagram-handle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.instagram-handle-item:hover {
    border-color: #1e88e5;
    box-shadow: 0 2px 8px rgba(30, 136, 229, 0.2);
}

.instagram-handle-item .handle-text {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    font-family: monospace;
}

.copy-handle-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.copy-handle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.4);
}

.copy-handle-btn:active {
    transform: translateY(0);
}

.loading-handles {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 16px;
}

/* Autofill Modal Styles */
#promo-autofill-modal .modal-content,
#compilation-autofill-modal .modal-content {
    max-width: 600px;
    background: white;
}

#promo-autofill-modal .modal-body,
#compilation-autofill-modal .modal-body {
    padding: 32px;
}

/* Autofill Form Styling */
.modal-body label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.modal-body input[type="text"],
.modal-body input[type="password"],
.modal-body input[type="number"],
.modal-body textarea,
.modal-body select {
    width: 100%;
    padding: 14px 16px;
    border: none;
    border-radius: 12px;
    background: #f0f0f0;
    font-size: 15px;
    color: #333;
    font-family: inherit;
    transition: all 0.2s ease;
    margin-bottom: 0;
}

.modal-body input[type="text"]:focus,
.modal-body input[type="password"]:focus,
.modal-body input[type="number"]:focus,
.modal-body textarea:focus,
.modal-body select:focus {
    outline: none;
    background: #e8e8e8;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

.modal-body input[type="text"]::placeholder,
.modal-body input[type="password"]::placeholder,
.modal-body input[type="number"]::placeholder,
.modal-body textarea::placeholder {
    color: #999;
}

.modal-body textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.5;
}

.modal-body select {
    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 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* Form Groups with better spacing */
.modal-body > div {
    margin-bottom: 20px;
}

.modal-body > div:last-of-type {
    margin-bottom: 24px;
}

/* Grid layout for side-by-side inputs */
.modal-body > div[style*="grid"] {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.modal-body > div[style*="grid"] > div {
    margin-bottom: 0;
}

/* Generate button in modal */
#generate-promo-text-btn,
#generate-compilation-text-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #ffc857 0%, #ffb143 100%);
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 200, 87, 0.4);
    margin-top: 8px;
}

#generate-promo-text-btn:hover,
#generate-compilation-text-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 200, 87, 0.6);
}

#generate-promo-text-btn:active,
#generate-compilation-text-btn:active {
    transform: translateY(0);
}

#generate-promo-text-btn:disabled,
#generate-compilation-text-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading spinner in modal */
#promo-autofill-loading,
#compilation-autofill-loading {
    text-align: center;
    padding: 20px 0;
}

#promo-autofill-loading .spinner,
#compilation-autofill-loading .spinner {
    width: 40px;
    height: 40px;
    border-width: 3px;
    margin: 0 auto 12px;
}

#promo-autofill-loading p,
#compilation-autofill-loading p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* Video type toggle specific styling */
#promo-event-fields,
#promo-brand-fields {
    margin-top: 20px;
}

/* Responsive adjustments for modal */
@media (max-width: 768px) {
    #promo-autofill-modal .modal-content,
    #compilation-autofill-modal .modal-content {
        max-width: 100%;
        height: 100vh;
        border-radius: 0;
    }

    #promo-autofill-modal .modal-body,
    #compilation-autofill-modal .modal-body {
        padding: 20px;
    }

    .modal-body > div[style*="grid"] {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ========== Bulk Editor Styles ========== */

/* Video thumbnail grid */
/* ── Bulk upload option cards ── */
.bulk-upload-option-card {
    border: 2px solid #e0e0e0;
    border-radius: 14px;
    padding: 12px 12px 10px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    background: #fafafa;
}
.bulk-upload-option-card:hover { border-color: #aaa; }
.bulk-upload-option-selected {
    border-color: #f5a623;
    background: #fffcf5;
}
.bulk-option-radio-row {
    display: flex; align-items: center; gap: 7px; margin-bottom: 7px;
}
.bulk-option-radio {
    width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid #ccc; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    transition: border-color 0.15s;
}
.bulk-upload-option-selected .bulk-option-radio,
.bulk-option-radio-active { border-color: #f5a623; }
.bulk-option-radio-dot {
    width: 8px; height: 8px; border-radius: 50%; background: #f5a623;
    display: none;
}
.bulk-upload-option-selected .bulk-option-radio-dot,
.bulk-option-radio-active + .bulk-option-radio-dot { display: block; }
.bulk-option-label {
    font-size: 10px; font-weight: 800; color: #f5a623;
    text-transform: uppercase; letter-spacing: 0.05em;
}
.bulk-option-title {
    font-size: 14px; font-weight: 800; color: #111; margin-bottom: 4px;
}
.bulk-option-desc {
    font-size: 12px; color: #666; line-height: 1.4; margin-bottom: 8px;
}
.bulk-option-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.bulk-tag {
    padding: 2px 8px; border-radius: 20px;
    font-size: 10px; font-weight: 700;
}
.bulk-tag-green { background: #e8f5e9; color: #2e7d32; }
.bulk-tag-orange { background: #fff3e0; color: #e65100; }
.bulk-tag-red { background: #fce4ec; color: #c62828; }

/* ── Upload tips ── */
.upload-tips-box {
    background: #fffbf0; border: 1.5px solid #ffe082; border-radius: 14px;
    padding: 14px 16px; margin-bottom: 14px;
}
.upload-tips-header { font-size: 13px; font-weight: 800; color: #e65100; font-style: italic; text-align: center; margin-bottom: 2px; }
.upload-tips-sub { font-size: 12px; color: #777; text-align: center; margin-bottom: 12px; }
.upload-tip-row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.upload-tip-row:last-child { margin-bottom: 0; }
.tip-check { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.tip-body { flex: 1; min-width: 0; }
.tip-body strong { font-size: 13px; color: #1a1a1a; margin-right: 8px; }
.tip-desc { font-size: 11px; color: #777; margin-top: 2px; line-height: 1.4; }
.btn-view-ex {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 20px;
    border: 1.5px solid #bbb; background: #f5f5f5;
    font-size: 11px; font-weight: 600; color: #444; cursor: pointer;
    vertical-align: middle; white-space: nowrap;
}
.btn-view-ex:hover { background: #e8e8e8; border-color: #999; }
/* ── Examples video modal ── */
.ex-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.72); z-index: 9000;
    align-items: center; justify-content: center; padding: 16px;
}
.ex-modal-overlay.open { display: flex; }
.ex-modal-box {
    background: #fff; border-radius: 20px; width: 100%; max-width: 480px;
    max-height: 90vh; overflow-y: auto; padding: 20px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.4);
}
.ex-modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.ex-modal-title { font-size: 16px; font-weight: 800; color: #1a1a1a; }
.ex-modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: #888; line-height: 1; padding: 0 4px; }
.ex-modal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ex-modal-grid video { width: 100%; aspect-ratio: 9/16; object-fit: cover; border-radius: 10px; background: #111; display: block; }

/* ── Bulk dropzone ── */
.bulk-dropzone {
    border: 2px dashed #ccc;
    border-radius: 14px;
    padding: 28px 16px 20px;
    text-align: center;
    cursor: pointer;
    background: #fafafa;
    transition: border-color 0.15s, background 0.15s;
    margin-bottom: 4px;
}
.bulk-dropzone:hover { border-color: #888; background: #f5f5f5; }
.bulk-dropzone-icon {
    font-size: 36px; color: #bbb; line-height: 1; margin-bottom: 8px;
}
.bulk-dropzone-text { font-size: 15px; font-weight: 700; color: #333; margin-bottom: 4px; }
.bulk-dropzone-sub { font-size: 12px; color: #aaa; }

/* ── Upload Footage button ── */
.bulk-upload-footage-btn {
    padding: 13px 40px;
    background: #222;
    border: none; border-radius: 50px;
    font-size: 16px; font-weight: 700; color: #fff;
    cursor: pointer; transition: background 0.2s;
}
.bulk-upload-footage-btn:hover { background: #444; }

.bulk-video-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 15px;
    padding: 0 10px;
}

.bulk-video-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 70px;
}

.bulk-video-thumb {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #f0f0f0;
    border: 2px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #666;
    font-weight: 600;
}

.bulk-video-remove {
    color: #f44336;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    padding: 2px 6px;
    line-height: 1;
    margin-top: 2px;
}

.bulk-video-remove:hover {
    color: #d32f2f;
}

/* Edit Details button - purple pill */
.bulk-edit-details-btn {
    background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 16px 50px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(156, 39, 176, 0.4);
}

.bulk-edit-details-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(156, 39, 176, 0.6);
}

/* Edit Details Overlay */
.bulk-edit-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 136, 229, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
}

.bulk-edit-modal {
    position: relative;
    background: #f5f5f5;
    border-radius: 20px;
    width: 100%;
    max-width: 550px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
}

.bulk-edit-close-x {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #e74c3c;
    cursor: pointer;
    padding: 4px;
    z-index: 1;
    transition: transform 0.2s;
}
.bulk-edit-close-x:hover {
    transform: scale(1.15);
}

/* Bulk select dropdowns */
.bulk-select {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 50px;
    background: #e8e8e8;
    font-size: 14px;
    color: #333;
    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 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    text-align: center;
    font-weight: 600;
}

/* Slider section */
.bulk-slider-section {
    margin: 20px 0;
}

.bulk-slider-labels {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.bulk-slider-labels span {
    text-align: center;
    min-width: 80px;
    line-height: 1.3;
}

.bulk-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #9c27b0, #ff9800);
    outline: none;
}

.bulk-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f5a623;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.bulk-slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f5a623;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* Bulk form fields */
.bulk-form-fields {
    margin-top: 20px;
}

.bulk-field-group {
    margin-bottom: 18px;
}

.bulk-input {
    width: 100%;
    padding: 14px 18px;
    border: none;
    border-radius: 50px;
    background: #e8e8e8;
    font-size: 14px;
    color: #333;
    font-family: inherit;
    transition: all 0.2s ease;
}

textarea.bulk-input {
    border-radius: 16px;
    resize: vertical;
    line-height: 1.5;
}

.bulk-input:focus {
    outline: none;
    background: #ddd;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.15);
}

.bulk-input::placeholder {
    color: #999;
    font-style: italic;
    font-size: 13px;
}

/* Close Form button */
.bulk-close-form-btn {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
}

.bulk-close-form-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.6);
}

/* Responsive for bulk editor */
@media (max-width: 768px) {
    .bulk-edit-modal {
        max-width: 100%;
        padding: 20px;
    }

    .bulk-slider-labels span {
        font-size: 13px;
        min-width: 60px;
    }
}

/* ========== Visual Style Selector ========== */

.style-selector-section {
    margin: 25px 0;
    text-align: center;
}

.style-selector-section h3 {
    font-weight: 700;
    font-style: italic;
    color: #333;
    text-align: center;
    margin-bottom: 15px;
}

.style-selector-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 0 10px;
}

.style-phone-card {
    cursor: pointer;
    border-radius: 12px;
    border: 3px solid transparent;
    padding: 4px;
    transition: all 0.2s ease;
    background: #f5f5f5;
}

.style-phone-card:hover {
    border-color: #90caf9;
}

.style-phone-card.selected {
    background: #e3f2fd;
    border-color: #42a5f5;
}

/* Style preview images */
.style-preview-img {
    width: 100%;
    aspect-ratio: 9 / 16;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

/* Video-based promo style preview cards */
.promo-style-preview {
    width: 100%;
    aspect-ratio: 9 / 16;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    background: #1a1a1a;
    cursor: pointer;
}
.promo-style-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}
.promo-style-preview .ps-play-btn {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    background: rgba(0,0,0,0.25);
    transition: background 0.2s;
    pointer-events: none;
}
.promo-style-preview .ps-play-btn::after {
    content: '';
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23333'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px;
}
.promo-style-preview:hover .ps-play-btn { background: rgba(0,0,0,0.15); }
.promo-style-preview.playing .ps-play-btn { display: none; }
.promo-style-preview .ps-cat {
    position: absolute;
    bottom: 4px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 5px;
    color: rgba(255,255,255,0.5);
    z-index: 1;
}
/* Column headers for promo style grid */
.ps-col-header {
    text-align: center; font-weight: 700; font-size: 13px;
    padding: 6px 0; color: #333;
    text-decoration: underline;
}

/* Responsive: 2 columns on mobile */
@media (max-width: 500px) {
    .style-selector-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

/* ========== Toast Notifications ========== */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 380px;
    width: calc(100% - 40px);
}

.toast {
    background: #fff;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: toastSlideIn 0.35s ease;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

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

.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.toast-body {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 700;
    font-size: 14px;
    color: #1a1a1a;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 13px;
    color: #666;
}

.toast-progress {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.toast-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #1e88e5, #42a5f5);
    border-radius: 2px;
    transition: width 0.3s ease;
    animation: toastProgressPulse 1.5s ease-in-out infinite;
}

.toast-close {
    background: none;
    border: none;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    flex-shrink: 0;
}

.toast-close:hover {
    color: #333;
}

/* Toast variants */
.toast-success {
    border-left: 4px solid #4CAF50;
}

.toast-uploading {
    border-left: 4px solid #1e88e5;
}

.toast-error {
    border-left: 4px solid #f44336;
}

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

@keyframes toastProgressPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ── Upload tips + examples modal (shared: bulk & onboarding) ── */
.ob-ex-btn {
    display: inline-block; padding: 2px 9px; border-radius: 20px;
    border: 1.5px solid #bbb; background: #f5f5f5;
    font-size: 11px; font-weight: 600; cursor: pointer; color: #555;
    vertical-align: middle; white-space: nowrap;
}
.ob-ex-btn:hover { background: #e8e8e8; }
.ob-ex-modal {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.72);
    z-index: 9999; align-items: center; justify-content: center; padding: 16px;
}
.ob-ex-modal.open { display: flex; }
.ob-ex-modal-box {
    background: #fff; border-radius: 20px; width: 100%; max-width: 420px;
    max-height: 88vh; overflow-y: auto; padding: 18px;
}
.ob-ex-modal-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.ob-ex-modal-title { font-size: 15px; font-weight: 800; }
.ob-ex-modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: #888; }
.ob-ex-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.ob-ex-grid video { width: 100%; aspect-ratio: 9/16; object-fit: cover; border-radius: 9px; background: #111; display: block; }

/* ── Template Preview Modal (Step 3 "View Template") ── */
.bt-modal-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.55);z-index:600;align-items:flex-end;justify-content:center;padding:0;}
.bt-modal-overlay.open{display:flex;}
@media(min-width:500px){.bt-modal-overlay{align-items:center;padding:20px;}}
.bt-modal-box{background:#f0ede8;border-radius:22px 22px 0 0;width:100%;max-width:520px;max-height:92vh;overflow-y:auto;position:relative;}
@media(min-width:500px){.bt-modal-box{border-radius:22px;}}
.bt-modal-handle{width:32px;height:3px;background:#ddd;border-radius:2px;margin:10px auto 0;}
.bt-modal-close{position:absolute;top:12px;right:14px;background:#e8e4df;border:none;border-radius:50%;width:28px;height:28px;font-size:16px;cursor:pointer;color:#555;display:flex;align-items:center;justify-content:center;z-index:2;}
.bt-modal-top{display:flex;gap:12px;padding:14px 16px 10px;}
.bt-modal-phone{width:72px;flex-shrink:0;aspect-ratio:9/16;border-radius:12px;background:#0f172a;border:2px solid #2d3748;position:relative;overflow:hidden;}
.bt-modal-phone-inner{position:absolute;inset:2px;border-radius:10px;overflow:hidden;display:flex;flex-direction:column;}
.bt-modal-info{flex:1;min-width:0;}
.bt-modal-name{font-size:14px;font-weight:800;color:#1a1a1a;margin-bottom:6px;line-height:1.3;}
.bt-modal-badge-row{display:flex;gap:4px;flex-wrap:wrap;margin-bottom:8px;}
.bt-modal-stat-row{display:flex;gap:5px;margin-bottom:10px;}
.bt-modal-stat{flex:1;background:#fff;border:1px solid #e0ddd8;border-radius:8px;padding:6px 4px;text-align:center;}
.bt-modal-stat-val{font-size:12px;font-weight:800;color:#1a1a1a;}
.bt-modal-stat-lbl{font-size:7px;font-weight:700;color:#aaa;text-transform:uppercase;margin-top:2px;}
.bt-modal-desc{font-size:12px;color:#555;line-height:1.7;padding:0 16px 12px;}
.bt-modal-section-lbl{font-size:10px;font-weight:700;color:#aaa;text-transform:uppercase;letter-spacing:.5px;padding:0 16px;margin-bottom:7px;}
.bt-modal-seg-pills{display:flex;gap:5px;flex-wrap:wrap;padding:0 16px 12px;}
.bt-modal-seg-pill{font-size:10px;font-weight:700;color:#fff;padding:4px 10px;border-radius:20px;}
.bt-modal-tl-section{padding:0 16px 16px;overflow-x:auto;}
.bt-modal-actions{padding:0 16px 24px;display:flex;flex-direction:column;gap:8px;}
.bt-modal-use-btn{width:100%;background:#f5a623;color:#fff;border:none;font-family:inherit;font-size:13px;font-weight:800;padding:13px;border-radius:12px;cursor:pointer;}
.bt-modal-use-btn.selected-state{background:#22a845;}

/* ── Bulk Template Selector Cards (Step 3) ── */
.btcard { background: #fff; border: 1.5px solid #e0ddd8; border-radius: 12px; overflow: hidden; cursor: pointer; transition: border-color .15s, box-shadow .15s; position: relative; display: flex; flex-direction: column; }
.btcard:hover { border-color: #1a56db; }
.btcard.selected { border-color: #f5a623; box-shadow: 0 0 0 2px rgba(245,166,35,.28); }
/* Mini phone-frame thumbnail — solid green body with segment-colour strip near the home bar */
.bt-thumb { aspect-ratio: 9/16; position: relative; overflow: hidden; background: #10b981; display: flex; flex-direction: column; }
.bt-thumb-island { position: absolute; top: 5px; left: 50%; transform: translateX(-50%); width: 34%; height: 5px; background: #0a0a0a; border-radius: 4px; z-index: 6; }
.bt-thumb-seg { flex: 1; }
.bt-thumb-bar { height: 5px; display: flex; position: absolute; bottom: 6px; left: 8%; right: 8%; border-radius: 3px; overflow: hidden; z-index: 5; }
.bt-thumb-bar-blk { flex: 1; }
.bt-thumb-home { position: absolute; bottom: 1.5px; left: 50%; transform: translateX(-50%); width: 32%; height: 1.5px; background: rgba(255,255,255,.35); border-radius: 1px; z-index: 6; }
.bt-check { display: none; position: absolute; top: 5px; right: 5px; width: 18px; height: 18px; border-radius: 50%; background: #f5a623; color: #fff; font-size: 10px; font-weight: 800; align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(0,0,0,.25); z-index: 2; }
.btcard.selected .bt-check { display: flex; }
.bt-body { padding: 5px 6px 4px; }
.bt-name { font-size: 9.5px; font-weight: 700; color: #1a1a1a; margin-bottom: 3px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bt-foot { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.bt-badge-free { font-size: 8px; font-weight: 700; background: #d4edda; color: #155724; padding: 2px 5px; border-radius: 7px; }
.bt-badge-type { font-size: 8px; font-weight: 600; background: #f0f0f0; color: #555; padding: 2px 5px; border-radius: 7px; }
.bt-uses { font-size: 8px; color: #aaa; font-weight: 600; }
.bt-view-btn { display: block; width: calc(100% - 12px); margin: 0 6px 6px; background: #eff6ff; border: 1.5px solid #bfdbfe; border-radius: 7px; font-family: inherit; font-size: 9px; font-weight: 700; color: #1a56db; padding: 5px 4px; cursor: pointer; text-align: center; }
.bt-view-btn:hover { background: #dbeafe; border-color: #93c5fd; }
