/* Modern, Premium Dark Mode UI */
:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #3b82f6;
    --accent-hover: #60a5fa;
    --border: #334155;
    --success: #10b981;
    --danger: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.app-header {
    margin-bottom: 3rem;
    text-align: center;
}

.app-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(to right, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.app-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.config-panel {
    background: var(--bg-secondary);
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid var(--border);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.config-panel h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

#system-status {
    padding: 1rem;
    border-radius: 0.5rem;
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* UI Form & Grid Elements */
.grid-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-group input {
    width: 100%;
    padding: 0.6rem;
    border-radius: 0.4rem;
    border: 1px solid var(--border);
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* Upload Grid Elements */
.upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.2rem;
}

.upload-card {
    background: rgba(255,255,255,0.03);
    border: 2px dashed var(--border);
    padding: 1.5rem 1rem;
    border-radius: 0.75rem;
    text-align: center;
    transition: all 0.3s;
}

.upload-card:hover {
    border-color: var(--accent);
    background: rgba(59, 130, 246, 0.05);
}

.upload-card label {
    display: block;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.upload-card input[type="file"] {
    max-width: 100%;
    font-size: 0.85rem;
}

/* Buttons */
.btn {
    padding: 0.8rem 1.8rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    margin: 0 0.5rem;
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

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

.btn-primary { background: var(--accent); color: white; }
.btn-secondary { background: var(--border); color: var(--text-primary); }
.btn-success { background: var(--success); color: white; }

/* Table Elements */
.table-responsive {
    overflow-x: auto;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
}

#preview-table {
    width: 100%;
    border-collapse: collapse;
}

#preview-table th, #preview-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    white-space: nowrap;
}

#preview-table th {
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
    font-weight: 600;
}

#preview-table tbody tr:hover {
    background: rgba(255,255,255,0.02);
}

#preview-table td strong {
    color: var(--accent);
    font-size: 1.1rem;
}
