/* Organizational Chart page (2026-10-03).
 * Same categorical palette as the ERP's own internal chart
 * (resources/js/Pages/Settings/OrgUnit/Chart.jsx) for visual parity
 * between the admin-facing and public-facing versions of this tree. */

.og-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem 5rem;
}

.og-title {
    font-size: 2rem;
    font-weight: 800;
    color: #111827;
    margin: 0 0 0.375rem;
    text-align: center;
}

.og-subtitle {
    font-size: 1rem;
    color: #6B7280;
    text-align: center;
    margin: 0 0 2.5rem;
}

.og-chart {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 0.75rem;
    padding: 2.5rem 1.5rem;
    overflow-x: auto;
}

.og-branch {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.og-stem {
    width: 2px;
    height: 24px;
    background: #D1D5DB;
}

.og-children-row {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    border-top: 2px solid #D1D5DB;
    padding-top: 24px;
}

.og-child-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.og-child-col::before {
    content: '';
    position: absolute;
    top: -24px;
    left: 50%;
    width: 2px;
    height: 24px;
    background: #D1D5DB;
}

.og-card {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 0.625rem;
    padding: 0.875rem 1.125rem;
    min-width: 180px;
    max-width: 220px;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.og-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.og-card-title {
    font-weight: 700;
    font-size: 0.875rem;
    color: #111827;
}

.og-card-person {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #6B7280;
}

.og-card-role {
    display: inline-block;
    margin-top: 0.3rem;
    padding: 0.0625rem 0.5rem;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 600;
}

.og-card.og-inactive {
    opacity: 0.5;
}

/* Categorical accents -- match ERP Chart.jsx's palette exactly */
.og-navy    { border-top: 3px solid #1E3A8A; }
.og-navy .og-card-icon, .og-navy .og-card-role   { background: #EEF2FF; color: #1E3A8A; }
.og-blue    { border-top: 3px solid #1D4ED8; }
.og-blue .og-card-icon, .og-blue .og-card-role   { background: #EFF6FF; color: #1D4ED8; }
.og-green   { border-top: 3px solid #15803D; }
.og-green .og-card-icon, .og-green .og-card-role { background: #F0FDF4; color: #15803D; }
.og-orange  { border-top: 3px solid #C2410C; }
.og-orange .og-card-icon, .og-orange .og-card-role { background: #FFF7ED; color: #C2410C; }
.og-red     { border-top: 3px solid #DC2626; }
.og-red .og-card-icon, .og-red .og-card-role     { background: #FEF2F2; color: #DC2626; }
.og-pink    { border-top: 3px solid #BE185D; }
.og-pink .og-card-icon, .og-pink .og-card-role   { background: #FDF2F8; color: #BE185D; }
.og-neutral { border-top: 3px solid #4B5563; }
.og-neutral .og-card-icon, .og-neutral .og-card-role { background: #F3F4F6; color: #4B5563; }

.og-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #9CA3AF;
}

@media (max-width: 640px) {
    .og-children-row { gap: 1rem; }
    .og-card { min-width: 140px; }
}
