/* =====================
   CSLPhotos - Stylesheet
   Canyon Spring Landscaping
   ===================== */

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

html, body {
    overflow-x: hidden;
    max-width: 100%;
}

html {
    background: var(--dark);
}

:root {
    --yellow:       #ccff00;
    --yellow-hover: #b3e600;
    --yellow-light: #f2ffe0;
    --dark:         #1F1F1F;
    --grey-dark:    #3A3A3A;
    --grey-mid:     #6B7280;
    --grey-light:   #F4F4F4;
    --grey-border:  #E0E0E0;
    --white:        #FFFFFF;
    --red:          #DC2626;
    --green:        #16A34A;
    --blue:         #2563EB;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--dark);
    color: var(--dark);
    font-size: 15px;
    line-height: 1.5;
}

/* =====================
   LOGIN PAGE
   ===================== */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark);
}

.login-card {
    background: var(--white);
    border-radius: 12px;
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    border-top: 5px solid var(--yellow);
}

.login-card .logo {
    text-align: center;
    margin-bottom: 8px;
}

.login-card .logo h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.5px;
}

.login-card .logo h1 span {
    color: var(--yellow);
}

.login-card .logo p {
    color: var(--grey-mid);
    font-size: 0.9rem;
    margin-top: 4px;
    margin-bottom: 32px;
}

/* =====================
   NAVBAR
   ===================== */

.navbar {
    background: var(--dark);
    height: 60px;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 3px solid var(--yellow);
}

.navbar .brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.3px;
    text-decoration: none;
}

.brand-icon {
    height: 44px;
    width: auto;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

.brand-text span {
    color: var(--yellow);
}

.navbar .nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    padding: 6px 14px;
    color: #aaa;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
}

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

.nav-link.active {
    color: var(--yellow);
}

.navbar .nav-user {
    font-size: 0.9rem;
    color: #aaa;
}

.navbar .nav-user strong {
    color: var(--white);
}

.btn-logout {
    padding: 6px 14px;
    background: transparent;
    color: #aaa;
    border: 1px solid #555;
    border-radius: 6px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-logout:hover {
    border-color: var(--yellow);
    color: var(--yellow);
}

/* =====================
   MAIN LAYOUT
   ===================== */

.main-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 24px;
    background: var(--grey-light);
    min-height: calc(100vh - 63px);
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
}

/* =====================
   BUTTONS
   ===================== */

.btn-primary {
    padding: 11px 22px;
    background: var(--yellow);
    color: var(--dark);
    border: none;
    border-radius: 7px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary:hover {
    background: var(--yellow-hover);
}

.btn-primary:disabled {
    background: var(--grey-border);
    color: var(--grey-mid);
    cursor: not-allowed;
}

.btn-secondary {
    padding: 9px 18px;
    background: var(--white);
    color: var(--dark);
    border: 2px solid var(--grey-border);
    border-radius: 7px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-secondary:hover {
    border-color: var(--yellow);
    background: var(--yellow-light);
}

.btn-danger {
    padding: 9px 18px;
    background: transparent;
    color: var(--red);
    border: 2px solid var(--red);
    border-radius: 7px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

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

.btn-icon {
    padding: 7px 12px;
    background: transparent;
    color: var(--grey-mid);
    border: 1px solid var(--grey-border);
    border-radius: 6px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    border-color: var(--yellow);
    color: var(--dark);
    background: var(--yellow-light);
}

/* =====================
   FORMS
   ===================== */

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

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--grey-dark);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--grey-border);
    border-radius: 7px;
    font-size: 0.95rem;
    color: var(--dark);
    background: var(--white);
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--yellow);
}

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

.error-msg {
    color: var(--red);
    font-size: 0.85rem;
    text-align: center;
    margin-top: 10px;
    min-height: 20px;
}

/* =====================
   MODAL
   ===================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
    padding: 16px;
}

.modal {
    background: var(--white);
    border-radius: 12px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--grey-border);
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    color: var(--grey-mid);
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.2s;
}

.modal-close:hover { color: var(--dark); }

.modal-body {
    padding: 20px 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--grey-border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* =====================
   SEARCH BAR
   ===================== */

