* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding: 20px;
    max-width: 500px;
    margin: 0 auto;
    background: #f5f5f5;
    -webkit-tap-highlight-color: transparent;
    -webkit-overflow-scrolling: touch; /* Safari smooth scroll */
}

h2 {
    text-align: center;
    color: #333;
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.input-group {
    margin-bottom: 15px;
}



input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    -webkit-border-radius: 8px; /* Safari */
    font-size: 16px; /* Prevents iOS zoom */
    transition: border-color 0.3s;
    -webkit-appearance: none; /* Reset Safari styling */
    appearance: none;
}

input:focus, select:focus {
    border-color: #007bff;
    outline: none;
}




select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    -webkit-border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
    background-color: white;
    cursor: pointer;
    
    /* Required for Safari padding */
    -webkit-appearance: none;
    appearance: none;
    
    /* Custom arrow */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
}



/* Only apply -webkit-appearance: none to inputs */
input {
    -webkit-appearance: none;
    appearance: none;
}



.buttons {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}


/* Admin buttons */
.admin-btn {
    flex: 1;
    padding: 14px;
    border: 2px solid #6c757d;
    border-radius: 8px;
    -webkit-border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    min-height: 44px;
    -webkit-appearance: none;
    appearance: none;
    background: white;
    color: #333;
}

.admin-btn:hover {
    background: #f8f9fa;
}

/* Month inputs layout */
.month-inputs {
    display: flex;
    gap: 10px;
}


/* Clear button */
.clear-btn {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 8px;
    -webkit-border-radius: 8px; /* Safari */
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    min-height: 44px; /* iOS minimum touch target */
    -webkit-appearance: none; /* Reset Safari styling */
    appearance: none;
    background: linear-gradient(135deg, #6c757d, #545b62);
    color: white;
}



.result-box {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-top: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-left: 5px solid #007bff;
}

.result-item {
    display: flex;
    justify-content: space-between;
    margin: 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.result-value {
    font-weight: 700;
    font-size: 18px;
    color: #007bff;
}

footer {
    text-align: center;
    margin-top: 30px;
    color: #888;
    font-size: 12px;
}

/* Remove spinner arrows from number inputs */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* For Firefox */
input[type="number"] {
    -moz-appearance: textfield;
}

/* Optional: Keep the input looking consistent */
input[type="number"] {
    appearance: textfield;
}       

.title-wrapper {
    position: relative;
}

.tap-area {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    background: transparent;
    z-index: 10;
}

select option {
    padding: 8px;
}



   