/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
    max-width: 100vw;
}

/* Navbar */
.navbar {
    position: relative;
    background-color: #2563eb;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-brand a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-icon-only {
    display: none;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.nav-link:hover {
    background-color: rgba(255,255,255,0.1);
}

.nav-link.active {
    background-color: rgba(255,255,255,0.15);
}

.nav-icon {
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
}

.nav-icon svg {
    display: block;
}

.desktop-only {
    display: inline-flex;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
    font-family: inherit;
}

.btn-primary {
    background-color: #2563eb;
    color: white;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background-color: #4b5563;
}

.btn-danger {
    background-color: #dc2626;
    color: white;
}

.btn-danger:hover {
    background-color: #b91c1c;
}

.btn-warning {
    background-color: #f59e0b;
    color: white;
}

.btn-warning:hover {
    background-color: #d97706;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
}

.edit-spot-btn,
.delete-spot-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
    background: transparent;
    border: 2px solid #6b7280;
    margin-right: 0.5rem;
}

.edit-spot-btn:hover,
.delete-spot-btn:hover {
    background-color: #f3f4f6;
}

/* Auth Pages */
.auth-container {
    max-width: 400px;
    margin: 4rem auto;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.auth-container h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #1f2937;
}

.auth-form .form-group {
    margin-bottom: 1rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.auth-form input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
}

.auth-form input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.auth-form .btn {
    width: 100%;
    margin-top: 1rem;
}

.error-message {
    background-color: #fef2f2;
    color: #dc2626;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    border: 1px solid #fecaca;
}

/* Home Page */
.home-container .page-header {
    text-align: center;
    margin-bottom: 1rem;
}

.home-container .page-header h1 {
    margin: 0 0 1rem 0;
    color: #1f2937;
}

.home-container h1 {
    margin-bottom: 1rem;
    color: #1f2937;
}

.home-container p {
    color: #6b7280;
}

/* Admin Pages */
.admin-container {
    max-width: 1000px;
    margin: 0 auto;
}

.admin-container h1 {
    margin-bottom: 1.5rem;
    color: #1f2937;
}

.admin-section {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.admin-section h2 {
    margin-bottom: 1rem;
    color: #374151;
    font-size: 1.25rem;
}

.settings-row {
    margin-bottom: 1.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
}

.checkbox-label input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
}

.form-actions {
    margin-top: 1.5rem;
}

/* Admin Tabs */
.admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    background: none;
    color: #6b7280;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: #374151;
}

.tab-btn.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

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

@media (min-width: 769px) {
    .section-header {
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 1rem;
    }
}

.section-header h2,
.section-header h3 {
    margin: 0;
}

.spotted-header {
    align-items: center;
}

.search-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.search-header h3 {
    font-size: 1.25rem;
    margin: 0 !important;
    color: #374151;
}

.search-header .excursion-tag-badge {
}

@media (max-width: 600px) {
    .search-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .search-header h3 {
        white-space: nowrap;
        margin: 0;
    }

    .search-header .tags-row {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        width: 100%;
    }

    .search-header .excursion-tag-badge {
        font-size: 0.875rem;
        padding: 0.2rem 0.5rem;
        white-space: nowrap;
    }
}

/* User Form */
.user-form {
    max-width: 600px;
}

.user-form .form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.user-form .form-group {
    flex: 1;
}

.user-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.user-form input,
.user-form select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
}

.user-form input:focus,
.user-form select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Users Table */
.users-list {
    margin-top: 1rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

.admin-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.admin-table .col-name {
    max-width: 200px;
    white-space: normal;
    word-wrap: break-word;
}

.admin-table tr:hover {
    background: #f9fafb;
}

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

#imageModal {
    z-index: 2000;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 450px;
    width: 90%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.modal-content h3 {
    margin-bottom: 1.5rem;
    color: #1f2937;
}

.modal-content .form-group {
    margin-bottom: 1rem;
}

.modal-content label {
    display: block;
    margin-bottom: 0;
    font-weight: 500;
    color: #374151;
}

.modal-content input,
.modal-content select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
}