.search-bar {
    position: relative;
    margin-bottom: 20px;
}

.search-bar input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border: 2px solid var(--grey-border);
    border-radius: 8px;
    font-size: 0.95rem;
    background: var(--white);
    transition: border-color 0.2s;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--yellow);
}

.search-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--grey-mid);
    font-size: 1rem;
    pointer-events: none;
}

/* =====================
   TOGGLE SWITCH
   ===================== */

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #ccc;
    border-radius: 24px;
    transition: .3s;
}

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

.toggle-switch input:checked + .toggle-slider {
    background: var(--yellow);
}

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

/* =====================
   EMPTY STATE
   ===================== */

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--grey-mid);
}

.empty-state .icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.empty-state p {
    font-size: 1rem;
}

/* =====================
   PROFILE / TEAM CARDS
   ===================== */

.profile-card {
    background: var(--white);
    border-radius: 10px;
    padding: 20px 24px;
    border: 1px solid var(--grey-border);
    margin-bottom: 12px;
}

.profile-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.profile-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--yellow);
    color: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    flex-shrink: 0;
}

.profile-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-top: 1px solid var(--grey-border);
}

.profile-setting-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark);
}

.profile-setting-desc {
    font-size: 0.8rem;
    color: var(--grey-mid);
    margin-top: 2px;
}

.profile-email-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    border-top: 1px solid var(--grey-border);
    flex-wrap: wrap;
}

.profile-email-row input {
    flex: 1;
    min-width: 160px;
    padding: 8px 12px;
    border: 2px solid var(--grey-border);
    border-radius: 7px;
    font-size: 0.88rem;
    transition: border-color 0.2s;
}

.profile-email-row input:focus {
    outline: none;
    border-color: var(--yellow);
}

/* =====================
   BADGE
   ===================== */

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.badge-admin  { background: #fef9c3; color: #854d0e; }
.badge-staff  { background: #F3F4F6; color: #4B5563; }

/* =====================
   VIEW TOGGLE
   ===================== */

.view-toggle {
    display: flex;
    background: var(--white);
    border: 2px solid var(--grey-border);
    border-radius: 8px;
    overflow: hidden;
}

.view-toggle-btn {
    padding: 8px 18px;
    background: none;
    border: none;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--grey-mid);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.view-toggle-btn.active {
    background: var(--yellow);
    color: var(--dark);
}

.view-toggle-btn:hover:not(.active) {
    color: var(--dark);
    background: var(--grey-light);
}

/* =====================
   NOTE / INFO BOX
   ===================== */

.note {
    background: var(--yellow-light);
    border: 1px solid #d4f092;
    border-radius: 7px;
    padding: 10px 14px;
    font-size: 0.85rem;
    color: var(--grey-dark);
}

/* =====================
   HOME PAGE — LOCATION BANNER
   ===================== */

.home-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 24px 16px 40px;
    background: var(--grey-light);
    min-height: calc(100vh - 63px);
}

.location-banner {
    background: var(--white);
    border-radius: 12px;
    border: 2px solid var(--grey-border);
    padding: 18px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.location-banner.active {
    border-color: var(--yellow);
    background: var(--yellow-light);
}

.location-banner-info {
    flex: 1;
    min-width: 0;
}

.location-banner-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--grey-mid);
    margin-bottom: 3px;
}

.location-banner-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.location-banner-address {
    font-size: 0.82rem;
    color: var(--grey-mid);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =====================
   HOME PAGE — UPLOAD AREA
   ===================== */

.upload-card {
    background: var(--white);
    border-radius: 14px;
    border: 2px dashed var(--grey-border);
    padding: 32px 20px;
    text-align: center;
    margin-bottom: 20px;
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
}

.upload-card:hover,
.upload-card.drag-over {
    border-color: var(--yellow);
    background: var(--yellow-light);
}

.upload-card.has-files {
    border-style: solid;
    border-color: var(--yellow);
    background: var(--yellow-light);
    cursor: default;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 10px;
    line-height: 1;
}

.upload-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 6px;
}

