/* Tiny.nl AI Render Generator - Main Stylesheet */

/* ==================== Variables ==================== */
:root {
    --tiny-green: #274736;
    --tiny-orange: #de7c01;
    --tiny-white: #ffffff;
    --tiny-light-bg: #F8F9FA;
    --tiny-border: #E5E7EB;
    --tiny-text-gray: #6B7280;
    --transition: 300ms ease;
}

/* ==================== Reset & Base ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: var(--tiny-light-bg);
    color: var(--tiny-green);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
}

/* ==================== Header ==================== */
.header {
    background: linear-gradient(135deg, var(--tiny-green) 0%, #1a2f25 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    color: white;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-main {
    font-size: 2rem;
    letter-spacing: -0.5px;
}

.logo-subtitle {
    font-size: 0.75rem;
    opacity: 0.85;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.header-info {
    display: flex;
    gap: 2rem;
    align-items: center;
    font-size: 0.875rem;
    opacity: 0.9;
}

.header-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-badge {
    background: var(--tiny-orange);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(222, 124, 1, 0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-badge svg {
    width: 1rem;
    height: 1rem;
    fill: white;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ==================== User Menu ==================== */
.user-menu {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Roboto', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
}

.user-menu-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.user-icon {
    width: 1.125rem;
    height: 1.125rem;
    fill: white;
}

.chevron-icon {
    width: 1rem;
    height: 1rem;
    fill: white;
    transition: transform var(--transition);
}

.user-menu-btn:hover .chevron-icon {
    transform: translateY(2px);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 240px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    z-index: 1001;
    animation: dropdownSlideIn 0.2s ease;
}

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

.user-dropdown.hidden {
    display: none;
}

.user-dropdown-header {
    padding: 1rem;
    background: var(--tiny-light-bg);
    border-bottom: 1px solid var(--tiny-border);
}

.user-name {
    font-weight: 600;
    color: var(--tiny-green);
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.user-email {
    font-size: 0.8rem;
    color: var(--tiny-text-gray);
    word-break: break-word;
}

.admin-badge {
    display: inline-block;
    background: var(--tiny-orange);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.5rem;
}

.user-dropdown-divider {
    height: 1px;
    background: var(--tiny-border);
    margin: 0;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1rem;
    border: none;
    background: transparent;
    color: var(--tiny-green);
    font-family: 'Roboto', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.user-dropdown-item:hover {
    background: var(--tiny-light-bg);
}

.dropdown-icon {
    width: 1.125rem;
    height: 1.125rem;
    fill: currentColor;
}

/* ==================== Navigation ==================== */
.nav-tabs {
    background: white;
    border-radius: 12px;
    padding: 0.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
}

.nav-tab {
    padding: 0.875rem 0.875rem;
    border: none;
    background: transparent;
    color: var(--tiny-text-gray);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-icon {
    width: 1.125rem;
    height: 1.125rem;
    fill: currentColor;
}

.nav-tab:hover {
    background: var(--tiny-light-bg);
    color: var(--tiny-green);
}

.nav-tab.active {
    background: var(--tiny-green);
    color: white;
}

.nav-badge {
    margin-left: auto;
    background: var(--tiny-orange);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    min-width: 2rem;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-tab.active .nav-badge {
    background: rgba(255, 255, 255, 0.3);
}

/* ==================== Container ==================== */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* ==================== Cards ==================== */
.card {
    background: white;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.card-header {
    margin-bottom: 2rem;
}

.card-header h2 {
    font-size: 1.75rem;
    color: var(--tiny-green);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-header p {
    color: var(--tiny-text-gray);
    font-size: 0.95rem;
}

/* ==================== Management Cards ==================== */
#agents-content,
#workflows-content,
#environments-content,
#materials-content {
    padding-top: 2rem;
}

.management-card {
    background: white;
    border: 1px solid var(--tiny-border);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.management-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--tiny-orange);
}

.management-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.management-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--tiny-green);
    font-family: 'Oswald', sans-serif;
}

.management-card-meta {
    color: var(--tiny-text-gray);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.management-card-body {
    color: var(--tiny-green);
    margin-bottom: 1rem;
}

.management-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--tiny-border);
}

.management-card-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ==================== Tags & Badges ==================== */
.tag {
    background: var(--tiny-light-bg);
    color: var(--tiny-green);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.tag-orange {
    background: rgba(222, 124, 1, 0.1);
    color: var(--tiny-orange);
}

.tag-green {
    background: rgba(39, 71, 54, 0.1);
    color: var(--tiny-green);
}

/* ==================== Buttons ==================== */
.btn {
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Roboto', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--tiny-orange);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #C76D00;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(222, 124, 0, 0.3);
}

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

.btn-secondary:hover:not(:disabled) {
    background: #1a2f25;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(39, 71, 54, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--tiny-green);
    color: var(--tiny-green);
}

.btn-outline:hover {
    background: var(--tiny-green);
    color: white;
}

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

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

.btn-group {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* ==================== Action Buttons ==================== */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.btn-edit {
    color: var(--tiny-orange);
}

.btn-edit:hover {
    background: rgba(222, 124, 1, 0.1);
}

.btn-delete {
    color: #dc2626;
}

.btn-delete:hover {
    background: rgba(220, 38, 38, 0.1);
}

/* ==================== Forms ==================== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--tiny-green);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--tiny-border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Roboto', sans-serif;
    color: var(--tiny-green);
    transition: var(--transition);
    background: white;
}

.form-select {
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23274736' d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}

.form-select:hover {
    border-color: var(--tiny-orange);
}

.form-select option {
    padding: 0.5rem;
    color: var(--tiny-green);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--tiny-orange);
    box-shadow: 0 0 0 3px rgba(222, 124, 0, 0.1);
}

/* ==================== Checkboxes ==================== */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 8px;
    transition: var(--transition);
}

.checkbox-label:hover {
    background: var(--tiny-light-bg);
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--tiny-green);
}

.checkbox-label span {
    font-size: 1rem;
    color: var(--tiny-text-dark);
}

/* ==================== Modals ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--tiny-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.5rem;
    color: var(--tiny-green);
    font-family: 'Oswald', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--tiny-text-gray);
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--tiny-green);
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--tiny-border);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* ==================== Alerts ==================== */
.alert {
    padding: 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.alert-success {
    background: #D1FAE5;
    border: 2px solid #10B981;
    color: #065F46;
}

.alert-error {
    background: #FEE2E2;
    border: 2px solid #EF4444;
    color: #991B1B;
}

.alert-info {
    background: rgba(39, 71, 54, 0.1);
    border: 2px solid var(--tiny-green);
    color: var(--tiny-green);
}

/* ==================== Icons ==================== */
.icon {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    vertical-align: middle;
    margin-right: 0.5rem;
}

.icon-lg {
    width: 3.5rem;
    height: 3.5rem;
}

.icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* ==================== Loading ==================== */
.loading-overlay {
    text-align: center;
    padding-top: 2rem;
}

.spinner {
    border: 4px solid var(--tiny-border);
    border-top: 4px solid var(--tiny-orange);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

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

.loading-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--tiny-green);
}

/* Content containers to prevent layout shift */
#agents-content,
#materials-content,
#workflows-content,
#environments-content {
    min-height: 400px;
}

.management-card:first-child {
    margin-top: 0;
}

/* ==================== Utilities ==================== */
.hidden {
    display: none !important;
}

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

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

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

/* ==================== Progress Steps ==================== */
.progress-steps {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 1rem;
}

.steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--tiny-border);
    z-index: 0;
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--tiny-border);
    color: var(--tiny-text-gray);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.step.active .step-number {
    background: var(--tiny-orange);
    color: white;
    transform: scale(1.1);
}

.step.completed .step-number {
    background: var(--tiny-green);
    color: white;
}

.step-label {
    font-size: 0.875rem;
    color: var(--tiny-text-gray);
    font-weight: 500;
}

.step.active .step-label {
    color: var(--tiny-orange);
    font-weight: 700;
}

/* ==================== Workflow Cards ==================== */
.workflow-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.workflow-card {
    background: var(--tiny-light-bg);
    border: 2px solid var(--tiny-border);
    border-radius: 10px;
    padding: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.workflow-card:hover {
    border-color: var(--tiny-orange);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(222, 124, 0, 0.15);
}

.workflow-card.selected {
    border-color: var(--tiny-green);
    background: white;
    box-shadow: 0 4px 12px rgba(39, 71, 54, 0.15);
}

.workflow-card.selected::before {
    content: '✓';
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 28px;
    height: 28px;
    background: var(--tiny-green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.workflow-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--tiny-green);
    margin-bottom: 0.5rem;
}

.workflow-desc {
    font-size: 0.875rem;
    color: var(--tiny-text-gray);
    margin-bottom: 1rem;
    min-height: 40px;
}

.workflow-cost {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--tiny-orange);
}

.workflow-badge {
    display: inline-block;
    background: var(--tiny-orange);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 0.5rem;
}

/* ==================== Render Type Selection ==================== */
.render-type-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.render-type-card {
    background: var(--tiny-light-bg);
    border: 2px solid var(--tiny-border);
    border-radius: 10px;
    padding: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    display: block;
}

.render-type-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.render-type-card:hover {
    border-color: var(--tiny-orange);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(222, 124, 0, 0.1);
}

.render-type-card:has(input[type="radio"]:checked) {
    border-color: var(--tiny-green);
    background: white;
    box-shadow: 0 4px 12px rgba(39, 71, 54, 0.15);
}

.render-type-card:has(input[type="radio"]:checked)::before {
    content: '✓';
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 28px;
    height: 28px;
    background: var(--tiny-green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.render-type-content {
    text-align: center;
}

.render-type-content .icon-lg {
    font-size: 2rem;
    color: var(--tiny-green);
    margin-bottom: 0.75rem;
}

.render-type-content h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--tiny-green);
    margin-bottom: 0.5rem;
}

.render-type-content p {
    font-size: 0.875rem;
    color: var(--tiny-text-gray);
    margin: 0;
}

/* ==================== House Type Selection ==================== */
.house-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.house-type-card {
    background: var(--tiny-light-bg);
    border: 2px solid var(--tiny-border);
    border-radius: 10px;
    padding: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    display: block;
}

.house-type-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.house-type-card:hover {
    border-color: var(--tiny-orange);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(222, 124, 0, 0.1);
}

.house-type-card:has(input[type="radio"]:checked) {
    border-color: var(--tiny-green);
    background: white;
    box-shadow: 0 4px 12px rgba(39, 71, 54, 0.15);
}

.house-type-card:has(input[type="radio"]:checked)::before {
    content: '✓';
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 28px;
    height: 28px;
    background: var(--tiny-green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.house-type-content {
    text-align: center;
}

.house-type-content h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--tiny-green);
    margin-bottom: 0.5rem;
}

.house-type-desc {
    font-size: 0.875rem;
    color: var(--tiny-text);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.house-type-environment {
    font-size: 0.8rem;
    color: var(--tiny-text-gray);
    margin: 0;
}

/* ==================== Upload Area ==================== */
.upload-zone {
    border: 3px dashed var(--tiny-border);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--tiny-light-bg);
}

.upload-zone:hover {
    border-color: var(--tiny-orange);
    background: white;
}

.upload-zone.has-file {
    border-color: var(--tiny-green);
    background: white;
}

.upload-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.upload-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--tiny-green);
    margin-bottom: 0.5rem;
}

.upload-hint {
    font-size: 0.875rem;
    color: var(--tiny-text-gray);
}

.preview-container {
    margin-top: 1.5rem;
    text-align: center;
}

.preview-image {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.preview-info {
    margin-top: 1rem;
    color: var(--tiny-green);
    font-weight: 600;
}

/* ==================== Material Selection ==================== */
.material-category {
    margin-bottom: 2.5rem;
}

.category-title {
    font-size: 1.25rem;
    color: var(--tiny-green);
    margin-bottom: 1rem;
    font-weight: 700;
}

.material-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.material-card {
    background: white;
    border: 2px solid var(--tiny-border);
    border-radius: 10px;
    padding: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.material-card:hover {
    border-color: var(--tiny-orange);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(222, 124, 0, 0.1);
}

.material-card.selected {
    border-color: var(--tiny-green);
    background: rgba(39, 71, 54, 0.05);
}

.material-card.selected::after {
    content: '✓';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 24px;
    height: 24px;
    background: var(--tiny-green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
}

.material-name {
    font-weight: 700;
    color: var(--tiny-green);
    margin-bottom: 0.5rem;
}

.material-description {
    font-size: 0.875rem;
    color: var(--tiny-text-gray);
}

/* ==================== Info Box ==================== */
.info-box {
    background: rgba(39, 71, 54, 0.05);
    border-left: 4px solid var(--tiny-green);
    padding: 1.25rem;
    border-radius: 8px;
    margin-top: 1.5rem;
}

.info-box p {
    margin: 0;
    color: var(--tiny-green);
    font-size: 0.95rem;
}

/* ==================== Tab Content ==================== */
.tab-content {
    display: none;
}

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

/* ==================== Gallery ==================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.gallery-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all var(--transition);
    cursor: pointer;
}

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

.gallery-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 66.67%; /* 3:2 aspect ratio */
    background: var(--tiny-light-bg);
    overflow: hidden;
}

.gallery-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

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

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(39, 71, 54, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-info {
    padding: 1rem;
}

.gallery-filename {
    font-weight: 500;
    color: var(--tiny-green);
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-meta {
    font-size: 0.875rem;
    color: var(--tiny-text-gray);
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.stats-bar {
    display: flex;
    gap: 2rem;
    padding: 1rem;
    background: var(--tiny-light-bg);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.stat-item {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.stat-label {
    color: var(--tiny-text-gray);
    font-size: 0.875rem;
}

.stat-value {
    font-weight: 600;
    color: var(--tiny-green);
    font-size: 1.125rem;
}

.image-modal .modal {
    max-width: 90vw;
    max-height: 90vh;
}

.image-modal .modal-body {
    padding: 2rem;
    background: var(--tiny-light-bg);
}

/* ==================== Login Page ==================== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--tiny-green) 0%, #1a2f25 100%);
}

.login-card {
    background: white;
    border-radius: 16px;
    padding: 3rem;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: loginCardSlideIn 0.4s ease;
}

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

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    height: 50px;
    margin-bottom: 1.5rem;
}

.login-header h1 {
    font-size: 1.75rem;
    color: var(--tiny-green);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--tiny-text-gray);
    font-size: 0.95rem;
}

.login-form {
    margin-bottom: 1.5rem;
}

.login-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--tiny-border);
}

.text-muted {
    color: var(--tiny-text-gray);
    font-size: 0.875rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn .icon {
    display: inline-flex;
    align-items: center;
    margin-right: 0.5rem;
}

.btn .icon svg {
    width: 1.125rem;
    height: 1.125rem;
    fill: currentColor;
}

/* Login message styles */
#login-message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 500;
}

#login-message.success {
    background: #D1FAE5;
    border: 2px solid #10B981;
    color: #065F46;
}

#login-message.error {
    background: #FEE2E2;
    border: 2px solid #EF4444;
    color: #991B1B;
}

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .card {
        padding: 1.5rem;
    }

    .header-content {
        flex-wrap: wrap;
    }

    .header-info {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .btn-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .nav-tabs {
        overflow-x: auto;
    }

    .management-card-header {
        flex-direction: column;
        gap: 1rem;
    }

    .action-buttons {
        width: 100%;
        justify-content: flex-end;
    }

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

    .house-type-grid {
        grid-template-columns: 1fr;
    }

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

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

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

    .stats-bar {
        flex-direction: column;
        gap: 0.75rem;
    }

    /* Enhanced Gallery Responsive */
    .gallery-layout {
        flex-direction: column;
    }

    .gallery-sidebar {
        width: 100%;
        position: fixed;
        top: 0;
        left: -100%;
        height: 100vh;
        z-index: 2000;
        transition: left 0.3s ease;
    }

    .gallery-sidebar.mobile-open {
        left: 0;
    }

    .mobile-filter-toggle {
        display: flex !important;
    }

    .gallery-card {
        max-width: 100%;
    }

    .render-modal-body {
        flex-direction: column;
    }

    .render-modal-image,
    .render-modal-metadata {
        width: 100%;
    }

    .bulk-toolbar {
        flex-direction: column;
        gap: 1rem;
    }

    .pagination-controls {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ==================== Enhanced Gallery Layout ==================== */
.gallery-layout {
    display: flex;
    gap: 2rem;
    max-width: calc(1200px + 280px + 2rem); /* Container width + sidebar + gap */
    margin: 2rem auto;
}

/* ==================== Gallery Sidebar (Filters) ==================== */
.gallery-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--tiny-border);
}

.sidebar-header h3 {
    font-size: 1.25rem;
    color: var(--tiny-green);
}

.filter-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--tiny-border);
}

.filter-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--tiny-green);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-input,
.filter-select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--tiny-border);
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all var(--transition);
    background-color: #ffffff;
    font-family: inherit;
}

