/* Locations Page Styles */
.locations-main {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.locations-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.locations-header h2 {
    font-size: 1.75rem;
    color: white;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.locations-header h2::before {
    content: '📍';
    font-size: 1.5rem;
}

.locations-header .btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    background: #27ae60;
    border: none;
    color: white;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
    transition: all 0.2s;
}

.locations-header .btn-primary:hover {
    background: #2ecc71;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4);
}

/* Notification Settings */
.notification-settings {
    margin-bottom: 1.5rem;
}

.settings-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 1.25rem;
}

.settings-card h3 {
    font-size: 1.1rem;
    color: #2c3e50;
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #eee;
}

.notification-option {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.notification-option:last-of-type {
    border-bottom: none;
}

.notification-option .toggle-label {
    flex: 1;
    min-width: 200px;
}

.notification-option .settings-email,
.notification-option .push-status {
    flex: 1;
    min-width: 150px;
    margin: 0;
    font-size: 0.85rem;
    color: #666;
}

.push-status.push-status-granted {
    color: #27ae60;
    font-weight: 500;
}

.push-status.push-status-default {
    color: #7f8c8d;
}

.push-status.push-status-denied {
    color: #e74c3c;
}

.push-status.push-status-unsupported {
    color: #95a5a6;
    font-style: italic;
}

.push-status.push-status-error {
    color: #e74c3c;
}

.toggle-slider-disabled {
    background: #bdc3c7 !important;
    cursor: not-allowed;
}

.dev-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
    border-radius: 4px;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.app-status {
    flex: 1;
    min-width: 150px;
    margin: 0;
    font-size: 0.85rem;
    color: #7f8c8d;
    font-style: italic;
}

.test-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.test-btn:hover:not(:disabled) {
    background: #2980b9;
    transform: translateY(-1px);
}

.test-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.toggle-label input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 50px;
    height: 26px;
    background: #ccc;
    border-radius: 26px;
    transition: background 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
}

.toggle-label input:checked + .toggle-slider {
    background: #27ae60;
}

.toggle-label input:checked + .toggle-slider::before {
    transform: translateX(24px);
}

.toggle-text {
    font-size: 0.95rem;
    color: #2c3e50;
}

.settings-email {
    font-size: 0.9rem;
    color: #2c3e50;
    margin: 0.75rem 0 0 0;
}

.settings-email strong {
    color: #27ae60;
}

.settings-info {
    font-size: 0.8rem;
    color: #888;
    margin: 0.5rem 0 0 0;
}

.locations-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.locations-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.loading, .empty-message {
    color: #666;
    text-align: center;
    padding: 2rem;
}

/* Location Card */
.location-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 1.25rem;
}

.location-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.location-card h3 {
    font-size: 1.1rem;
    color: #2c3e50;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.my-location-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    background: linear-gradient(135deg, #ec4899, #db2777);
    color: white;
    border-radius: 10px;
    white-space: nowrap;
}

.location-card-actions {
    display: flex;
    gap: 0.5rem;
}

.location-card-actions button {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: #666;
    font-size: 1rem;
}

.location-card-actions button:hover {
    color: #2c3e50;
}

.location-card-actions .delete-btn:hover {
    color: #e74c3c;
}

.location-coords {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.5rem;
}

.location-gts {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 6px;
}

.location-gts .gts-label {
    font-size: 0.85rem;
    color: #666;
}

.location-gts .gts-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #27ae60;
}

/* Alerts Section */
.location-alerts {
    border-top: 1px solid #eee;
    padding-top: 0.75rem;
    margin-top: 0.5rem;
}

.alerts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.alerts-header h4 {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
    font-weight: 500;
}

.add-alert-btn {
    background: transparent;
    border: 1px solid #27ae60;
    color: #27ae60;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
}

.add-alert-btn:hover {
    background: #27ae60;
    color: white;
}

.alert-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.alert-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 0.85rem;
}

.alert-item.disabled {
    opacity: 0.5;
}

.alert-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-gts {
    font-weight: 600;
    color: #e67e22;
    min-width: 50px;
}

.alert-label {
    color: #2c3e50;
}