.upload-card p {
    font-size: 0.85rem;
    color: var(--grey-mid);
}

.upload-btn-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 18px;
    flex-wrap: wrap;
}

/* Preview thumbnails */
.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
    margin-top: 16px;
}

.preview-thumb {
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    background: var(--grey-border);
}

.preview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-thumb .thumb-status {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    background: rgba(0,0,0,0.35);
    border-radius: 6px;
}

.preview-thumb .thumb-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: var(--yellow);
    transition: width 0.2s;
    border-radius: 0 0 6px 6px;
}

/* Timestamp toggle row */
.timestamp-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--white);
    border: 1px solid var(--grey-border);
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 20px;
}

.timestamp-row-info .label {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--dark);
}

.timestamp-row-info .desc {
    font-size: 0.8rem;
    color: var(--grey-mid);
    margin-top: 2px;
}

/* Upload submit button */
.btn-upload {
    width: 100%;
    padding: 16px;
    background: var(--yellow);
    color: var(--dark);
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 20px;
}

.btn-upload:hover { background: var(--yellow-hover); }
.btn-upload:disabled {
    background: var(--grey-border);
    color: var(--grey-mid);
    cursor: not-allowed;
}

/* =====================
   RECENT PHOTOS SECTION
   ===================== */

.section-heading {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--grey-mid);
    margin-bottom: 12px;
}

/* =====================
   PHOTO GRID
   ===================== */

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}

.photo-grid.dense {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 6px;
}

.photo-item {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background: var(--grey-border);
    transition: transform 0.15s, box-shadow 0.15s;
}

.photo-item:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

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

.photo-item .photo-meta {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 18px 8px 6px;
    background: linear-gradient(transparent, rgba(0,0,0,0.55));
    font-size: 0.7rem;
    color: rgba(255,255,255,0.85);
    display: none;
}

.photo-item:hover .photo-meta {
    display: block;
}

/* =====================
   LOCATION CARDS (locations.html)
   ===================== */

.location-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.location-card {
    background: var(--white);
    border-radius: 12px;
    border: 1px solid var(--grey-border);
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.1s;
    text-decoration: none;
    display: block;
    color: inherit;
}

.location-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.location-card-thumb {
    height: 160px;
    background: var(--grey-border);
    overflow: hidden;
    position: relative;
}

.location-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.location-card-thumb .no-photo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #ccc;
    background: var(--grey-light);
}

.location-card-body {
    padding: 14px 16px;
}

.location-card-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.location-card-address {
    font-size: 0.82rem;
    color: var(--grey-mid);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 8px;
}

.location-card-stats {
    display: flex;
    gap: 14px;
    font-size: 0.78rem;
    color: var(--grey-mid);
}

.location-card-stats strong {
    color: var(--dark);
}

/* =====================
   PORTFOLIO PAGE
   ===================== */

.portfolio-header {
    background: var(--white);
    border-radius: 12px;
    border: 1px solid var(--grey-border);
    padding: 18px 22px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.portfolio-header-info h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 4px;
}

.portfolio-header-info p {
    font-size: 0.88rem;
    color: var(--grey-mid);
}

.portfolio-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.portfolio-filters select {
    padding: 8px 12px;
    border: 2px solid var(--grey-border);
    border-radius: 7px;
    font-size: 0.9rem;
    background: var(--white);
    color: var(--dark);
    cursor: pointer;
    transition: border-color 0.2s;
}

.portfolio-filters select:focus {
    outline: none;
    border-color: var(--yellow);
}

.photo-count-label {
    font-size: 0.85rem;
    color: var(--grey-mid);
    margin-left: auto;
}

/* =====================
   LIGHTBOX
   ===================== */

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 16px;
}

.lightbox-img-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-height: calc(100vh - 100px);
}

.lightbox img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    object-fit: contain;
}

.lightbox-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0 8px;
}

