/* =====================================================
   Real Estate Property Rates — Public Frontend CSS
   ===================================================== */

:root {
    --primary:       #00C27A;
    --primary-dark:  #00a868;
    --primary-light: #e6faf3;
    --secondary:     #0F172A;
    --text:          #1e293b;
    --text-muted:    #64748b;
    --border:        #e2e8f0;
    --bg:            #f8fafc;
    --card-bg:       #ffffff;
    --shadow:        0 1px 6px rgba(0,0,0,.08);
    --shadow-md:     0 4px 20px rgba(0,0,0,.10);
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
}

/* ─── Top Header Bar ─────────────────────────────── */
.site-topbar {
    background: var(--secondary);
    color: #94a3b8;
    font-size: .78rem;
    padding: 6px 0;
}

.site-navbar {
    background: #fff;
    border-bottom: 3px solid var(--primary);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.navbar-brand-custom {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.brand-icon-wrap {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.1rem;
}

.brand-text-main {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--secondary);
    line-height: 1;
}
.brand-text-sub {
    font-size: .7rem;
    color: var(--text-muted);
}

.nav-link-custom {
    color: var(--text) !important;
    font-weight: 500;
    font-size: .88rem;
    padding: 8px 14px !important;
    border-radius: 6px;
    transition: all .2s;
}
.nav-link-custom:hover {
    background: var(--primary-light);
    color: var(--primary) !important;
}
.nav-link-custom.active {
    background: var(--primary-light);
    color: var(--primary) !important;
    font-weight: 600;
}

/* ─── Hero Section ───────────────────────────────── */
.rates-hero {
    background: linear-gradient(135deg, var(--secondary) 0%, #1e3a5f 60%, #0d4f35 100%);
    color: #fff;
    padding: 48px 0 36px;
}

.hero-badge {
    display: inline-block;
    background: rgba(0,194,122,.2);
    border: 1px solid rgba(0,194,122,.4);
    color: var(--primary);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.hero-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 8px;
}

.hero-sub {
    color: #94a3b8;
    font-size: .9rem;
}

.last-updated-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 20px;
    padding: 5px 14px;
    font-size: .78rem;
    color: #e2e8f0;
    margin-top: 10px;
}

/* ─── Filter Card ────────────────────────────────── */
.filter-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    padding: 24px;
    margin-top: -28px;
    position: relative;
    z-index: 10;
}

.filter-card label {
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 6px;
}

.filter-card .form-control,
.filter-card .form-select {
    border-radius: 10px;
    border: 1.5px solid var(--border);
    padding: 10px 14px;
    font-size: .875rem;
}
.filter-card .form-control:focus,
.filter-card .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 .2rem rgba(0,194,122,.2);
}

.btn-search {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    color: #fff;
    border-radius: 10px;
    padding: 11px 28px;
    font-weight: 700;
    transition: all .2s;
    width: 100%;
}
.btn-search:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0,194,122,.35);
    color: #fff;
}

/* ─── Phase Quick Links ──────────────────────────── */
.phase-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }

.phase-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    transition: all .2s;
    white-space: nowrap;
}
.phase-pill:hover,
.phase-pill.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* ─── Rates Table Section ────────────────────────── */
.rates-section { padding: 32px 0; }

.rates-card {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.rates-card-header {
    background: linear-gradient(135deg, var(--secondary), #1e3a5f);
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.rates-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.rates-date-badge {
    background: rgba(0,194,122,.2);
    border: 1px solid rgba(0,194,122,.3);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 600;
}

/* ─── Rates Table ────────────────────────────────── */
.rates-table-wrap { overflow-x: auto; }

.rates-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}

.rates-table thead tr {
    background: var(--primary-light);
}

.rates-table thead th {
    padding: 13px 18px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #065f46;
    border-bottom: 2px solid var(--primary);
    white-space: nowrap;
    text-align: center;
}

.rates-table thead th:first-child { text-align: left; }

.rates-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background .15s;
}

.rates-table tbody tr:hover { background: #f8fff9; }
.rates-table tbody tr:last-child { border-bottom: none; }

.rates-table tbody td {
    padding: 14px 18px;
    text-align: center;
    vertical-align: middle;
}

.rates-table tbody td:first-child {
    text-align: left;
    font-weight: 700;
    color: var(--secondary);
}

.rate-value {
    font-size: .95rem;
    font-weight: 700;
    color: #059669;
}

.rate-empty {
    color: #cbd5e1;
    font-size: .85rem;
}

/* ─── Info Strip ─────────────────────────────────── */
.info-strip {
    background: #fff3cd;
    border-left: 4px solid #f59e0b;
    border-radius: 0;
    padding: 10px 18px;
    font-size: .82rem;
    color: #92400e;
}

/* ─── Society Cards ──────────────────────────────── */
.society-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    transition: all .2s;
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}
.society-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
    color: inherit;
}
.society-card-icon {
    width: 48px; height: 48px;
    background: var(--primary-light);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 12px;
}

/* ─── Stats Bar ──────────────────────────────────── */
.stats-bar {
    background: var(--secondary);
    color: #94a3b8;
    padding: 16px 0;
}
.stats-bar .stat-item { text-align: center; }
.stats-bar .stat-num  { font-size: 1.3rem; font-weight: 800; color: var(--primary); }
.stats-bar .stat-lbl  { font-size: .72rem; text-transform: uppercase; letter-spacing: .5px; }

/* ─── Footer ─────────────────────────────────────── */
.site-footer {
    background: var(--secondary);
    color: #94a3b8;
    padding: 48px 0 24px;
}
.footer-brand { color: #f8fafc; font-size: 1.1rem; font-weight: 800; }
.footer-link  { color: #94a3b8; text-decoration: none; font-size: .85rem; display: block; margin-bottom: 6px; }
.footer-link:hover { color: var(--primary); }
.footer-divider { border-color: rgba(255,255,255,.08); margin: 24px 0; }
.footer-bottom { font-size: .8rem; text-align: center; color: #64748b; }

/* ─── Loading ────────────────────────────────────── */
.rate-loader {
    text-align: center;
    padding: 48px;
    color: var(--text-muted);
}
.rate-loader .spinner-border { color: var(--primary); }

/* ─── Empty State ────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-muted);
}
.empty-state i { font-size: 3rem; opacity: .3; }

/* ─── Responsive ─────────────────────────────────── */
@media (max-width: 767px) {
    .hero-title { font-size: 1.4rem; }
    .filter-card { margin-top: 0; border-radius: 0; }
    .rates-table { font-size: .82rem; }
    .rates-table td, .rates-table th { padding: 10px 12px; }
}
