body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0.625rem;
    background-color: #f8f8f8;
    color: #333;
}

.container {
    max-width: 90%;
    margin: 0 auto;
    background-color: white;
    padding: 1.25rem;
    border-radius: 0.25rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.1);
}

.title-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.title {
    color: #217346; /* Excel green */
    margin: 0;
    font-size: 1.5rem;
    line-height: 1;
    display: flex;
    align-items: center;
}

.sheet-select {
    display: none;
}

h2 {
    color: #333;
    font-size: 1.125rem;
    margin-top: 1.25rem;
}

.file-section {
    background: #f5f7f5;
    padding: 1.25rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.1);
}

.file-section h2 {
    color: #217346;  /* Excel green */
    margin-bottom: 1.25rem;
    font-size: 1.2rem;
}

.file-section div {
    margin-bottom: 0.9375rem;
}

.file-section label {
    display: block;
    margin-bottom: 0.3125rem;
    color: #333;
    font-weight: 500;
}

.file-section input[type="file"] {
    width: 100%;
    padding: 0.5rem;
    border: 0.0625rem solid #c8e6c9;
    border-radius: 0.25rem;
    background: white;
    margin-bottom: 0.625rem;
}

.file-section select {
    width: 100%;
    padding: 0.5rem;
    border: 0.0625rem solid #c8e6c9;
    border-radius: 0.25rem;
    background: white;
    margin-bottom: 0.625rem;
}

#compareButton {
    background-color: #217346;  /* Excel green */
    color: white;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    width: 100%;
    font-weight: 600;
    transition: background-color 0.2s;
}

#compareButton:hover {
    background-color: #185a35;  /* Darker green */
}

#compareButton:active {
    transform: translateY(0.0625rem);
}

.loading {
    display: none;
    margin: 1.25rem 0;
    text-align: center;
}

.spinner {
    border: 0.25rem solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 0.25rem solid #217346;
    width: 2.5rem;
    height: 2.5rem;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#results {
    margin-top: 1.25rem;
}

.error {
    color: #e53935;
    background-color: #ffebee;
    padding: 0.625rem;
    border-radius: 0.25rem;
    border-left: 0.25rem solid #e53935;
}

.warning {
    color: #f57c00;
    background-color: #fff3e0;
    padding: 0.625rem;
    border-radius: 0.25rem;
    border-left: 0.25rem solid #f57c00;
}

.success {
    color: #388e3c;
    background-color: #e8f5e9;
    padding: 0.625rem;
    border-radius: 0.25rem;
    border-left: 0.25rem solid #388e3c;
}

.input-dialog {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.dialog-content {
    background-color: white;
    margin: 15% auto;
    padding: 1.25rem;
    border-radius: 0.25rem;
    max-width: 31.25rem;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.2);
}

.dialog-content h3 {
    margin-top: 0;
    color: #217346;
}

.dialog-content input {
    width: 100%;
    padding: 0.5rem;
    margin: 0.625rem 0;
    border: 0.0625rem solid #ddd;
    border-radius: 0.25rem;
    box-sizing: border-box;
}

.dialog-buttons {
    text-align: right;
    margin-top: 1.25rem;
}

.dialog-buttons button {
    margin-left: 0.625rem;
}

.dialog-buttons button.secondary {
    background-color: #cccccc;
    color: #333;
}

.dialog-buttons button.secondary:hover {
    background-color: #bbbbbb;
}

/* Color legend */
.color-legend {
    margin-top: 1.25rem;
    padding: 0.625rem;
    background-color: #f5f5f5;
    border-radius: 0.25rem;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.3125rem;
}

.color-box {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.625rem;
    border: 0.0625rem solid #ccc;
}

.green {
    background-color: #90ee90;
}

.red {
    background-color: #ff6347;
}

.yellow {
    background-color: #ffff00;
}

.multiSelectDropdownItem {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: background 0.2s;
}

.multiSelectDropdownItem label {
    margin-left: 0.5rem;
    -ms-flex: 1;
    flex: 1;
    cursor: pointer;
    font-size: 0.8rem;
}

