:root {
    --color-primary: #c78e1f;
    --color-primary-light: #f4d58d;
    --color-secondary: #1e3a4c;
    --color-accent: #d95d39;
    --color-bg: #fbf7ed;
    --color-card: #ffffff;
    --color-text: #2a2a2a;
    --color-text-muted: #5c5c5c;
    --color-success: #2a9d8f;
    --color-danger: #c0392b;
    --color-pending: #e9c46a;
    --radius: 12px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --max-width: 1120px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
}

.container {
    width: min(100% - 2rem, var(--max-width));
    margin-inline: auto;
}

.container.narrow {
    max-width: 720px;
}

.container.wide {
    max-width: 1300px;
}

/* Header */
.site-header {
    background: var(--color-card);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 1px 8px rgba(0,0,0,0.04);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 0;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--color-secondary);
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}

.logo-icon {
    font-size: 1.6rem;
    line-height: 1;
}

.main-nav {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.main-nav a {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.35rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s, color 0.2s;
}

.main-nav a:hover {
    border-color: var(--color-primary);
    color: var(--color-secondary);
}

.main-nav .nav-admin {
    color: var(--color-accent);
}

/* Hero */
.hero {
    background: linear-gradient(160deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
    color: var(--color-secondary);
    padding: 5rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.hero-skyline {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    color: rgba(255, 255, 255, 0.35);
    height: 170px;
    pointer-events: none;
}

.hero-skyline svg,
.hero-skyline img {
    width: 100%;
    height: 100%;
    display: block;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 760px;
    margin: 0 auto;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.92);
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.hero h1 {
    font-size: clamp(2.4rem, 7vw, 4.2rem);
    margin: 0 0 0.75rem;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.12);
    letter-spacing: -0.03em;
    line-height: 1.05;
}

.hero-sub {
    font-size: 1.3rem;
    margin: 0 0 2rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 700;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
    font-size: 1rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.btn-primary {
    background: var(--color-secondary);
    color: #fff;
}

.btn-primary:hover {
    background: #152a38;
}

.btn-secondary {
    background: #fff;
    color: var(--color-secondary);
    border-color: var(--color-secondary);
}

.btn-secondary:hover {
    background: var(--color-secondary);
    color: #fff;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.15rem;
    width: 100%;
}

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

.btn-success {
    background: var(--color-success);
    color: #fff;
}

.btn-danger {
    background: var(--color-danger);
    color: #fff;
}

/* Sections */
.section {
    padding: 3.5rem 0;
}

.section-alt {
    background: #fff;
}

.section h1,
.section h2 {
    color: var(--color-secondary);
    margin-top: 0;
    font-size: 2rem;
    letter-spacing: -0.02em;
}

.section h1 {
    font-size: 2.4rem;
}

.section-intro {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    margin-top: -0.5rem;
    max-width: 680px;
}

/* Map */
.map-wrapper {
    background: var(--color-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem;
}

/* Map wrapper */
.map-wrapper {
    display: block;
    margin-top: 1.5rem;
}

.osm-map {
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 420px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid #e8e0d0;
}

.osm-map.small {
    aspect-ratio: 16 / 10;
    min-height: 320px;
}

.seller-detail {
    margin-top: 1rem;
    padding: 1.25rem;
    background: #fff;
    border-radius: var(--radius);
    border-left: 5px solid var(--color-primary);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.seller-detail.hidden {
    display: none;
}

.seller-detail h3 {
    margin: 0 0 0.35rem;
    color: var(--color-secondary);
    font-size: 1.25rem;
}

.seller-detail p {
    margin: 0.35rem 0;
    color: var(--color-text-muted);
}

/* Seller grid */
.seller-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 1.75rem;
}

.seller-card {
    background: var(--color-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.35rem;
    border: 1px solid rgba(0,0,0,0.04);
    transition: transform 0.15s;
}

.seller-card:hover {
    transform: translateY(-3px);
}

.seller-card-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 0.85rem;
}

.seller-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
    font-size: 0.95rem;
}

.seller-card h3 {
    margin: 0;
    font-size: 1.15rem;
    color: var(--color-secondary);
}

.seller-categories {
    font-weight: 700;
    color: var(--color-accent);
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
}

.seller-description {
    color: var(--color-text-muted);
    margin: 0;
    font-size: 0.95rem;
}

/* Rules */
.rules-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    display: grid;
    gap: 0.75rem;
}

.rules-list li {
    position: relative;
    padding: 1rem 1.25rem 1rem 3rem;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.04);
}

.rules-list li::before {
    content: "✓";
    position: absolute;
    left: 1.1rem;
    top: 1.05rem;
    color: var(--color-success);
    font-weight: 800;
    font-size: 1.2rem;
}

.rules-list-numbered {
    list-style: decimal;
    padding-left: 1.25rem;
    display: block;
}

.rules-list-numbered li {
    padding-left: 1rem;
    margin-bottom: 0.75rem;
    background: transparent;
    box-shadow: none;
    border: none;
}

.rules-list-numbered li::before {
    content: none;
}

.rules-cta {
    margin-top: 2rem;
    text-align: center;
}

/* Forms */
.register-form,
.login-form {
    background: var(--color-card);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.04);
}

