:root {
    --bg-color: #FAF9F6; /* Ivory */
    --sidebar-bg: #FFFFFF;
    --panel-bg: rgba(255, 255, 255, 0.85);
    --border-color: rgba(216, 67, 21, 0.3); /* Dark Orange */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --accent-color: #D84315; /* Dark Orange */
    --accent-hover: #BF360C;
    --success-color: #059669;
    --highlight-glow: rgba(216, 67, 21, 0.4);
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Glassmorphism Utilities */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 24px 32px;
    color: var(--accent-color);
}

.logo h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 12px;
}

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-menu a:hover, .nav-menu a.active {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--accent-color);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    max-height: 100vh;
    overflow-y: auto;
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.header-title h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.header-title p {
    color: var(--text-secondary);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* Specific Sections */
.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.section-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.section-header svg {
    color: var(--accent-color);
}

/* Drag & Drop */
.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(216, 67, 21, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--accent-color);
    background: rgba(216, 67, 21, 0.05);
}

.upload-icon {
    width: 48px;
    height: 48px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.drop-text {
    font-size: 1.1rem;
    font-weight: 500;
}

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

.file-input {
    display: none;
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    margin-top: 16px;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
}
.btn-primary:active {
    transform: scale(0.98);
}

.file-list {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 150px;
    overflow-y: auto;
}

.file-item {
    background: rgba(255, 255, 255, 0.5);
    padding: 10px 16px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
}
.file-item .file-name {
    display: flex;
    align-items: center;
    gap: 8px;
}
.file-item .file-name svg {
    width: 16px;
    height: 16px;
    color: var(--success-color);
}

.btn-process {
    width: 100%;
    margin-top: 24px;
    background: linear-gradient(135deg, var(--accent-color) 0%, #6366f1 100%);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: opacity 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 15px var(--highlight-glow);
}

.btn-process:hover:not(:disabled) {
    opacity: 0.9;
    box-shadow: 0 6px 20px var(--highlight-glow);
}

.btn-process:disabled {
    background: #334155;
    color: #64748b;
    cursor: not-allowed;
    box-shadow: none;
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.summary-card {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.card-title {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.card-value.highlight {
    color: var(--success-color);
    font-size: 1.8rem;
}

/* Table Section */
.table-section {
    grid-column: 1 / -1;
}

.table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    background: rgba(216, 67, 21, 0.15);
    padding: 16px;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-primary);
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(212, 175, 55, 0.05);
}

.empty-state {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px !important;
}

/* Formatting for numbers */
.num-cell {
    text-align: right;
    font-family: monospace;
    font-size: 1rem;
}

.header-row {
    background: rgba(59, 130, 246, 0.1);
    font-weight: 700;
}
.header-row td {
    color: var(--accent-color);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.4s ease forwards;
}