.modal-content input:focus,
.modal-content select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.warning-text {
    color: #dc2626;
    font-weight: 500;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding-top: 1rem;
    color: #6b7280;
}

/* Create list section */
.create-list-section {
    margin-bottom: 2rem;
}

/* Lists Grid */
.lists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.list-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.list-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

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

.list-card-header h3 {
    margin: 0;
}

.list-card-header h3 a {
    color: #1f2937;
    text-decoration: none;
}

.list-card-header h3 a:hover {
    color: #2563eb;
}

.list-date {
    color: #6b7280;
    font-size: 0.875rem;
}

.list-card-body {
    padding: 1rem 1.5rem;
}

.list-items-count {
    color: #2563eb;
    font-weight: 500;
    margin-top: 0.5rem;
}

.list-card-actions {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 1.0rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.list-card-actions .btn {
    line-height: 1;
    box-sizing: border-box;
    height: 44px;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    min-width: 80px;
}

@media (max-width: 380px) {
    .list-card-actions {
        padding: 0.75rem;
        /* gap: 0.25rem; */
    }

    .list-card-actions .btn {
        padding: 0.4rem 0.5rem;
        font-size: 0.80rem;
        min-width: 80px;
        height: 36px;
    }
}

.delete-form {
    display: inline;
}

/* List Page */
.list-container {
    max-width: 800px;
    margin: 0 auto;
}

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

.list-header h1 {
    color: #1f2937;
}

.clear-section {
    margin-bottom: 1.5rem;
}

/* Shopping List Items */
.shopping-list-items {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.shopping-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.shopping-list-header h3 {
    margin: 0;
    color: #374151;
}

.product-search-inline {
    margin-top: 1rem;
}

.product-search-inline .search-input {
    width: 100%;
}

#itemsList {
    min-height: 50px;
}

.list-item {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    background: #fafafa;
    transition: background-color 0.1s;
}

.list-item:hover {
    background: #f5f5f5;
}

.item-name {
    flex: 1;
    min-width: 0;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 0.75rem;
}

.item-name:hover {
    color: #2563eb;
}

.list-item.checked .item-name {
    text-decoration: line-through;
    color: #9ca3af;
}

.list-item.checked {
    background: #f3f4f6;
    opacity: 0.8;
}

/* Quantity controls */
.item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s;
}

.qty-btn-minus {
    background-color: #dc2626;
}

.qty-btn-minus:hover {
    background-color: #b91c1c;
}

.qty-btn-plus {
    background-color: #16a34a;
}

.qty-btn-plus:hover {
    background-color: #15803d;
}

.qty-value {
    min-width: 24px;
    text-align: center;
    font-weight: 600;
    color: #374151;
}

.delete-item-btn {
    flex-shrink: 0;
    white-space: nowrap;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s;
    background-color: #dc2626;
    padding: 0;
}

.delete-item-btn:hover {
    background-color: #b91c1c;
}

.delete-item-btn svg {
    width: 16px;
    height: 16px;
}

/* Search input */
.search-container {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
}

.search-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 0;
        padding: 0.75rem 1rem;
    }
    
    .nav-brand {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
    }
    
    .nav-brand a {
        font-size: 1.25rem;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        margin-top: 0.5rem;
    }
    
    .nav-icon-only {
        display: flex;
        gap: 0.5rem;
        position: absolute;
        right: 0.75rem;
        top: 0.75rem;
    }
    
    .desktop-only {
        display: none;
    }
    
    .nav-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.9rem;
    }
    
    .container {
        padding: 1rem;
    }

    .spots-search-group {
        flex: 1;
    }

    .spots-search-input {
        width: 100%;
        min-width: 0;
    }
}

/* List page styles */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.excursion-tag-badge {
    background: #e0e7ff;
    color: #3730a3;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.section-header .excursion-tag-badge {
    white-space: nowrap;
}

