/* Essentials for enterprise IT screens (PLAN-003). Uses the app's existing tokens. */
#screen-essentials { min-height: 100vh; background: var(--bg-base); color: var(--text-primary); }
.es-wrap { max-width: 1100px; margin: 0 auto; padding: 16px 20px 60px; font-family: var(--font-sans); }
.es-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.es-title { flex: 1 1 260px; }
.es-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.es-muted { color: var(--text-muted); font-size: 13px; }
.es-badge, .es-chip { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; border: 1px solid var(--border-strong); background: var(--bg-raised); }
.es-chip-warn { border-color: #D97706; color: #FBBF24; }
.es-r-fully_effective { border-color: var(--brand-border); color: var(--brand); }
.es-r-partially_effective { border-color: #D97706; color: #FBBF24; }
.es-r-not_effective { border-color: #DC2626; color: #F87171; }
.es-r-not_assessed { color: var(--text-secondary); }
.es-banner { margin: 12px 0; padding: 10px 14px; border: 1px solid var(--border-brand); background: var(--brand-glow); border-radius: 8px; font-size: 14px; }
.es-stages { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 12px 0; }
.es-stages li { padding: 6px 12px; border-radius: 6px; background: var(--bg-surface); color: var(--text-muted); font-size: 13px; }
.es-stages .es-stage-current { background: var(--brand-glow); color: var(--text-primary); border: 1px solid var(--border-brand); }
.es-stages .es-stage-done { color: var(--brand); }
.es-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.es-tab { background: none; border: 0; color: var(--text-secondary); padding: 8px 16px; cursor: pointer; border-bottom: 2px solid transparent; }
.es-tab.active { color: var(--text-primary); border-bottom-color: var(--brand); }
.es-msg { min-height: 20px; font-size: 13px; color: var(--brand); margin-bottom: 8px; }
.es-msg-error { color: #F87171; }
.es-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin: 10px 0; }
.es-card > header { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.es-card label { display: block; font-size: 13px; color: var(--text-secondary); margin: 8px 0; }
.es-card textarea, .es-card select, .es-card input[type=text], .es-row select { width: 100%; box-sizing: border-box; margin-top: 4px; padding: 8px; background: var(--bg-raised); color: var(--text-primary); border: 1px solid var(--border-strong); border-radius: 6px; font: inherit; }
.es-card .es-check { display: flex; align-items: center; gap: 8px; }
.es-row { margin: 8px 0 16px; max-width: 420px; }
.es-principle { margin: 20px 0 4px; font-size: 14px; color: var(--text-secondary); }
.es-tier h4, .es-evidence h4 { margin: 14px 0 6px; font-size: 13px; color: var(--text-secondary); }
.es-igp { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px solid var(--border); }
.es-igp-text { flex: 1 1 420px; font-size: 14px; }
.es-yn { display: flex; gap: 4px; }
.es-yn-btn { padding: 4px 10px; background: var(--bg-raised); color: var(--text-secondary); border: 1px solid var(--border-strong); border-radius: 6px; cursor: pointer; font-size: 12px; }
.es-yn-btn.on { background: var(--brand-glow); color: var(--text-primary); border-color: var(--brand-border); }
.es-yn-btn:disabled { opacity: .5; cursor: default; }
.es-ev-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 6px 0; }
.es-upload { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-top: 8px; }
.es-score { font-size: 22px; font-weight: 700; color: var(--brand); }
.es-counts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.es-principles { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.es-principles li { padding: 4px 0; }
@media (max-width: 640px) { .es-wrap { padding: 12px; } }
#screen-essentials .btn-primary { background: var(--brand); border-color: var(--brand); color: var(--text-inverse); }
#screen-essentials .btn-primary:hover { background: var(--brand-dim); border-color: var(--brand-dim); }
.es-radios { display: flex; gap: 20px; margin: 6px 0; }
.es-req { color: #FBBF24; font-size: 12px; }
.es-need { margin: 8px 0; padding: 6px 10px; border-left: 3px solid #D97706; background: rgba(217,119,6,.12); color: #FBBF24; font-size: 13px; border-radius: 4px; }
/* Whole action card is clickable */
.es-action { cursor: pointer; transition: border-color .15s, background .15s; }
.es-action:hover { border-color: var(--border-brand); background: var(--bg-raised); }
.es-action.es-open { cursor: default; border-color: var(--border-brand); }
.es-action.es-open > header, .es-action.es-open > p { cursor: pointer; }
.es-chev { color: var(--brand); width: 14px; display: inline-block; }
.es-hint { margin-left: auto; }
/* Save button states */
.es-save[data-state="dirty"] { background: #D97706; border-color: #D97706; color: #111; }
.es-save[data-state="saving"] { opacity: .7; }
.es-save[data-state="saved"] { background: #059669; border-color: #059669; color: #fff; }
.es-save[data-state="error"] { background: #DC2626; border-color: #DC2626; color: #fff; }
/* Slide-out guidance */
.es-drawer-wrap { position: fixed; inset: 0; z-index: 1000; }
.es-drawer-back { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.es-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(520px, 100%); background: var(--bg-surface); border-left: 1px solid var(--border-strong); display: flex; flex-direction: column; animation: es-slide .18s ease-out; }
.es-drawer > header { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.es-drawer-body { padding: 14px 16px 40px; overflow-y: auto; font-size: 14px; }
.es-drawer-body h4 { margin: 18px 0 6px; color: var(--text-primary); }
.es-drawer-body ul { padding-left: 18px; margin: 6px 0; }
.es-drawer-body li { margin: 4px 0; }
.es-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.es-table th, .es-table td { text-align: left; vertical-align: top; padding: 6px 8px; border-top: 1px solid var(--border); }
.es-table th { width: 110px; color: var(--text-secondary); font-weight: 600; }
@keyframes es-slide { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Related Essential Eight controls (PLAN-004) */
.es-e8 { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.es-e8 h4 { margin: 0 0 4px; }
.es-e8-row { margin-top: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; }
.es-e8-req { margin-top: 4px; padding-left: 10px; }
