:root {
    --primary-color: #0078D4; /* Outlook Blue */
    --primary-hover: #005A9E;
    --bg-gradient-start: #f3f9ff;
    --bg-gradient-end: #dfefff;
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-border: rgba(255, 255, 255, 0.5);
    --text-primary: #323130;
    --text-secondary: #605E5C;
    --success: #107C10;
    --error: #D13438;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-gradient-start: #1f1f1f;
        --bg-gradient-end: #111111;
        --card-bg: rgba(45, 45, 45, 0.85);
        --card-border: rgba(255, 255, 255, 0.1);
        --text-primary: #ffffff;
        --text-secondary: #bebebe;
    }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

.background-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 10% 20%, rgba(0, 120, 212, 0.1) 0%, transparent 20%),
                      radial-gradient(circle at 90% 80%, rgba(0, 164, 239, 0.1) 0%, transparent 20%);
    z-index: -1;
}

.container {
    width: 100%;
    max-width: 800px;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 24px;
    background: white;
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

.card h3 {
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}

/* Login Section */
.centered {
    text-align: center;
    padding: 20px 0;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--text-secondary);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
}

/* Upload Area */
.upload-area {
    border: 2px dashed #ccc;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.upload-area:hover, .upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(0, 120, 212, 0.05);
}

.upload-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 12px;
}

.link {
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: 600;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0,0,0,0.05);
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
}

.badge {
    background: var(--primary-color);
    color: white;
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 12px;
}

.btn-icon {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-secondary);
}

/* Preview Table */
.csv-preview {
    margin-top: 20px;
    max-height: 200px;
    overflow-y: auto;
    font-size: 0.9rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

th {
    background: rgba(0,0,0,0.02);
    font-weight: 600;
}

/* Progress */
.progress-area {
    margin-top: 25px;
}

.progress-item {
    margin-bottom: 16px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 0.9rem;
    font-weight: 500;
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(0,0,0,0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary-color);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.status-log {
    margin-top: 20px;
    height: 150px;
    overflow-y: auto;
    background: rgba(0,0,0,0.8); /* Console-like */
    color: #4AF626;
    padding: 12px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.85rem;
}

.log-entry { margin-bottom: 4px; }
.log-error { color: #ff6b6b; }
.log-success { color: #4AF626; }

/* Utility */
.hidden { display: none; }

.fade-in {
    animation: fadeIn 0.5s ease forwards;
    opacity: 0;
    transform: translateY(10px);
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }

@keyframes fadeIn {
    to { opacity: 1; transform: translateY(0); }
}
