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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    display: flex;
    height: 100vh;
    overflow: hidden;
    color: #333;
}

/* Sidebar */
#sidebar {
    width: 360px;
    min-width: 360px;
    height: 100vh;
    overflow-y: auto;
    background: #fafafa;
    border-right: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    z-index: 500;
}

#sidebar-header {
    padding: 14px 16px;
    background: #1b2a4a;
    color: #fff;
    display: flex;
    align-items: stretch;
    gap: 14px;
}

#header-logo {
    width: auto;
    height: 80px;
    object-fit: contain;
    flex-shrink: 0;
    align-self: center;
}

#header-right {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#sidebar-header h1 {
    font-size: 1.3rem;
    font-weight: 700;
}

#auth-area {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
}

#auth-user {
    opacity: 0.85;
}

#auth-btn {
    padding: 4px 10px;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 4px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: 0.75rem;
}

#auth-btn:hover {
    background: rgba(255,255,255,0.15);
}

#user-filter {
    padding: 6px 16px;
    border-bottom: 1px solid #e0e0e0;
}

#user-filter-select {
    width: 100%;
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.8rem;
}

#auth-form {
    padding: 16px 20px 20px;
}

#auth-form label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #555;
    margin-top: 12px;
    margin-bottom: 4px;
}

#auth-form input[type="text"],
#auth-form input[type="email"],
#auth-form input[type="password"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
}

#auth-toggle-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 0.8rem;
}

#auth-submit-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    background: #3498db;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
}

.entry-card-user {
    font-size: 0.7rem;
    color: #aaa;
    margin-top: 2px;
    margin-left: 28px;
    font-style: italic;
}

#sidebar-subtitle {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-top: 4px;
}

#global-photo-btn {
    margin-top: 6px;
    padding: 6px 14px;
    background: #8e44ad;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    width: 100%;
}

#global-photo-btn:hover {
    background: #7d3c98;
}

#location-prompt-save {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    background: #3498db;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
}

#location-prompt-save:hover {
    background: #2980b9;
}

#location-prompt-skip {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
}

#country-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#country-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #34495e;
    color: #fff;
}

#country-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

#back-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}

#back-btn:hover {
    background: rgba(255,255,255,0.15);
}

/* Filters */
#filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 16px;
    border-bottom: 1px solid #e0e0e0;
}

.filter-btn {
    padding: 4px 10px;
    border: 1px solid #ccc;
    border-radius: 16px;
    background: #fff;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s;
}

.filter-btn.active {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}

.filter-btn:hover {
    opacity: 0.85;
}

/* Entries list */
#entries-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.entry-card {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.15s;
}

.entry-card:hover {
    background: #f0f0f0;
}

.entry-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.entry-category-icon {
    font-size: 1.1rem;
}

.entry-card-title {
    font-weight: 600;
    font-size: 0.9rem;
    flex: 1;
}

.entry-card-actions {
    display: flex;
    gap: 4px;
}

.entry-card-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 2px 6px;
    border-radius: 3px;
    opacity: 0.5;
}

.entry-card-actions button:hover {
    opacity: 1;
    background: #e0e0e0;
}

.entry-card-meta {
    font-size: 0.78rem;
    color: #888;
    margin-top: 2px;
    margin-left: 28px;
}

.entry-card-body {
    font-size: 0.82rem;
    color: #666;
    margin-top: 4px;
    margin-left: 28px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.entry-card-rating {
    color: #f39c12;
    margin-left: 28px;
    font-size: 0.8rem;
}

#add-entry-btn {
    margin: 12px 16px;
    padding: 10px;
    background: #27ae60;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: 600;
}

#add-entry-btn:hover {
    background: #219a52;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 0.9rem;
}

/* Map */
#map {
    flex: 1;
    height: 100vh;
}

/* Sidebar toggle (mobile) */
#sidebar-toggle {
    display: none;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1000;
    background: #1b2a4a;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 1.2rem;
    cursor: pointer;
}

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

.modal-content {
    background: #fff;
    border-radius: 10px;
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

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

.modal-header h3 {
    font-size: 1.1rem;
}

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

#entry-form {
    padding: 16px 20px 20px;
}

#entry-form label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #555;
    margin-top: 12px;
    margin-bottom: 4px;
}

#entry-form select,
#entry-form input[type="text"],
#entry-form input[type="number"],
#entry-form textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
}

#entry-form textarea {
    resize: vertical;
}

.address-row {
    display: flex;
    gap: 8px;
}

.address-row input {
    flex: 1;
}