fieldset {
    border: none;
    padding: 0;
    margin: 0 0 1.75rem;
}

legend {
    font-weight: 800;
    color: var(--color-secondary);
    margin-bottom: 0.85rem;
    font-size: 1.15rem;
}

label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    color: var(--color-text);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1.5px solid #ddd4c4;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 1rem;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(199, 142, 31, 0.12);
}

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

.form-col {
    flex: 1;
    min-width: 140px;
}

.form-col.small {
    flex: 0 0 90px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 0.6rem;
}

.category-chip {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 0.9rem;
    background: #f4efe4;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    border: 2px solid transparent;
}

.category-chip:hover {
    background: #ebe6d6;
}

.category-chip:has(input:checked) {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
}

.category-chip input {
    margin: 0;
    accent-color: var(--color-primary);
}

.category-chip span {
    font-weight: 600;
}

.hint {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-top: -0.25rem;
    margin-bottom: 0.85rem;
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: #f4efe4;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.checkbox-row input {
    margin-top: 0.25rem;
    flex-shrink: 0;
    accent-color: var(--color-primary);
}

.checkbox-row a {
    color: var(--color-accent);
    font-weight: 700;
}

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

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-top: 1.75rem;
    font-size: 0.95rem;
    border: 1px solid rgba(0,0,0,0.04);
}

.admin-table th,
.admin-table td {
    padding: 0.85rem;
    text-align: left;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.admin-table th {
    background: var(--color-secondary);
    color: #fff;
    font-weight: 700;
}

.admin-table tr.pending {
    background: #fff9e6;
}

.admin-table tr.approved {
    background: #f0fff4;
}

.badge {
    display: inline-block;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-pending {
    background: #fff3cd;
    color: #856404;
}

.actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Flash messages */
.flash-messages {
    margin-top: 1rem;
}

.flash {
    padding: 0.85rem 1.1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.flash-success {
    background: #d4edda;
    color: #155724;
}

.flash-danger {
    background: #f8d7da;
    color: #721c24;
}

/* Footer */
.site-footer {
    background: var(--color-secondary);
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

.site-footer p {
    margin: 0.3rem 0;
    font-size: 0.9rem;
}

/* Rule cards */
.section-rules {
    background: var(--color-bg);
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    margin: 2rem 0;
}

.rule-card {
    background: var(--color-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--color-primary);
    transition: transform 0.15s, box-shadow 0.15s;
}

.rule-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.rule-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1;
}

.rule-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
    color: var(--color-secondary);
}

.rule-card p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.rules-cta {
    text-align: center;
    margin-top: 2rem;
}

/* Utilities */
.empty-state {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 1.15rem;
    padding: 2.5rem;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.text-link {
    color: var(--color-accent);
    font-weight: 700;
}

@media (max-width: 700px) {
    .hero {
        padding: 3.5rem 0 3rem;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .main-nav {
        gap: 1rem;
    }

    .admin-table {
        display: block;
        overflow-x: auto;
    }

    .register-form,
    .login-form {
        padding: 1.25rem;
    }
}

/* Print list */
.print-list {
    margin-top: 1.5rem;
    background: #fff;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.print-title {
    margin: 0 0 0.25rem;
    font-size: 1.4rem;
    color: var(--color-secondary);
}

.print-date {
    margin: 0 0 1rem;
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.print-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.print-table th,
.print-table td {
    text-align: left;
    padding: 0.65rem 0.5rem;
    border-bottom: 1px solid #e8e0d0;
    vertical-align: top;
}

.print-table th {
    font-weight: 700;
    color: var(--color-secondary);
    background: #faf8f3;
}

.print-table tr:last-child td {
    border-bottom: none;
}

@media print {
    body * {
        visibility: hidden;
    }

    .print-list,
    .print-list * {
        visibility: visible;
    }

    .print-list {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 0;
        box-shadow: none;
        background: #fff;
    }

    .print-table th,
    .print-table td {
        font-size: 11pt;
        padding: 0.4rem;
    }

    .print-title {
        font-size: 16pt;
    }

    .print-date {
        font-size: 10pt;
    }
}