#multiSelectDropdown {
    border: 0.0625rem solid #c8e6c9;
    border-radius: 0.5rem;
    background: #f8f8f8;
    max-height: 20rem;
    overflow-y: scroll;
    margin-bottom: 0.625rem;
    padding: 0.5rem 0;
}

.multiSelectDropdownItem input[type="checkbox"] {
    accent-color: #217346;
    width: 1.125rem;
    height: 1.125rem;
    cursor: pointer;
}

.multiSelectDropdownItem input[type="checkbox"]:focus {
    outline: 0.125rem solid #217346;
}

.login-form {
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.5rem rgba(33, 115, 70, 0.08);
    max-width: 400px;
    margin: 2rem auto 0 auto;
    padding: 2rem 2rem 1.5rem 2rem;
    display: flex;
    -ms-flex-direction: column;
    flex-direction: column;
    align-items: stretch;
}

.login-form h2 {
    color: #217346;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
    text-align: left;
}

.login-form p {
    color: #555;
    margin-bottom: 1.2rem;
    font-size: 1rem;
    text-align: left;
}

.login-form label {
    margin-bottom: 0.25rem;
    color: #333;
    font-weight: 500;
    font-size: 0.98rem;
}

.form-input {
    padding: 0.7rem 0.9rem;
    border: 1px solid #c8e6c9;
    border-radius: 0.3rem;
    margin-bottom: 1.1rem;
    font-size: 1rem;
    background: #f8f8f8;
    transition: border 0.2s;
}

.form-input:focus {
    border: 1.5px solid #217346;
    outline: none;
    background: #fff;
}

.login-btn {
    background-color: #217346;
    color: #fff;
    border: none;
    border-radius: 2rem;
    padding: 0.8rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.2rem;
    margin-bottom: 1.2rem;
    transition: background 0.2s;
}

.login-btn:hover {
    background-color: #185a35;
}

.form-links {
    text-align: center;
    font-size: 0.98rem;
}

.form-links a {
    color: #217346;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.form-links a:hover {
    color: #185a35;
    text-decoration: underline;
}

@media (max-width: 500px) {
    .login-form {
        padding: 1.2rem 0.5rem 1rem 0.5rem;
        max-width: 98vw;
    }
}

#formContainer {
    position: absolute;
    top: 0; /* Adjust based on title and first p height */
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    z-index: 1000;
    box-sizing: border-box;
    padding: 10px;
    box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

#loginForm {
    margin-top: 10rem;
    background-color: #f8f8f8;
    border-radius: 10px;
    border: 1px solid #217346;
    padding: 20px;
    box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
}

.dismiss-btn {
    position: absolute;
    top: 10rem;
    right: 1.2rem;
    background: #fff;
    color: #217346;
    border: none;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(33, 115, 70, 0.08);
    transition: background 0.2s, color 0.2s;
    z-index: 1100;
}
.dismiss-btn:hover {
    background: #217346;
    color: #fff;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-container img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

#selectedItems {
    max-height: 6.5rem;
    overflow-y: auto;
    padding: 0.2rem 0.1rem 0.2rem 0;
    margin-bottom: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.5rem 0.5rem;
}

.selected-item-pill {
    display: inline-flex;
    align-items: center;
    background: #e5e5e5;
    color: #222;
    border-radius: 2rem;
    padding: 0.04rem 0.55rem 0.04rem 0.32rem;
    margin: 0.05rem 0.13rem 0.05rem 0;
    font-size: 0.89rem;
    font-weight: 500;
    border: 1.1px solid #217346;
    box-shadow: none;
    position: relative;
    transition: background 0.2s, border 0.2s;
    min-height: 1.25rem;
}

.selected-item-pill .remove-pill {
    background: #aaa;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 0.92rem;
    height: 0.92rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.32rem;
    margin-left: -0.32rem;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.selected-item-pill .remove-pill:hover {
    background: #217346;
}

.file-section h2 {
    margin-top: 0 !important;
}

.file-section h2 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1rem;
    margin-top: 0 !important;
    margin-bottom: 0.5rem;
}
