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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f8f9fa;
    color: #1a365d;
    line-height: 1.7;
}

/* Navigation */
.navbar {
    background: #1a365d;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

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

.nav-link {
    color: white;
    text-decoration: none;
    transition: opacity 0.2s;
}

.nav-link:hover {
    opacity: 0.8;
}

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

/* Hamburger Menu Button (Hidden on Desktop) */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.75rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    transition: opacity 0.2s;
}

.hamburger-btn:hover {
    opacity: 0.8;
}

.hamburger-icon {
    display: block;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile Slide-in Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100%;
    background: white;
    z-index: 999;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: #1a365d;
    color: white;
}

.mobile-menu-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.mobile-menu-close:hover {
    opacity: 0.8;
}

.mobile-menu-content {
    padding: 0;
}

.mobile-menu-user {
    padding: 1.5rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e5e7eb;
}

.mobile-user-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a365d;
    margin-bottom: 0.25rem;
}

.mobile-user-role {
    font-size: 0.875rem;
    color: #64748b;
    text-transform: capitalize;
}

.mobile-nav {
    padding: 0.5rem 0;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: #1a365d;
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 500;
    transition: background 0.2s ease;
    min-height: 56px;
}

.mobile-nav-link:hover,
.mobile-nav-link:active {
    background: #f8f9fa;
}

.mobile-nav-icon {
    font-size: 1.5rem;
    line-height: 1;
    width: 32px;
    text-align: center;
}

.mobile-nav-logout {
    margin-top: 1rem;
    border-top: 1px solid #e5e7eb;
    color: #ef4444;
}

.mobile-nav-logout:hover {
    background: #fef2f2;
}

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

/* Alerts */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Auth Pages - Premium Design */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a365d 0%, #2563eb 50%, #3b82f6 100%);
    position: relative;
    overflow: hidden;
    padding: 2rem;
}

/* Auth page takes full viewport */
.container:has(.auth-page) {
    max-width: 100%;
    padding: 0;
}

.auth-bg-decoration {
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.auth-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 450px;
    padding: 40px;
    position: relative;
    z-index: 1;
}

.auth-card-wide {
    max-width: 520px;
}

/* Auth Branding */
.auth-brand {
    text-align: center;
    margin-bottom: 24px;
}

.auth-logo {
    display: inline-block;
    margin-bottom: 16px;
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a365d;
    margin: 0 0 4px 0;
    letter-spacing: -0.5px;
}

.auth-tagline {
    color: #64748b;
    font-size: 0.95rem;
    margin: 0;
}

/* Auth Welcome Section */
.auth-welcome {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e2e8f0;
}

.auth-welcome h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.auth-welcome p {
    color: #64748b;
    margin: 0;
    font-size: 0.95rem;
}

/* Auth Form */
.auth-form {
    margin-bottom: 24px;
}

.auth-input-group {
    margin-bottom: 20px;
}

.auth-input-group > label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    left: 14px;
    color: #9ca3af;
    pointer-events: none;
    z-index: 1;
}

.auth-input-wrapper input {
    width: 100%;
    height: 48px;
    padding: 0 48px 0 44px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    color: #1e293b;
    background: #f8fafc;
    transition: all 0.2s ease;
}

.auth-input-wrapper input::placeholder {
    color: #94a3b8;
}

.auth-input-wrapper input:hover {
    border-color: #cbd5e1;
    background: white;
}

.auth-input-wrapper input:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* Password Toggle */
.auth-password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.auth-password-toggle:hover {
    color: #3b82f6;
}

/* Submit Button */
.auth-submit-btn {
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
    margin-top: 8px;
}

.auth-submit-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
    transform: translateY(-1px);
}

.auth-submit-btn:active {
    transform: translateY(0);
}

.auth-submit-btn svg {
    transition: transform 0.2s;
}

.auth-submit-btn:hover svg {
    transform: translateX(4px);
}

/* Footer Link */
.auth-footer-link {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.auth-footer-link span {
    color: #64748b;
    font-size: 0.95rem;
}

.auth-footer-link a {
    color: #3b82f6;
    font-weight: 600;
    text-decoration: none;
    margin-left: 6px;
    transition: color 0.2s;
}

.auth-footer-link a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Account Type Selector - Premium */
.auth-account-type-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.auth-type-card {
    cursor: pointer;
}

.auth-type-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.auth-type-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    transition: all 0.2s ease;
    position: relative;
}

.auth-type-card-content:hover {
    border-color: #cbd5e1;
    background: white;
}

