:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --accent-primary: #4a90e2;
    --accent-hover: #357abd;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --danger: #ef4444;
    --success: #10b981;
    --brand-color-0: #facc15;
    --brand-color-1: #60a5fa;
    --brand-color-2: #fb923c;
    --brand-color-3: #34d399;
    --brand-color-4: #a78bfa;
}

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

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

.app-container {
    width: 100%;
    margin: 0 auto;
    padding: 2rem 3rem;
}

/* Header matching the screenshot */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    width: 100%;
}

.header-left {
    flex: 1;
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.95rem;
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.header-center img {
    height: 40px;
    object-fit: contain;
}

.header-center .company-name {
    font-weight: 600;
    font-size: 1.25rem;
    color: #000;
}

.header-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.badge {
    background: #f1f5f9;
    color: var(--text-primary);
    padding: 0.4rem 1rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

.top-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.input-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

input[type="number"], input[type="text"] {
    padding: 0.6rem 0.9rem;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: all 0.2s ease;
}

input[type="number"]:focus, input[type="text"]:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
    background: #ffffff;
}

.table-input {
    width: 100%;
    background: transparent !important;
    border: 1px solid transparent !important;
    padding: 0.25rem !important;
    border-radius: 4px !important;
}

.table-input:hover {
    border-color: var(--border-color) !important;
    background: #f8fafc !important;
}

.table-input:focus {
    border-color: var(--accent-primary) !important;
    background: #ffffff !important;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.5rem;
    border-radius: 9999px; /* Pill shape */
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 4px 10px rgba(74, 144, 226, 0.2);
}

.btn-primary:hover:not(:disabled) {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(74, 144, 226, 0.3);
}

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

/* Table */
.data-table-container {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: #f1f5f9;
    padding: 1rem 1.25rem;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    font-size: 1rem;
}

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

.data-table tbody tr:hover {
    filter: brightness(0.97);
}

.brand-group-0 td { background-color: rgba(250, 204, 21, 0.15); border-bottom: 1px solid rgba(250, 204, 21, 0.3); }
.brand-group-1 td { background-color: rgba(96, 165, 250, 0.15); border-bottom: 1px solid rgba(96, 165, 250, 0.3); }
.brand-group-2 td { background-color: rgba(251, 146, 60, 0.15); border-bottom: 1px solid rgba(251, 146, 60, 0.3); }
.brand-group-3 td { background-color: rgba(52, 211, 153, 0.15); border-bottom: 1px solid rgba(52, 211, 153, 0.3); }
.brand-group-4 td { background-color: rgba(167, 139, 250, 0.15); border-bottom: 1px solid rgba(167, 139, 250, 0.3); }

.brand-group-0 td:first-child { border-left: 4px solid var(--brand-color-0); }
.brand-group-1 td:first-child { border-left: 4px solid var(--brand-color-1); }
.brand-group-2 td:first-child { border-left: 4px solid var(--brand-color-2); }
.brand-group-3 td:first-child { border-left: 4px solid var(--brand-color-3); }
.brand-group-4 td:first-child { border-left: 4px solid var(--brand-color-4); }

.result-val {
    font-family: monospace;
    font-size: 1.05rem;
}

.highlight-val {
    color: var(--accent-primary);
    font-weight: 700;
}

.summary-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 1rem;
    background: #f0fdf4; /* Light green */
    border-top: 1px solid var(--border-color);
    gap: 2rem;
}

.summary-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.summary-stat span {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-weight: 600;
}

.summary-stat strong {
    font-size: 1.25rem;
    color: var(--success);
}

.error-alert {
    background: #fef2f2;
    border-left: 4px solid var(--danger);
    padding: 1rem;
    border-radius: 4px;
    color: #991b1b;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