.lightbox-btn {
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.lightbox-btn:hover { background: rgba(255,255,255,0.28); }

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover { background: rgba(255,255,255,0.28); }

.lightbox-caption {
    color: rgba(255,255,255,0.7);
    font-size: 0.82rem;
    text-align: center;
}

.lightbox-counter {
    color: rgba(255,255,255,0.5);
    font-size: 0.8rem;
}

/* =====================
   LOCATION SEARCH IN MODAL
   ===================== */

.location-search-results {
    border: 2px solid var(--grey-border);
    border-top: none;
    border-radius: 0 0 7px 7px;
    background: var(--white);
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.location-search-results.open {
    display: block;
}

.location-result-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--grey-border);
    transition: background 0.15s;
}

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

.location-result-item:hover {
    background: var(--yellow-light);
}

.location-result-item strong {
    display: block;
    font-size: 0.92rem;
    color: var(--dark);
}

.location-result-item span {
    font-size: 0.78rem;
    color: var(--grey-mid);
}

.location-result-new {
    padding: 10px 14px;
    cursor: pointer;
    color: var(--blue);
    font-size: 0.88rem;
    font-weight: 600;
    background: #EFF6FF;
}

.location-result-new:hover { background: #DBEAFE; }

/* =====================
   ADMIN — LOCATION LIST
   ===================== */

.location-list-item {
    background: var(--white);
    border-radius: 10px;
    border: 1px solid var(--grey-border);
    padding: 14px 18px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.location-list-item-info strong {
    font-size: 0.98rem;
    color: var(--dark);
    display: block;
}

.location-list-item-info span {
    font-size: 0.82rem;
    color: var(--grey-mid);
}

/* =====================
   PHOTO TAG BADGE
   ===================== */

.photo-tag-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.63rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    z-index: 2;
    transition: opacity 0.15s;
    user-select: none;
}

.photo-tag-badge.tag-before  { background: #2563EB; color: #fff; }
.photo-tag-badge.tag-after   { background: #16A34A; color: #fff; }
.photo-tag-badge.tag-none    { background: rgba(0,0,0,0.38); color: rgba(255,255,255,0.65); }

/* share page tag filter tabs */
.tag-filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tag-filter-btn {
    padding: 6px 16px;
    border-radius: 20px;
    border: 2px solid var(--grey-border);
    background: var(--white);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    color: var(--grey-mid);
}

.tag-filter-btn.active         { border-color: var(--dark); color: var(--dark); background: var(--white); }
.tag-filter-btn.active-before  { border-color: #2563EB; color: #2563EB; }
.tag-filter-btn.active-after   { border-color: #16A34A; color: #16A34A; }

/* =====================
   BOTTOM NAV (mobile)
   ===================== */

.bottom-nav {
    display: none;
}

@media (max-width: 600px) {
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--dark);
        border-top: 3px solid var(--yellow);
        z-index: 200;
        padding-bottom: calc(env(safe-area-inset-bottom) + 12px);
    }

    .bottom-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 10px 4px;
        text-decoration: none;
        color: #888;
        font-size: 0.7rem;
        font-weight: 600;
        gap: 3px;
        transition: color 0.2s;
    }

    .bottom-nav-item.active {
        color: var(--yellow);
    }

    .bottom-nav-icon {
        width: 22px;
        height: 22px;
        display: block;
    }

    .bottom-nav-icon svg {
        width: 22px;
        height: 22px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }
}

/* =====================
   MOBILE RESPONSIVE
   ===================== */

@media (max-width: 600px) {
    .navbar {
        padding: 0 16px;
        height: 56px;
    }

    .nav-links { display: none; }

    .main-content {
        padding: 20px 14px;
    }

    .home-content {
        padding: 16px 12px 32px;
    }

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

    .modal {
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        max-height: 85vh;
    }

    .modal-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }

    .location-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-filters {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-header h2 { font-size: 1.2rem; }

    .main-content  { padding-bottom: 100px; }
    .home-content  { padding-bottom: 100px; }

    .login-card {
        padding: 36px 24px;
        border-radius: 10px;
    }
}

@media (max-width: 400px) {
    .photo-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
    }
    .preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
    }
}