.auth-type-card input[type="radio"]:checked + .auth-type-card-content {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.auth-type-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    color: #64748b;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.auth-type-card input[type="radio"]:checked + .auth-type-card-content .auth-type-icon {
    background: #3b82f6;
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.auth-type-text {
    text-align: center;
}

.auth-type-text strong {
    display: block;
    color: #1e293b;
    font-size: 1rem;
    margin-bottom: 4px;
}

.auth-type-text span {
    display: block;
    color: #64748b;
    font-size: 0.8rem;
    line-height: 1.3;
}

.auth-type-check {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s;
}

.auth-type-check svg {
    color: white;
    width: 14px;
    height: 14px;
}

.auth-type-card input[type="radio"]:checked + .auth-type-card-content .auth-type-check {
    opacity: 1;
    transform: scale(1);
    background: #3b82f6;
}

/* Flash Messages in Auth Pages */
.auth-page .alert {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    max-width: 400px;
    width: calc(100% - 40px);
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Invite Form */
.invite-form {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
}

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

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

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

/* Invitation Info */
.invite-info {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

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

/* Badges */
.badge-owner {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: #3b82f6;
    color: white;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

.status-pending {
    color: #f39c12;
    font-weight: 500;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #1a365d;
}

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

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-hint {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-top: 0.25rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
}

.btn-primary {
    background: #3b82f6;
    color: white;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: #2563eb;
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

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

.btn-secondary:hover {
    background: #5a6268;
}

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

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

.btn-block {
    width: 100%;
    display: block;
    text-align: center;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

/* Dashboard */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.company-label {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.dashboard-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-form input {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 250px;
}

/* Hero Section */
.hero-section {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    margin-bottom: 2.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.hero-title {
    font-size: 2rem;
    font-weight: 600;
    color: #1a365d;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    color: #64748b;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Hero Stats Card (Clickable) */
.hero-stats-card {
    display: block;
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    margin-bottom: 2.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.hero-stats-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.stats-row {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 1.5rem;
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-divider {
    width: 1px;
    height: 60px;
    background: #e5e7eb;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #1a365d;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.admin-link {
    text-align: right;
    color: #3b82f6;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.hero-stats-card:hover .admin-link {
    color: #2563eb;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.stat-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a365d;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.9rem;
    color: #64748b;
    margin-top: 0.25rem;
}

/* Dashboard Actions Bar */
.dashboard-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-form-modern {
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.5rem 1rem;
    flex: 1;
    max-width: 500px;
    transition: all 0.2s ease;
}

.search-form-modern:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-icon {
    font-size: 1.2rem;
    margin-right: 0.75rem;
    color: #64748b;
}

.search-input-modern {
    border: none;
    outline: none;
    flex: 1;
    font-size: 1rem;
    padding: 0.5rem 0;
    color: #1a365d;
}

.search-input-modern::placeholder {
    color: #94a3b8;
}

.btn-search {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-search:hover {
    background: #2563eb;
}

/* Centered Search Container */
.search-container-centered {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

/* Upload Button Centered */
.upload-button-centered {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
}

.btn-upload-dashboard {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    background: #3b82f6;
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-upload-dashboard:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

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

.search-form-centered {
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    width: 100%;
    max-width: 600px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.search-form-centered:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
}

.search-icon-centered {
    font-size: 1.3rem;
    margin-right: 1rem;
    color: #64748b;
}

.search-input-centered {
    border: none;
    outline: none;
    flex: 1;
    font-size: 1.05rem;
    padding: 0.5rem 0;
    color: #1a365d;
}

.search-input-centered::placeholder {
    color: #94a3b8;
}

.btn-search-centered {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0.7rem 1.75rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 0.5rem;
}

.btn-search-centered:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Search Loading Spinner */
.search-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.search-spinner.active {
    display: block;
    animation: spin 0.8s linear infinite;
}

/* Search Clear Button */
.search-clear-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #e5e7eb;
    border: none;
    border-radius: 50%;
    color: #64748b;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 0.5rem;
    flex-shrink: 0;
    line-height: 1;
}

.search-clear-btn.visible {
    display: flex;
}

.search-clear-btn:hover {
    background: #d1d5db;
    color: #374151;
}

/* Search History Dropdown */
.search-container-centered {
    position: relative;
}

.search-history-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 100;
    display: none;
    overflow: hidden;
}

.search-history-dropdown.visible {
    display: block;
}

.search-history-header {
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

.search-history-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1rem;
    border: none;
    background: transparent;
    color: #1a365d;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.15s ease;
    text-align: left;
}

.search-history-item:hover {
    background: #f1f5f9;
}

.search-history-item .history-icon {
    color: #94a3b8;
    font-size: 0.9rem;
}

/* Live Search Results */
.search-results-live {
    margin-top: 1.5rem;
    animation: fadeIn 0.2s ease;
}

.search-results-header-live {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0 0.25rem;
}

.search-results-count {
    color: #64748b;
    font-size: 0.95rem;
}

.search-results-count strong {
    color: #1a365d;
}

.btn-clear-search-link {
    background: none;
    border: none;
    color: #3b82f6;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: color 0.2s ease;
}

.btn-clear-search-link:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* Search Results List */
.search-results-list {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.15s ease;
}

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

.search-result-item:hover {
    background-color: #f8fafc;
}

.search-result-thumb {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 1rem;
}

.search-result-icon {
    font-size: 1.5rem;
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1a365d;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-meta {
    font-size: 0.875rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.search-result-dot {
    color: #cbd5e1;
    margin: 0 0.25rem;
}

.search-result-arrow {
    font-size: 1.25rem;
    color: #cbd5e1;
    margin-left: 1rem;
    transition: transform 0.2s ease, color 0.2s ease;
}

.search-result-item:hover .search-result-arrow {
    color: #3b82f6;
    transform: translateX(4px);
}

/* No Results State */
.search-no-results {
    text-align: center;
    padding: 3rem 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.search-no-results .empty-icon-container {
    margin-bottom: 1.5rem;
}

.search-no-results h3 {
    color: #1a365d;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.search-no-results p {
    color: #64748b;
    margin-bottom: 0.5rem;
}

.search-no-results .btn-clear-search {
    margin-top: 1.5rem;
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #f1f5f9;
    color: #3b82f6;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-no-results .btn-clear-search:hover {
    background: #e2e8f0;
}

/* Highlight matching text */
.search-results-live mark {
    background: #fef08a;
    color: inherit;
    padding: 0.1em 0.2em;
    border-radius: 2px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Activity Section */
.activity-section {
    margin-top: 2rem;
}

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

.activity-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a365d;
}

.activity-feed {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.date-group-header {
    background: #f8f9fa;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e5e7eb;
}

.activity-item {
    display: flex;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f3f5;
    transition: background 0.2s ease;
}

.activity-item:hover {
    background: #f8f9fa;
}

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

.activity-item-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.activity-item-link:hover {
    text-decoration: none;
}

.activity-thumbnail {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.25rem;
    flex-shrink: 0;
}

.thumbnail-placeholder {
    font-size: 1.75rem;
    opacity: 0.9;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-main {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
    flex-wrap: wrap;
}

.activity-address {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1a365d;
    text-decoration: none;
    transition: color 0.2s ease;
}

.activity-address:hover {
    color: #3b82f6;
}

.activity-meta {
    font-size: 0.9rem;
    color: #64748b;
}

.activity-time {
    font-size: 0.85rem;
    color: #94a3b8;
}

.activity-action {
    margin-left: 1rem;
    flex-shrink: 0;
}

.btn-view {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: #3b82f6;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-view:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

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

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

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

.address-link {
    display: block;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
}

.address-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.address-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.photo-count {
    color: #667eea;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.address-date {
    font-size: 0.85rem;
    color: #7f8c8d;
}

/* Modern Address Cards */
.address-card-modern {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.25s ease;
    border: 1px solid #e5e7eb;
}

.address-card-modern:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.address-link-modern {
    display: block;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.address-thumbnail {
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.address-placeholder {
    font-size: 3.5rem;
    opacity: 0.9;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.address-content {
    padding: 1.25rem;
}

.address-title-modern {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a365d;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.address-meta {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
}

.photo-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.95);
    color: #1a365d;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

/* Upload Page - Modern Design */
.upload-page {
    max-width: 700px;
    margin: 0 auto;
}

.upload-header {
    text-align: center;
    margin-bottom: 3rem;
}

.upload-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a365d;
    margin-bottom: 0.5rem;
}

.upload-subtitle {
    color: #64748b;
    font-size: 1.05rem;
}

/* Session Detection Banner */
.session-detection {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #93c5fd;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 0.5rem;
}

.session-detection-content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.session-detection-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.session-detection-text {
    flex: 1;
}

.session-detection-title {
    font-weight: 600;
    color: #1a365d;
    margin: 0 0 0.25rem 0;
    font-size: 1.05rem;
}

.session-detection-desc {
    color: #3b82f6;
    margin: 0;
    font-size: 0.95rem;
}

.session-detection-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-session-yes {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-session-yes:hover {
    background: #2563eb;
}

.btn-session-no {
    background: white;
    color: #64748b;
    border: 1px solid #cbd5e1;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-session-no:hover {
    background: #f8f9fa;
    color: #1a365d;
}

.session-confirmed {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.session-confirmed-icon {
    color: #22c55e;
    font-weight: bold;
}

/* Session Description Input */
.session-description-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.session-description-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.session-description-input::placeholder {
    color: #94a3b8;
}

.upload-form-modern {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.upload-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.section-label {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a365d;
    margin-bottom: 1rem;
}

/* Drag and Drop Zone */
.dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.dropzone:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.dropzone.dragover {
    border-color: #3b82f6;
    background: #dbeafe;
    border-width: 3px;
}

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

.dropzone-icon {
    font-size: 3.5rem;
    opacity: 0.7;
}

.dropzone-primary {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a365d;
    margin: 0;
}

.dropzone-secondary {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
}

.dropzone-selected {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: #3b82f6;
    color: white;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.btn-clear-files {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease;
}

.btn-clear-files:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Duplicate Warning Modal */
.duplicate-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
}

.duplicate-modal {
    background: white;
    border-radius: 12px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.duplicate-modal-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    background: #fef3c7;
    border-bottom: 1px solid #fcd34d;
}

.duplicate-modal-icon {
    font-size: 1.5rem;
}

.duplicate-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #92400e;
}

.duplicate-modal-body {
    padding: 1.25rem 1.5rem;
}

.duplicate-modal-body p {
    margin: 0 0 0.75rem 0;
    color: #374151;
}

.duplicate-file-list {
    margin: 0;
    padding: 0;
    list-style: none;
    max-height: 150px;
    overflow-y: auto;
}

.duplicate-file-list li {
    padding: 0.5rem 0.75rem;
    background: #f3f4f6;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #4b5563;
    word-break: break-all;
}

.duplicate-file-list li:last-child {
    margin-bottom: 0;
}

.duplicate-modal-actions {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.btn-duplicate-skip,
.btn-duplicate-add {
    flex: 1;
    padding: 0.625rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-duplicate-skip {
    background: white;
    border: 1px solid #d1d5db;
    color: #374151;
}

.btn-duplicate-skip:hover {
    background: #f3f4f6;
}

.btn-duplicate-add {
    background: #f59e0b;
    border: 1px solid #f59e0b;
    color: white;
}

.btn-duplicate-add:hover {
    background: #d97706;
}

/* Photo Preview Grid */
.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.preview-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.preview-image-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f3f5;
}

.preview-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.preview-remove:hover {
    background: #ef4444;
    transform: scale(1.1);
}

.preview-info {
    text-align: center;
}

.preview-filename {
    font-size: 0.8rem;
    color: #1a365d;
    font-weight: 500;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-filesize {
    font-size: 0.75rem;
    color: #94a3b8;
    margin: 0;
}

/* Preview Loading States */
.preview-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: #64748b;
    font-size: 0.95rem;
}

.preview-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f1f3f5 0%, #e2e8f0 100%);
    color: #94a3b8;
    font-size: 0.85rem;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.preview-loading-item {
    opacity: 0.7;
}

/* Preview "+X more" indicator */
.preview-more {
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-more-content {
    width: 100%;
    padding-bottom: 100%;
    position: relative;
    border-radius: 8px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-more-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 2rem;
    font-weight: 700;
}

.preview-more-text {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Address Selection */
.address-select-wrapper {
    margin-bottom: 1rem;
}

.address-select-modern {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: white;
    color: #1a365d;
    cursor: pointer;
    transition: all 0.2s ease;
}

.address-select-modern:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.divider-with-text {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
}

.divider-with-text::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e7eb;
}

.divider-with-text span {
    position: relative;
    display: inline-block;
    padding: 0 1rem;
    background: white;
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.new-address-input {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: white;
    color: #1a365d;
    transition: all 0.2s ease;
}

.new-address-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.new-address-input::placeholder {
    color: #94a3b8;
}

/* Address Autocomplete */
.address-autocomplete {
    position: relative;
}

.autocomplete-input-wrapper {
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 0 1rem;
    transition: all 0.2s ease;
}

.autocomplete-input-wrapper:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.autocomplete-icon {
    font-size: 1.25rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.autocomplete-input {
    flex: 1;
    padding: 1rem 0;
    font-size: 1rem;
    border: none;
    background: transparent;
    color: #1a365d;
    outline: none;
}

.autocomplete-input::placeholder {
    color: #94a3b8;
}

.autocomplete-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #e5e7eb;
    border: none;
    border-radius: 50%;
    color: #64748b;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.autocomplete-clear:hover {
    background: #d1d5db;
    color: #374151;
}

.autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    z-index: 100;
    max-height: 320px;
    overflow-y: auto;
    display: none;
}

.autocomplete-dropdown.visible {
    display: block;
}

.autocomplete-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem;
    cursor: pointer;
    transition: background-color 0.1s ease;
    border-bottom: 1px solid #f1f5f9;
}

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

.autocomplete-item:hover,
.autocomplete-item.highlighted {
    background-color: #f1f5f9;
}

.autocomplete-item-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.autocomplete-item-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.autocomplete-item-text {
    color: #1a365d;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.autocomplete-item-text mark {
    background: #fef08a;
    color: inherit;
    padding: 0.1em 0.15em;
    border-radius: 2px;
}

.autocomplete-item-count {
    color: #94a3b8;
    font-size: 0.8rem;
    flex-shrink: 0;
    margin-left: 0.75rem;
}

.autocomplete-item-hint {
    color: #94a3b8;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.autocomplete-create {
    background-color: #f8fafc;
    border-top: 1px solid #e5e7eb;
}

.autocomplete-create:hover,
.autocomplete-create.highlighted {
    background-color: #e0f2fe;
}

.autocomplete-create .autocomplete-item-icon {
    color: #3b82f6;
}

/* Address Selection Status */
.address-selection-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.625rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
}

.address-selection-status.status-existing {
    background: #dcfce7;
    color: #166534;
}

.address-selection-status.status-new {
    background: #e0f2fe;
    color: #0369a1;
}

.status-icon {
    font-size: 1rem;
}

/* Job Numbers Section (Upload page) */
.job-numbers-section {
    margin-top: 0.75rem;
}

.add-job-numbers-link {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0.5rem 0;
    transition: color 0.15s;
}

.add-job-numbers-link:hover {
    color: #3b82f6;
}

.job-numbers-input-wrapper {
    margin-top: 0.5rem;
}

.job-numbers-input {
    width: 100%;
    padding: 0.625rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.job-numbers-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Search Results Job Numbers */
.search-result-jobs {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.125rem;
}

.search-result-jobs mark {
    background: #fef08a;
    padding: 0 2px;
    border-radius: 2px;
}

/* Address Title Row (View page) */
.address-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-edit-address {
    background: none;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.375rem 0.5rem;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-edit-address:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #374151;
}

.btn-delete-address {
    background: none;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.375rem 0.5rem;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-delete-address:hover {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #dc2626;
}

.address-job-numbers {
    font-size: 0.9rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

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

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

.modal-small {
    max-width: 400px;
}

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

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a365d;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.15s;
}

.modal-close:hover {
    color: #1f2937;
}

#edit-address-form {
    padding: 1.5rem;
}

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

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

#edit-address-form input[type="text"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

#edit-address-form input[type="text"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-hint {
    display: block;
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.375rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.modal-actions .btn {
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.modal-actions .btn-secondary {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    color: #374151;
}

.modal-actions .btn-secondary:hover {
    background: #e5e7eb;
}

.modal-actions .btn-primary {
    background: #3b82f6;
    border: none;
    color: white;
}

.modal-actions .btn-primary:hover {
    background: #2563eb;
}

.modal-actions .btn-primary:disabled {
    background: #93c5fd;
    cursor: not-allowed;
}

/* Danger Modal (Delete) */
.modal-danger {
    border: 2px solid #fca5a5;
}

.modal-header-danger {
    background: #fef2f2;
    border-bottom: 1px solid #fecaca;
}

.modal-header-danger h2 {
    color: #dc2626;
}

.modal-body {
    padding: 1.5rem;
}

.delete-warning {
    color: #b91c1c;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.delete-warning-list {
    margin: 0.75rem 0 1.25rem 1.25rem;
    padding: 0;
    color: #374151;
}

.delete-warning-list li {
    margin-bottom: 0.25rem;
}

.delete-confirm-prompt {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.delete-confirm-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
}

.delete-confirm-input:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.1);
}

.modal-actions .btn-danger {
    background: #dc2626;
    color: white;
    border: none;
}

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

.modal-actions .btn-danger:disabled {
    background: #fca5a5;
    cursor: not-allowed;
}

.text-muted {
    color: #6b7280;
    font-size: 0.875rem;
}

/* Address Modal */
.modal-address {
    max-width: 480px;
}

.form-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.form-group .required {
    color: #dc2626;
}

.form-group .optional {
    color: #9ca3af;
    font-weight: normal;
    font-size: 0.875rem;
}

/* Photo Note Indicator on Thumbnails */
.photo-note-indicator {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    pointer-events: none;
    z-index: 2;
}

.photo-note-indicator svg {
    opacity: 0.9;
}

/* Upload Page Photo Note */
.photo-note-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.5;
    resize: vertical;
    min-height: 60px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.photo-note-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.photo-note-input::placeholder {
    color: #9ca3af;
}

.label-optional {
    font-weight: normal;
    color: #9ca3af;
    font-size: 0.85rem;
}

/* Gallery Filter and Sort Controls */
.gallery-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.gallery-controls-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.gallery-controls-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-download-all {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    color: #374151;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-download-all:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

.btn-download-all:active {
    background: #d1d5db;
}

.btn-download-all.loading {
    opacity: 0.6;
    pointer-events: none;
}

.btn-download-all.loading svg {
    animation: spin 1s linear infinite;
}

.gallery-photo-count {
    font-size: 0.9rem;
    color: #6b7280;
    white-space: nowrap;
}

.gallery-photo-count .filtered-count {
    color: #3b82f6;
    font-weight: 500;
}

.gallery-filters {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-select,
.sort-select {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.filter-select:hover,
.sort-select:hover {
    border-color: #9ca3af;
}

.filter-select:focus,
.sort-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-clear-filters {
    padding: 0.5rem 0.75rem;
    border: none;
    background: #fee2e2;
    color: #dc2626;
    font-size: 0.875rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.btn-clear-filters:hover {
    background: #fecaca;
}

/* Mobile responsive for gallery controls */
@media (max-width: 768px) {
    .gallery-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .gallery-controls-left {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
    }

    .gallery-controls-right {
        justify-content: flex-end;
    }

    .filter-select,
    .sort-select {
        width: auto;
    }
}

/* Upload Actions */
.upload-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    cursor: default;
}

.btn-upload-large {
    width: 100%;
    padding: 1.25rem 2rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer !important;
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-upload-large * {
    pointer-events: none;
    cursor: inherit;
}

.btn-upload-large:not(.btn-disabled):hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-upload-large:not(.btn-disabled):active {
    transform: translateY(0);
}

.btn-upload-large.btn-disabled {
    background: #cbd5e1 !important;
    cursor: not-allowed !important;
    box-shadow: none;
    transform: none;
    pointer-events: none;
}

.btn-cancel-link {
    color: #64748b;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.btn-cancel-link:hover {
    color: #1a365d;
    text-decoration: underline;
}

/* Old Upload Page Styles (keep for backward compatibility) */
.upload-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
}

.upload-form {
    margin-top: 2rem;
}

.form-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.form-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #ddd;
}

.form-divider span {
    background: white;
    padding: 0 1rem;
    position: relative;
    color: #7f8c8d;
}

.preview-container {
    margin: 1.5rem 0;
}

.preview-title {
    font-weight: 500;
    margin-bottom: 1rem;
}

.preview-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.preview-more {
    color: #7f8c8d;
    font-style: italic;
}

/* View Page */
.view-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 2.5rem;
}

.tab-button {
    padding: 1rem 2rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: #64748b;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    bottom: -2px;
}

.tab-button:hover:not(.disabled) {
    color: #1a365d;
    background: #f8f9fa;
}

.tab-button.active {
    color: #1a365d;
    font-weight: 700;
    border-bottom-color: #1a365d;
}

.tab-button.disabled {
    color: #cbd5e1;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Tab Content */
.tab-content {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.back-link {
    color: #3b82f6;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.back-link:hover {
    text-decoration: underline;
}

.photo-section {
    margin-bottom: 3rem;
}

.date-header {
    color: #1a365d;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3b82f6;
}

/* Google Photos Style Uniform Grid */
.photo-gallery-with-dates {
    margin-top: 1rem;
}

.gallery-date-separator {
    position: relative;
    text-align: center;
    margin: 2rem 0 1.5rem 0;
}

.gallery-date-separator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e7eb;
    z-index: 0;
}

.gallery-date-label {
    position: relative;
    display: inline-block;
    padding: 0 1.5rem;
    background: #f8f9fa;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 1;
}

.btn-date-download {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: #f8f9fa;
    border: none;
    border-radius: 50%;
    color: #9ca3af;
    cursor: pointer;
    margin-left: 0.5rem;
    z-index: 1;
    transition: all 0.15s ease;
}

.btn-date-download:hover {
    background: #e5e7eb;
    color: #374151;
}

.btn-date-download:active {
    background: #d1d5db;
}

.btn-date-download.loading {
    pointer-events: none;
}

.btn-date-download.loading svg {
    animation: spin 1s linear infinite;
}

/* Session Groups */
.session-group {
    margin-bottom: 1.5rem;
}

.session-header {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
}

.session-header-display {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.session-header-display.session-editable {
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    margin: -0.25rem -0.5rem;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.session-header-display.session-editable:hover {
    background-color: #f1f5f9;
}

.session-description {
    font-weight: 600;
    color: #1a365d;
    font-size: 0.95rem;
}

.session-uploader {
    font-weight: 500;
    color: #475569;
    font-size: 0.9rem;
}

.session-meta {
    color: #64748b;
    font-size: 0.85rem;
}

.btn-session-edit {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.25rem;
    margin-left: 0.5rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    opacity: 0;
}

.session-header:hover .btn-session-edit {
    opacity: 1;
}

.btn-session-edit:hover {
    color: #3b82f6;
    background: #eff6ff;
}

/* Session Edit Mode */
.session-header-edit {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.session-edit-input {
    flex: 1;
    max-width: 400px;
    padding: 0.5rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.session-edit-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-session-save,
.btn-session-cancel {
    background: none;
    border: none;
    padding: 0.4rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-session-save {
    color: #22c55e;
}

.btn-session-save:hover {
    background: #f0fdf4;
}

.btn-session-cancel {
    color: #64748b;
}

.btn-session-cancel:hover {
    background: #f1f5f9;
    color: #ef4444;
}

.photo-grid-uniform {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    margin-bottom: 1rem;
}

.photo-tile {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* 1:1 aspect ratio */
    overflow: hidden;
    cursor: pointer;
    background: #f1f3f5;
}

.photo-tile-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-tile:hover .photo-tile-img {
    transform: scale(1.05);
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: flex-end;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-tile:hover .photo-overlay {
    opacity: 1;
}

.photo-overlay-info {
    width: 100%;
}

.photo-overlay-uploader {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    margin: 0 0 0.25rem 0;
}

.photo-overlay-date {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    margin: 0;
}

/* Photo Selection Mode */
.photo-select-checkbox {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 24px;
    height: 24px;
    z-index: 10;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s ease;
    pointer-events: auto;
}

.photo-tile:hover .photo-select-checkbox,
.selection-mode-active .photo-select-checkbox {
    opacity: 1;
}

.photo-select-checkbox svg {
    width: 24px;
    height: 24px;
}

.photo-select-checkbox .checkbox-unchecked {
    color: rgba(255, 255, 255, 0.7);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.photo-select-checkbox .checkbox-checked {
    display: none;
    color: #3b82f6;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.photo-tile.selected .photo-select-checkbox {
    opacity: 1;
}

.photo-tile.selected .photo-select-checkbox .checkbox-unchecked {
    display: none;
}

.photo-tile.selected .photo-select-checkbox .checkbox-checked {
    display: block;
}

.photo-tile.selected {
    outline: 3px solid #3b82f6;
    outline-offset: -3px;
}

.photo-tile.selected::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(59, 130, 246, 0.1);
    pointer-events: none;
}

/* Selection Context Bar */
.selection-context-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: #1a365d;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
    z-index: 900;
    transform: translateY(100%);
    transition: transform 0.2s ease;
}

.selection-context-bar.visible {
    transform: translateY(0);
}

.selection-bar-left {
    display: flex;
    align-items: center;
}

.selection-count {
    font-weight: 600;
    font-size: 1rem;
}

.selection-bar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.selection-action-btn {
    background: none;
    border: none;
    color: white;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s;
}

.selection-action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.selection-action-btn:active {
    background: rgba(255, 255, 255, 0.25);
}

.selection-action-danger:hover {
    background: rgba(239, 68, 68, 0.3);
}

.selection-action-btn.loading {
    opacity: 0.6;
    pointer-events: none;
}

.selection-action-btn.loading svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.selection-bar-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.3);
    margin: 0 0.25rem;
}

/* Prevent body scroll when context bar is visible on mobile */
body.selection-active {
    padding-bottom: 56px;
}

/* Map Placeholder */
.map-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.map-placeholder-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    opacity: 0.6;
}

.map-placeholder h3 {
    font-size: 1.5rem;
    color: #1a365d;
    margin-bottom: 0.75rem;
}

.map-placeholder p {
    font-size: 1rem;
    color: #64748b;
}

/* Old photo grid styles (keep for backward compatibility) */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.photo-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s;
}

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

.photo-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.photo-info {
    padding: 0.75rem;
}

.photo-uploader {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.photo-time {
    font-size: 0.85rem;
    color: #7f8c8d;
}

/* Lightbox */
/* ========================================
   REDESIGNED LIGHTBOX - CLEAN & FOCUSED
   ======================================== */

.lightbox {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox.closing {
    opacity: 0;
}

/* Full screen dark overlay - covers EVERYTHING */
.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    cursor: pointer;
}

/* Top bar - minimal, sleek */
.lightbox-topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, transparent 100%);
}

.lightbox-topbar-left {
    display: flex;
    align-items: center;
}

.lightbox-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lightbox-counter {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.lightbox-topbar-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.15s ease;
}

.lightbox-topbar-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.lightbox-topbar-btn svg {
    width: 20px;
    height: 20px;
    color: white;
}

/* Zoom indicator - top center, fades in/out */
.lightbox-zoom-indicator {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 25;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.lightbox-zoom-indicator.visible {
    opacity: 1;
    visibility: visible;
}

/* Navigation arrows - appear on hover */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 15;
    width: 56px;
    height: 56px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.2s ease, transform 0.2s ease;
}

.lightbox:hover .lightbox-nav {
    opacity: 1;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav.disabled {
    opacity: 0.2 !important;
    cursor: not-allowed;
    pointer-events: none;
}

.lightbox-nav svg {
    width: 28px;
    height: 28px;
    color: white;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Image container - maximum space for photo */
.lightbox-image-container {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(100% - 160px);
    height: calc(100% - 120px);
    max-width: 1600px;
    margin: 60px auto 60px;
    overflow: hidden;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 2px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    transform-origin: 0 0;
    user-select: none;
    -webkit-user-drag: none;
}

.lightbox-image.loading {
    opacity: 0.5;
}

/* Entry/exit animations */
.lightbox.active .lightbox-image-container {
    animation: lightboxFadeIn 0.3s ease forwards;
}

.lightbox.closing .lightbox-image-container {
    animation: lightboxFadeOut 0.3s ease forwards;
}

@keyframes lightboxFadeIn {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes lightboxFadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.96);
    }
}

/* Bottom info bar */
.lightbox-bottombar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 80%, transparent 100%);
    padding: 20px 24px 16px;
}

.lightbox-info-row {
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Left: filename + meta */
.lightbox-info-left {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lightbox-filename {
    color: white;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lightbox-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.lightbox-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
}

.lightbox-meta-item svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    opacity: 0.7;
}

/* Center: inline notes */
.lightbox-notes-inline {
    flex: 0 1 auto;
    min-width: 200px;
    max-width: 400px;
}

.lightbox-notes-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
    min-height: 32px;
}

.lightbox-notes-display:hover {
    background: rgba(255, 255, 255, 0.12);
}

.lightbox-notes-display .notes-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.5);
}

.lightbox-notes-text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lightbox-notes-placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
    font-style: italic;
}

/* Notes edit mode */
.lightbox-notes-edit {
    display: none;
    align-items: center;
    gap: 6px;
}

.lightbox-notes-inline.editing .lightbox-notes-edit {
    display: flex;
}

.lightbox-notes-edit input {
    flex: 1;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    color: white;
    font-size: 12px;
    outline: none;
    min-height: 32px;
}

.lightbox-notes-edit input:focus {
    border-color: #3b82f6;
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-notes-edit input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.btn-notes-save,
.btn-notes-cancel {
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.btn-notes-save {
    background: #3b82f6;
    color: white;
}

.btn-notes-save:hover {
    background: #2563eb;
}

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

.btn-notes-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.btn-notes-cancel:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-notes-save svg,
.btn-notes-cancel svg {
    width: 14px;
    height: 14px;
}

/* Right: actions */
.lightbox-info-right {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.btn-lightbox-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

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

.btn-lightbox-action svg {
    width: 18px;
    height: 18px;
}

.btn-lightbox-delete:hover {
    background: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.btn-lightbox-delete.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Fullscreen mode adjustments */
.lightbox:fullscreen {
    background: black;
}

.lightbox:fullscreen .lightbox-overlay {
    background: black;
}

.lightbox:fullscreen .lightbox-image-container {
    width: calc(100% - 120px);
    height: calc(100% - 100px);
    margin: 50px auto 50px;
}

/* ========================================
   ADMIN PANEL - MODERN DESIGN
   ======================================== */

.admin-page {
    max-width: 1200px;
    margin: 0 auto;
}

/* Admin Header */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.admin-header-content h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a365d;
    margin: 0 0 0.5rem 0;
}

.admin-subtitle {
    font-size: 1rem;
    color: #64748b;
    margin: 0;
}

.admin-back-link {
    color: #64748b;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.admin-back-link:hover {
    color: #1a365d;
}

/* Stats Cards */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.admin-stat-card {
    background: white;
    padding: 1.75rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #1a365d;
    line-height: 1.2;
    margin: 0;
}

.stat-label {
    font-size: 0.9rem;
    color: #64748b;
    margin-top: 0.25rem;
}

/* Section Styling */
.admin-section {
    margin-bottom: 2.5rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a365d;
    margin: 0;
}

.section-badge {
    background: #e0e7ff;
    color: #3b82f6;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
}

/* Invite Form */
.invite-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.invite-card-highlight {
    border: 2px solid #3b82f6;
    background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
}

.invite-prompt {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #e2e8f0;
}

.invite-prompt-icon {
    font-size: 2rem;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.invite-prompt-content h4 {
    margin: 0 0 0.25rem;
    color: #1a365d;
    font-size: 1.1rem;
}

.invite-prompt-content p {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}

.individual-account-notice {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.individual-account-notice .notice-icon {
    font-size: 2rem;
    width: 56px;
    height: 56px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.individual-account-notice .notice-content h4 {
    margin: 0 0 0.25rem;
    color: #1a365d;
    font-size: 1.1rem;
}

.individual-account-notice .notice-content p {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}

.invite-form-modern {
    width: 100%;
}

.form-row-modern {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.invite-email-input {
    flex: 1;
    padding: 0.875rem 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.invite-email-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.invite-role-select {
    padding: 0.875rem 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    min-width: 160px;
    transition: border-color 0.2s ease;
}

.invite-role-select:focus {
    outline: none;
    border-color: #3b82f6;
}

.btn-invite {
    padding: 0.875rem 2rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

.btn-invite:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

/* Modern Tables */
.table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

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

.modern-table thead {
    background: #f8f9fa;
}

.modern-table th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #e5e7eb;
}

.modern-table tbody tr {
    border-bottom: 1px solid #f1f3f5;
    transition: background 0.15s ease;
}

.modern-table tbody tr:last-child {
    border-bottom: none;
}

.modern-table tbody tr:hover {
    background: #f8f9fa;
}

.modern-table td {
    padding: 1.25rem;
    color: #1a365d;
}

/* Member Cell */
.member-cell {
    padding: 1rem 1.25rem !important;
}

.member-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.member-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.member-details {
    flex: 1;
    min-width: 0;
}

.member-name {
    font-weight: 600;
    color: #1a365d;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.member-email {
    font-size: 0.875rem;
    color: #64748b;
}

/* Badges */
.badge-owner {
    display: inline-block;
    background: #3b82f6;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
}

.status-badge {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 12px;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

/* Role Select */
.role-form {
    display: inline-block;
}

.role-select {
    padding: 0.5rem 0.875rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.role-select:hover:not(:disabled) {
    border-color: #3b82f6;
}

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

/* Action Buttons */
.actions-cell {
    text-align: right;
}

.delete-form {
    display: inline-block;
}

.btn-delete {
    padding: 0.5rem 1rem;
    background: #fee;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-delete:hover {
    background: #dc2626;
    color: white;
    border-color: #dc2626;
}

.action-disabled {
    color: #cbd5e1;
    font-size: 1.25rem;
}

/* Cell Helpers */
.email-cell {
    color: #64748b;
    font-size: 0.9rem;
}

.date-cell {
    color: #94a3b8;
    font-size: 0.875rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #64748b;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    max-width: 480px;
    margin: 2rem auto;
}

.empty-state-wide {
    max-width: 600px;
}

.empty-state-inline {
    background: transparent;
    box-shadow: none;
    padding: 2rem;
    margin: 0;
    max-width: none;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1.25rem;
    display: block;
}

.empty-icon-container {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-icon-container .empty-icon {
    font-size: 3rem;
    margin: 0;
}

.empty-state h3 {
    color: #1a365d;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.empty-state p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0;
    color: #64748b;
}

.empty-state p + p {
    margin-top: 0.5rem;
}

.empty-state a {
    color: #3b82f6;
    font-weight: 600;
    text-decoration: none;
}

.empty-state a:hover {
    text-decoration: underline;
}

.empty-state-action {
    margin-top: 1.75rem;
}

.empty-state-action .btn-primary-large {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

.empty-state-action .btn-primary-large:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    text-decoration: none;
}

.empty-state-secondary {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.empty-state-secondary a {
    font-weight: 500;
}

/* Search No Results */
.search-query-highlight {
    background: #fef3c7;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    color: #92400e;
}

.btn-clear-search {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: #f1f5f9;
    color: #475569;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-clear-search:hover {
    background: #e2e8f0;
    color: #1e293b;
    text-decoration: none;
}

/* Welcome/Onboarding Empty State */
.empty-state-welcome {
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
}

.empty-state-welcome h3 {
    font-size: 1.75rem;
}

.empty-state-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.empty-state-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    font-size: 0.875rem;
}

.empty-state-feature-icon {
    font-size: 1.25rem;
}

/* Welcome Workflow Steps */
.welcome-subtitle {
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 1.5rem;
}

.welcome-workflow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.workflow-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

.workflow-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #3b82f6;
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.workflow-text {
    color: #475569;
    font-size: 0.875rem;
}

.workflow-arrow {
    color: #cbd5e1;
    font-size: 1.25rem;
}

@media (max-width: 768px) {
    .welcome-workflow {
        flex-direction: column;
        gap: 0.5rem;
    }

    .workflow-arrow {
        transform: rotate(90deg);
    }
}

/* Search Results */
.search-results-header {
    margin-bottom: 2rem;
}

.search-results-header h1 {
    margin: 0.5rem 0;
    color: #1a365d;
}

.search-results-info {
    color: #64748b;
    margin: 0;
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.address-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    transition: all 0.2s;
}

.address-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.address-card-icon {
    font-size: 1.5rem;
    width: 48px;
    height: 48px;
    background: #eff6ff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.address-card-content h3 {
    margin: 0 0 0.25rem;
    color: #1a365d;
    font-size: 1rem;
    font-weight: 600;
}

.address-card-content p {
    margin: 0;
    color: #64748b;
    font-size: 0.875rem;
}

/* ========================================
   RESPONSIVE DESIGN - MOBILE FIRST
   ======================================== */

/* Tablet: 768px - 1023px */
@media (min-width: 768px) and (max-width: 1023px) {
    .photo-grid-uniform {
        grid-template-columns: repeat(3, 1fr);
    }

    .preview-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .activity-item {
        padding: 1rem 1.25rem;
    }
}

/* Mobile: < 768px */
@media (max-width: 767px) {
    /* === GENERAL MOBILE === */
    body {
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .container {
        padding: 0 1rem;
        margin: 1rem auto;
    }

    /* === NAVIGATION === */
    .navbar {
        padding: 0.75rem 0;
    }

    .nav-container {
        position: relative;
        justify-content: center;
        padding: 0 1rem;
    }

    .nav-brand {
        font-size: 1.25rem;
        text-align: center;
    }

    /* Show hamburger button on mobile */
    .hamburger-btn {
        display: block;
        position: absolute;
        left: 1rem;
        min-width: 44px;
        min-height: 44px;
    }

    /* Hide desktop menu on mobile */
    .nav-menu-desktop {
        display: none;
    }

    /* === BUTTONS - MINIMUM TAP TARGETS === */
    .btn {
        min-height: 44px;
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
    }

    .btn-primary,
    .btn-secondary,
    .btn-danger {
        min-height: 48px;
    }

    /* === DASHBOARD === */
    .hero-section {
        padding: 1.25rem;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-stats-card {
        padding: 1.25rem;
    }

    .stats-row {
        flex-direction: column;
        gap: 1.25rem;
    }

    .stat-divider {
        display: none;
    }

    .stat-number {
        font-size: 1.75rem;
    }

    /* Centered Search Bar */
    .search-container-centered {
        margin-bottom: 1.5rem;
    }

    .search-form-centered {
        padding: 0.75rem 1rem;
        max-width: 100%;
    }

    .search-input-centered {
        font-size: 16px; /* Prevent iOS zoom */
    }

    .btn-search-centered {
        padding: 0.75rem 1.25rem;
        min-height: 44px;
    }

    /* Search Results List */
    .search-results-list {
        border-radius: 0;
        margin: 0 -1rem;
        box-shadow: none;
        border-top: 1px solid #e5e7eb;
        border-bottom: 1px solid #e5e7eb;
    }

    .search-result-item {
        padding: 0.875rem 1rem;
    }

    .search-result-thumb {
        width: 44px;
        height: 44px;
        margin-right: 0.75rem;
    }

    .search-result-icon {
        font-size: 1.25rem;
    }

    .search-result-title {
        font-size: 0.95rem;
    }

    .search-result-meta {
        font-size: 0.8rem;
    }

    .search-result-arrow {
        font-size: 1.1rem;
        margin-left: 0.5rem;
    }

    /* Upload Button */
    .upload-button-centered {
        margin-bottom: 2rem;
    }

    .btn-upload-dashboard {
        padding: 0.875rem 2rem;
        font-size: 1.05rem;
        min-height: 52px;
        width: auto;
        max-width: 100%;
    }

    .upload-icon {
        font-size: 1.35rem;
    }

    /* Recent Activity */
    .activity-section {
        margin-top: 1.5rem;
    }

    .activity-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
        margin-bottom: 1.5rem;
    }

    .activity-header h2 {
        font-size: 1.35rem;
    }

    .activity-header .btn-primary {
        width: 100%;
        text-align: center;
        min-height: 48px;
    }

    .activity-item {
        padding: 0.5rem 0.75rem;
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
    }

    .activity-thumbnail {
        width: 60px;
        height: 60px;
        margin-right: 0;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .thumbnail-placeholder {
        font-size: 1.5rem;
    }

    .activity-content {
        flex: 1;
        min-width: 0;
    }

    .activity-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .activity-address {
        font-size: 14px;
        font-weight: 600;
        line-height: 1.3;
    }

    .activity-meta {
        font-size: 12px;
        line-height: 1.4;
    }

    .activity-time {
        display: none;
    }

    .activity-action {
        margin-left: 0;
        flex-shrink: 0;
    }

    .btn-view {
        min-height: 36px;
        padding: 0.5rem 0.875rem;
        font-size: 14px;
    }

    /* === GALLERY VIEW === */
    .view-header {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

    .view-header .btn-primary {
        width: 100%;
        min-height: 48px;
    }

    /* Tab Navigation */
    .tab-navigation {
        margin-bottom: 1.5rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tab-button {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        min-height: 48px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* Photo Grid */
    .photo-grid-uniform {
        grid-template-columns: repeat(2, 1fr);
        gap: 3px;
    }

    .photo-tile {
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(59, 130, 246, 0.2);
    }

    /* Disable hover effects on mobile */
    .photo-tile:hover .photo-tile-img {
        transform: none;
    }

    .photo-tile:active .photo-tile-img {
        transform: scale(0.98);
    }

    /* Date Separators */
    .gallery-date-separator {
        margin: 1.25rem 0 1rem 0;
    }

    .gallery-date-label {
        font-size: 0.8rem;
        padding: 0 0.75rem;
    }

    /* Lightbox Mobile */
    .lightbox-image-container {
        width: 100%;
        height: calc(100% - 50px);
        margin: 50px auto 0;
    }

    .lightbox-topbar {
        padding: 10px 12px;
    }

    .lightbox-counter {
        font-size: 13px;
    }

    /* Hide fullscreen button on mobile */
    #fullscreen-btn {
        display: none;
    }

    .lightbox-topbar-btn {
        width: 40px;
        height: 40px;
    }

    .lightbox-topbar-btn svg {
        width: 20px;
        height: 20px;
    }

    .lightbox-zoom-indicator {
        top: 60px;
        font-size: 13px;
        padding: 6px 12px;
    }

    .lightbox-nav {
        width: 44px;
        height: 44px;
        opacity: 0.8;
    }

    .lightbox-nav svg {
        width: 24px;
        height: 24px;
    }

    .lightbox-prev {
        left: 4px;
    }

    .lightbox-next {
        right: 4px;
    }

    /* Mobile bottom bar - stacked layout */
    .lightbox-bottombar {
        padding: 12px 16px;
        padding-bottom: max(12px, env(safe-area-inset-bottom));
        max-height: 40vh;
        overflow-y: auto;
    }

    .lightbox-info-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    /* Row 1: Filename */
    .lightbox-info-left {
        flex: none;
        width: 100%;
        order: 1;
    }

    .lightbox-filename {
        font-size: 14px;
        font-weight: 600;
    }

    /* Row 2: Meta info */
    .lightbox-meta-row {
        gap: 12px;
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .lightbox-meta-item {
        font-size: 12px;
        flex-shrink: 0;
    }

    .lightbox-meta-item svg {
        width: 14px;
        height: 14px;
    }

    /* Row 3: Notes - full width */
    .lightbox-notes-inline {
        flex: none;
        width: 100%;
        order: 2;
        min-width: unset;
        max-width: none;
    }

    .lightbox-notes-display {
        padding: 10px 12px;
        min-height: 44px;
        background: rgba(255, 255, 255, 0.1);
    }

    .lightbox-notes-display .notes-icon {
        width: 16px;
        height: 16px;
    }

    .lightbox-notes-text {
        font-size: 14px;
        color: rgba(255, 255, 255, 0.9);
        white-space: normal;
        line-height: 1.4;
    }

    .lightbox-notes-placeholder {
        font-size: 14px;
    }

    .lightbox-notes-edit {
        gap: 8px;
    }

    .lightbox-notes-edit input {
        font-size: 16px; /* Prevent iOS zoom */
        min-height: 44px;
        padding: 10px 12px;
    }

    .btn-notes-save,
    .btn-notes-cancel {
        width: 44px;
        height: 44px;
        flex-shrink: 0;
    }

    .btn-notes-save svg,
    .btn-notes-cancel svg {
        width: 18px;
        height: 18px;
    }

    /* Row 4: Action buttons */
    .lightbox-info-right {
        flex: none;
        width: 100%;
        order: 3;
        justify-content: flex-end;
        gap: 12px;
        padding-top: 8px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        margin-top: 2px;
    }

    .btn-lightbox-action {
        width: 44px;
        height: 44px;
    }

    .btn-lightbox-action svg {
        width: 20px;
        height: 20px;
    }

    /* === UPLOAD PAGE === */
    .upload-page {
        max-width: 100%;
    }

    .upload-header {
        margin-bottom: 2rem;
    }

    .upload-header h1 {
        font-size: 1.5rem;
    }

    .upload-subtitle {
        font-size: 1rem;
    }

    .upload-form-modern {
        gap: 1.5rem;
    }

    .upload-section {
        padding: 1.25rem;
    }

    .section-label {
        font-size: 1rem;
    }

    /* Dropzone */
    .dropzone {
        padding: 2rem 1rem;
        min-height: 200px;
    }

    .dropzone-icon {
        font-size: 2.5rem;
    }

    .dropzone-primary {
        font-size: 1rem;
    }

    .dropzone-secondary {
        font-size: 0.875rem;
    }

    .dropzone-selected {
        padding: 0.875rem 1.25rem;
        font-size: 1rem;
    }

    /* Photo Preview Grid */
    .preview-grid {
        grid-template-columns: repeat(3, 1fr);
        padding: 1rem;
        gap: 0.5rem;
    }

    .preview-remove {
        width: 32px;
        height: 32px;
        font-size: 1.75rem;
    }

    .preview-filename {
        font-size: 0.75rem;
    }

    .preview-filesize {
        font-size: 0.7rem;
    }

    /* Address Selection */
    .address-select-modern,
    .new-address-input {
        padding: 0.875rem 1rem;
        font-size: 16px; /* Prevent iOS zoom */
        min-height: 48px;
    }

    .divider-with-text {
        margin: 1.25rem 0;
    }

    /* Upload Button */
    .btn-upload-large {
        font-size: 1.1rem;
        padding: 1.125rem 1.5rem;
        min-height: 56px;
    }

    .btn-cancel-link {
        font-size: 1rem;
        padding: 0.75rem;
        min-height: 44px;
        display: inline-block;
    }

    /* === OTHER PAGES === */
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .dashboard-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }

    .search-form {
        width: 100%;
    }

    .search-form input {
        min-width: auto;
    }

    /* === ADMIN PANEL MOBILE === */
    .admin-header {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

    .admin-header-content h1 {
        font-size: 1.75rem;
    }

    .admin-back-link {
        font-size: 0.9rem;
    }

    .admin-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 2rem;
    }

    .admin-stat-card {
        padding: 1.25rem;
    }

    .stat-icon {
        font-size: 2rem;
    }

    .stat-number {
        font-size: 1.75rem;
    }

    .section-header h2 {
        font-size: 1.25rem;
    }

    .form-row-modern {
        flex-direction: column;
        gap: 0.75rem;
    }

    .invite-email-input,
    .invite-role-select {
        width: 100%;
        font-size: 16px; /* Prevent iOS zoom */
    }

    .btn-invite {
        width: 100%;
    }

    .modern-table {
        font-size: 0.875rem;
    }

    .modern-table th,
    .modern-table td {
        padding: 0.875rem;
    }

    .member-avatar {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .member-name {
        font-size: 0.95rem;
    }

    .member-email {
        font-size: 0.8125rem;
    }

    .role-select {
        font-size: 16px; /* Prevent iOS zoom */
    }

    .actions-cell {
        text-align: left;
    }

    .btn-delete {
        width: 100%;
        font-size: 16px;
        padding: 0.5rem 0.875rem;
    }

    .address-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

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

    /* Forms */
    .form-group input,
    .form-group select {
        font-size: 16px; /* Prevent iOS zoom */
        min-height: 48px;
    }

    /* Auth Pages - Mobile */
    .auth-page {
        padding: 1rem;
    }

    .auth-card {
        padding: 28px 24px;
        border-radius: 12px;
    }

    .auth-card-wide {
        max-width: 100%;
    }

    .auth-brand {
        margin-bottom: 20px;
    }

    .auth-logo svg {
        width: 40px;
        height: 40px;
    }

    .auth-title {
        font-size: 1.75rem;
    }

    .auth-tagline {
        font-size: 0.875rem;
    }

    .auth-welcome {
        margin-bottom: 24px;
        padding-bottom: 20px;
    }

    .auth-welcome h2 {
        font-size: 1.25rem;
    }

    .auth-input-wrapper input {
        height: 48px;
        font-size: 16px; /* Prevent iOS zoom */
    }

    .auth-submit-btn {
        height: 50px;
    }

    .auth-account-type-selector {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .auth-type-card-content {
        flex-direction: row;
        padding: 16px;
        gap: 14px;
    }

    .auth-type-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .auth-type-icon svg {
        width: 24px;
        height: 24px;
    }

    .auth-type-text {
        text-align: left;
        flex: 1;
    }

    .auth-type-text strong {
        font-size: 0.95rem;
    }

    .auth-type-text span {
        font-size: 0.75rem;
    }

    .auth-type-check {
        position: static;
        flex-shrink: 0;
    }

    .auth-footer-link {
        padding-top: 16px;
    }

    .auth-footer-link span,
    .auth-footer-link a {
        font-size: 0.875rem;
    }

    .auth-page .alert {
        top: 10px;
        font-size: 0.875rem;
    }

    /* Admin Page */
    .admin-table {
        font-size: 0.875rem;
    }

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

    /* Back Link */
    .back-link {
        font-size: 1rem;
        padding: 0.5rem 0;
        min-height: 44px;
        display: inline-block;
    }

    /* Empty State */
    .empty-state {
        padding: 2.5rem 1.5rem;
        margin: 1rem auto;
    }

    .empty-state-welcome {
        padding: 2rem 1.5rem;
    }

    .empty-icon {
        font-size: 3rem;
    }

    .empty-icon-container {
        width: 80px;
        height: 80px;
    }

    .empty-icon-container .empty-icon {
        font-size: 2.5rem;
    }

    .empty-state h3 {
        font-size: 1.25rem;
    }

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

    .empty-state-features {
        flex-direction: column;
        gap: 1rem;
    }

    .empty-state-action .btn-primary-large {
        width: 100%;
        justify-content: center;
    }

    /* Search Results Mobile */
    .search-results-grid {
        grid-template-columns: 1fr;
    }

    /* Admin Invite Prompt Mobile */
    .invite-prompt {
        flex-direction: column;
        text-align: center;
    }

    .individual-account-notice {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================
   LOADING STATES & PROGRESS INDICATORS
   ============================================ */

/* Spinner Animation */
@keyframes spinner {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Base Spinner */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spinner 0.8s linear infinite;
}

.spinner-dark {
    border-color: rgba(59, 130, 246, 0.2);
    border-top-color: #3b82f6;
}

.spinner-sm {
    width: 14px;
    height: 14px;
    border-width: 2px;
}

.spinner-lg {
    width: 32px;
    height: 32px;
    border-width: 3px;
}

/* Global Loading Overlay */
.global-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.global-loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.global-loading-content {
    background: white;
    padding: 2rem 3rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.global-loading-content .spinner-lg {
    margin-bottom: 1rem;
}

.global-loading-text {
    color: #1a365d;
    font-weight: 500;
    margin: 0;
}

/* Navbar Loading Indicator */
.nav-loading-indicator {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 0 1rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
}

.nav-loading-indicator.active {
    display: flex;
}

.nav-loading-indicator .spinner {
    width: 16px;
    height: 16px;
}

/* Button Loading States */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.85;
}

.btn-loading .btn-text {
    visibility: visible;
}

.btn-loading .spinner {
    margin-right: 8px;
}

/* Specific button loading states */
.btn-upload-large.btn-loading,
.btn-invite.btn-loading,
.auth-submit-btn.btn-loading {
    cursor: wait;
    opacity: 0.9;
}

.btn-delete.btn-loading {
    cursor: wait;
    opacity: 0.7;
}

/* Upload Progress */
.upload-progress-container {
    display: none;
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.upload-progress-container.active {
    display: block;
}

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

.upload-progress-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #1a365d;
}

.upload-progress-count {
    color: #64748b;
    font-size: 0.9rem;
}

.upload-progress-bar-wrapper {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.upload-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
}

.upload-progress-status {
    font-size: 0.875rem;
    color: #64748b;
}

.upload-progress-status.success {
    color: #059669;
}

.upload-progress-status.error {
    color: #dc2626;
}

/* Skeleton Loaders */
.skeleton {
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
}

.skeleton-text-sm {
    height: 0.75rem;
    width: 60%;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.skeleton-image {
    aspect-ratio: 1;
    border-radius: 8px;
}

.skeleton-card {
    padding: 1rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

/* Photo Grid Skeleton */
.photo-grid-skeleton {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.photo-skeleton-item {
    aspect-ratio: 1;
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 12px;
}

/* Activity Feed Skeleton */
.activity-skeleton {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-skeleton-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.activity-skeleton-thumb {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.activity-skeleton-content {
    flex: 1;
}

.activity-skeleton-title {
    height: 1rem;
    width: 70%;
    margin-bottom: 0.5rem;
}

.activity-skeleton-meta {
    height: 0.75rem;
    width: 40%;
}

/* Loading State for Images */
.photo-tile-img {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-tile-img.loaded {
    opacity: 1;
}

.photo-tile.loading::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: inherit;
}

/* Centered Loading Spinner */
.loading-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: #64748b;
}

.loading-center .spinner-lg {
    margin-bottom: 1rem;
}

.loading-center p {
    margin: 0;
    font-size: 0.95rem;
}

/* Form disabled state during loading */
.form-loading {
    position: relative;
    pointer-events: none;
}

.form-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.6);
    border-radius: inherit;
}

.form-loading input,
.form-loading select,
.form-loading button {
    opacity: 0.6;
}

/* Delete button loading */
.btn-delete.btn-loading {
    min-width: 70px;
}

.btn-delete .spinner {
    width: 12px;
    height: 12px;
    border-width: 2px;
    border-color: rgba(220, 38, 38, 0.3);
    border-top-color: #dc2626;
}

/* Toast Notification System */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: #1e293b;
    color: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2), 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    min-width: 300px;
    pointer-events: auto;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.toast-visible {
    transform: translateX(0);
    opacity: 1;
}

.toast-hiding {
    transform: translateX(120%);
    opacity: 0;
}

.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-icon svg {
    width: 20px;
    height: 20px;
}

.toast-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.toast-message {
    font-size: 0.925rem;
    font-weight: 500;
    line-height: 1.4;
}

.toast-action {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    align-self: flex-start;
}

.toast-action:hover {
    background: rgba(255, 255, 255, 0.3);
}

.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 4px;
    margin: -4px -4px -4px 0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background 0.2s;
}

.toast-close:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

/* Toast Types */
.toast-success {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.toast-error {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.toast-warning {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

.toast-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

/* Flash message data (hidden, used for conversion) */
.flash-message-data {
    display: none;
}

/* Mobile adjustments for loading states */
@media (max-width: 767px) {
    .global-loading-content {
        padding: 1.5rem 2rem;
        margin: 1rem;
    }

    .upload-progress-container {
        padding: 1rem;
    }

    .toast-container {
        top: auto;
        bottom: 20px;
        left: 16px;
        right: 16px;
    }

    .toast {
        max-width: none;
        min-width: 0;
        width: 100%;
    }
}

/* =====================================================
   BROWSE PAGE STYLES
   ===================================================== */

.browse-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

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

.browse-header-content {
    flex: 1;
}

.browse-header h1 {
    font-size: 1.75rem;
    color: #1a365d;
    margin-bottom: 0.25rem;
}

.browse-subtitle {
    color: #6b7280;
    font-size: 0.95rem;
}

.btn-new-address {
    white-space: nowrap;
    flex-shrink: 0;
}

/* Controls Bar */
.browse-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.browse-controls-left,
.browse-controls-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Sort Dropdown */
.browse-sort {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.browse-sort-label {
    font-size: 0.875rem;
    color: #6b7280;
    white-space: nowrap;
}

.browse-sort-select {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 0.75rem center;
    appearance: none;
    cursor: pointer;
    color: #1a365d;
}

.browse-sort-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* Filter Input */
.browse-filter {
    position: relative;
    display: flex;
    align-items: center;
}

.browse-filter-icon {
    position: absolute;
    left: 0.75rem;
    font-size: 0.875rem;
    pointer-events: none;
}

.browse-filter-input {
    padding: 0.5rem 2rem 0.5rem 2.25rem;
    font-size: 0.875rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    width: 200px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.browse-filter-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.browse-filter-input::placeholder {
    color: #9ca3af;
}

.browse-filter-clear {
    position: absolute;
    right: 0.5rem;
    display: none;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.browse-filter-clear:hover {
    color: #6b7280;
}

/* Address List */
.browse-list {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.browse-list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s;
}

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

.browse-list-item:hover {
    background: #f9fafb;
}

.browse-item-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 10px;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.browse-item-content {
    flex: 1;
    min-width: 0;
}

.browse-item-name {
    font-weight: 600;
    color: #1a365d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.browse-item-jobs {
    font-size: 0.85rem;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.browse-item-meta {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-top: 2px;
}

.browse-item-stats {
    flex-shrink: 0;
}

.browse-item-count {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 12px;
    white-space: nowrap;
}

.browse-item-arrow {
    color: #9ca3af;
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* Browse Empty State */
.browse-empty-state {
    padding: 4rem 1.5rem;
    text-align: center;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.browse-empty-state h3 {
    color: #1a365d;
    margin-bottom: 0.5rem;
}

.browse-empty-state p {
    color: #6b7280;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

/* No Results (filtering) */
.browse-no-results {
    padding: 3rem 1.5rem;
    text-align: center;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.browse-no-results h3 {
    color: #1a365d;
    margin-bottom: 0.5rem;
}

.browse-no-results p {
    color: #6b7280;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .browse-page {
        padding: 1rem;
    }

    .browse-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .browse-header h1 {
        font-size: 1.5rem;
    }

    .btn-new-address {
        width: 100%;
        text-align: center;
    }

    .browse-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .browse-controls-left,
    .browse-controls-right {
        width: 100%;
    }

    .browse-sort {
        width: 100%;
    }

    .browse-sort-select {
        flex: 1;
    }

    .browse-filter {
        width: 100%;
    }

    .browse-filter-input {
        width: 100%;
    }

    .browse-list-item {
        padding: 0.875rem 1rem;
    }

    .browse-item-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .browse-item-stats {
        display: none;
    }

    .browse-item-meta::before {
        content: '';
    }
}

/* =====================================================
   DASHBOARD SEARCH CREATE OPTION
   ===================================================== */

.search-create-option {
    padding: 0.875rem 1rem;
    background: #f0f9ff;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background 0.2s;
}

.search-create-option:hover {
    background: #e0f2fe;
}

/* =====================================================
   MAP VIEW STYLES
   ===================================================== */

.map-container {
    margin-bottom: 1rem;
    position: relative;
}

.photo-map {
    width: 100%;
    height: clamp(400px, 65vh, 800px);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

/* Map Fullscreen Mode */
.map-container.map-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: 0;
    z-index: 9999;
    background: #1a1a1a;
}

.map-container.map-fullscreen .photo-map {
    height: 100vh;
    border-radius: 0;
    box-shadow: none;
}

.map-container.map-fullscreen .map-stats {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    margin: 0;
    z-index: 1000;
}

/* Fullscreen Toggle Button */
.map-fullscreen-btn {
    position: absolute;
    bottom: 55px;
    right: 10px;
    z-index: 1000;
    width: 34px;
    height: 34px;
    background: white;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s;
}

.map-fullscreen-btn:hover {
    background: #f4f4f4;
}

.map-fullscreen-btn svg {
    width: 16px;
    height: 16px;
    color: #333;
}

.map-container.map-fullscreen .map-fullscreen-btn {
    bottom: 70px;
    right: 20px;
}

.map-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.map-stat-separator {
    color: #d1d5db;
}

.map-stat-muted {
    color: #9ca3af;
}

.map-stat-filtered {
    color: #3b82f6;
    font-weight: 500;
}

.map-stat-warning {
    color: #f59e0b;
    font-style: italic;
}

.map-geocoded-message {
    text-align: center;
    padding: 0.75rem;
    font-size: 0.875rem;
    color: #6b7280;
    font-style: italic;
}

.map-empty-state {
    padding: 4rem 1.5rem;
    text-align: center;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.map-empty-state h3 {
    color: #1a365d;
    margin-bottom: 0.5rem;
}

.map-empty-state p {
    color: #6b7280;
    font-size: 0.95rem;
}

/* Leaflet Layer Control Styling */
.leaflet-control-layers {
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.leaflet-control-layers-toggle {
    width: 36px;
    height: 36px;
    background-size: 20px 20px;
}

.leaflet-control-layers-expanded {
    padding: 8px 12px;
    min-width: 120px;
}

.leaflet-control-layers-base label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 0.875rem;
    cursor: pointer;
}

.leaflet-control-layers-base label:hover {
    color: #3b82f6;
}

/* Custom Map Marker */
.custom-map-marker {
    background: transparent;
    border: none;
}

.custom-map-marker .marker-pin {
    width: 24px;
    height: 24px;
    background: #3b82f6;
    border: 3px solid white;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.custom-map-marker .marker-pin::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

/* Photo Popup Styles */
.photo-popup .leaflet-popup-content-wrapper {
    padding: 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.photo-popup .leaflet-popup-content {
    margin: 0;
    min-width: 180px;
}

.photo-popup .leaflet-popup-tip {
    background: white;
}

.popup-content {
    display: flex;
    flex-direction: column;
}

.popup-thumbnail-wrapper {
    width: 100%;
    height: 120px;
    overflow: hidden;
    background: #f3f4f6;
}

.popup-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popup-info {
    padding: 0.75rem;
}

.popup-filename {
    font-weight: 600;
    font-size: 0.85rem;
    color: #1a365d;
    word-break: break-word;
}

.popup-date {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.popup-view-btn {
    width: 100%;
    padding: 0.625rem;
    background: #3b82f6;
    color: white;
    border: none;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.popup-view-btn:hover {
    background: #2563eb;
}

/* Marker Cluster Styles */
.marker-cluster-small {
    background-color: rgba(59, 130, 246, 0.6);
}

.marker-cluster-small div {
    background-color: rgba(59, 130, 246, 0.8);
}

.marker-cluster-medium {
    background-color: rgba(59, 130, 246, 0.6);
}

.marker-cluster-medium div {
    background-color: rgba(59, 130, 246, 0.8);
}

.marker-cluster-large {
    background-color: rgba(59, 130, 246, 0.6);
}

.marker-cluster-large div {
    background-color: rgba(59, 130, 246, 0.8);
}

.marker-cluster {
    background-clip: padding-box;
    border-radius: 50%;
}

.marker-cluster div {
    width: 30px;
    height: 30px;
    margin-left: 5px;
    margin-top: 5px;
    text-align: center;
    border-radius: 50%;
    font: 12px "Helvetica Neue", Arial, Helvetica, sans-serif;
    color: white;
    font-weight: 600;
    line-height: 30px;
}

.marker-cluster span {
    line-height: 30px;
}

/* Mobile Map Styles */
@media (max-width: 768px) {
    .photo-map {
        height: clamp(300px, 50vh, 450px);
        border-radius: 8px;
    }

    .map-stats {
        flex-wrap: wrap;
        font-size: 0.8rem;
    }

    .map-empty-state {
        padding: 2.5rem 1rem;
    }

    .popup-thumbnail-wrapper {
        height: 100px;
    }
}

/* ========================================
   ROLE MANAGEMENT STYLES
   ======================================== */

/* Create Role Button */
.btn-create-role {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-create-role:hover {
    background: #2563eb;
}

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

/* Role Card */
.role-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.role-card-admin {
    border-color: #fbbf24;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.role-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.role-card-title h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
}

.role-badges {
    display: flex;
    gap: 0.375rem;
    margin-top: 0.375rem;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.role-badge-admin {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fbbf24;
}

.role-badge-default {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.role-user-count {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #f3f4f6;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    min-width: 50px;
}

.user-count-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: #374151;
    line-height: 1;
}

.user-count-label {
    font-size: 0.6875rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Permissions Summary */
.role-permissions-summary {
    padding: 0.5rem 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.permissions-count {
    font-size: 0.8125rem;
    color: #6b7280;
}

/* Permissions List */
.role-permissions-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.375rem;
}

.permission-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    padding: 0.25rem 0;
}

.permission-icon {
    font-size: 0.75rem;
    width: 1rem;
    text-align: center;
}

.permission-granted .permission-icon {
    color: #10b981;
}

.permission-denied .permission-icon {
    color: #d1d5db;
}

.permission-granted .permission-name {
    color: #374151;
}

.permission-denied .permission-name {
    color: #9ca3af;
}

.permission-name {
    cursor: help;
}

/* Role Card Actions */
.role-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid #e5e7eb;
}

.btn-role-action {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid;
    transition: all 0.2s;
}

.btn-role-edit {
    background: white;
    border-color: #d1d5db;
    color: #374151;
}

.btn-role-edit:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.btn-role-default {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

.btn-role-default:hover {
    background: #dbeafe;
    border-color: #93c5fd;
}

.btn-role-delete {
    background: white;
    border-color: #fecaca;
    color: #dc2626;
}

.btn-role-delete:hover:not(:disabled) {
    background: #fef2f2;
    border-color: #f87171;
}

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

.role-protected-notice {
    font-size: 0.8125rem;
    color: #9ca3af;
    font-style: italic;
    text-align: center;
    width: 100%;
}

/* Role Modal */
.modal-role {
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
}

/* Permissions Grid in Modal */
.permissions-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    padding: 0.5rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.permission-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
}

.permission-checkbox:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.permission-checkbox input[type="checkbox"] {
    margin-top: 0.125rem;
    width: 1rem;
    height: 1rem;
    cursor: pointer;
    accent-color: #3b82f6;
}

.permission-checkbox-label {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.permission-checkbox-name {
    font-weight: 500;
    color: #1f2937;
    font-size: 0.875rem;
}

.permission-checkbox-desc {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .roles-grid {
        grid-template-columns: 1fr;
    }

    .role-permissions-list {
        grid-template-columns: 1fr;
    }

    .role-card-actions {
        flex-wrap: wrap;
    }

    .btn-role-action {
        flex: 1 1 calc(50% - 0.25rem);
    }

    .modal-role {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
}

/* ========================================
   User Preferences Section
   ======================================== */

.preferences-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
}

.preferences-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.preference-info {
    flex: 1;
    min-width: 200px;
}

.preference-info label {
    display: block;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.preference-description {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
}

.preference-control {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.preference-control input[type="range"] {
    width: 200px;
    height: 8px;
    border-radius: 4px;
    background: #e2e8f0;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.preference-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.preference-control input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(59, 130, 246, 0.4);
}

.preference-control input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.preference-value {
    min-width: 60px;
    font-weight: 600;
    color: #3b82f6;
    text-align: right;
}

.preference-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 0.5rem;
}

/* Mobile responsive for preferences */
@media (max-width: 640px) {
    .preference-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .preference-control {
        width: 100%;
    }

    .preference-control input[type="range"] {
        flex: 1;
    }
}

/* ========================================
   Data Warning Modal (Cellular/WiFi)
   ======================================== */

.data-warning-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.data-warning-overlay.active {
    opacity: 1;
    visibility: visible;
}

.data-warning-modal {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s ease;
}

.data-warning-overlay.active .data-warning-modal {
    transform: scale(1) translateY(0);
}

.data-warning-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.25rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d97706;
}

.data-warning-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.75rem 0;
}

.data-warning-message {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 1.25rem 0;
}

.data-warning-message strong {
    color: #1e293b;
    font-weight: 600;
}

.data-warning-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 1.5rem;
    cursor: pointer;
}

.data-warning-checkbox input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: #3b82f6;
    cursor: pointer;
}

.data-warning-actions {
    display: flex;
    gap: 0.75rem;
}

.data-warning-actions .btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.data-warning-actions .btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.data-warning-actions .btn-secondary:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.data-warning-actions .btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
}

.data-warning-actions .btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .data-warning-modal {
        padding: 1.5rem;
    }

    .data-warning-actions {
        flex-direction: column-reverse;
    }

    .data-warning-actions .btn {
        width: 100%;
    }
}