.search-header .excursion-tag-badge {
    line-height: 1;
}

.list-tag-line {
    margin-bottom: 0.5rem;
}

.list-tag-label {
    color: #6b7280;
    font-size: 0.875rem;
}

.list-tag-line .excursion-tag-badge {
    background: #e0e7ff;
    color: #3730a3;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.list-tag-line .excursion-tag-badge.generic {
    background: #f3f4f6;
    color: #6b7280;
}

/* Search section */
.search-section {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.search-section h3 {
    margin-bottom: 1rem;
    color: #374151;
}

/* Bird info card */
.bird-info-card {
    margin-top: 1rem;
    border: 2px solid #2563eb;
    border-radius: 12px;
    overflow: hidden;
}

#birdInfoModal .modal-content {
    padding: 0;
    max-width: 400px;
}

#birdInfoModal .bird-info-card {
    margin: 0;
    border: none;
    border-radius: 0;
}

#birdInfoCarouselModal .bird-info-carousel {
    margin-top: 0;
}

.bird-info-carousel {
    margin-top: 1rem;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.bird-info-track {
    display: flex;
    transition: transform 0.1s ease-in-out;
}

.bird-info-card {
    min-width: 100%;
    box-sizing: border-box;
}

.bird-info-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #f9fafb;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d1d5db;
    cursor: pointer;
    transition: background-color 0.2s;
}

.dot.active {
    background: #2563eb;
}

.modal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d1d5db;
    cursor: pointer;
    transition: background-color 0.2s;
}

.modal-dot.active {
    background: #2563eb;
}

.modal-dot:hover {
    background: #6b7280;
}

.dot:hover {
    background: #6b7280;
}

.carousel-images {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    max-height: 250px;
}

.carousel-images img {
    max-width: 120px;
    max-height: 120px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
}

.carousel-images img:hover {
    transform: scale(1.05);
    border-color: #2563eb;
}

.image-modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.image-modal-content img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}

.image-modal-actions {
    padding-top: 0.5rem;
}

.carousel-audio {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
    max-height: 250px;
}

.carousel-audio audio {
    width: 100%;
    height: 40px;
}

.bird-info-header {
    background: #2563eb;
    color: white;
    padding: 1rem;
}

.bird-info-header h4 {
    margin: 0;
    font-size: 1.25rem;
}

.bird-info-details {
    padding: 1rem;
}

.bird-info-details p {
    margin: 0.5rem 0;
}

.bird-info-details strong {
    color: #6b7280;
}

.bird-info-actions {
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

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

.dropdown-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.1s;
}

.dropdown-item:hover {
    background-color: #f3f4f6;
}

.dropdown-item.disabled {
    color: #9ca3af;
    cursor: default;
}

.dropdown-item.selected {
    background-color: #dbeafe;
}

.english-name {
    color: #6b7280;
    font-size: 0.875rem;
}

/* Spotted list section */
.spotted-list-section {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.spotted-list-section h3 {
    margin: 0;
    color: #374151;
}

.spotted-table-container {
    overflow-x: hidden;
}

.spotted-table {
    width: 100%;
    border-collapse: collapse;
}

.spotted-table th,
.spotted-table td {
    padding: 0.75rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.spotted-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.spotted-table tr:hover {
    background: #f9fafb;
}

.bird-name-cell {
    font-weight: 500;
}

.amount-cell {
    text-align: center;
    /* font-weight: 600; */
    /* font-size: 1.125rem; */
}

.actions-cell {
    white-space: nowrap;
}

.clickable-row {
    cursor: pointer;
}

.clickable-row:hover {
    background: #f0f0f0;
}

@media (max-width: 500px) {
    .spotted-table {
        font-size: 0.875rem;
    }

    .spotted-table th,
    .spotted-table td {
        padding: 0.5rem;
    }

    .edit-spot-btn,
    .delete-spot-btn {
        width: 28px;
        height: 28px;
        padding: 0;
        font-size: 0.75rem;
    }
}

/* Modal large */
.modal-large {
    max-width: 600px;
}

.modal-subtitle {
    color: #6b7280;
    margin-bottom: 1rem;
}

/* Spots list in modal */
.spots-search-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.spots-search-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    flex-wrap: wrap;
    width: 100%;
}

.modal-content .spots-search-group {
    display: flex;
    flex-direction: column;
    background: #f3f4f6;
    border-radius: 6px;
    padding: 0.5rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.spots-search-label {
    font-size: 0.875rem;
    color: #6b7280;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.spots-search-input {
    padding: 0.5rem;
    border: none;
    border-radius: 4px;
    font-size: 0.875rem;
    min-width: 120px;
    background: white;
    box-sizing: border-box;
}

.spots-search-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px #2563eb;
}



.spots-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    padding-bottom: 0.5rem;
    margin-bottom: 0;
    border-bottom: 1px solid #e5e7eb;
}

