/* ===== UPLOAD PAGE SPECIFIC STYLES ===== */

/* Force single column on upload page */
.admin-page {
    display: block !important;
}

.admin-page .container {
    display: block !important;
    flex-direction: column !important;
    max-width: 600px !important;
    margin: 0 auto !important;
}

/* Admin upload page layout */
.admin-page .admin-header {
    display: flex !important;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    gap: 2rem;
    flex-wrap: wrap;
    width: 100% !important;
    flex-direction: column;
}

.header-content {
    flex: 1;
}

.admin-page .admin-header h2 {
    font-size: 2rem;
    margin: 0 0 0.3rem 0;
    color: #1f2937;
    font-weight: 700;
}

.admin-page .admin-header .admin-subtitle {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
}

.back-btn {
    padding: 0.6rem 1.2rem;
    background: #f0f0f0;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    display: inline-block;
    align-self: flex-start;
}

.back-btn:hover {
    background: #e0e0e0;
}

/* Upload container */
.upload-container {
    background: white;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.upload-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 2rem;
    width: 100% !important;
}

/* Upload field - INDIVIDUAL FIELDS STACKED */
.upload-field {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 0.4rem;
}

.upload-field label {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
    display: block;
}

.required {
    color: #dc2626;
    margin-left: 0.3rem;
}

/* File input */
.file-label {
    cursor: pointer;
    border: 2px dashed #d0d0d0;
    border-radius: 10px;
    padding: 2rem 1.5rem;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fafafa;
}

.file-label:hover {
    border-color: #20b090;
    background: #f0faf7;
}

.file-label input[type="file"] {
    display: none;
}

.file-input-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.file-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.file-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.file-title {
    margin: 0;
    font-weight: 600;
    color: #1f2937;
    font-size: 1rem;
}

.file-subtitle {
    margin: 0;
    color: #6b7280;
    font-size: 0.85rem;
}

.file-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid #e5e5e5;
    font-size: 0.85rem;
    color: #6b7280;
}

.file-size {
    font-weight: 500;
    color: #20b090;
}

/* Text inputs - FORCE WIDTH */
.upload-field input[type="text"],
.upload-field input[type="number"],
.upload-field select,
.upload-field textarea {
    padding: 0.8rem 1rem !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    font-size: 0.95rem !important;
    font-family: inherit !important;
    background: white !important;
    color: #1f2937 !important;
    transition: all 0.2s ease !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: block !important;
}

.upload-field input[type="text"]:focus,
.upload-field input[type="number"]:focus,
.upload-field select:focus,
.upload-field textarea:focus {
    outline: none !important;
    border-color: #20b090 !important;
    box-shadow: 0 0 0 3px rgba(32, 176, 144, 0.1) !important;
    background: #f9fdfb !important;
}

.upload-field textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

/* Small text */
.upload-field small {
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: #6b7280;
    display: block;
}

.char-count {
    display: block;
    text-align: right;
    margin-top: 0.4rem;
    font-size: 0.75rem;
    color: #999;
}

/* Upload actions - BUTTONS STACKED */
.upload-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem;
    margin-top: 1rem;
    width: 100% !important;
}

.upload-btn, .cancel-btn {
    padding: 0.9rem 2rem !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
    flex: 1 !important;
}

.upload-btn {
    background: #20b090 !important;
    color: white !important;
}

.upload-btn:hover {
    background: #1a9878 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(32, 176, 144, 0.3);
}

.upload-btn:active {
    transform: translateY(0);
}

.cancel-btn {
    background: #e0e0e0 !important;
    color: #333 !important;
}

.cancel-btn:hover {
    background: #d0d0d0 !important;
    transform: translateY(-2px);
}

/* Messages */
.success-message, .error-message {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.success-message {
    background: #e8f5f0;
    color: #047857;
    border-left: 4px solid #047857;
}

.error-message {
    background: #fef2f2;
    color: #dc2626;
    border-left: 4px solid #dc2626;
}

/* Mobile */
@media (max-width: 768px) {
    .admin-page .admin-header {
        flex-direction: column !important;
        align-items: flex-start;
    }

    .upload-container {
        padding: 1.5rem;
        max-width: 100%;
    }

    .file-label {
        padding: 1.5rem 1rem;
    }

    .file-icon {
        font-size: 2rem;
    }

    .file-title {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .admin-page .admin-header h2 {
        font-size: 1.5rem;
    }

    .upload-container {
        padding: 1rem;
    }

    .upload-field label {
        font-size: 0.9rem;
    }

    .file-label {
        padding: 1.2rem 0.8rem;
    }

    .file-icon {
        font-size: 1.8rem;
    }

    .upload-field input[type="text"],
    .upload-field input[type="number"],
    .upload-field select,
    .upload-field textarea {
        padding: 0.7rem 0.8rem !important;
        font-size: 16px !important;
    }

    .upload-btn, .cancel-btn {
        padding: 0.7rem 1rem !important;
        font-size: 0.85rem !important;
    }
}
