* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, Arial, sans-serif;
    background: #f5f5f5;
    color: #171717;
}

.sidebar {
    position: fixed;
    width: 240px;
    height: 100vh;
    background: #171717;
    color: white;
    padding: 28px 22px;
}

.brand {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 46px;
}

.brand span {
    color: #9b59b6;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar nav a {
    color: #bbb;
    text-decoration: none;
    padding: 12px;
    border-radius: 8px;
}

.sidebar nav a:hover {
    background: #292929;
    color: white;
}

.sidebar-bottom {
    position: absolute;
    bottom: 25px;
    font-size: 10px;
    letter-spacing: 1.5px;
    color: #777;
}

.main {
    margin-left: 240px;
    padding: 42px;
    max-width: 1500px;
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

h1 {
    margin: 5px 0 0;
    font-size: 34px;
}

h2 {
    margin: 0;
}

.eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.3px;
    color: #777;
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.metric,
.panel,
.approval-card {
    background: white;
    border: 1px solid #e4e4e4;
    border-radius: 14px;
}

.metric {
    padding: 24px;
}

.metric span {
    display: block;
    color: #777;
}

.metric strong {
    display: block;
    margin-top: 8px;
    font-size: 34px;
}

.panel {
    padding: 24px;
    margin-bottom: 24px;
}

.panel-title {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.panel-title a {
    color: #792a8c;
    text-decoration: none;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 14px 10px;
    border-bottom: 1px solid #eee;
}

th {
    color: #777;
    font-size: 12px;
}

.status {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
}

.health {
    font-size: 12px;
    font-weight: 700;
}

.dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.good {
    background: #46a758;
}

.bad {
    background: #d13438;
}

.approval-card {
    padding: 24px;
    margin-bottom: 18px;
}

.approval-top {
    display: flex;
    justify-content: space-between;
}

.muted {
    color: #777;
    margin-top: 8px;
    font-size: 13px;
}

.payload {
    margin-top: 22px;
}

pre {
    white-space: pre-wrap;
    background: #f6f6f6;
    padding: 15px;
    border-radius: 9px;
}

.approval-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 20px;
}

.approval-actions form {
    display: flex;
    gap: 8px;
}

input {
    min-width: 230px;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 7px;
}

.button {
    border: 0;
    padding: 11px 17px;
    border-radius: 7px;
    font-weight: 700;
    cursor: pointer;
}

.approve {
    background: #792a8c;
    color: white;
}

.danger {
    background: #eee;
    color: #a00000;
}

.secondary {
    color: #792a8c;
    text-decoration: none;
}

.approval-row {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid #eee;
}

.approval-row span {
    display: block;
    color: #777;
    margin-top: 5px;
    font-size: 12px;
}

.empty {
    padding: 25px 0;
    color: #777;
}

.decision {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #171717;
}

.login-card {
    width: 420px;
    background: white;
    padding: 38px;
    border-radius: 16px;
}

.login-brand {
    color: #171717;
    margin-bottom: 30px;
}

.login-card form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 28px;
}

.login-card input {
    width: 100%;
    margin-bottom: 10px;
}

.login-button {
    margin-top: 8px;
}

.login-error {
    margin-top: 18px;
    padding: 12px;
    background: #f6eaea;
    border-radius: 8px;
}

.sidebar-user {
    position: absolute;
    bottom: 65px;
    left: 22px;
    right: 22px;
    font-size: 12px;
}

.sidebar-user span {
    display: block;
    color: #888;
    margin-top: 3px;
}

.logout-button {
    margin-top: 10px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #aaa;
    cursor: pointer;
}

.logout-button:hover {
    color: white;
}

.approval-meta {
    display: flex;
    gap: 40px;
    margin-top: 22px;
    padding: 16px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.approval-meta span {
    display: block;
    color: #777;
    font-size: 11px;
    margin-bottom: 4px;
}

.section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #777;
    margin-bottom: 8px;
}

.approval-warning {
    margin-top: 20px;
    padding: 14px 16px;
    border: 1px solid #e5d9e8;
    background: #faf7fb;
    border-radius: 8px;
    font-size: 13px;
}

.viewer-notice {
    margin-top: 20px;
    padding: 14px 16px;
    background: #f4f4f4;
    border-radius: 8px;
    color: #666;
}

.decision-reason {
    margin-top: 8px;
    color: #666;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.hidden {
    display: none;
}

.confirm-modal {
    width: 440px;
    max-width: calc(100vw - 40px);
    background: white;
    border-radius: 14px;
    padding: 30px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, .25);
}

.confirm-modal h2 {
    margin-top: 8px;
}

.confirm-modal p {
    color: #666;
    line-height: 1.5;
    margin: 16px 0 24px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.secondary-button {
    background: #eee;
    color: #222;
}

.button-disabled,
button:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.page-description {
    margin: 8px 0 0;
    color: #777;
    font-size: 14px;
}

.command-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.command-card {
    display: block;
    padding: 24px;
    background: white;
    border: 1px solid #e4e4e4;
    border-radius: 14px;
    color: inherit;
    text-decoration: none;
    transition: transform .15s ease, border-color .15s ease;
}

a.command-card:hover {
    transform: translateY(-2px);
    border-color: #cfcfcf;
}

.command-card-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #777;
}

.command-card-number {
    margin-top: 10px;
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
}

.command-card-text {
    margin-top: 12px;
    color: #777;
    font-size: 13px;
    line-height: 1.45;
}

.decision-card {
    border-left: 4px solid #792a8c;
}

.issue-card {
    border-left: 4px solid #b42318;
}

.priority-panel {
    border-top: 3px solid #792a8c;
}

.command-approval {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 16px 0;
    border-bottom: 1px solid #eee;
}

.command-approval:last-child {
    border-bottom: 0;
}

.command-approval-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.command-approval-main span:not(.priority-indicator) {
    display: block;
    margin-top: 4px;
    color: #777;
    font-size: 12px;
}

.priority-indicator {
    width: 9px;
    height: 9px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #792a8c;
}

.all-clear {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 0;
}

.all-clear-icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #edf7ef;
    font-weight: 800;
}

.all-clear span {
    display: block;
    margin-top: 4px;
    color: #777;
    font-size: 13px;
}

.system-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 26px;
    padding: 14px 18px;
    background: white;
    border: 1px solid #e4e4e4;
    border-radius: 12px;
    font-size: 12px;
    color: #666;
}

.system-strip .dot {
    vertical-align: middle;
}

@media (max-width: 1000px) {
    .command-grid {
        grid-template-columns: 1fr;
    }
}
