:root {
    --brand: #0d5c4a;
    --brand-dark: #094437;
    --brand-light: #e6f2ef;
}

body {
    background: #f4f6f8;
    font-size: 0.95rem;
}

.app-navbar {
    background: linear-gradient(90deg, var(--brand-dark), var(--brand));
    box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}

.app-navbar .nav-link.active {
    background: rgba(255, 255, 255, .18);
    border-radius: .4rem;
}

/* Login */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--brand-dark), var(--brand));
    padding: 1rem;
}

.login-card {
    width: 100%;
    max-width: 400px;
    border: none;
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
}

/* Cards / dashboard */
.stat-card {
    border: none;
    border-radius: .85rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
    transition: transform .15s ease, box-shadow .15s ease;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: .75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    background: var(--brand-light);
    color: var(--brand);
}

.card {
    border: none;
    border-radius: .75rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #eef0f2;
    font-weight: 600;
}

.btn-brand {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.btn-brand:hover {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
    color: #fff;
}

.table thead th {
    background: #f8f9fa;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #6c757d;
}

.page-title {
    font-weight: 600;
    color: #2c3e50;
}

/* Make tables scroll nicely on mobile */
.table-responsive {
    border-radius: .5rem;
}

@media (max-width: 576px) {
    .page-title { font-size: 1.25rem; }
}

/* ===================== Plant Layout Map ===================== */
.plant-map-wrap {
    width: 100%;
    overflow-x: auto;
    background: #fff;
    border-radius: .75rem;
}

.plant-map {
    width: 100%;
    min-width: 520px;
    height: auto;
    display: block;
}

.plant-area {
    cursor: pointer;
    transition: filter .12s ease, opacity .12s ease;
    outline: none;
}

.plant-area:hover,
.plant-area:focus {
    filter: brightness(1.08) drop-shadow(0 0 4px rgba(0, 0, 0, .35));
}

.plant-area rect,
.plant-area circle,
.plant-area ellipse,
.plant-area path {
    stroke-width: 1.5;
}

.plant-area.selected rect,
.plant-area.selected circle,
.plant-area.selected ellipse,
.plant-area.selected path {
    stroke: #0d5c4a;
    stroke-width: 3.5;
}

.area-label {
    font-size: 11px;
    font-weight: 700;
    fill: #1f2933;
    text-anchor: middle;
    pointer-events: none;
    paint-order: stroke;
    stroke: #ffffff;
    stroke-width: 2.5px;
}

.area-label.sm {
    font-size: 8px;
    font-weight: 600;
}

.road-label {
    font-size: 9px;
    fill: #5b6570;
    font-weight: 600;
}

/* Legend */
.map-legend .dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 1px solid #334155;
    vertical-align: -2px;
    margin-right: .35rem;
}
.dot-green  { background: #2e9e5b; }
.dot-yellow { background: #e8b800; }
.dot-red    { background: #d64545; }
.dot-none   { background: #c7ced6; }
