/* CSS Variables */
:root {
    /* Header */
    --header-height: 80px;
    --header-bg: white;
    --header-border: #e0e0e0;
    --logo-size: 50px;
    
    /* Colors */
    --color-text: #333;
    --color-heading: #2c3e50;
    --color-bg: #f5f5f5;
    --color-bg-hover: #f0f0f0;
    --color-bg-active: #555;
    
    /* Spacing */
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    
    /* Other */
    --border-radius: 4px;
    --max-width: 1400px;
}

/* Basic styling for the Flask app */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    padding-top: calc(var(--header-height) + var(--spacing-md));
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--spacing-xl);
}

/* Page header section (optional, for page titles outside cards) */
.page-header-section {
    margin-bottom: var(--spacing-xl);
}

.page-header-section h1 {
    margin-bottom: var(--spacing-sm);
    text-align: left;
}

.page-header-section p {
    color: #6b7280;
    font-size: 0.9375rem;
    margin: 0;
}

/* Card header section (for consistent card titles) */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid #e5e7eb;
}

.card-header h2,
.card-header h3 {
    margin: 0;
    flex: 1;
}

.card-header-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.card-section {
    margin-bottom: var(--spacing-lg);
}

.card-section:last-child {
    margin-bottom: 0;
}

.card-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--spacing-sm);
}

.row {
    margin-top: var(--spacing-lg);
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
     justify-content: center;
   
}

.row > * {
    flex: 1;
    min-width: 200px;
}
h1 {
    color: var(--color-heading);
    margin-bottom: var(--spacing-xl);
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.2;
}

h2 {
    color: var(--color-heading);
    margin-bottom: var(--spacing-md);
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
}

h3 {
    color: var(--color-heading);
    margin-bottom: var(--spacing-md);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
}

h4 {
    color: var(--color-heading);
    margin-bottom: var(--spacing-sm);
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
}

h5 {
    color: var(--color-heading);
    margin-bottom: var(--spacing-sm);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
}

h6 {
    color: var(--color-heading);
    margin-bottom: var(--spacing-sm);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.4;
}

/* Header */
.page-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    padding: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--spacing-md) var(--spacing-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-xl);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.logo-placeholder {
    width: var(--logo-size);
    height: var(--logo-size);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logo-image {
    max-height: 60px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.header-title {
    color: var(--color-heading);
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* Navigation */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--color-text);
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.9375rem;
    border-radius: 6px;
    white-space: nowrap;
}

.nav-links a:hover {
    background: var(--color-bg-hover);
    color: var(--color-heading);
}

.nav-links a.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.nav-links a.active:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.4);
}