.filter-input:hover,
.filter-select:hover {
    border-color: var(--tiny-green);
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--tiny-orange);
    box-shadow: 0 0 0 3px rgba(222, 124, 1, 0.1);
}

/* Enhanced select dropdown styling */
.filter-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2315803d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px;
    padding-right: 2.5rem;
    cursor: pointer;
    color: var(--tiny-text);
    font-weight: 500;
}

.filter-select:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23de7c01' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.filter-select option {
    padding: 0.5rem;
    background-color: #ffffff;
    color: var(--tiny-text);
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    cursor: pointer;
    user-select: none;
}

.filter-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.tags-filter {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
}

.mobile-filter-toggle {
    display: none;
}

/* ==================== Gallery Main Content ==================== */
.gallery-main {
    flex: 1;
    min-width: 0;
}

.gallery-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.gallery-title {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gallery-count {
    font-size: 0.875rem;
    color: var(--tiny-text-gray);
    font-weight: normal;
}

/* ==================== Bulk Toolbar ==================== */
.bulk-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--tiny-orange) 0%, #c56a01 100%);
    color: white;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(222, 124, 1, 0.3);
}

.bulk-info {
    font-weight: 600;
}

.bulk-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.bulk-toolbar .btn {
    background: white;
    color: var(--tiny-orange);
}

