/* ============================================
   MAISON DALI ADMIN UI - PROFESSIONAL STYLING
   ============================================ */

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

:root {
    /* Color Palette - Inspired by Dalí's surrealism */
    --primary-color: #2C3E50;        /* Deep navy blue */
    --accent-color: #E74C3C;         /* Surrealist red */
    --success-color: #27AE60;        /* Fresh green */
    --warning-color: #F39C12;        /* Warm orange */
    --error-color: #C0392B;          /* Deep red */
    --background: #F8F9FA;           /* Light gray */
    --card-background: #FFFFFF;      /* Pure white */
    --text-primary: #2C3E50;         /* Dark gray */
    --text-secondary: #7F8C8D;       /* Medium gray */
    --border-color: #E0E6ED;         /* Light border */
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 12px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--text-primary);
}

/* === Container === */
.container {
    background: var(--card-background);
    border-radius: 16px;
    box-shadow: var(--shadow-hover);
    max-width: 700px;
    width: 100%;
    padding: 40px;
    animation: fadeIn 0.5s ease-in;
}

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

/* === Header === */
header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 400;
}

/* === Info Card === */
.info-card {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border-left: 4px solid var(--accent-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.info-card h2 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.info-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* === Form Styles === */
.upload-form {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 25px;
}

label {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 1rem;
}

.label-number {
    background: var(--accent-color);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 0.9rem;
}

.label-text {
    flex: 1;
}

/* === Select Dropdown === */
select {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: white;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

select:hover {
    border-color: var(--accent-color);
}

select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* === File Input & Drop Zone === */
.file-input-wrapper {
    position: relative;
}

input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.file-drop-zone {
    border: 3px dashed var(--border-color);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background: var(--background);
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-drop-zone:hover,
.file-drop-zone.dragover {
    border-color: var(--accent-color);
    background: rgba(231, 76, 60, 0.05);
    transform: scale(1.02);
}

.drop-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.drop-text {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 5px;
}

.drop-subtext {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* === File Info === */
.file-info {
    margin-top: 15px;
    padding: 12px 16px;
    background: var(--success-color);
    color: white;
    border-radius: 8px;
    font-size: 0.95rem;
    display: none;
}

.file-info.show {
    display: block;
    animation: slideDown 0.3s ease;
}

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

/* === Submit Button === */
.submit-button {
    width: 100%;
    padding: 16px 24px;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--accent-color) 0%, #c0392b 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}

.submit-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.submit-button:active:not(:disabled) {
    transform: translateY(0);
}

.submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.button-icon {
    margin-right: 10px;
    font-size: 1.2rem;
}

.button-text {
    font-size: 1rem;
}

/* === Status Messages === */
.status-message {
    padding: 16px 20px;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 20px;
    display: none;
    animation: slideDown 0.3s ease;
}

.status-message.show {
    display: block;
}

.status-message.status-info {
    background: #3498db;
    color: white;
    border-left: 4px solid #2980b9;
}

.status-message.status-success {
    background: var(--success-color);
    color: white;
    border-left: 4px solid #229954;
}

.status-message.status-error {
    background: var(--error-color);
    color: white;
    border-left: 4px solid #a93226;
}

/* === Upload History === */
.upload-history {
    background: var(--background);
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
}

.upload-history h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 15px;
}

#historyList {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* === Footer === */
footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.footer-note {
    font-size: 0.85rem;
}

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

    h1 {
        font-size: 2rem;
    }

    .info-card {
        padding: 15px;
    }

    .drop-icon {
        font-size: 2.5rem;
    }

    .submit-button {
        padding: 14px 20px;
        font-size: 1rem;
    }
}

/* === Loading Animation === */
.submit-button.loading .button-text::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}
