:root {
    --bg: #f8f5ef;
    --panel: #fffef9;
    --ink: #1f2933;
    --muted: #52606d;
    --primary: #0f766e;
    --primary-dark: #115e59;
    --accent: #f97316;
    --danger: #b42318;
    --line: #d9d2c2;
    --success-bg: #e7f8ee;
    --success-ink: #166534;
    --error-bg: #fdecec;
    --error-ink: #9f1239;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Gill Sans", "Trebuchet MS", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 10% 15%, #fde8d5 0%, transparent 45%),
        radial-gradient(circle at 90% 0%, #d6f0ec 0%, transparent 40%),
        var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

a:hover {
    text-decoration: underline;
}

.wrapper {
    width: min(1100px, 92%);
    margin: 0 auto;
}

.site-header {
    background: rgba(255, 255, 255, 0.86);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    backdrop-filter: blur(6px);
    z-index: 10;
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 0;
}

.brand {
    font-size: 1.1rem;
    letter-spacing: 0.3px;
    font-weight: 700;
    color: var(--ink);
}

.top-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.top-nav a,
.link-btn {
    font-size: 0.95rem;
    font-weight: 600;
}

.link-btn {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    padding: 0;
}

.inline-form {
    display: inline;
}

.main-content {
    flex: 1;
    padding: 1.4rem 0 2rem;
}

.hero {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
    padding: 1.1rem;
}

.hero-title {
    font-size: clamp(1.5rem, 2.6vw, 2.1rem);
    margin-top: 0;
    margin-bottom: 0.8rem;
}

.lead {
    color: var(--muted);
    font-size: 1.03rem;
    line-height: 1.5;
}

.cta-row {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--primary);
    padding: 0.62rem 1rem;
    font-weight: 700;
    text-decoration: none;
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(130deg, var(--primary), var(--primary-dark));
    color: #fff;
    border: none;
}

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

.map-wrap {
    position: relative;
    overflow: hidden;
}

.map-wrap svg {
    width: 100%;
    height: 320px;
}

.lk-outline {
    fill: #efe9db;
    stroke: #2f3d4a;
    stroke-width: 3;
}

.district-line {
    fill: none;
    stroke: #9e8f75;
    stroke-width: 2;
    stroke-dasharray: 5 6;
}

.kundasale-dot {
    fill: var(--accent);
    stroke: #fff;
    stroke-width: 3;
    animation: pulse 1.8s infinite;
}

.kundasale-label {
    fill: #111827;
    font-size: 15px;
    font-weight: 700;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        transform-origin: center;
    }
    40% {
        transform: scale(1.15);
        transform-origin: center;
    }
    100% {
        transform: scale(1);
        transform-origin: center;
    }
}

.grid-2 {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.parking-sections {
    grid-template-columns: 1fr;
    max-width: 940px;
    margin-bottom: 1rem;
}

.parking-table + .parking-table {
    margin-top: 1rem;
}

.info-list {
    margin: 0;
    padding-left: 1rem;
    color: var(--muted);
    line-height: 1.45;
}

.form-card,
.table-card {
    max-width: 940px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.form-grid .full {
    grid-column: 1 / -1;
}

label {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.28rem;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.6rem 0.62rem;
    border: 1px solid #c9c3b8;
    border-radius: 9px;
    font: inherit;
    background: #fff;
}

textarea {
    min-height: 95px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #93c5fd;
    border-color: #60a5fa;
}

.filters {
    display: grid;
    grid-template-columns: 1.1fr 1.1fr 1fr auto;
    gap: 0.7rem;
    align-items: end;
    margin-bottom: 1rem;
}

.filters-wide {
    grid-template-columns: 1fr 1fr 1fr 1fr auto;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

th,
td {
    border-bottom: 1px solid var(--line);
    text-align: left;
    padding: 0.62rem 0.58rem;
    font-size: 0.93rem;
}

th {
    background: #f5f2ea;
    font-size: 0.83rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.action-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.action-stack {
    flex-direction: column;
    align-items: stretch;
    min-width: 86px;
}

.action-stack .inline-form {
    display: block;
}

.action-stack .btn {
    width: 100%;
    text-align: center;
}

.table-inline-form {
    display: flex;
    gap: 0.45rem;
    align-items: center;
}

.table-inline-form input {
    min-width: 210px;
}

.table-inline-form select {
    min-width: 190px;
}

.btn-small {
    padding: 0.4rem 0.58rem;
    border-radius: 8px;
    font-size: 0.85rem;
}

.btn-danger {
    border: 1px solid var(--danger);
    color: var(--danger);
    background: #fff;
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.flash {
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.flash-success {
    background: var(--success-bg);
    color: var(--success-ink);
    border: 1px solid #b7ebc6;
}

.flash-error {
    background: var(--error-bg);
    color: var(--error-ink);
    border: 1px solid #f7c8d6;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.85);
    padding: 0.75rem 0;
    color: var(--muted);
}

.error-text {
    color: var(--error-ink);
    margin-bottom: 0.7rem;
    font-weight: 600;
}

.muted-note {
    color: var(--muted);
    font-size: 0.88rem;
    margin-top: 0.42rem;
    margin-bottom: 0;
}

@media (max-width: 900px) {
    .hero,
    .grid-2,
    .form-grid,
    .filters {
        grid-template-columns: 1fr;
    }

    .map-wrap svg {
        height: 260px;
    }

    .top-nav {
        gap: 0.7rem;
    }
}