#geocode-btn {
    padding: 6px 12px;
    background: #8e44ad;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

#geocode-btn:hover {
    background: #7d3c98;
}

#geocode-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.coord-row {
    display: flex;
    gap: 8px;
}

.coord-row input {
    flex: 1;
}

/* Star rating */
#star-rating {
    display: flex;
    gap: 4px;
}

.star {
    font-size: 1.4rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.15s;
}

.star.active {
    color: #f39c12;
}

.form-actions {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    justify-content: flex-end;
}

#cancel-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
}

#save-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    background: #3498db;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
}

#save-btn:hover {
    background: #2980b9;
}

/* Tabs */
#sidebar-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
}

.tab-btn {
    flex: 1;
    padding: 8px;
    background: #f5f5f5;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    color: #888;
    transition: all 0.15s;
}

.tab-btn.active {
    background: #fff;
    color: #2c3e50;
    border-bottom-color: #3498db;
}

.tab-content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Map popup photo */
.popup-photo {
    max-width: 200px;
    border-radius: 8px;
    display: block;
    box-shadow: 0 0 0 3px #fff;
}

/* Photo gallery */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 12px;
}

.photo-thumb {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1;
    border: 3px solid #fff;
}

.photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 5px;
}

.photo-entry-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    padding: 2px 6px;
    background: rgba(52, 152, 219, 0.85);
    color: #fff;
    font-size: 0.65rem;
    border-radius: 3px;
    max-width: 80%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.photo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4px 6px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 0.7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.photo-delete-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    cursor: pointer;
    font-size: 14px;
    display: none;
    align-items: center;
    justify-content: center;
}

.photo-thumb:hover .photo-delete-btn {
    display: flex;
}

.photo-upload-area {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid #eee;
}

.photo-upload-area input[type="file"] {
    font-size: 0.8rem;
}

#photo-entry-select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: inherit;
}

.photo-upload-area input[type="text"] {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.85rem;
}

#photo-upload-btn {
    padding: 8px;
    background: #8e44ad;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
}

#photo-upload-btn:hover {
    background: #7d3c98;
}

/* Lightbox */
#lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

#lightbox-inner {
    position: relative;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    width: 720px;
    max-width: 92vw;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    cursor: default;
    box-shadow: 0 8px 40px rgba(0,0,0,0.4);
}

#lightbox-inner img {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    background: #000;
    display: block;
}

#lightbox-toolbar {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 6px;
    z-index: 1;
}

#lightbox-toolbar button {
    background: rgba(0,0,0,0.5);
    border: none;
    color: #fff;
    font-size: 1.2rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.15s;
}

#lightbox-toolbar button:hover {
    background: rgba(0,0,0,0.7);
}

#lightbox-close {
    font-size: 1.5rem;
}

/* Lightbox edit form */
#lightbox-edit-form {
    padding: 12px 20px;
    border-bottom: 1px solid #eee;
    background: #fafafa;
}

#lightbox-edit-form label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #555;
    display: block;
    margin-bottom: 3px;
    margin-top: 8px;
}

#lightbox-edit-form label:first-child {
    margin-top: 0;
}

#lightbox-edit-form input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: inherit;
    box-sizing: border-box;
}

.lightbox-coord-row {
    display: flex;
    gap: 8px;
}

.lightbox-coord-row input {
    flex: 1;
}

.lightbox-edit-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 10px;
}

.lightbox-edit-actions button {
    padding: 6px 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
}

#lightbox-edit-cancel {
    background: #ecf0f1;
    color: #333;
}

#lightbox-edit-save {
    background: #3498db;
    color: #fff;
}

/* Contacts */
.contact-card {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
}

.contact-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-card-name {
    font-weight: 600;
    font-size: 0.9rem;
    flex: 1;
}

.contact-card-business {
    font-size: 0.8rem;
    color: #888;
    margin-left: 28px;
}

.contact-card-details {
    font-size: 0.8rem;
    color: #555;
    margin-top: 4px;
    margin-left: 28px;
}

.contact-card-details a {
    color: #3498db;
    text-decoration: none;
}

.contact-card-details a:hover {
    text-decoration: underline;
}

.contact-card-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 2px 6px;
    border-radius: 3px;
    opacity: 0.5;
}

.contact-card-actions button:hover {
    opacity: 1;
    background: #e0e0e0;
}

#add-contact-btn {
    margin: 12px 16px;
    padding: 10px;
    background: #2980b9;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: 600;
}

#add-contact-btn:hover {
    background: #2471a3;
}