.bulk-toolbar .btn:hover {
    background: var(--tiny-light-bg);
}

.bulk-toolbar .btn-danger {
    background: #dc2626;
    color: white;
}

.bulk-toolbar .btn-danger:hover {
    background: #b91c1c;
}

/* ==================== Gallery Grid ==================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns default */
    gap: 1.5rem;
}

/* Keep 3 columns on all desktop sizes for default view */
@media (max-width: 1023px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
}

/* 1 column on mobile */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Compact mode shows 4 columns on large screens */
.gallery-grid-compact {
    grid-template-columns: repeat(4, 1fr); /* 4 columns in compact mode */
    gap: 1rem;
}

@media (max-width: 1399px) {
    .gallery-grid-compact {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1023px) {
    .gallery-grid-compact {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .gallery-grid-compact {
        grid-template-columns: 1fr;
    }
}

/* ==================== Gallery Card ==================== */
.gallery-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all var(--transition);
    position: relative;
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.gallery-card-select {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 10;
}

.card-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    appearance: none;
    background: white;
    border: 2px solid var(--tiny-border);
    border-radius: 4px;
    transition: all var(--transition);
}

.card-checkbox:checked {
    background: var(--tiny-orange);
    border-color: var(--tiny-orange);
}

.card-checkbox:checked::after {
    content: '✓';
    display: block;
    text-align: center;
    color: white;
    font-weight: bold;
    line-height: 16px;
}

.gallery-card-image {
    position: relative;
    width: 100%;
    padding-top: 66.67%;
    background: var(--tiny-light-bg);
    cursor: pointer;
    overflow: hidden;
}

.gallery-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.gallery-card:hover .gallery-card-image img {
    transform: scale(1.05);
}

.gallery-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(39, 71, 54, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition);
}

