/* assets/css/style.css */
:root {
    --primary: #c69c6d; /* Gold */
    --primary-dark: #b0875b;
    --secondary: #1e293b; /* Dark Navy / Black */
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
    --success: #10b981;
    --danger: #ef4444;
    --glass-blur: blur(12px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    justify-content: center;
}

/* Background Animated Shapes for Glassmorphism effect */
.bg-shape {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.5;
}

.bg-shape-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    right: -100px;
    animation: float 10s infinite ease-in-out alternate;
}

.bg-shape-2 {
    width: 500px;
    height: 500px;
    background: #0ea5e9;
    bottom: -150px;
    left: -150px;
    animation: float 12s infinite ease-in-out alternate-reverse;
}

.bg-shape-3 {
    width: 300px;
    height: 300px;
    background: #8b5cf6;
    top: 40%;
    left: 40%;
    animation: float 15s infinite ease-in-out alternate;
}

@keyframes float {
    0% { transform: translateY(0) translateX(0); }
    100% { transform: translateY(30px) translateX(30px); }
}

/* Main Container */
.dashboard-container {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.logo h2 {
    font-weight: 800;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    color: var(--primary);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--primary);
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 30px 20px;
}

.hero-section h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(to left, #fff, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-section p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Upload Cards */
.upload-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.upload-card {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.upload-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.card-header {
    margin-bottom: 25px;
}

.icon-box {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.template-icon {
    background: rgba(43, 87, 154, 0.2);
    color: #2b579a;
}

.excel-icon {
    background: rgba(33, 115, 70, 0.2);
    color: #217346;
}

.card-header h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.required {
    color: var(--danger);
}

.card-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed rgba(255,255,255,0.2);
    border-radius: 15px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(0,0,0,0.2);
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--primary);
    background: rgba(198, 156, 109, 0.05);
}

.cloud-icon {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.drop-zone:hover .cloud-icon {
    color: var(--primary);
}

.drop-text {
    display: block;
    color: var(--text-muted);
}

.browse-link {
    color: var(--primary);
    text-decoration: underline;
}

/* File Info */
.file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.05);
    padding: 15px 20px;
    border-radius: 10px;
    margin-top: 20px;
    border: 1px solid var(--border-color);
}

.filename {
    flex: 1;
    margin: 0 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    direction: ltr;
    text-align: right;
}

.remove-btn {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.remove-btn:hover {
    background: var(--danger);
    color: white;
}

/* Action Button Container */
.action-container {
    text-align: center;
    margin: 20px 0;
}

.btn-primary, .btn-success {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(198, 156, 109, 0.3);
}

.btn-primary:not(:disabled):hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(198, 156, 109, 0.4);
}

.btn-primary:disabled {
    background: rgba(255,255,255,0.1);
    color: var(--text-muted);
    box-shadow: none;
    cursor: not-allowed;
}

.btn-success {
    background: var(--success);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    background: #059669;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* Mapping Section */
.mapping-section {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    animation: fadeIn 0.5s ease;
}

.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.mapping-header {
    text-align: center;
    margin-bottom: 30px;
}

.mapping-header h2 {
    color: var(--primary);
    margin-bottom: 10px;
}

/* Grid layout for mapping fields */
.mapping-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.map-item {
    background: rgba(0,0,0,0.2);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.map-item label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-main);
}

.map-item select {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    font-size: 1rem;
    outline: none;
}

.map-item select option {
    background: var(--secondary);
    color: white;
}

/* Output Options */
.output-options {
    background: rgba(0,0,0,0.2);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.output-options h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.options-wrapper {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.custom-radio {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.custom-radio input {
    display: none;
}

.radio-mark {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--text-muted);
    position: relative;
    transition: all 0.2s ease;
}

.custom-radio input:checked + .radio-mark {
    border-color: var(--primary);
}

.custom-radio input:checked + .radio-mark::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
}

.submit-action {
    text-align: center;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: auto;
}

/* Loading Overlay */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader {
    text-align: center;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(198, 156, 109, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .upload-cards-container {
        grid-template-columns: 1fr;
    }
    .options-wrapper {
        flex-direction: column;
        gap: 15px;
    }
}
