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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #e0e0e0;
    min-height: 100vh;
}

.screen {
    min-height: 100vh;
    padding: 20px;
}

.hidden {
    display: none !important;
}

/* Setup Screen */
.setup-container {
    max-width: 500px;
    margin: 0 auto;
    background: #d9d9d9;
    padding: 30px;
    border-radius: 12px;
    margin-top: 40px;
}

.setup-container h1 {
    text-align: center;
    color: #333;
    margin-bottom: 10px;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    background: white;
}

.form-group input:disabled {
    background: #f0f0f0;
    cursor: not-allowed;
}

.form-group input:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.dropdown.show {
    display: block;
}

.dropdown-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: #e3f2fd;
}

.status {
    text-align: center;
    padding: 10px;
    color: #666;
    font-size: 14px;
}

.status.error {
    color: #c92a2a;
}

.status.success {
    color: #2d7f2d;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: #1976d2;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #1565c0;
}

.btn-secondary {
    background: #455a64;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #37474f;
}

.btn-purple {
    background: #7b1fa2;
    color: white;
}

.btn-purple:hover:not(:disabled) {
    background: #6a1b9a;
}

#complete-setup-btn {
    width: 100%;
    margin-top: 20px;
    padding: 15px;
}

/* Dashboard */
#dashboard-screen {
    max-width: 900px;
    margin: 0 auto;
}

header {
    text-align: center;
    padding: 20px 0;
}

header h1 {
    font-size: 28px;
    color: #333;
}

header .subtitle {
    margin-bottom: 0;
}

/* Alert Banners */
#alerts-container {
    margin-bottom: 15px;
}

.alert {
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    margin-bottom: 10px;
    text-align: center;
}

.alert-warning {
    background: #e65100;
}

.alert-info {
    background: #1976d2;
}

.alert-event {
    background: #1565c0;
}

/* Bin Cards */
.cards-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

@media (max-width: 700px) {
    .cards-container {
        grid-template-columns: 1fr;
    }
}

.bin-card {
    padding: 30px 20px;
    border-radius: 12px;
    color: white;
    text-align: center;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bin-card h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

.bin-card .days-count {
    font-size: 72px;
    font-weight: bold;
    line-height: 1;
}

.bin-card .days-label {
    font-size: 14px;
    margin-top: 10px;
    opacity: 0.9;
}

.bin-card .collection-date {
    margin-top: 20px;
    font-size: 14px;
    opacity: 0.8;
}

.bin-card.fogo {
    background: #2d7f2d;
}

.bin-card.recycling {
    background: #d4a500;
}

.bin-card.landfill {
    background: #c92a2a;
}

/* Toolbar */
.toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 12px;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    font-size: 20px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    line-height: 1;
}

.close-btn:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-body input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 15px;
}

.results-count {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.search-results {
    max-height: 400px;
    overflow-y: auto;
}

.result-item {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    color: white;
}

.result-item h3 {
    font-size: 16px;
    margin-bottom: 3px;
}

.result-item .bin-name {
    display: block;
    font-size: 12px;
    opacity: 0.85;
    margin-bottom: 5px;
}

.result-item .tip {
    font-size: 13px;
    opacity: 0.9;
    margin-top: 5px;
}

.result-item.recycle { background: #d4a500; }
.result-item.organic { background: #2d7f2d; }
.result-item.waste { background: #c92a2a; }
.result-item.crc { background: #1e88e5; }
.result-item.special { background: #ff6f00; }
.result-item.clean_up { background: #7b1fa2; }

/* Loading spinner */
.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* PWA Install Banner */
#install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1976d2;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1001;
}

#install-banner.hidden {
    display: none;
}

#install-banner button {
    background: white;
    color: #1976d2;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}