.spots-list {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 0;
    margin-bottom: 0.5rem;
    padding-right: 0.25rem;
}

.spots-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.spots-pagination button {
    padding: 0;
    border: 2px solid #6b7280;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 16px;
    color: #374151;
    width: 32px;
    height: 32px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.spots-pagination button:hover:not(:disabled) {
    background: #f3f4f6;
}

.spots-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.spots-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 0;
    padding-right: 0.25rem;
}

.spots-list .spot-item:last-child {
    border-bottom: none;
}

.spots-summary {
    font-size: 0.875rem;
    color: #6b7280;
    padding: 0.25rem 0;
    margin-bottom: 0.5rem;
    border-top: 1px solid #e5e7eb;
}

.spots-summary {
    font-size: 0.875rem;
    color: #6b7280;
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
    border-top: 1px solid #e5e7eb;
}

.spot-item {
    box-sizing: border-box;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    height: 36px;
    padding: 0 0.5rem;
}

.spot-item .checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

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

.spot-item .checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.new-spot-badge {
    background: #16a34a;
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
}

.spot-item span {
    line-height: 1;
    vertical-align: middle;
}

.spot-item input[type="checkbox"] {
    vertical-align: middle;
    margin: 0;
}

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

.modal-header-row h3 {
    margin: 0 0 1rem 0;
    flex: 1;
}

.modal-header-row h3:last-child {
    margin-bottom: 0;
}

.modal-header-buttons {
    display: flex;
    gap: 0.5rem;
}

.modal-footer-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

@media (max-width: 424px) {
    .modal-header-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .modal-header-row h3 {
        align-self: center;
    }
    
    .modal-header-row .btn,
    .modal-header-buttons {
        width: 100%;
    }
    
    .modal-header-buttons .btn {
        width: 100%;
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    

    .modal-content.modal-large {
        width: 100%;
        max-width: 100%;
        border-radius: 0;
    }

    .modal-large {
        width: 100%;
        max-width: 100%;
    }

    .modal-content {
        width: 100%;
        max-width: 100%;
        padding: 1rem;
    }

    .spots-search-row {
        flex-direction: column;
    }

    .spots-search-group {
        width: 100%;
    }
    
    #editSpotsModal .modal-footer-buttons {
        flex-direction: row;
        gap: 0.5rem;
    }
    
    #editSpotsModal .modal-footer-buttons .btn {
        flex: 1;
        padding: 0.75rem 0.5rem;
        font-size: 1rem;
    }
}

/* Reports page */
.reports-container {
    max-width: 800px;
    margin: 0 auto;
}

.reports-container h1 {
    margin-bottom: 1.5rem;
    color: #1f2937;
}