.alert-status {
    font-size: 0.75rem;
    color: #888;
}

.alert-actions {
    display: flex;
    gap: 0.25rem;
}

.alert-actions button {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: #888;
    font-size: 0.85rem;
}

.alert-actions button:hover {
    color: #2c3e50;
}

.alert-actions .delete-alert-btn:hover {
    color: #e74c3c;
}

.no-alerts {
    font-size: 0.8rem;
    color: #999;
    font-style: italic;
}

/* Preset Buttons */
.preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.preset-btn {
    background: #f8f9fa;
    border: 1px solid #ddd;
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.preset-btn:hover {
    background: #e67e22;
    border-color: #e67e22;
    color: white;
}

.preset-btn .preset-gts {
    font-weight: 600;
    margin-left: 0.25rem;
}

.preset-milestones {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #eee;
}

.preset-milestone {
    background: #fff3e0 !important;
    border-color: #e67e22 !important;
    color: #e67e22;
    font-weight: 600;
}

.preset-milestone:hover {
    background: #e67e22 !important;
    color: white !important;
}

.preset-section-label {
    width: 100%;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

/* Checkbox Label */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.location-gts {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
}

.location-gts-current, .location-gts-forecast {
    padding: 0.5rem 0.75rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.location-gts-value {
    font-weight: 600;
    color: #2c3e50;
}

/* Locations Map */
.locations-map-container {
    position: sticky;
    top: 2rem;
    height: calc(100vh - 200px);
    min-height: 400px;
}

.locations-map {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-small {
    max-width: 350px;
    padding: 1.5rem;
    text-align: center;
}

.modal-small h3 {
    margin-bottom: 0.5rem;
}

.modal-small p {
    color: #666;
    margin-bottom: 1.5rem;
}

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

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

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

#location-form {
    padding: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.modal-map {
    height: 250px;
    border-radius: 4px;
    border: 1px solid #ddd;
    margin-top: 0.5rem;
}

.btn-danger {
    background: #e74c3c;
    color: white;
    border: none;
}

.btn-danger:hover {
    background: #c0392b;
}

/* Mein Standort Toggle in Modal */
#my-location-group {
    background: #fdf2f8;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #fce7f3;
    margin-bottom: 1rem;
}

#my-location-group .toggle-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}

#my-location-group .toggle-slider {
    flex-shrink: 0;
    min-width: 50px;
    width: 50px;
    height: 26px;
}

#my-location-group .toggle-text {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.form-hint {
    font-size: 0.8rem;
    color: #888;
    margin: 0.5rem 0 0 0;
    line-height: 1.4;
}

/* Alert Modal Styling */
#alert-modal .modal-content {
    max-width: 480px;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

#alert-modal .modal-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    padding: 1.25rem 1.5rem;
    border-bottom: none;
}

#alert-modal .modal-header h3 {
    color: white;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#alert-modal .modal-header h3::before {
    content: '\1F514';
    font-size: 1.2rem;
}

#alert-modal .modal-close {
    color: white;
    opacity: 0.8;
}

#alert-modal .modal-close:hover {
    opacity: 1;
    color: white;
}

#alert-form {
    padding: 1.5rem;
}

#alert-form .form-group {
    margin-bottom: 1.25rem;
}

#alert-form .form-group label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* Preset Buttons - Layout */
.preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
    max-height: 280px;
    overflow-y: auto;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.preset-featured {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #ddd;
}

.preset-featured-btn {
    width: 100%;
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, #fff8e1, #fff3e0) !important;
    border: 2px solid #f9a825 !important;
    color: #e65100 !important;
    font-size: 0.9rem !important;
}

.preset-featured-btn:hover {
    background: linear-gradient(135deg, #f9a825, #f57f17) !important;
    border-color: #f57f17 !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(249, 168, 37, 0.4);
}

.preset-featured-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.preset-featured-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.preset-featured-text strong {
    font-size: 0.95rem;
}

.preset-featured-text small {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-top: 2px;
}

.preset-featured-btn:hover .preset-featured-text small {
    opacity: 1;
}

.preset-swarm-btn {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2) !important;
    border-color: #ff9800 !important;
    color: #e65100 !important;
}