.gallery-card-image:hover .gallery-card-overlay {
    opacity: 1;
}

.gallery-card-overlay svg {
    fill: white;
}

.gallery-card-content {
    padding: 1rem;
}

.gallery-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.gallery-card-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.favorite-btn {
    color: var(--tiny-text-gray);
    transition: all var(--transition);
}

.favorite-btn:hover,
.favorite-btn.active {
    color: #dc2626;
}

.gallery-card-project {
    font-weight: 600;
    color: var(--tiny-green);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.gallery-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.quality-indicator {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
}

.quality-indicator svg {
    width: 14px;
    height: 14px;
}

.cost-indicator {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    background: #EFF6FF;
    color: #1E40AF;
}

.cost-highlight {
    font-weight: 700;
    color: #1E40AF;
}

.text-warning {
    color: #D97706;
}

.text-success {
    color: #059669;
}

.quality-high {
    background: #D1FAE5;
    color: #065F46;
}

.quality-high svg {
    fill: #10B981;
}

.quality-medium {
    background: #FEF3C7;
    color: #92400E;
}

.quality-medium svg {
    fill: #F59E0B;
}

.quality-low {
    background: #FEE2E2;
    color: #991B1B;
}

.quality-low svg {
    fill: #EF4444;
}

.gallery-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.tag {
    background: var(--tiny-light-bg);
    color: var(--tiny-text-gray);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.gallery-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--tiny-border);
}

