/* =========================
   NURSERY PAGE
========================= */

.nursery-page-intro {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 30px;
}

.nursery-breadcrumb {
    margin: 0 0 8px;
    font-size: 13px;
    color: #64748b;
}

.nursery-page-intro h2 {
    margin: 0;
    font-size: 30px;
    color: #334155;
}

.nursery-page-intro p:last-child {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 14px;
}

.nursery-primary-button {
    border: none;
    background: #14532D;
    color: #ffffff;
    padding: 12px 18px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.nursery-primary-button:hover {
    background: #166534;
}


/* =========================
   STATISTICS
========================= */

.nursery-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.nursery-stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.nursery-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #DCFCE7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    flex-shrink: 0;
}

.nursery-stat-content {
    display: flex;
    flex-direction: column;
}

.nursery-stat-content span {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 4px;
}

.nursery-stat-content strong {
    font-size: 24px;
    color: #334155;
    line-height: 1.2;
}

.nursery-stat-content small {
    margin-top: 4px;
    font-size: 11px;
    color: #94a3b8;
}


/* =========================
   RECORDS
========================= */

.nursery-records-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
}

.nursery-records-header {
    padding: 24px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.nursery-section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #16A34A;
}

.nursery-records-header h3 {
    margin: 5px 0 4px;
    font-size: 21px;
    color: #334155;
}

.nursery-records-header p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

.nursery-export-button {
    border: 1px solid #dbe4dc;
    background: #ffffff;
    color: #14532D;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.nursery-export-button:hover {
    background: #f0fdf4;
}


/* =========================
   FILTERS
========================= */

.nursery-filters {
    padding: 0 24px 20px;
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 12px;
}

.nursery-search {
    height: 42px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 8px;
}

.nursery-search span {
    color: #94a3b8;
}

.nursery-search input {
    width: 100%;
    border: none;
    outline: none;
    font: inherit;
    color: #334155;
}

.nursery-filters select {
    height: 42px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0 12px;
    background: #ffffff;
    color: #475569;
    outline: none;
}


/* =========================
   TABLE
========================= */
/* =========================
   TABLE
========================= */

.nursery-table-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

.nursery-table {
    width: 100%;
    min-width: 1050px;
    border-collapse: collapse;
    table-layout: auto;
}

.nursery-table th {
    padding: 13px 16px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    white-space: nowrap;
}

.nursery-table td {
    padding: 15px 16px;
    border-bottom: 1px solid #eef2f7;
    font-size: 13px;
    color: #475569;
    white-space: nowrap;
    vertical-align: middle;
}

.nursery-table tbody tr:hover {
    background: #f8fafc;
}

.nursery-table td strong {
    color: #334155;
}

/* Nursery column */
.nursery-table th:first-child,
.nursery-table td:first-child {
    min-width: 150px;
}

/* Location */
.nursery-table th:nth-child(2),
.nursery-table td:nth-child(2) {
    min-width: 100px;
}

/* Manager */
.nursery-table th:nth-child(3),
.nursery-table td:nth-child(3) {
    min-width: 130px;
}

/* Zones */
.nursery-table th:nth-child(4),
.nursery-table td:nth-child(4) {
    width: 70px;
}

/* Capacity */
.nursery-table th:nth-child(5),
.nursery-table td:nth-child(5) {
    min-width: 110px;
}

/* Current Stock */
.nursery-table th:nth-child(6),
.nursery-table td:nth-child(6) {
    min-width: 120px;
}

/* Status */
.nursery-table th:nth-child(7),
.nursery-table td:nth-child(7) {
    min-width: 100px;
}

/* Action */
.nursery-table th:nth-child(8),
.nursery-table td:nth-child(8) {
    min-width: 250px;
}