/* Form styles for both modals */
#contact-form {
    padding: 16px 20px 20px;
}

#contact-form label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #555;
    margin-top: 12px;
    margin-bottom: 4px;
}

#contact-form input[type="text"],
#contact-form textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
}

#contact-form textarea {
    resize: vertical;
}

#contact-cancel-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
}

#contact-save-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    background: #3498db;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
}

#contact-save-btn:hover {
    background: #2980b9;
}

/* Header actions (settings + auth) */
#header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

#settings-btn {
    background: none;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    font-size: 1rem;
    padding: 3px 8px;
}

#settings-btn:hover {
    background: rgba(255,255,255,0.15);
}

/* Settings modal */
.settings-body {
    padding: 16px 20px 20px;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.setting-row:last-child {
    border-bottom: none;
}

.setting-label {
    font-size: 0.9rem;
    font-weight: 600;
}

.setting-options {
    display: flex;
    gap: 4px;
}

.map-style-btn {
    padding: 4px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 0.8rem;
}

.map-style-btn.active {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    display: inline-block;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #ccc;
    border-radius: 24px;
    transition: 0.2s;
}

.toggle-slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.2s;
}

.toggle-switch input:checked + .toggle-slider {
    background: #3498db;
}

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

/* Main page content */
#main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#main-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 16px;
    border-bottom: 1px solid #e0e0e0;
}

#main-location-filter {
    display: flex;
    gap: 6px;
    padding: 8px 16px;
    border-bottom: 1px solid #e0e0e0;
}

#main-location-filter select {
    flex: 1;
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.8rem;
}

#top-entries-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

#view-more-btn {
    margin: 8px 16px 12px;
    padding: 8px;
    background: #ecf0f1;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
}

#view-more-btn:hover {
    background: #dfe6e9;
}

/* Main page photo grid */
.main-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 6px;
    padding: 8px 16px 12px;
}

.main-photo-thumb {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.15s;
    border: 3px solid #fff;
}

.main-photo-thumb:hover {
    transform: scale(1.05);
}

.main-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 5px;
}

/* Entry card country badge */
.entry-card-country {
    font-size: 0.7rem;
    color: #3498db;
    margin-left: 28px;
    margin-top: 1px;
}

/* Inline star rating */
.inline-rate {
    margin-left: 28px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 2px;
}

.rate-star {
    font-size: 1rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.15s;
}

.rate-star:hover,
.rate-star.active {
    color: #f39c12;
}

.rate-label {
    font-size: 0.7rem;
    color: #aaa;
    margin-left: 4px;
}

/* Lightbox comments */
#lightbox-comments {
    background: #fff;
    max-height: 240px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

#comments-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px 20px;
    min-height: 40px;
    max-height: 160px;
}

.comment-item {
    font-size: 0.9rem;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
}

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

.empty-comments {
    font-size: 0.85rem;
    color: #999;
    padding: 12px 0;
    text-align: center;
}

#comment-form {
    display: flex;
    gap: 8px;
    padding: 10px 20px 14px;
    border-top: 1px solid #eee;
}

#comment-input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: inherit;
}

#comment-submit {
    padding: 6px 12px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Responsive - iPad and mobile */
@media (max-width: 768px) {
    #sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: 85vw;
        max-width: 360px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 2px 0 10px rgba(0,0,0,0.2);
    }

    #sidebar.open {
        transform: translateX(0);
    }

    #sidebar-toggle {
        display: block;
    }

    #map {
        width: 100vw;
    }
}

/* Auth gate — hide content before login */
.auth-locked #main-content,
.auth-locked #country-info,
.auth-locked #global-photo-btn,
.auth-locked #settings-btn {
    display: none !important;
}

/* Entry card photo thumbnail */
.entry-card-photo {
    margin: 6px 0 4px 28px;
    position: relative;
    display: inline-block;
}

.entry-card-photo img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
}

.entry-photo-count {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 0.65rem;
    padding: 1px 5px;
    border-radius: 3px;
}

.entry-add-photo-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 2px 6px;
    border-radius: 3px;
    opacity: 0.5;
}

.entry-add-photo-btn:hover {
    opacity: 1;
    background: #e0e0e0;
}

/* Change password button in settings */
.change-pw-btn {
    padding: 4px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 0.8rem;
}

.change-pw-btn:hover {
    background: #f0f0f0;
}

/* ===== Forgot Password Modal ===== */
#forgot-step1,
#forgot-step2 {
    padding: 16px 20px 20px;
}

