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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #0096C7 0%, #0077B6 100%);
    min-height: 100vh;
    color: #333;
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 50px 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 450px;
    width: 100%;
}

.logo {
    max-width: 150px;
    margin-bottom: 30px;
}

.login-box h1 {
    color: #0096C7;
    margin-bottom: 10px;
    font-size: 28px;
}

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

.login-form input,
.login-form select {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
    background-color: #fff;
    box-sizing: border-box;
}

.login-form input:focus,
.login-form select:focus {
    outline: none;
    border-color: #0096C7;
}

.phone-input-group {
    display: flex;
    align-items: stretch;
    margin-bottom: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.3s;
}

.phone-input-group:focus-within {
    border-color: #0096C7;
}

.phone-country-code {
    padding: 0 8px;
    background: #f5f5f5;
    color: #333;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    border: none;
    border-right: 1px solid #e0e0e0;
    border-radius: 0;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23666'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 4px center;
    padding-right: 16px;
    width: 90px;
    min-width: 90px;
    max-width: 90px;
    flex-shrink: 0;
    margin-bottom: 0 !important;
}

.phone-input-group input {
    flex: 1;
    border: none !important;
    margin-bottom: 0 !important;
    border-radius: 0 !important;
    outline: none;
    min-width: 0;
}

/* Auth form toggle link */
.form-toggle-link {
    margin-top: 15px;
    font-size: 14px;
    color: #666;
}

.form-toggle-link a {
    color: #0096C7;
    text-decoration: none;
    font-weight: 600;
}

.form-toggle-link a:hover {
    text-decoration: underline;
}

/* Error message */
.error-message {
    background: #fdecea;
    color: #b71c1c;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    text-align: left;
    border-left: 4px solid #e53935;
}

/* Success message */
.success-message {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    text-align: left;
    border-left: 4px solid #43a047;
}

/* Email confirmation message */
.confirmation-message {
    padding: 20px 0;
}

.confirmation-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.confirmation-message h2 {
    color: #0096C7;
    font-size: 22px;
    margin-bottom: 10px;
}

.confirmation-message p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 10px;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #0096C7 0%, #0077B6 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 150, 199, 0.4);
}

.btn-secondary {
    padding: 10px 20px;
    background: white;
    color: #0096C7;
    border: 2px solid #0096C7;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #0096C7;
    color: white;
}