/* ==================== Pagination ==================== */
.pagination {
    margin-top: 2rem;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.pagination-pages {
    display: flex;
    gap: 0.25rem;
}

.pagination-ellipsis {
    padding: 0 0.5rem;
    color: var(--tiny-text-gray);
}

/* ==================== Enhanced Render Modal ==================== */
.render-modal {
    max-width: 1200px;
    width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
}

.render-modal-body {
    display: flex;
    gap: 2rem;
    padding: 0;
}

.render-modal-image {
    flex: 1;
    background: var(--tiny-light-bg);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.render-modal-image img {
    width: 100%;
    height: auto;
    display: block;
}

.render-modal-metadata {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    max-height: 70vh;
}

.metadata-sections {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.metadata-section {
    padding: 1rem;
    background: var(--tiny-light-bg);
    border-radius: 8px;
}

.metadata-section h4 {
    color: var(--tiny-green);
    margin-bottom: 1rem;
    font-size: 1rem;
}

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

.metadata-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.metadata-item .label {
    font-size: 0.75rem;
    color: var(--tiny-text-gray);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metadata-item .value {
    color: var(--tiny-green);
    font-weight: 500;
}

.quality-score-large {
    text-align: center;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.quality-score-large .score {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
}

.quality-score-large .label {
    display: block;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.quality-breakdown {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.quality-bar {
    display: grid;
    grid-template-columns: 140px 1fr 40px;
    gap: 0.75rem;
    align-items: center;
}

.quality-bar-label {
    font-size: 0.875rem;
    color: var(--tiny-text-gray);
    text-transform: capitalize;
}

.quality-bar-bg {
    height: 8px;
    background: var(--tiny-border);
    border-radius: 4px;
    overflow: hidden;
}

.quality-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--tiny-orange), #c56a01);
    transition: width 0.3s ease;
}

.quality-bar-value {
    text-align: right;
    font-weight: 600;
    color: var(--tiny-green);
    font-size: 0.875rem;
}

.materials-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.material-chip {
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    border: 2px solid var(--tiny-border);
}

.material-category {
    font-weight: 600;
    color: var(--tiny-green);
}

/* ==================== Empty State ==================== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--tiny-text-gray);
}

.empty-state svg {
    fill: currentColor;
}

.empty-state p:first-of-type {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--tiny-green);
    margin-bottom: 0.5rem;
}

/* ==================== Toast Animations ==================== */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* ==================== Real-time Progress Tracking ==================== */
.progress-overview {
    background: var(--tiny-light-bg);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.progress-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 1.5rem;
}

.progress-stat {
    text-align: center;
}

.progress-stat .stat-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--tiny-green);
    line-height: 1;
}

.progress-stat .stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--tiny-text-gray);
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.progress-bar-container {
    height: 16px;
    background: var(--tiny-border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--tiny-orange) 0%, #f59e0b 100%);
    transition: width 0.5s ease;
    box-shadow: 0 2px 8px rgba(222, 124, 1, 0.3);
}

/* Indeterminate Progress Animation */
.progress-indeterminate {
    position: relative;
    overflow: hidden;
    animation: progressShimmer 1.5s ease-in-out infinite;
}

@keyframes progressShimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.progress-indeterminate::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Completed Renders Grid */
.completed-renders {
    margin-top: 2rem;
}

.completed-renders h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--tiny-green);
}