#forgot-link {
    font-size: 0.8rem;
    color: #3498db;
    text-decoration: none;
}

#forgot-link:hover {
    text-decoration: underline;
}

/* ===== Dark Mode ===== */
body.dark {
    background: #1a1a2e;
    color: #e0e0e0;
}

body.dark #sidebar {
    background: #16213e;
    border-right-color: #2a2a4a;
}

body.dark #sidebar-header {
    background: #0d1f3c;
}

body.dark #country-header {
    background: #1a1a4a;
}

body.dark #filters,
body.dark #main-filters {
    border-bottom-color: #2a2a4a;
}

body.dark .filter-btn {
    background: #1a1a2e;
    border-color: #3a3a5a;
    color: #ccc;
}

body.dark .filter-btn.active {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}

body.dark .entry-card {
    border-bottom-color: #2a2a4a;
}

body.dark .entry-card:hover {
    background: #1e2d4a;
}

body.dark .entry-card-title {
    color: #e0e0e0;
}

body.dark .entry-card-body {
    color: #aaa;
}

body.dark .entry-card-meta {
    color: #888;
}

body.dark .modal-content {
    background: #16213e;
    color: #e0e0e0;
}

body.dark .modal-header {
    border-bottom-color: #2a2a4a;
}

body.dark .setting-row {
    border-bottom-color: #2a2a4a;
}

body.dark .map-style-btn {
    background: #1a1a2e;
    border-color: #3a3a5a;
    color: #ccc;
}

body.dark .map-style-btn.active {
    background: #3498db;
    color: #fff;
}

body.dark #main-location-filter {
    border-bottom-color: #2a2a4a;
}

body.dark #main-location-filter select {
    background: #1a1a2e;
    border-color: #3a3a5a;
    color: #e0e0e0;
}

body.dark #view-more-btn {
    background: #1a1a2e;
    border-color: #3a3a5a;
    color: #ccc;
}

body.dark #tab-entries,
body.dark #tab-photos,
body.dark #tab-contacts {
    background: #16213e;
}

body.dark .tab-btn {
    background: #1a1a2e;
    color: #888;
}

body.dark .tab-btn.active {
    background: #16213e;
    color: #e0e0e0;
}

body.dark #sidebar-tabs {
    border-bottom-color: #2a2a4a;
}

body.dark #user-filter {
    border-bottom-color: #2a2a4a;
}

body.dark #user-filter-select {
    background: #1a1a2e;
    border-color: #3a3a5a;
    color: #e0e0e0;
}

body.dark .empty-state {
    color: #666;
}

body.dark input[type="text"],
body.dark input[type="email"],
body.dark input[type="number"],
body.dark input[type="password"],
body.dark textarea,
body.dark select {
    background: #1a1a2e;
    border-color: #3a3a5a;
    color: #e0e0e0;
}

body.dark #forgot-step1 p,
body.dark #forgot-step2 p {
    color: #aaa;
}

body.dark #forgot-back-btn,
body.dark #reset-back-btn {
    background: #1a1a2e;
    border-color: #3a3a5a;
    color: #ccc;
}

body.dark .change-pw-btn,
body.dark #change-pw-cancel,
body.dark #cancel-btn,
body.dark #contact-cancel-btn,
body.dark #location-prompt-skip,
body.dark #auth-toggle-btn {
    background: #1a1a2e;
    border-color: #3a3a5a;
    color: #ccc;
}

body.dark #lightbox-inner {
    background: #1a1a2e;
}

body.dark #lightbox-comments {
    background: #1a1a2e;
}

body.dark .comment-item {
    color: #e0e0e0;
    border-bottom-color: #2a2a4a;
}

body.dark #comment-input {
    background: #1a1a2e;
    border-color: #3a3a5a;
    color: #e0e0e0;
}

body.dark #lightbox-edit-form {
    background: #16213e;
    border-bottom-color: #2a2a4a;
}

body.dark #lightbox-edit-form label {
    color: #aaa;
}

body.dark #lightbox-edit-form input {
    background: #1a1a2e;
    border-color: #3a3a5a;
    color: #e0e0e0;
}

body.dark #lightbox-edit-cancel {
    background: #2a2a4a;
    color: #ccc;
}

body.dark .photo-upload-area {
    border-top-color: #2a2a4a;
}

body.dark .contact-card {
    border-bottom-color: #2a2a4a;
}

body.dark #sidebar-toggle {
    background: #0f3460;
}

body.dark #sidebar-subtitle {
    opacity: 0.6;
}