.preset-swarm-btn:hover {
    background: linear-gradient(135deg, #ff9800, #f57c00) !important;
    border-color: #f57c00 !important;
    box-shadow: 0 3px 12px rgba(255, 152, 0, 0.4);
}

.preset-winter-btn {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb) !important;
    border-color: #42a5f5 !important;
    color: #1565c0 !important;
}

.preset-winter-btn:hover {
    background: linear-gradient(135deg, #42a5f5, #1e88e5) !important;
    border-color: #1e88e5 !important;
    box-shadow: 0 3px 12px rgba(66, 165, 245, 0.4);
}

.winter-info {
    background: #e3f2fd;
    border: 1px solid #90caf9;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 0.85rem;
    color: #1565c0;
    line-height: 1.5;
}

.winter-info p:first-child {
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.alert-winter .alert-gts {
    background: #e3f2fd;
    color: #1565c0;
}

.alert-weather-badge {
    font-size: 1rem;
    min-width: auto;
    padding: 2px 6px;
}

/* Varroawetter button */
.preset-varroa-btn {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2) !important;
    border-color: #ff9800 !important;
    color: #e65100 !important;
}

.preset-varroa-btn:hover {
    background: linear-gradient(135deg, #ff9800, #f57c00) !important;
    border-color: #f57c00 !important;
    color: #fff !important;
    box-shadow: 0 3px 12px rgba(255, 152, 0, 0.4);
}

/* Flugwetter button */
.preset-flug-btn {
    background: linear-gradient(135deg, #fffde7, #fff9c4) !important;
    border-color: #fbc02d !important;
    color: #f57f17 !important;
}

.preset-flug-btn:hover {
    background: linear-gradient(135deg, #fbc02d, #f9a825) !important;
    border-color: #f9a825 !important;
    color: #fff !important;
    box-shadow: 0 3px 12px rgba(251, 192, 45, 0.4);
}

/* Stockkontrolle button */
.preset-kontrolle-btn {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9) !important;
    border-color: #66bb6a !important;
    color: #2e7d32 !important;
}

.preset-kontrolle-btn:hover {
    background: linear-gradient(135deg, #66bb6a, #43a047) !important;
    border-color: #43a047 !important;
    color: #fff !important;
    box-shadow: 0 3px 12px rgba(102, 187, 106, 0.4);
}

/* Weather info boxes */
.weather-info {
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 0.85rem;
    line-height: 1.5;
}

.weather-info p:first-child {
    margin-bottom: 6px;
    font-size: 0.95rem;
}

#varroa-info {
    background: #fff3e0;
    border: 1px solid #ffcc80;
    color: #e65100;
}

#flug-info {
    background: #fffde7;
    border: 1px solid #fff176;
    color: #f57f17;
}

#kontrolle-info {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    color: #2e7d32;
}

/* Weather alert badges in list */
.alert-varroa .alert-gts { background: #fff3e0; color: #e65100; }
.alert-flug .alert-gts { background: #fffde7; color: #f57f17; }
.alert-kontrolle .alert-gts { background: #e8f5e9; color: #2e7d32; }

/* Debug section label */
.preset-debug-section .preset-section-label {
    color: #9e9e9e;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Preset search */
.preset-search-wrapper {
    width: 100%;
    margin-bottom: 0.5rem;
}

.preset-search {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.preset-search:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

.preset-results {
    display: none;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    margin-bottom: 0.5rem;
}

.preset-result-btn {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 8px 12px !important;
    border: none !important;
    border-bottom: 1px solid #f0f0f0 !important;
    border-radius: 0 !important;
    background: white !important;
    cursor: pointer;
    font-size: 0.85rem !important;
    transition: background 0.1s;
}

.preset-result-btn:last-child {
    border-bottom: none !important;
}

.preset-result-btn:hover {
    background: #f0f7ff !important;
}

.preset-result-icon {
    font-size: 1rem;
    width: 1.5em;
    text-align: center;
    flex-shrink: 0;
}

.preset-result-name {
    font-weight: 500;
    flex: 1;
}

.preset-gts-winter {
    background: #e3f2fd;
    color: #1565c0;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 0.75rem;
}

.preset-no-results {
    padding: 12px;
    text-align: center;
    color: #999;
    font-size: 0.85rem;
}

.preset-milestones {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
    margin-bottom: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #ddd;
}

.preset-milestone {
    background: #fff3e0 !important;
    border-color: #e67e22 !important;
    color: #c0600a !important;
    font-weight: 600 !important;
}

.preset-milestone:hover {
    background: #e67e22 !important;
    border-color: #d35400 !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(230, 126, 34, 0.3);
}

.preset-milestone .preset-gts {
    color: #e67e22 !important;
}

.preset-milestone:hover .preset-gts {
    color: white !important;
}

.preset-section-label {
    width: 100%;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    font-weight: 600;
    margin-bottom: 0.1rem;
}

.preset-btn {
    background: white;
    border: 1px solid #ddd;
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.preset-btn:hover {
    background: #f0f7f4;
    border-color: #27ae60;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.2);
}

.preset-btn .preset-gts {
    font-weight: 700;
    color: #27ae60;
    font-size: 0.85rem;
    margin-left: 0.25rem;
}

/* Threshold Input with Unit */
.threshold-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

#alert-threshold {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-right: 3rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: border-color 0.2s;
}

#alert-threshold:focus {
    outline: none;
    border-color: #27ae60;
}

.threshold-unit {
    position: absolute;
    right: 1rem;
    color: #888;
    font-weight: 600;
}

/* Label Input */
#alert-label {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: border-color 0.2s;
}

#alert-label:focus {
    outline: none;
    border-color: #27ae60;
}

/* Alert Form Actions */
#alert-form .form-actions {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

#alert-form .btn-primary {
    background: #27ae60;
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
}

#alert-form .btn-primary:hover {
    background: #2ecc71;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

/* Checkbox styling */
#alert-enabled-group {
    background: #f8f9fa;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-top: 0.5rem;
}

/* Responsive */
@media (max-width: 900px) {
    .locations-content {
        grid-template-columns: 1fr;
    }

    .locations-map-container {
        position: relative;
        top: 0;
        height: 400px;
        order: -1;
    }
}

@media (max-width: 480px) {
    .locations-main {
        padding: 1rem;
    }

    .locations-header {
        padding: 1.25rem 1rem;
    }

    .locations-header h2 {
        font-size: 1.5rem;
    }

    .locations-header .btn-primary {
        width: 100%;
    }
}

/* Alert History Modal */
#history-modal .modal-content {
    max-width: 550px;
}

