:root {
    --primary-green: #27ae60;
    --primary-green-dark: #219150;
    --background: #f6f7f9;
    --white: #fff;
    --gray: #e9ecef;
    --text-main: #222;
    --text-secondary: #666;
    --accent: #1a73e8;
}

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

body {
    font-family: 'Inter', Arial, sans-serif;
    background-color: var(--background);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    color: var(--text-main);
}

.container {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 24px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
    width: 100%;
    max-width: 500px;
}

h1, h2 {
    text-align: center;
    color: var(--primary-green);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

h1 {
    font-size: 1.7rem;
    letter-spacing: -1px;
}

h2 {
    font-size: 1.1rem;
    margin-top: 2rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.date-section {
    margin-bottom: 1rem;
}

.date-input {
    width: 100%;
    padding: 15px;
    border: 1.5px solid var(--gray);
    border-radius: 16px;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    background: var(--background);
    color: var(--text-main);
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.tab-button {
    flex: 1;
    padding: 14px 0;
    background-color: var(--background);
    color: var(--text-secondary);
    border: none;
    border-radius: 16px;
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: none;
}

.tab-button.active {
    background-color: var(--primary-green);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.08);
}

.tab-content {
    margin-bottom: 1.5rem;
}

.tab-content.hidden {
    display: none;
}

.amount-inputs, .fuel-inputs, .tank-inputs {
    margin-bottom: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 1rem;
}

label {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 2px;
}

input {
    width: 100%;
    padding: 15px;
    border: 1.5px solid var(--gray);
    border-radius: 16px;
    font-size: 1.1rem;
    background: var(--background);
    color: var(--text-main);
    -webkit-appearance: none;
    margin: 0;
    transition: border 0.2s;
}

input:focus {
    border: 1.5px solid var(--primary-green);
    outline: none;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

button {
    width: 100%;
    padding: 15px 20px;
    border: none;
    border-radius: 16px;
    background-color: var(--primary-green);
    color: var(--white);
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: background-color 0.2s, box-shadow 0.2s;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.08);
}

button:active, button:focus {
    background-color: var(--primary-green-dark);
}

.buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 1rem;
}

.result, .tank-result {
    text-align: center;
    font-size: 1.2rem;
    color: var(--primary-green);
    min-height: 30px;
    margin-top: 1rem;
    padding: 10px;
    word-break: break-word;
    background: var(--background);
    border-radius: 12px;
}

.tank-result {
    background-color: var(--gray);
    border-radius: 12px;
    margin-top: 1.5rem;
    color: var(--primary-green);
}

.history-section {
    margin-top: 2rem;
    border-top: 1px solid var(--gray);
    padding-top: 1rem;
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
}

.history-item {
    padding: 12px;
    margin: 7px 0;
    background-color: var(--background);
    border-radius: 16px;
    box-shadow: 0 1px 4px rgba(39, 174, 96, 0.04);
}

.history-date {
    font-weight: bold;
    color: var(--primary-green);
    margin-bottom: 5px;
}

.history-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.98rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.history-sum {
    color: var(--primary-green);
    font-weight: bold;
}

.history-fuel {
    color: #ea4335;
    font-weight: bold;
}

@media (min-width: 768px) {
    .buttons {
        flex-direction: row;
    }
    
    button {
        width: auto;
    }
}

@media (max-width: 767px) {
    .container {
        padding: 0.7rem;
        border-radius: 14px;
        max-width: 95vw;
    }
    .buttons button, button {
        font-size: 1.15rem;
        padding: 18px 0;
        border-radius: 14px;
    }
    .input-group input, input[type="number"], input[type="date"] {
        font-size: 1.15rem;
        padding: 16px;
        border-radius: 12px;
    }
    .input-group {
        gap: 10px;
        margin-bottom: 1.2rem;
    }
    .history-item {
        padding: 8px;
        font-size: 1.08rem;
    }
    .history-date {
        font-size: 1.1rem;
    }
}

/* Sidebar мобилен */
@media (max-width: 767px) {
    #sidebar {
        width: 100vw !important;
        min-width: unset !important;
        max-width: unset !important;
    }
    #sidebar nav button {
        font-size: 1.15rem;
        padding: 18px 0;
        border-radius: 14px;
    }
} 