:root {
    color-scheme: dark;
    --color-teal-400: oklch(72% .16 250);
    --color-teal-500: oklch(58% .22 250);
    --color-teal-600: oklch(50% .22 250);
    --color-teal-700: oklch(44% .2 250);
    --color-cream-50: oklch(12% .015 240);
    --color-cream-100: oklch(16% .018 240);
    --color-slate-900: oklch(20% .018 240);
    --color-slate-500: oklch(60% .01 240);
    --color-gray-200: oklch(22% .02 240);
    --color-red-500: oklch(55% .22 25);
    --color-text: oklch(95% .005 240);
    --color-border: oklch(30% .02 240);
    --color-border-subtle: oklch(22% .02 240);
    --color-whatsapp: oklch(60% .2 145);
    --color-whatsapp-hover: oklch(52% .2 145);

    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--color-cream-50);
    color: var(--color-text);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 28px;
    margin-bottom: 10px;
    color: var(--color-text);
}

.header p {
    color: var(--color-slate-500);
    font-size: 14px;
}

.status-box {
    background: oklch(60% .2 145 / 18%);
    border: 2px solid var(--color-whatsapp);
    border-radius: 12px;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
    font-weight: 600;
}

.filters {
    background: var(--color-cream-100);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
}

.filters h3 {
    font-size: 16px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.filter-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--color-text);
}

.filter-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 14px;
    background: var(--color-cream-100);
    color: var(--color-text);
}

.filter-group input:focus {
    outline: 2px solid var(--color-teal-500);
    border-color: var(--color-teal-500);
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-clear {
    background: var(--color-border-subtle);
    color: var(--color-text);
}

.btn-clear:hover {
    background: var(--color-border);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: var(--color-cream-100);
    border: 2px solid var(--color-border-subtle);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    transition: all 0.3s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.35);
}

.card.entrada-baixa {
    border-color: var(--color-teal-500);
    border-width: 2px;
}

.card-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--color-teal-500);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-teal-400);
}

.card-type {
    font-size: 12px;
    color: var(--color-slate-500);
    font-weight: 600;
}

.card-info {
    margin-bottom: 12px;
    font-size: 14px;
}

.card-info strong {
    font-weight: 700;
    color: var(--color-text);
}

.card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
}

.btn-copy {
    background: var(--color-teal-600);
    color: white;
}

.btn-copy:hover {
    background: var(--color-teal-700);
}

.btn-whatsapp {
    background: var(--color-whatsapp);
    color: white;
}

.btn-whatsapp:hover {
    background: var(--color-whatsapp-hover);
}

.selection-panel {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-cream-100);
    border: 2px solid var(--color-teal-500);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    display: none;
    z-index: 1000;
    max-width: 90%;
}

.selection-panel.active {
    display: block;
}

.selection-header {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--color-text);
}

.selection-actions {
    display: flex;
    gap: 10px;
}

.btn-primary {
    background: var(--color-teal-500);
    color: white;
    flex: 1;
}

.btn-primary:hover {
    background: var(--color-teal-600);
}

.btn-secondary {
    background: var(--color-gray-200);
    color: var(--color-text);
}

.btn-secondary:hover {
    background: var(--color-border);
}

.checkbox-container {
    position: absolute;
    top: 20px;
    left: 20px;
}

.checkbox-container input[type="checkbox"] {
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: var(--color-teal-500);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--color-cream-100);
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--color-slate-500);
}

.modal-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--color-teal-400);
}

.result-section {
    margin-bottom: 20px;
}

.result-section h4 {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--color-text);
}

.result-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-teal-400);
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--color-slate-500);
}

option {
    background: var(--color-cream-100);
    color: var(--color-text);
}