.history-modal-header {
    background: linear-gradient(135deg, #8e44ad 0%, #9b59b6 100%);
    color: white;
    border-radius: 8px 8px 0 0;
}

.history-modal-header h3 {
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.history-modal-header h3::before {
    content: '\1F4C5';
}

.history-modal-header .modal-close {
    color: white;
    opacity: 0.8;
}

.history-modal-header .modal-close:hover {
    opacity: 1;
}

.history-modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.history-loading {
    text-align: center;
    color: #888;
    padding: 2rem;
}

.history-empty {
    text-align: center;
    color: #888;
    padding: 2rem;
    font-style: italic;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa, #fff);
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.2s;
}

.history-item:hover {
    border-color: #9b59b6;
    box-shadow: 0 2px 8px rgba(155, 89, 182, 0.1);
}

.history-item-info {
    flex: 1;
}

.history-item-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.history-item-location {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.history-item-date {
    font-size: 0.8rem;
    color: #888;
}

.history-item-values {
    text-align: right;
}

.history-item-gts {
    font-size: 1.1rem;
    font-weight: 700;
    color: #27ae60;
}

.history-item-threshold {
    font-size: 0.8rem;
    color: #e67e22;
    margin-top: 0.25rem;
}

.history-item-forecast {
    font-size: 0.75rem;
    color: #888;
    margin-top: 0.25rem;
}

/* History Button in Alert Item */
.history-alert-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: #9b59b6;
    font-size: 0.85rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.history-alert-btn:hover {
    opacity: 1;
}
