/* All tables inside your container share column widths */
.table th, .table td {
    width: 120px;   /* adjust as needed */
    min-width: 80px;    text-align: center;
}
.table {
    table-layout: fixed; /* ensures fixed column width */
    width: 100%;
}
table thead.my-green th {
    background-color: #107227 !important; /* force override */
    color: white !important;
}





.pulsate {
    animation: pulsate 5.5s infinite;
}

@keyframes pulsate {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ── Add Nutrient Page: staged table ── */
.nutrient-staged-table {
    table-layout: auto;
}

/* ── Mobile optimizations ── */
@media (max-width: 576px) {
    /* Reduce header size on mobile */
    header h1 {
        font-size: 1rem !important;
    }

    /* Compact cards */
    .card-header {
        padding: 0.4rem 0.75rem;
    }

    /* Ensure selects and inputs have adequate touch target (min 44px) */
    .form-select-sm,
    .form-control-sm {
        min-height: 38px;
        font-size: 0.875rem;
    }

    /* Full-width buttons on mobile */
    .btn-sm {
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
    }

    /* Compact staged table */
    .nutrient-staged-table th,
    .nutrient-staged-table td {
        padding: 0.3rem 0.4rem;
        font-size: 0.8rem;
    }

    /* Prevent zoom on input focus (iOS) */
    input[type="number"],
    select {
        font-size: 16px !important;
    }
}

.location-card {
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 14px;
    margin-bottom: 16px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.05);
    overflow: hidden;
    background: #fff;
}

.location-header {
    padding: 14px 16px;
    background: #fff;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.location-header:hover {
    background: #f8f9fa;
}

.location-count {
    background: #198754;
    color: white;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 999px;
}

.plant-row {
    display: flex;
    padding: 10px 14px;
    border-top: 1px solid rgba(0,0,0,0.05);
    transition: background 0.15s ease;
}

.location-card:hover {
    /* DO NOT change background here */
}

.plant-col {
    flex: 1;
    font-size: 0.92rem;
}

.plant-col.small {
    flex: 0.6;
}

.location-card {
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 14px;
    margin-bottom: 16px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.05);
    overflow: hidden;
    background: #fff;
}

.location-header {
    padding: 14px 16px;
    background: #f8f9fa;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.location-header:hover {
    background: #f1f3f5;
}

.location-count {
    background: #198754;
    color: white;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 999px;
}

.location-body {
    display: none;
}

.location-card.open .location-body {
    display: block;
}

.chevron {
    transition: transform 0.2s ease;
}

.location-card.open .chevron {
    transform: rotate(180deg);
}


.status-circle {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    background: grey;
    flex-shrink: 0;
}

.pulsate {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0,0,0,0.2); }
    70% { box-shadow: 0 0 0 6px rgba(0,0,0,0); }
    100% { box-shadow: 0 0 0 0 rgba(0,0,0,0); }
}

/* table look upgrade */
.table-clean td {
    border-color: rgba(0,0,0,0.06) !important;
    vertical-align: middle;
    padding: 10px 12px;
}

.table-clean tbody tr {
    transition: background 0.15s ease;
}

.table-clean tbody tr:hover {
    background: rgba(0,0,0,0.02);
}

/* combined cell layout */
.device-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.device-label {
    font-weight: 500;
    font-size: 0.95rem;
    color: #212529;
}

.intake-row {
    cursor: pointer;
    font-weight: 500;
}

.intake-row:hover {
    background: rgba(0,0,0,0.03);
}

.nutrient-row td {
    padding-left: 24px !important;
    font-size: 0.92rem;
    color: #495057;
}

.nutrient-row {
    transition: all 0.15s ease;
}

.nutrient-row.hidden {
    display: none;
}

/* optional indicator */
.intake-badge {
    background: #198754;
    color: white;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 999px;
    margin-left: 8px;
}


.page-header {
    padding: 14px 18px;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.04);
}

.page-header h4 {
    font-weight: 600;
    color: #212529;
}

.page-header small {
    display: block;
    margin-top: 2px;
}

.plant-header {
    background: #fafafa;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6c757d;
    font-weight: 600;
}

header .status-circle {
    position: relative;
    z-index: 1100;
}