.report-section {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.report-section h2 {
    margin-bottom: 0.5rem;
    color: #374151;
}

.export-controls {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.export-list-group {
    width: 100%;
}

.export-list-group select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
}

.export-buttons {
    display: flex;
    gap: 0.5rem;
    padding-top: 1rem;
}

@media (min-width: 769px) {
    .export-buttons {
        padding-top: 0;
    }
    
    .export-controls {
        flex-direction: row;
        align-items: center;
    }
    
    .export-list-group {
        width: auto;
    }
    
    .export-list-group select {
        width: auto;
        min-width: 200px;
    }
}

.filter-section {
    margin: 1.5rem 0;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.filter-section h4 {
    margin-bottom: 1rem;
    color: #374151;
}

.date-filter-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.date-filter-stack .form-group {
    flex: 1;
}

.date-filter-stack input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
}

.date-filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.filter-checkbox-row .checkbox-label {
    margin-bottom: 0;
}

.help-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid #6b7280;
    background: transparent;
    color: #6b7280;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 0.875rem;
}

.help-btn:hover {
    background: #f3f4f6;
    border-color: #374151;
    color: #374151;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stat-card {
    background: #f3f4f6;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: #2563eb;
}

.stat-label {
    display: block;
    color: #6b7280;
    font-size: 0.875rem;
}

.most-spotted-content {
    display: block;
    min-height: 2.5rem;
    /* line-height: 2.5rem; */
    text-align: center;
}

.most-spotted-name {
    font-weight: 600;
    /* font-size: 1.125rem; */
    color: #1f2937;
}

.most-spotted-count {
    color: #2563eb;
    font-weight: 600;
}

.stat-card-most-spotted .stat-label {
    margin-top: auto;
    padding-top: 0.5rem;
}

/* Excursions page */
.excursions-container {
    max-width: 800px;
    margin: 0 auto;
}

.excursions-container h1 {
    margin-bottom: 1.5rem;
    color: #1f2937;
}

.inline-form {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.inline-form input {
    flex: 1;
    min-width: 150px;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
}

.inline-form .btn {
    white-space: nowrap;
}

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

.tag-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
}

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

.tag-count {
    color: #6b7280;
    font-size: 0.875rem;
}

.back-link {
    margin-top: 1rem;
}

/* Bird form */
.bird-form {
    max-width: 700px;
}

.bird-form .form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.bird-form .form-group {
    flex: 1;
    min-width: 150px;
}

@media (max-width: 360px) {
    .user-form .form-row,
    .bird-form .form-row {
        flex-direction: column;
    }

    .user-form .form-group,
    .bird-form .form-group {
        width: 100%;
    }
}

.bird-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.bird-form input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
}

.bird-form input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-actions-inline {
    display: flex;
    align-items: flex-end;
}

.test-data-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.test-data-buttons > button,
.test-data-buttons > label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
}

.birds-list {
    margin-top: 1rem;
}

.birds-search {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.birds-search .search-input {
    flex: 1;
    max-width: 300px;
}

.users-search {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.users-search .search-input {
    flex: 1;
    max-width: 300px;
}

.filter-checkbox-stack {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1rem 0;
}

.filter-checkbox-stack .checkbox-label {
    margin-bottom: 0;
}

/* Upload sections in modals */
.upload-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.upload-section h4 {
    margin-bottom: 0.75rem;
    color: #374151;
    font-size: 1rem;
}

.upload-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.upload-buttons label {
    color: white;
}

.images-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    max-height: 150px;
    overflow-y: auto;
}

.image-item {
    position: relative;
    width: 80px;
    height: 80px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.image-item.selected {
    border-color: #2563eb;
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-item .delete-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.image-item:hover .delete-btn {
    opacity: 1;
}

.audio-preview {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    max-height: 150px;
    overflow-y: auto;
}

.audio-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: #f3f4f6;
    border-radius: 6px;
}

.audio-item audio {
    flex: 1;
    height: 32px;
}

.audio-item .delete-btn {
    width: 24px;
    height: 24px;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.audio-item .delete-btn:hover {
    background: #b91c1c;
}

.modal-large {
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-sizing: border-box;
    width: 100%;
}

.modal-content.modal-large {
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    box-sizing: border-box;
}
