/* GeoSnap — Global Styles */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --accent: #f59e0b;
    --accent-dark: #d97706;
    --success: #10b981;
    --danger: #ef4444;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--gray-800);
    background: var(--gray-50);
    line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* ── Nav ──────────────────────────────────────────────────────────────────── */

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 60px;
    background: white;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-brand {
    font-size: 22px;
    font-weight: 800;
    color: var(--gray-900);
    letter-spacing: -0.5px;
}

.nav-brand span { color: var(--primary); }

.nav-links {
    display: flex;
    gap: 24px;
    list-style: none;
}

.nav-links a {
    color: var(--gray-600);
    font-size: 15px;
    font-weight: 500;
    transition: color 0.15s;
}

.nav-links a:hover { color: var(--gray-900); }
.nav-links a.active { color: var(--primary); }

/* ── Buttons ──────────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover { background: var(--primary-dark); }

.btn-accent {
    background: var(--accent);
    color: white;
}
.btn-accent:hover { background: var(--accent-dark); }

.btn-outline {
    background: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}
.btn-outline:hover { background: var(--gray-50); border-color: var(--gray-400); }

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 17px; }

/* ── Cards ────────────────────────────────────────────────────────────────── */

.card {
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-body { padding: 20px; }

/* ── Photo Grid ───────────────────────────────────────────────────────────── */

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

.photo-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.15s, box-shadow 0.15s;
    cursor: pointer;
}

.photo-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.photo-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.photo-card-info {
    padding: 12px;
}

.photo-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.photo-card-location {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 2px;
}

.photo-card-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    margin-top: 6px;
}

/* ── Hero ──────────────────────────────────────────────────────────────────── */

.hero {
    text-align: center;
    padding: 80px 24px 60px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
    color: white;
}

.hero h1 {
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 16px;
}

.hero p {
    font-size: 20px;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 32px;
}

.hero-buttons { display: flex; gap: 12px; justify-content: center; }

/* ── Map ──────────────────────────────────────────────────────────────────── */

#map { width: 100%; height: 100%; }

.map-container { position: relative; }

.map-search {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    gap: 8px;
}

.map-search input {
    width: 360px;
    padding: 10px 16px;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    box-shadow: var(--shadow-lg);
}

.map-search input:focus { outline: 2px solid var(--primary); }

/* ── Forms ─────────────────────────────────────────────────────────────────── */

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

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 4px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 15px;
    transition: border-color 0.15s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

textarea.form-control { min-height: 80px; resize: vertical; }

/* ── Upload Drop Zone ─────────────────────────────────────────────────────── */

.drop-zone {
    border: 2px dashed var(--gray-300);
    border-radius: 12px;
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.drop-zone-icon { font-size: 48px; margin-bottom: 12px; }
.drop-zone-text { font-size: 16px; color: var(--gray-600); }
.drop-zone-hint { font-size: 13px; color: var(--gray-400); margin-top: 8px; }

/* ── Stats ─────────────────────────────────────────────────────────────────── */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--gray-900);
}

.stat-label {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 4px;
}

/* ── Table ─────────────────────────────────────────────────────────────────── */

.table-wrap { overflow-x: auto; }

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

th, td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
    font-size: 14px;
}

th {
    font-weight: 600;
    color: var(--gray-600);
    background: var(--gray-50);
}

/* ── Badge ─────────────────────────────────────────────────────────────────── */

.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
}