.completed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.completed-render-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all var(--transition);
}

.completed-render-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.render-image-container {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--tiny-light-bg);
}

.render-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.render-info {
    padding: 1.25rem;
}

.render-info h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--tiny-green);
}

.quality-score {
    color: var(--tiny-orange);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.retry-info {
    color: var(--tiny-text-gray);
    font-size: 0.875rem;
}

.render-actions {
    padding: 0 1.25rem 1.25rem;
    display: flex;
    gap: 0.75rem;
}

.render-actions .btn {
    flex: 1;
    text-align: center;
    text-decoration: none;
}

/* Progress Card Styles */
.progress-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.progress-card-header h3 {
    font-size: 1.25rem;
    color: var(--tiny-green);
}

.progress-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.progress-badge-generating {
    background: rgba(222, 124, 1, 0.1);
    color: var(--tiny-orange);
}

.progress-steps {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--tiny-text-gray);
    font-size: 0.875rem;
}

.progress-step.active {
    color: var(--tiny-green);
    font-weight: 500;
}

.step-icon {
    font-size: 1.25rem;
}

/* Individual Render Progress */
.render-progress-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.render-progress-card {
    background: var(--tiny-light-bg);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all var(--transition);
}

.render-progress-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.render-progress-icon {
    font-size: 2rem;
    width: 50px;
    text-align: center;
}