/* Navigation */
.navbar {
    background: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-logo {
    height: 40px;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.greeting {
    color: white;
    font-size: 36px;
    margin-bottom: 40px;
    text-align: center;
}

/* Upload Section */
.upload-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.upload-section h2 {
    color: #0096C7;
    margin-bottom: 20px;
    font-size: 24px;
}

.upload-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.upload-btn {
    padding: 30px 20px;
    background: linear-gradient(135deg, #0096C7 0%, #0077B6 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.upload-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 150, 199, 0.4);
}

.upload-btn .icon {
    font-size: 40px;
}

.upload-icon-img {
    width: 48px;
    height: 48px;
}

/* Credit Balance Display */
.upload-credit-balance {
    background: linear-gradient(135deg, #0096C7 0%, #0077B6 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    display: inline-block;
}

.upload-credit-balance #creditCount {
    font-size: 20px;
    font-weight: 700;
}

/* Upload Form Area */
.upload-form-area {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.upload-file-name {
    width: 100%;
    color: #0096C7;
    font-weight: 600;
    font-size: 15px;
    margin: 0;
}

.upload-title-input {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.upload-title-input:focus {
    outline: none;
    border-color: #0096C7;
}

.upload-size-hint {
    width: 100%;
    font-size: 12px;
    color: #888;
    margin: 4px 0 8px;
}

.translate-dropdown {
    position: relative;
    display: inline-block;
}

.btn-translate {
    padding: 5px 12px;
    background: #e3f2fd;
    color: #0096C7;
    border: 1px solid #bbdefb;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s;
}

.btn-translate:hover {
    background: #bbdefb;
}

.translate-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 50;
    min-width: 140px;
    margin-top: 4px;
}

.translate-menu a {
    display: block;
    padding: 8px 14px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    cursor: pointer;
}

.translate-menu a:hover {
    background: #f5f5f5;
}

.church-lang-select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.upload-lang-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 4px 0;
}

.upload-lang-label {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
}

.upload-lang-note {
    font-size: 12px;
    color: #e65100;
    font-style: italic;
}

.upload-submit-btn {
    width: auto;
    padding: 12px 30px;
}

.upload-cancel-btn {
    padding: 12px 20px;
}

/* Upload Progress Bar — large, prominent per Req 3.12 */
.upload-progress-area {
    margin-top: 24px;
    padding: 24px;
    background: #eef0fb;
    border-radius: 12px;
    border: 2px solid #c5caf6;
}

.upload-progress-label {
    font-size: 20px;
    font-weight: 700;
    color: #4a54b5;
    margin-bottom: 12px;
    text-align: center;
}

.upload-progress-track {
    width: 100%;
    height: 28px;
    background: #d0d0d0;
    border-radius: 14px;
    overflow: hidden;
}

.upload-progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #0096C7 0%, #0077B6 100%);
    border-radius: 14px;
    transition: width 0.2s ease;
}

/* Drag & Drop Overlay */
.drop-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 119, 182, 0.85);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.drop-overlay.active {
    display: flex;
}

.drop-overlay-content {
    text-align: center;
    color: white;
}

.drop-overlay-icon {
    font-size: 72px;
    margin-bottom: 16px;
    animation: dropBounce 1s ease infinite;
}

@keyframes dropBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.drop-overlay-content p {
    font-size: 24px;
    font-weight: 600;
}

/* Drop Type Selection Modal */
.drop-type-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.drop-type-modal-box {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.drop-type-modal-box h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 8px;
}

.drop-file-name {
    color: #0096C7;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 20px;
    word-break: break-all;
}

.drop-type-buttons {
    display: flex;
    gap: 12px;
}

.drop-type-btn {
    flex: 1;
    padding: 20px 12px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.drop-type-btn:hover {
    border-color: #0096C7;
    background: rgba(0, 150, 199, 0.05);
}

.drop-type-icon-img {
    width: 48px;
    height: 48px;
}

/* Content List */
.content-list {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.content-list h2 {
    color: #0096C7;
    margin-bottom: 20px;
    font-size: 24px;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.content-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid transparent;
    display: flex;
    gap: 15px;
    align-items: start;
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: #0096C7;
}

.content-thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.content-info {
    flex: 1;
}

.content-type {
    display: inline-flex;
    vertical-align: middle;
    margin-right: 6px;
}

.content-type .content-type-icon-img {
    width: 22px;
    height: 22px;
}

.content-card h3,
.content-info h3 {
    color: #333;
    margin-bottom: 8px;
    font-size: 18px;
    min-height: 47px;
    line-height: 1.3;
}

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

.status-badge {
    display: inline-block;
    padding: 5px 12px;
    background: #4caf50;
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.processing {
    background: #ff9800;
}

/* Resources Page */
.back-link {
    color: white;
    text-decoration: none;
    font-size: 16px;
    margin-bottom: 20px;
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.back-link:hover {
    background: rgba(255, 255, 255, 0.3);
}

.content-header {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.content-header h1 {
    color: #0096C7;
    margin-bottom: 10px;
}

.content-meta {
    color: #666;
    font-size: 14px;
}

.resources-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.resources-section h2 {
    color: #0096C7;
    margin-bottom: 25px;
    font-size: 24px;
}

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

.resource-actions h3 {
    color: #333;
    font-size: 18px;
}

.resource-preview {
    color: #444;
    line-height: 1.5;
    font-size: 15px;
    padding: 20px 0;
}

.resource-preview .resource-h1 {
    font-size: 22px;
    color: #0096C7;
    margin: 20px 0 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid #e3f2fd;
}

.resource-preview .resource-h2 {
    font-size: 18px;
    color: #333;
    margin: 16px 0 6px;
}

.resource-preview .resource-h3 {
    font-size: 15px;
    color: #555;
    margin: 12px 0 4px;
}

.resource-preview .resource-h4 {
    font-size: 14px;
    color: #666;
    margin: 10px 0 4px;
    font-style: italic;
}

.resource-preview .resource-paragraph {
    margin: 6px 0;
    line-height: 1.7;
    color: #444;
    font-size: 14px;
}

.resource-preview .resource-list {
    margin: 8px 0;
    padding-left: 24px;
}

.resource-preview .resource-list li {
    margin: 4px 0;
    line-height: 1.6;
    color: #444;
    font-size: 14px;
}

.resource-preview .resource-quote {
    padding: 10px 16px;
    margin: 10px 0;
    border-left: 3px solid #0096C7;
    color: #555;
    background: rgba(0, 150, 199, 0.04);
    border-radius: 0 6px 6px 0;
    font-style: italic;
}

.resource-preview .resource-divider {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 16px 0;
}

.resource-preview .resource-spacer {
    height: 8px;
}

.resource-preview code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    color: #d32f2f;
}

.media-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.media-section h2 {
    color: #0096C7;
    margin-bottom: 20px;
    font-size: 24px;
}

.media-player {
    width: 100%;
    max-width: 800px;
    border-radius: 10px;
    background: #000;
}

audio.media-player {
    width: 100%;
    max-width: 600px;
}

.btn-download, .btn-copy {
    padding: 8px 16px;
    background: #0096C7;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-download:hover, .btn-copy:hover {
    background: #0077B6;
}

.social-posts, .video-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.post-item, .video-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 15px;
}

.post-item p, .video-info p {
    color: #666;
    margin: 8px 0;
    flex: 1;
}

.video-item {
    align-items: center;
}

.video-thumbnail {
    font-size: 40px;
    width: 60px;
    text-align: center;
}

.video-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.graphics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.graphic-item {
    background: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    font-size: 40px;
}

/* Video Player Section */
.video-player-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.video-player {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
}

.video-thumbnail-large {
    width: 100%;
    display: block;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(0, 150, 199, 0.9);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 30px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 5px;
}

.play-button:hover {
    background: rgba(118, 75, 162, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid #e0e0e0;
    flex-wrap: wrap;
}

.tab-button {
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #999;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    position: relative;
}

.tab-button .tab-icon {
    font-size: 24px;
}

.tab-icon-img {
    width: 24px;
    height: 24px;
}

.tab-button .tab-label {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
    pointer-events: none;
    margin-bottom: 6px;
}

.tab-button:hover .tab-label {
    display: block;
}

.tab-button:hover {
    color: #0096C7;
    background: rgba(0, 150, 199, 0.05);
}

.tab-button.active {
    color: #0096C7;
    border-bottom-color: #0096C7;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s;
}

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

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

/* Responsive */
@media (max-width: 768px) {
    .greeting {
        font-size: 28px;
    }
    
    .upload-buttons {
        grid-template-columns: 1fr;
    }

    .upload-form-area {
        flex-direction: column;
    }

    .upload-title-input {
        width: 100%;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .content-card {
        flex-direction: column;
    }
    
    .content-thumbnail {
        width: 100%;
        height: auto;
    }
    
    .resource-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .post-item, .video-info {
        flex-direction: column;
    }
    
    .resources-grid {
        grid-template-columns: 1fr;
    }
}

/* Content Loading Indicator */
.content-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #0096C7;
    font-size: 16px;
    font-weight: 600;
}

.content-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top-color: #0096C7;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 12px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Processing Progress Bar (inside content cards) — large, prominent per Req 10.4 */
.processing-progress-area {
    margin-top: 12px;
    width: 100%;
    padding: 16px;
    background: #fff8e1;
    border-radius: 10px;
    border: 2px solid #ffe0b2;
}

.processing-progress-track {
    width: 100%;
    height: 24px;
    background: #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
}

.processing-progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    border-radius: 12px;
    transition: width 0.4s ease;
}

.processing-progress-label {
    font-size: 16px;
    font-weight: 700;
    color: #e65100;
    margin-bottom: 8px;
    text-align: center;
}

.processing-state-label {
    font-size: 13px;
    color: #6d4c00;
    margin-top: 6px;
    font-style: italic;
    text-align: center;
}

/* Status badge variants */
.status-badge.queued {
    background: #9e9e9e;
}

.status-badge.complete {
    background: #4caf50;
}

.status-badge.error {
    background: #e53935;
}

/* Content card non-clickable state */
.content-card.not-clickable {
    cursor: default;
}

.content-card.not-clickable:hover {
    transform: none;
    box-shadow: none;
    border-color: transparent;
}

/* Nav actions group */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-church-btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Church Profile Section */
.church-profile-section,
.vocabulary-section,
.members-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.church-profile-section h2,
.vocabulary-section h2,
.members-section h2 {
    color: #0096C7;
    margin-bottom: 20px;
    font-size: 24px;
}

.church-profile-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.profile-field {
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #0096C7;
}

.profile-label {
    font-weight: 700;
    color: #0096C7;
    display: block;
    font-size: 13px;
    margin-bottom: 4px;
}

.profile-value {
    color: #333;
    font-size: 16px;
}

/* Vocabulary List */
.vocabulary-list {
    margin-bottom: 20px;
}

.vocabulary-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 15px;
}

.vocabulary-default {
    background: #f0f0f0;
    color: #555;
}

.vocabulary-custom {
    background: #e8eaf6;
    color: #333;
}

.vocabulary-term {
    flex: 1;
}

.vocabulary-badge-default {
    font-size: 11px;
    font-weight: 600;
    color: #888;
    background: #e0e0e0;
    padding: 3px 10px;
    border-radius: 12px;
    margin-left: 12px;
}

.vocabulary-form {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.vocabulary-input {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.vocabulary-input:focus {
    outline: none;
    border-color: #0096C7;
}

.vocabulary-add-btn {
    width: auto;
    padding: 12px 24px;
}

/* Members Section */
.members-table {
    width: 100%;
    overflow-x: auto;
}

.members-header,
.members-row {
    display: grid;
    grid-template-columns: 1.5fr 2fr 1fr 1fr 1fr;
    gap: 12px;
    align-items: center;
    padding: 12px 16px;
}

.members-header {
    background: #0096C7;
    color: white;
    font-weight: 700;
    font-size: 14px;
    border-radius: 10px 10px 0 0;
}

.members-row {
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
}

.members-row:last-child {
    border-bottom: none;
    border-radius: 0 0 10px 10px;
}

.members-row:hover {
    background: #eef0fb;
}

.member-role-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.role-owner {
    background: #e8f5e9;
    color: #2e7d32;
}

.role-member {
    background: #e3f2fd;
    color: #1565c0;
}

.upload-status {
    font-weight: 600;
    font-size: 13px;
}

.upload-yes {
    color: #2e7d32;
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #ccc;
    border-radius: 24px;
    transition: 0.3s;
}

.toggle-slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background: #0096C7;
}

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

/* Member form */
.member-form {
    margin-top: 24px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.member-form h3 {
    color: #0096C7;
    margin-bottom: 16px;
    font-size: 18px;
}

.member-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    margin-bottom: 12px;
    transition: border-color 0.3s;
}

.member-input:focus {
    outline: none;
    border-color: #0096C7;
}

.member-add-btn {
    width: auto;
    padding: 12px 24px;
}

/* Danger button (small) */
.btn-danger-sm {
    padding: 6px 14px;
    background: #e53935;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-danger-sm:hover {
    background: #b71c1c;
}

.btn-activate-sm {
    padding: 6px 14px;
    background: #2e7d32;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-activate-sm:hover {
    background: #1b5e20;
}

/* Responsive for church page */
@media (max-width: 768px) {
    .members-header,
    .members-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .members-header {
        display: none;
    }

    .members-row {
        padding: 16px;
        border-radius: 10px;
        margin-bottom: 10px;
    }

    .vocabulary-form {
        flex-direction: column;
    }

    .vocabulary-input {
        width: 100%;
    }

    .nav-actions {
        flex-direction: column;
        gap: 6px;
    }
}

/* ============================================================
   Subscription Page Styles
   ============================================================ */
.subscription-status-section,
.subscription-payment-section,
.subscription-history-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.subscription-status-section h2,
.subscription-payment-section h2,
.subscription-history-section h2 {
    color: #0096C7;
    margin-bottom: 20px;
    font-size: 24px;
}

.subscription-status-card {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
}

.btn-reload {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 14px;
    vertical-align: middle;
    margin-left: 8px;
}
.btn-reload:hover {
    background: #f0f0f0;
}

.subscription-status-badge {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    flex-shrink: 0;
}

.subscription-status-badge.sub-active {
    background: #e8f5e9;
    color: #2e7d32;
    border: 2px solid #4caf50;
}

.subscription-status-badge.sub-inactive {
    background: #fdecea;
    color: #b71c1c;
    border: 2px solid #e53935;
}

.subscription-details {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.subscription-payment-desc {
    color: #666;
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 1.5;
}

.mock-payment-form {
    max-width: 500px;
}

.mock-payment-form .member-input {
    margin-bottom: 12px;
}

.payment-row {
    display: flex;
    gap: 12px;
}

.payment-row .member-input {
    flex: 1;
}

/* Transaction History Table */
.transaction-table {
    width: 100%;
    overflow-x: auto;
}

.transaction-header,
.transaction-row {
    display: grid;
    grid-template-columns: 1.5fr 1.5fr 1fr;
    gap: 12px;
    align-items: center;
    padding: 12px 16px;
}

.transaction-header {
    background: #0096C7;
    color: white;
    font-weight: 700;
    font-size: 14px;
    border-radius: 10px 10px 0 0;
}

.transaction-row {
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
}

.transaction-row:last-child {
    border-bottom: none;
    border-radius: 0 0 10px 10px;
}

/* ============================================================
   Admin Panel Styles
   ============================================================ */

/* Compact admin layout for superadmin users */
body.admin-compact .container {
    max-width: 1200px;
}

body.admin-compact .greeting {
    font-size: 22px;
    margin-bottom: 16px;
}

body.admin-compact .admin-section {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.admin-compact .admin-section h2 {
    font-size: 16px;
    margin-bottom: 10px;
}

body.admin-compact .admin-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-end;
    max-width: 100%;
}

body.admin-compact .admin-form .member-input {
    margin-bottom: 0;
    padding: 8px 10px;
    font-size: 13px;
    flex: 1;
    min-width: 140px;
}

body.admin-compact .admin-form .btn-primary {
    padding: 8px 16px;
    font-size: 13px;
    white-space: nowrap;
}

body.admin-compact .admin-table-header,
body.admin-compact .admin-table-row {
    padding: 6px 10px;
    font-size: 12px;
    gap: 8px;
}

body.admin-compact .admin-table-header {
    border-radius: 5px 5px 0 0;
}

body.admin-compact .admin-table-row:last-child {
    border-radius: 0 0 5px 5px;
}

body.admin-compact .admin-id-cell {
    font-size: 11px;
}

body.admin-compact .btn-copy-id {
    font-size: 10px;
    padding: 1px 3px;
}

body.admin-compact .admin-users-row {
    grid-template-columns: 1fr 1.5fr 1fr 0.7fr 0.7fr 0.7fr;
}

body.admin-compact .error-message,
body.admin-compact .success-message {
    font-size: 13px;
    padding: 6px 10px;
    margin-top: 8px;
}

body.admin-compact .subscription-status-badge {
    padding: 3px 10px;
    font-size: 11px;
    border-radius: 8px;
}

body.admin-compact .admin-forms-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

body.admin-compact .admin-forms-row .admin-section {
    margin-bottom: 0;
}

/* Admin section header with inline button */
.admin-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.admin-section-header h2 {
    margin-bottom: 0 !important;
}

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

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 28px;
    width: 90%;
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

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

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #0096C7;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0 4px;
}

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

.modal-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.modal-form-grid .form-group {
    display: flex;
    flex-direction: column;
}

.modal-form-grid .form-group label {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin-bottom: 4px;
}

.modal-form-grid .form-group .member-input {
    margin-bottom: 0;
    padding: 8px 10px;
    font-size: 13px;
}

.modal-divider {
    border: none;
    border-top: 1px solid #eee;
    margin: 16px 0;
}

.modal-content h4 {
    font-size: 14px;
    color: #333;
    margin: 0 0 12px 0;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.modal-actions .btn-primary,
.modal-actions .btn-secondary,
.admin-section-header .btn-primary {
    width: auto;
}

.admin-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.admin-section h2 {
    color: #0096C7;
    margin-bottom: 20px;
    font-size: 24px;
}

.admin-form {
    max-width: 500px;
}

.admin-form .member-input {
    margin-bottom: 12px;
}

/* Admin Tables */
.admin-table {
    width: 100%;
    overflow-x: auto;
}

.admin-table-header,
.admin-table-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 0.8fr 2fr;
    gap: 12px;
    align-items: center;
    padding: 12px 16px;
}

.admin-table-header {
    background: #0096C7;
    color: white;
    font-weight: 700;
    font-size: 14px;
    border-radius: 10px 10px 0 0;
}

.admin-table-row {
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
}

.admin-table-row:last-child {
    border-bottom: none;
    border-radius: 0 0 10px 10px;
}

.admin-table-row:hover {
    background: #eef0fb;
}

.admin-id-cell {
    font-family: monospace;
    font-size: 12px;
    color: #888;
    word-break: break-all;
}

.btn-copy-id {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    padding: 2px 5px;
    font-size: 12px;
    vertical-align: middle;
    margin-left: 4px;
}
.btn-copy-id:hover {
    background: #f0f0f0;
}

.btn-view-church {
    background: none;
    border: 1px solid #0096C7;
    border-radius: 4px;
    cursor: pointer;
    padding: 3px 8px;
    font-size: 12px;
}
.btn-view-church:hover {
    background: #e3f2fd;
}

.user-picker-option {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 14px;
    text-align: left;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.15s;
}
.user-picker-option:hover {
    background: #e3f2fd;
    border-color: #0096C7;
}

/* Admin content table */
.admin-content-row {
    grid-template-columns: 2fr 1.2fr 0.5fr 1fr 0.8fr 0.4fr;
}

.admin-content-row .content-type-icon-img {
    width: 20px;
    height: 20px;
}

.admin-content-row .content-type {
    font-size: 14px;
}

.admin-status-processing {
    color: #e65100;
    font-weight: 600;
}

.admin-status-waiting {
    color: #2e7d32;
    font-weight: 600;
}

/* Admin Users Table (6 columns) */
.admin-users-row {
    grid-template-columns: 1.2fr 1.5fr 1fr 0.8fr 0.8fr 0.8fr;
}

.admin-actions-cell {
    text-align: center;
}

.user-active {
    color: #2e7d32;
    font-weight: 600;
}

.user-inactive {
    color: #b71c1c;
    font-weight: 600;
}

/* Responsive for subscription and admin pages */
@media (max-width: 768px) {
    .subscription-status-card {
        flex-direction: column;
    }

    .payment-row {
        flex-direction: column;
    }

    .transaction-header,
    .transaction-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .transaction-header {
        display: none;
    }

    .transaction-row {
        padding: 16px;
        border-radius: 10px;
        margin-bottom: 10px;
    }

    .admin-table-header,
    .admin-table-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .admin-table-header {
        display: none;
    }

    .admin-table-row {
        padding: 16px;
        border-radius: 10px;
        margin-bottom: 10px;
    }

    .admin-users-row {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   Accessibility: Focus-visible styles for keyboard navigation
   ============================================================ */
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.btn-download:focus-visible,
.btn-copy:focus-visible,
.btn-danger-sm:focus-visible,
.upload-btn:focus-visible,
.tab-button:focus-visible,
.toggle-switch input:focus-visible + .toggle-slider,
.back-link:focus-visible {
    outline: 3px solid #4a54b5;
    outline-offset: 2px;
}

.login-form input:focus-visible,
.upload-title-input:focus-visible,
.vocabulary-input:focus-visible,
.member-input:focus-visible {
    outline: 3px solid #4a54b5;
    outline-offset: 0;
    border-color: #4a54b5;
}

/* High contrast status badges for accessibility */
.status-badge.processing {
    background: #e65100;
    color: #fff;
}

.status-badge.queued {
    background: #616161;
    color: #fff;
}

.status-badge.error {
    background: #b71c1c;
    color: #fff;
}

/* ============================================================
   Responsive: Small screens (480px and below)
   ============================================================ */
@media (max-width: 480px) {
    .container {
        padding: 20px 12px;
    }

    .greeting {
        font-size: 22px;
        margin-bottom: 24px;
    }

    .upload-section,
    .content-list,
    .resources-section,
    .church-profile-section,
    .vocabulary-section,
    .members-section,
    .subscription-status-section,
    .subscription-payment-section,
    .subscription-history-section,
    .admin-section {
        padding: 20px 16px;
    }

    .upload-progress-label {
        font-size: 16px;
    }

    .processing-progress-label {
        font-size: 14px;
    }

    .tabs {
        gap: 4px;
    }

    .tab-button {
        padding: 10px 12px;
    }

    .tab-button .tab-label {
        display: none !important;
    }

    .resource-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .mock-payment-form {
        max-width: 100%;
    }

    .admin-form {
        max-width: 100%;
    }
}

/* ============================================================
   Print styles
   ============================================================ */
@media print {
    body {
        background: white;
        color: #000;
    }

    .navbar,
    .back-link,
    .upload-section,
    .btn-primary,
    .btn-secondary,
    .btn-download,
    .btn-copy,
    .btn-danger-sm {
        display: none;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    .resources-section,
    .content-header,
    .church-profile-section,
    .subscription-status-section,
    .admin-section {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
    }
}

/* ============================================================
   PDF Generation Modal
   ============================================================ */

.pdf-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdf-preview-content {
    background: white;
    border-radius: 16px;
    width: 95%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

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

.pdf-preview-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.pdf-palette-selector {
    padding: 16px 20px;
}

.pdf-palette-selector label {
    font-size: 13px;
    color: #666;
    display: block;
    margin-bottom: 10px;
}

.pdf-palette-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pdf-palette-btn {
    display: flex;
    align-items: stretch;
    border: 2px solid transparent;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    overflow: hidden;
    padding: 0;
}

.pdf-palette-btn:hover {
    border-color: rgba(255,255,255,0.4);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.pdf-palette-btn.active {
    border-color: white;
    box-shadow: 0 0 0 2px #333;
}

.palette-name {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: white;
    padding: 12px 16px;
    display: flex;
    align-items: center;
}

.palette-swatches {
    display: flex;
    align-self: stretch;
}

.palette-swatch {
    width: 44px;
    align-self: stretch;
}

.pdf-generate-area {
    padding: 20px;
}

.btn-pdf-generate {
    padding: 8px 16px;
    background: linear-gradient(135deg, #8014f0 0%, #6a0dad 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-pdf-generate:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(128, 20, 240, 0.3);
}

.btn-pdf-generate:focus-visible {
    outline: 3px solid #4a54b5;
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .pdf-preview-content {
        width: 100%;
        max-width: 100%;
        border-radius: 12px;
    }
}

/* ============================================================
   Social Media Posts — Per-Network Cards
   ============================================================ */

.social-posts-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.social-post-card {
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

.social-post-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
}

.social-post-header h4 {
    flex: 1;
    margin: 0;
    font-size: 16px;
    color: #333;
}

.social-post-icon {
    font-size: 20px;
}

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

.social-post-body {
    padding: 16px;
    font-size: 15px;
    line-height: 1.6;
    color: #444;
}

.social-post-editor {
    border-top: 1px solid #e0e0e0;
}

.social-post-editor .rich-editor-toolbar {
    border-bottom: 1px solid #e0e0e0;
    border-top: none;
}

.social-editor-content {
    min-height: 120px;
    max-height: 300px;
}

/* ============================================================
   Resource Editing — Rich Text Editor
   ============================================================ */

.btn-edit-resource {
    padding: 8px 16px;
    background: #e8eaf6;
    color: #4a54b5;
    border: 1px solid #c5cae9;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.btn-edit-resource:hover {
    background: #c5cae9;
    border-color: #4a54b5;
}

.btn-restore-resource {
    padding: 8px 16px;
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffcc80;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-restore-resource:hover {
    background: #ffe0b2;
}

.resource-edit-badge {
    font-size: 13px;
    color: #4a54b5;
    background: #e8eaf6;
    padding: 6px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    display: inline-block;
}

.resource-editor-area {
    margin-top: 16px;
    border: 2px solid #c5cae9;
    border-radius: 10px;
    overflow: hidden;
}

.rich-editor-toolbar {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
    flex-wrap: wrap;
}

.rich-editor-toolbar button {
    padding: 6px 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.15s;
}

.rich-editor-toolbar button:hover {
    background: #e8eaf6;
    border-color: #4a54b5;
}

.rich-editor-content {
    min-height: 200px;
    max-height: 500px;
    overflow-y: auto;
    padding: 16px;
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    outline: none;
}

.rich-editor-content:focus {
    background: #fafbff;
}

.resource-editor-actions {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    background: #f5f5f5;
    border-top: 1px solid #e0e0e0;
    justify-content: flex-end;
}

.btn-edit-resource:focus-visible,
.btn-restore-resource:focus-visible {
    outline: 3px solid #4a54b5;
    outline-offset: 2px;
}

/* ============================================================
   Video Shorts Styles
   ============================================================ */

/* Shorts grid layout */
.shorts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

/* Short card */
.short-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Vertical video player container (9:16) */
.short-video-player {
    width: 100%;
    aspect-ratio: 9 / 16;
    background: #000;
    object-fit: contain;
}

/* Card body */
.short-card-body {
    padding: 16px;
}

/* Category badge */
.short-category-badge {
    display: inline-block;
    font-size: 12px;
    background: #e8eaf6;
    color: #4a54b5;
    border-radius: 12px;
    padding: 2px 8px;
    font-weight: 500;
}

/* Card title */
.short-card-title {
    font-weight: 600;
    margin: 8px 0 4px;
    font-size: 16px;
    color: #333;
}

/* Duration text */
.short-card-duration {
    font-size: 13px;
    color: #888;
}

/* Description */
.short-card-description {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.4;
}

/* Card action buttons */
.short-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 0 16px 16px;
}

.short-card-actions button {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #f8f9fa;
    color: #333;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.short-card-actions button:hover {
    background: #e8eaf6;
    border-color: #4a54b5;
}

/* Expandable transcript excerpt below short cards */
.short-transcript-toggle {
    padding: 8px 12px;
    margin-top: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #0077B6;
    font-weight: 500;
    user-select: none;
    border-top: 1px solid #e0e0e0;
}
.short-transcript-toggle:hover {
    color: #005a8c;
}
.transcript-toggle-icon {
    display: inline-block;
    font-size: 10px;
    margin-right: 4px;
    transition: transform 0.2s;
}
.short-transcript-box {
    padding: 10px 14px;
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #444;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    border-radius: 0 0 12px 12px;
    max-height: 200px;
    overflow-y: auto;
}

/* Crop editor modal overlay */
.crop-editor-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Crop editor content box */
.crop-editor-content {
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

/* Crop editor inputs */
.crop-editor-inputs {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 16px 0;
}

.crop-editor-inputs label {
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.crop-editor-inputs input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.crop-editor-inputs input:focus {
    outline: none;
    border-color: #0096C7;
}

/* Crop editor action buttons */
.crop-editor-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 16px;
}

/* Save button */
.btn-save {
    background: #4CAF50;
    color: white;
    padding: 8px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-save:hover {
    background: #43a047;
}

/* Cancel button */
.btn-cancel {
    background: #eee;
    color: #333;
    padding: 8px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-cancel:hover {
    background: #ddd;
}

/* Share buttons group */
.share-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.share-buttons button {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #f8f9fa;
    color: #333;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.share-buttons button:hover {
    background: #e8eaf6;
    border-color: #4a54b5;
}

/* Placeholder for unavailable video */
.short-placeholder {
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 9 / 16;
    color: #999;
    font-size: 14px;
    font-weight: 500;
}

/* Focus-visible for new buttons */
.btn-save:focus-visible,
.btn-cancel:focus-visible,
.short-card-actions button:focus-visible,
.share-buttons button:focus-visible {
    outline: 3px solid #4a54b5;
    outline-offset: 2px;
}

/* Responsive for shorts */
@media (max-width: 768px) {
    .shorts-grid {
        grid-template-columns: 1fr;
    }

    .crop-editor-content {
        width: 95%;
        padding: 20px;
    }
}

/* ============================================================
   Transcript Selector (Shorts Editor)
   ============================================================ */
.transcript-selector-content {
    max-width: 600px;
    width: 95%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.transcript-selector-hint {
    font-size: 13px;
    color: #666;
    margin: 8px 0 12px;
    line-height: 1.4;
}

.transcript-selector-times {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #e8f5e9;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #2e7d32;
}

.transcript-selector-times #tsSelectedDuration {
    font-weight: 400;
    color: #555;
}

.transcript-sentences-list {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px;
}

.transcript-sentence {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
    margin-bottom: 2px;
}

.transcript-sentence:hover {
    background: #f0f4ff;
}

.transcript-sentence.selected {
    background: #e3f2fd;
    border-left: 3px solid #0096C7;
    padding-left: 7px;
}

.sentence-time {
    font-size: 11px;
    font-family: monospace;
    color: #888;
    white-space: nowrap;
    padding-top: 2px;
    min-width: 40px;
}

.sentence-text {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

/* Inline editor box (inside short card) */
.short-editor-box {
    padding: 12px 14px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    border-radius: 0 0 12px 12px;
}

.short-editor-box .transcript-selector-hint {
    margin-top: 0;
}

.short-editor-box .transcript-sentences-list {
    max-height: 250px;
}

.inline-editor-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 12px;
}

/* ============================================================
   Terms & Conditions Modal
   ============================================================ */
.terms-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.terms-modal {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.terms-modal h2 {
    color: #0096C7;
    font-size: 22px;
    margin-bottom: 12px;
}

.terms-modal .terms-intro {
    color: #555;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 16px;
}

.terms-modal .terms-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}

.terms-modal .terms-list li {
    background: #f8f9fa;
    border-left: 4px solid #0096C7;
    border-radius: 0 8px 8px 0;
    padding: 12px 14px;
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.5;
    color: #444;
}

.terms-modal .terms-checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.terms-modal .terms-checkbox-row input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
}

.terms-modal .btn-primary {
    margin-bottom: 10px;
}

.terms-modal .btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.terms-modal .terms-logout-btn {
    width: 100%;
}

/* ============================================================
   Admin — Reprocess content button
   ============================================================ */
.btn-reprocess {
    padding: 4px 10px;
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffb74d;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
    white-space: nowrap;
}

.btn-reprocess:hover:not(:disabled) {
    background: #ffe0b2;
}

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

/* ============================================================
   Admin — Reprocess modal
   ============================================================ */
.reprocess-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10002;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.reprocess-modal {
    background: white;
    border-radius: 16px;
    padding: 28px;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.reprocess-modal h2 {
    color: #0096C7;
    font-size: 20px;
    margin-bottom: 4px;
}

.reprocess-content-title {
    color: #333;
    font-weight: 600;
    margin-bottom: 16px;
    font-size: 15px;
}

.reprocess-subheading {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #888;
    margin: 18px 0 8px;
}

.reprocess-resource-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.reprocess-resource-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 6px;
    font-size: 14px;
    color: #444;
}

.rp-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

.rp-badge.rp-ok { background: #e8f5e9; color: #2e7d32; }
.rp-badge.rp-missing { background: #ffebee; color: #c62828; }

.reprocess-warn {
    background: #fff8e1;
    border-left: 3px solid #ffc107;
    padding: 10px 12px;
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    color: #6d4c00;
    margin: 12px 0;
}

.reprocess-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.reprocess-option {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
    padding: 14px 16px;
    border: 1px solid #d6e6ee;
    border-radius: 10px;
    background: #f7fbfd;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}

.reprocess-option:hover:not(:disabled) {
    background: #e3f2fd;
    border-color: #0096C7;
}

.reprocess-option strong { color: #0077B6; font-size: 15px; }
.reprocess-option span { color: #666; font-size: 13px; line-height: 1.4; }

.reprocess-option-full { background: #fff3e0; border-color: #ffcc80; }
.reprocess-option-full:hover:not(:disabled) { background: #ffe0b2; border-color: #fb8c00; }
.reprocess-option-full strong { color: #e65100; }

.reprocess-option:disabled { opacity: 0.45; cursor: not-allowed; }

.reprocess-result {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
    background: #eef6fb;
    color: #0077B6;
}

.reprocess-result.rp-success { background: #e8f5e9; color: #2e7d32; }
.reprocess-result.rp-error { background: #ffebee; color: #c62828; }

.reprocess-close-btn { margin-top: 18px; width: 100%; }