/* Cards */
.card {
    background: var(--header-bg);
    padding: var(--spacing-xl);
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.card h2:first-child,
.card h3:first-child {
    margin-top: 0;
}

.card p:last-child {
    margin-bottom: 0;
}

.card.info {
    background: #e8f4f8;
    border-left: 4px solid #3498db;
}

.card.info pre {
    background: white;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* Forms */
.chat-box, .input-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

input[type="text"],
input[type="file"],
input[type="number"],
textarea {
    width: 100%;
    padding: 0.75rem;
    font-size: 14px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    transition: border-color 0.2s;
}

input[type="text"]:focus,
textarea:focus {
    outline: none;
    border-color: #007bff;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

input[type="checkbox"] {
    margin-right: 0.5rem;
}

/* Buttons */
button, .button {
    padding: 0.75rem 2rem;
    font-size: 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: inherit;
}

button:hover, .button:hover {
    background-color: #0056b3;
}

button:disabled, .button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

button.secondary {
    background-color: #6c757d;
}

button.secondary:hover {
    background-color: #5a6268;
}

button.success {
    background-color: #28a745;
}

button.success:hover {
    background-color: #218838;
}

/* Response areas */
.response {
    padding: 1.5rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-height: 100px;
    white-space: pre-wrap;
}

.response:empty {
    display: none;
}

.loading {
    color: #666;
    font-style: italic;
}

.error {
    color: #d9534f;
}

.success {
    color: #27ae60;
}

/* Index page specific styles */
.subtitle {
    text-align: center;
    color: #666;
    font-weight: 400;
    margin-top: -1rem;
    margin-bottom: 3rem;
}

.line-height-relaxed {
    line-height: 1.8;
}

.grid-card {
    padding: 1rem;
    text-align: left;
    border: 2px solid #e0e0e0;
    margin-bottom: 0.5rem;
    color: inherit;
    text-decoration: none;
    display: block;
    border-radius: 4px;
    transition: border-color 0.2s, background-color 0.2s;
}

.grid-card:hover {
    border-color: #007bff;
    background-color: #f8f9fa;
}

.grid-card-description {
    font-size: 0.9rem;
    color: #666;
}

.code-block {
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 4px;
    margin: 0.5rem 0;
    overflow-x: auto;
}

.text-muted {
    font-size: 0.9rem;
    color: #666;
}

.mt-1 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 3rem;
}

/* Preview areas */
.preview {
    margin: 1.5rem 0;
    text-align: center;
}

.preview img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

video {
    width: 100%;
    max-width: 640px;
    display: block;
    margin: 1.5rem auto;
    border-radius: 8px;
    border: 2px solid #ddd;
}

/* JSON display */
.json-result {
    background: white;
    padding: 1rem;
    border-radius: 8px;
}

.json-field {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.json-field:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.json-field strong {
    color: #2c3e50;
    display: block;
    margin-bottom: 0.5rem;
}

.json-field ul {
    list-style: none;
    padding-left: 0;
}

.json-field li {
    padding: 0.25rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.json-field li:before {
    content: "•";
    position: absolute;
    left: 0.5rem;
    color: #3498db;
}

.usage {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    color: #666;
    font-size: 0.9rem;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background-color: #f8f9fa;
}

/* ============================================
   PROFESSIONAL FORM STYLES (from new_case.html)
   ============================================ */

.page-container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 2rem;
}

.page-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    /* max-width: 1600px; */
    margin-left: auto;
    margin-right: auto;
}

.page-header h1 {
    font-size: 1.875rem;
    color: #111827;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.page-subtitle {
    color: #6b7280;
    font-size: 0.9375rem;
    margin-top: 0;
    font-weight: 400;
}

.garments-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.garment-section {
    background: var(--header-bg);
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: var(--spacing-xl);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.garment-section-header {
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid #e5e7eb;
}

.garment-section-header h2 {
    margin: 0;
}

.garment-section-content {
    flex: 1;
}

.form-section {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.form-section-half {
    margin-bottom: 0;
}

/* Action buttons wrapper for forms */
.action-buttons-wrapper {
    padding: var(--spacing-lg) 0;
    display: flex;
    justify-content: flex-end;
}

.project-info-wrapper {
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

.section-header {
    padding: 1.25rem 1.5rem;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.section-header h2 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

.section-content {
    padding: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.file-upload-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

.file-input {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.file-upload-display {
    border: 1px dashed #d1d5db;
    border-radius: 4px;
    padding: 1.5rem;
    text-align: center;
    background: #f9fafb;
    transition: all 0.2s ease;
    cursor: pointer;
}

.file-upload-wrapper:hover .file-upload-display {
    border-color: #9ca3af;
    background: #f3f4f6;
}

.file-upload-text {
    display: block;
    color: #111827;
    font-weight: 400;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.file-upload-hint {
    display: block;
    color: #6b7280;
    font-size: 0.8125rem;
}

.form-control {
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-family: inherit;
    transition: all 0.15s ease;
    background: white;
    color: #111827;
}

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-control::placeholder {
    color: #9ca3af;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.preview-item {
    position: relative;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    background: white;
    transition: border-color 0.15s ease;
}

.preview-item:hover {
    border-color: #9ca3af;
}

.preview-item img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

.preview-item .remove-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s ease;
    font-weight: 600;
}

.preview-item .remove-btn:hover {
    background: rgba(220, 38, 38, 1);
}

.radio-group {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    transition: all 0.15s ease;
    background: white;
}

.radio-option:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}

.radio-option input[type="radio"] {
    margin: 0;
    cursor: pointer;
    accent-color: #3b82f6;
}

.radio-option input[type="radio"]:checked + .radio-label {
    color: #111827;
    font-weight: 500;
}

.radio-option:has(input[type="radio"]:checked) {
    border-color: #3b82f6;
    background: #eff6ff;
}

.action-buttons-wrapper {
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.action-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: #111827;
    color: white;
}

.btn-primary:hover {
    background: #1f2937;
}

.btn-secondary {
    background: #374151;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-outline {
    background: white;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-outline:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.btn-link {
    background: transparent;
    color: #6b7280;
    padding: 0.625rem 1rem;
}

.btn-link:hover {
    color: #111827;
    background: #f9fafb;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-small {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
}

/* Filter buttons */
.btn-filter {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-filter:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.btn-filter.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

.btn-filter-tag {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border: 1px solid;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-filter-tag:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

.btn-filter-tag.active {
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Hidden utility class */
.hidden {
    display: none !important;
}

#message-container {
    margin-bottom: 1.5rem;
}

.message-alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-success {
    background: #f0fdf4;
    color: #166534;
    border-left: 3px solid #22c55e;
}

.message-error {
    background: #fef2f2;
    color: #991b1b;
    border-left: 3px solid #ef4444;
}

.message-info {
    background: #eff6ff;
    color: #1e40af;
    border-left: 3px solid #3b82f6;
}

.message-text {
    flex: 1;
}

/* ============================================
   LOADING MODAL
   ============================================ */

.loading-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-modal.hidden {
    display: none;
}

.loading-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.loading-modal-content {
    position: relative;
    background: white;
    border-radius: 8px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    min-width: 300px;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.loading-modal-content h3 {
    margin: 1.5rem 0 0.5rem 0;
    color: #111827;
    font-size: 1.25rem;
    font-weight: 600;
}

.loading-modal-content p {
    margin: 0;
    color: #6b7280;
    font-size: 0.875rem;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .garments-row {
        grid-template-columns: 1fr;
    }
    
    .form-section-half {
        margin-bottom: 1.5rem;
    }
    
    .project-info-wrapper {
        margin-bottom: 0;
    }
    
    .project-info-wrapper .form-section {
        margin-bottom: 1.5rem;
    }
}

/* Tag Selection Modal */
.tag-selection-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tag-selection-modal.hidden {
    display: none;
}

.tag-selection-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.tag-selection-content {
    position: relative;
    background: white;
    border-radius: 8px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: modalFadeIn 0.3s ease;
}

.tag-selection-content h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #111827;
    font-size: 1.25rem;
    font-weight: 600;
}

.tag-selection-content p {
    margin-bottom: 1rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.tag-selection-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    min-height: 60px;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 4px;
}

.tag-selection-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #28a745;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.tag-selection-tag:hover {
    background: #218838;
    transform: scale(1.05);
}

.tag-selection-tag-removed {
    background: #dc3545;
    opacity: 0.6;
    text-decoration: line-through;
}

.tag-selection-tag-removed:hover {
    background: #c82333;
    opacity: 0.8;
}

.tag-selection-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.tag-selection-empty {
    color: #6b7280;
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

@media (max-width: 768px) {
    .page-container {
        padding: 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .section-content {
        padding: 1.5rem;
    }

    .section-header {
        padding: 1.25rem 1.5rem;
    }
    
    .loading-modal-content {
        padding: 2rem;
        max-width: 90%;
    }
}

/* Tags Input Styling */
.tags-input-wrapper {
    position: relative;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
    min-height: 2rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    background: #007bff;
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    gap: 0.5rem;
}

.tag-remove {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.125rem;
    line-height: 1;
    padding: 0;
    margin-left: 0.25rem;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.tag-remove:hover {
    opacity: 1;
}

.tags-display {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.tag-badge {
    display: inline-flex;
    align-items: center;
    background: #e9ecef;
    color: #495057;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.875rem;
    border: 1px solid #dee2e6;
}

.tag-badge.tag-removable {
    padding-right: 0.5rem;
    gap: 0.5rem;
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.tag-badge .tag-remove {
    color: white;
}

.form-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #6c757d;
    font-style: italic;
}