.nursery-status {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

.nursery-status-active {
    background: #dcfce7;
    color: #166534;
}

.nursery-status-inactive {
    background: #f1f5f9;
    color: #64748b;
}

.nursery-view-button {
    border: none;
    background: transparent;
    color: #14532D;
    font-weight: 600;
    cursor: pointer;
    padding: 7px 4px;
}

.nursery-view-button:hover {
    text-decoration: underline;
}

.nursery-action-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

/* =========================
   FOOTER
========================= */

.nursery-table-footer {
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.nursery-table-footer > span {
    font-size: 12px;
    color: #64748b;
}

.nursery-pagination {
    display: flex;
    gap: 5px;
}

.nursery-pagination button {
    min-width: 32px;
    height: 32px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    border-radius: 6px;
    color: #64748b;
    cursor: pointer;
}

.nursery-pagination button.active {
    background: #14532D;
    border-color: #14532D;
    color: #ffffff;
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1000px) {

    .nursery-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

}

@media (max-width: 700px) {

    .nursery-page-intro {
        align-items: flex-start;
        flex-direction: column;
    }

    .nursery-stats-grid {
        grid-template-columns: 1fr;
    }

    .nursery-filters {
        grid-template-columns: 1fr;
    }

}

/* ==========================================
   ADD NURSERY MODAL
   ========================================== */

.nursery-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
}

.nursery-modal-overlay.show {
    display: flex;
}

.nursery-modal {
    width: min(680px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.2);
    padding: 28px;
}

.nursery-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}

.modal-label {
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #16A34A;
}

.nursery-modal-header h3 {
    margin: 0;
    font-size: 24px;
    color: #334155;
}

.nursery-modal-close {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 10px;
    background: #F1F5F9;
    color: #64748B;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
    transition: 0.2s ease;
}

.nursery-modal-close:hover {
    background: #DCFCE7;
    color: #14532D;
}

.nursery-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.nursery-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nursery-form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.nursery-form-group input,
.nursery-form-group select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid #CBD5E1;
    border-radius: 10px;
    background: #F8FAFC;
    color: #334155;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: 0.2s ease;
    box-sizing: border-box;
}

.nursery-form-group input:focus,
.nursery-form-group select:focus {
    border-color: #16A34A;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.nursery-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #E2E8F0;
}

.nursery-cancel-button,
.nursery-save-button {
    min-height: 44px;
    padding: 0 20px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.nursery-cancel-button {
    border: 1px solid #CBD5E1;
    background: #ffffff;
    color: #475569;
}

.nursery-cancel-button:hover {
    background: #F8FAFC;
}

.nursery-save-button {
    border: none;
    background: #14532D;
    color: #ffffff;
}

.nursery-save-button:hover {
    background: #166534;
}


/* Mobile */
@media (max-width: 640px) {

    .nursery-modal {
        padding: 22px;
        border-radius: 14px;
    }

    .nursery-form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .nursery-modal-actions {
        flex-direction: column-reverse;
    }

    .nursery-cancel-button,
    .nursery-save-button {
        width: 100%;
    }
}

/* ==========================================
   VIEW NURSERY DETAILS
   ========================================== */

.nursery-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.nursery-detail-item {
    padding: 17px;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    background: #F8FAFC;
}

.nursery-detail-item span {
    display: block;
    margin-bottom: 7px;
    font-size: 12px;
    font-weight: 600;
    color: #64748B;
}

.nursery-detail-item strong {
    display: block;
    font-size: 15px;
    color: #334155;
}

@media (max-width: 640px) {

    .nursery-details-grid {
        grid-template-columns: 1fr;
    }

}

.nursery-action-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nursery-edit-button {
    border: none;
    background: #DCFCE7;
    color: #14532D;
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.nursery-edit-button:hover {
    background: #BBF7D0;
}

@media (max-width: 700px) {
    .nursery-action-buttons {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ==========================================
   ACTIVATE / DEACTIVATE BUTTON
   ========================================== */

.nursery-status-button {
    border: none;
    padding: 7px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Active nursery → show red Deactivate button */
.nursery-status-button.deactivate {
    background: #fee2e2;
    color: #b91c1c;
}

.nursery-status-button.deactivate:hover {
    background: #fecaca;
}

/* Inactive nursery → show green Activate button */
.nursery-status-button.activate {
    background: #dcfce7;
    color: #15803d;
}

.nursery-status-button.activate:hover {
    background: #bbf7d0;
}

.nursery-status-button:active {
    transform: translateY(1px);
}