:root {
    --primary-red: #8B1A1A;
    --dark-text: #222;
    --gray-bg: #f2f2f2;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--gray-bg);
    margin: 0;
    padding: 10px;
    -webkit-tap-highlight-color: transparent;
}

.container { width: 100%; max-width: 800px; margin: 0 auto; }

.main-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    margin-bottom: 15px;
}

.header-title { font-size: 20px; font-weight: bold; margin-bottom: 5px; }
.red-slash { color: var(--primary-red); font-weight: 900; }
.disclaimer { font-size: 11px; color: #888; margin-bottom: 20px; }

/* Gridlar mobil uchun bitta ustunga o'tadi */
.input-grid, .expenses-grid {
    display: grid;
    grid-template-columns: 1fr; /* Mobil default */
    gap: 15px;
}

@media (min-width: 600px) {
    .input-grid { grid-template-columns: 1fr 1fr; }
    .expenses-grid { grid-template-columns: repeat(3, 1fr); }
    .full-width { grid-column: span 2; }
}

.input-group label { display: block; margin-bottom: 5px; font-size: 13px; color: #666; font-weight: 500; }

.display-value {
    background: #fff;
    border: 1px solid #ddd;
    padding: 12px;
    font-size: 17px;
    font-weight: bold;
    border-bottom: 3px solid var(--primary-red);
}

.input-with-unit {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.input-with-unit input { border: none; padding: 10px; width: 100%; outline: none; }
.input-with-unit span { background: #eee; padding: 10px; font-size: 12px; color: #555; }

.input-wrapper-static {
    background: #fff;
    border: 1px solid #ddd;
    padding: 12px;
    color: #999;
}

/* Slider */
.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: #ddd;
    border-radius: 3px;
    margin: 15px 0;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    background: white;
    border: 5px solid var(--primary-red);
    border-radius: 50%;
    cursor: pointer;
}

.btn-calculate {
    width: 100%;
    background: var(--primary-red);
    color: white;
    border: none;
    padding: 16px;
    font-weight: bold;
    font-size: 16px;
    margin-top: 25px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-calculate:active { transform: scale(0.98); }

/* Results Header */
.result-header {
    background: var(--primary-red);
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    text-align: center;
}

.header-info { display: flex; justify-content: space-between; gap: 10px; }
.info-block span { display: block; font-size: 16px; font-weight: bold; }
.info-block small { font-size: 10px; opacity: 0.8; }

.table-container { background: white; padding: 15px; border-radius: 0 0 12px 12px; overflow: hidden; }

/* Jadval mobil scrolli */
.table-responsive { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 380px; }
th { text-align: left; font-size: 12px; color: #888; padding: 10px; border-bottom: 1px solid #eee; }
td { padding: 12px 10px; border-bottom: 1px solid #f5f5f5; font-size: 14px; }

.btn-cancel {
    border: 1px solid var(--primary-red);
    background: white;
    color: var(--primary-red);
    padding: 6px 12px;
    font-weight: bold;
    border-radius: 4px;
    font-size: 12px;
}