.render-progress-info {
    flex: 1;
}

.render-progress-type {
    font-weight: 600;
    color: var(--tiny-green);
    font-size: 1.125rem;
}

.render-progress-status {
    font-size: 0.875rem;
    color: var(--tiny-text-gray);
    margin-top: 0.25rem;
}

.render-progress-status.status-queued {
    color: var(--tiny-text-gray);
}

.render-progress-status.status-generating {
    color: var(--tiny-orange);
    font-weight: 600;
}

.render-progress-status.status-completed {
    color: #10b981;
    font-weight: 600;
}

.render-progress-status.status-failed {
    color: #dc2626;
    font-weight: 600;
}

.render-progress-percent {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--tiny-orange);
}

.render-progress-bar {
    height: 8px;
    background: var(--tiny-border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.render-progress-bar-fill {
    height: 100%;
    background: var(--tiny-orange);
    transition: width 0.5s ease;
}

.render-progress-message {
    font-size: 0.875rem;
    color: var(--tiny-text-gray);
    font-style: italic;
}

/* New Progress Styles */
.status-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.spinner-small {
    width: 24px;
    height: 24px;
    border: 3px solid var(--tiny-border);
    border-top-color: var(--tiny-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.progress-step {
    font-size: 0.875rem;
    color: var(--tiny-text-gray);
    margin-top: 0.25rem;
}

.render-progress-card.completed .progress-step {
    color: #10b981;
}

.render-progress-card.failed .progress-step {
    color: #dc2626;
}

.progress-thumbnail {
    width: 100%;
    border-radius: 8px;
    margin-top: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.progress-thumbnail:hover {
    transform: scale(1.02);
}

.progress-percent {
    text-align: center;
    font-size: 0.875rem;
    color: var(--tiny-text-gray);
    margin-top: 0.5rem;
}

.completion-message {
    background: var(--tiny-light-green);
    border: 2px solid var(--tiny-green);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin-top: 2rem;
}

.completion-message h3 {
    color: var(--tiny-green);
    margin-bottom: 0.5rem;
}

.completion-message p {
    color: var(--tiny-text-gray);
    margin-bottom: 1.5rem;
}

.error-text {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: #fee2e2;
    border-radius: 6px;
}

/* Completed Renders Preview */
.completed-renders {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--tiny-border);
}

.completed-renders h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--tiny-green);
    margin-bottom: 1.5rem;
}

.completed-renders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.completed-render-thumbnail {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--transition);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.completed-render-thumbnail:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.completed-render-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.completed-render-overlay {
    position: absolute;
    top: 0;
    right: 0;
    padding: 0.5rem;
}

.quality-score {
    background: rgba(255, 255, 255, 0.95);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--tiny-green);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Progress animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.render-progress-card.generating {
    animation: pulse 2s ease-in-out infinite;
}

/* Responsive */
@media (max-width: 768px) {
    .progress-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .progress-stat .stat-value {
        font-size: 2rem;
    }

    .completed-renders-grid {
        grid-template-columns: 1fr;
    }
}