.badge-listed { background: #d1fae5; color: #065f46; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-rejected { background: #fee2e2; color: #991b1b; }
.badge-paid { background: #d1fae5; color: #065f46; }

/* ── Container ────────────────────────────────────────────────────────────── */

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 48px 0; }

/* ── Footer ───────────────────────────────────────────────────────────────── */

.footer {
    background: var(--gray-800);
    color: var(--gray-400);
    padding: 40px 24px;
    text-align: center;
    font-size: 14px;
}

.footer a { color: var(--gray-300); }
.footer a:hover { color: white; }

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .hero h1 { font-size: 32px; }
    .hero p { font-size: 17px; }
    .hero-buttons { flex-direction: column; align-items: center; }
    .nav-links { gap: 16px; }
    .nav-links a { font-size: 13px; }
    .map-search input { width: 260px; }
    .photo-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

/* ── Utility ──────────────────────────────────────────────────────────────── */

.text-center { text-align: center; }
.text-muted { color: var(--gray-500); }
.text-muted-light { color: var(--gray-400); }
.text-subtle { color: var(--gray-600); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.text-base { font-size: 14px; }
.text-lg { font-size: 15px; }
.text-inherit { color: inherit; }
.text-success { color: var(--success); }
.text-accent-bold { color: var(--accent); font-weight: 700; }
.text-primary-bold { color: var(--primary); font-weight: 700; }
.font-bold { font-weight: 600; }
.font-heavy { font-weight: 700; }
.font-mono { font-family: monospace; }
.no-decoration { text-decoration: none; }
.no-pad { padding: 0; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.ml-2 { margin-left: 8px; }
.d-flex { display: flex; }
.d-block { display: block; }
.d-none { display: none; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1; }
.flex-between { justify-content: space-between; }
.flex-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ── Page Headers ─────────────────────────────────────────────────────────── */

.page-title { font-size: 28px; margin-bottom: 8px; }
.page-subtitle { color: var(--gray-500); margin-bottom: 24px; }
.section-title { font-size: 18px; margin-bottom: 16px; }
.section-title-lg { font-size: 28px; margin-bottom: 32px; }

/* ── Content Layout ───────────────────────────────────────────────────────── */

.container-narrow { max-width: 800px; margin: 0 auto; padding: 0 24px; }
.container-form { max-width: 400px; }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }

/* ── Hero Variant ─────────────────────────────────────────────────────────── */

.btn-outline-light {
    background: transparent;
    color: white;
    border: 1px solid rgba(255,255,255,0.4);
}
.btn-outline-light:hover { background: rgba(255,255,255,0.1); }

/* ── Sidebar / Explore ────────────────────────────────────────────────────── */

.sidebar-count { float: right; color: var(--gray-400); }

/* ── Map Popup ────────────────────────────────────────────────────────────── */

.map-popup { text-decoration: none; display: block; width: 180px; }
.map-popup img { width: 100%; border-radius: 4px; }
.map-popup-title { font-weight: 600; margin-top: 6px; font-size: 14px; color: var(--gray-800); }
.map-popup-price { color: var(--primary); font-weight: 700; font-size: 15px; }

/* ── Sidebar Photo List ───────────────────────────────────────────────────── */

.sidebar-empty { padding: 24px; text-align: center; color: var(--gray-400); }

/* ── Photo Detail ─────────────────────────────────────────────────────────── */

.photo-title-lg { font-size: 24px; margin-bottom: 4px; }
.photo-location-text { color: var(--gray-500); font-size: 14px; }
.photographer-name { font-weight: 600; font-size: 14px; }
.photographer-subtitle { font-size: 13px; color: var(--gray-500); }
.price-label { color: var(--gray-500); font-size: 13px; }
.print-section-title { font-weight: 600; font-size: 15px; margin-bottom: 10px; }
.photo-description { font-size: 14px; color: var(--gray-600); }
.btn-approve { background: var(--success); color: white; }
.btn-reject { background: var(--danger); color: white; }

/* ── Dashboard ────────────────────────────────────────────────────────────── */

.photo-card-stats { display: flex; justify-content: space-between; margin-top: 6px; font-size: 13px; color: var(--gray-500); }
.order-cut { color: var(--success); font-weight: 600; }
.empty-state { text-align: center; padding: 32px; color: var(--gray-400); }

/* ── Upload ───────────────────────────────────────────────────────────────── */

.upload-layout { max-width: 800px; margin: 0 auto; padding: 32px 24px; }
.price-input { width: 150px; }
.location-label { font-size: 14px; font-weight: 600; margin-bottom: 4px; display: block; }
.location-text { font-size: 14px; color: var(--gray-600); margin-left: 8px; }
.manual-loc-row { display: flex; gap: 12px; }

/* ── Admin ────────────────────────────────────────────────────────────────── */

.pending-info-title { font-weight: 600; }
.pending-info-meta { font-size: 13px; color: var(--gray-500); }

/* ── Footer Links ─────────────────────────────────────────────────────────── */

.footer-links { margin-top: 8px; }

.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    margin-bottom: 16px;
}

.alert-success { background: #d1fae5; color: #065f46; }
.alert-error { background: #fee2e2; color: #991b1b; }
.alert-info { background: var(--primary-light); color: #1e40af; }

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    color: var(--gray-400);
}
