:root {
    --app-bg: #f6f8fb;
    --app-surface: #ffffff;
    --app-surface-muted: #f8fafc;
    --app-surface-soft: #eef5fb;
    --app-border: #dbe3ee;
    --app-border-strong: #c7d2e1;
    --app-text: #0f172a;
    --app-muted: #64748b;
    --app-primary: #0f6db7;
    --app-primary-dark: #0b5c9c;
    --app-primary-soft: #e8f3fb;
    --app-success: #047857;
    --app-warning: #b45309;
    --app-danger: #be123c;
    --app-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 12px 28px rgba(15, 23, 42, .06);
    --app-radius: 8px;
}

html {
    color-scheme: light;
}

body {
    background: var(--app-bg);
}

button,
input,
select,
textarea {
    font: inherit;
}

.app-shell {
    min-height: 100vh;
    background: var(--app-bg);
}

.app-main {
    flex: 1;
}

.app-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem;
}

@media (min-width: 640px) {
    .app-container {
        padding: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .app-shell {
        display: flex;
    }

    .app-main {
        margin-left: 18rem;
    }

    .app-container {
        padding: 2rem;
    }
}

.app-sidebar {
    border-bottom: 1px solid #1f2a3b;
    background: #0b1220;
    color: #dbe7f3;
}

@media (min-width: 1024px) {
    .app-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: 18rem;
        border-right: 1px solid #1f2a3b;
        border-bottom: 0;
    }
}

.app-sidebar-inner {
    display: flex;
    min-height: 100%;
    flex-direction: column;
}

.app-sidebar-header {
    padding: 1rem;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: var(--app-radius);
    background: rgba(255, 255, 255, .05);
    padding: .8rem;
}

.app-brand-mark {
    display: grid;
    width: 2.35rem;
    height: 2.35rem;
    flex: 0 0 auto;
    place-items: center;
    border-radius: var(--app-radius);
    background: #f8fafc;
    color: #0f172a;
    font-size: .78rem;
    font-weight: 850;
    letter-spacing: .04em;
}

.app-brand-copy {
    min-width: 0;
}

.app-brand-kicker {
    overflow: hidden;
    color: #7dd3fc;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.app-brand-title {
    margin-top: .18rem;
    overflow: hidden;
    color: #ffffff;
    font-size: .98rem;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-sidebar-label {
    padding: .15rem 1.1rem .45rem;
    color: #94a3b8;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.app-nav {
    display: grid;
    gap: .35rem;
    align-content: start;
    padding: 0 .75rem 1rem;
}

@media (max-width: 1023px) {
    .app-sidebar-header {
        padding: .85rem 1rem .55rem;
    }

    .app-sidebar-label {
        display: none;
    }

    .app-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: .45rem 1rem 1rem;
    }

    .app-user-panel {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: .65rem;
    }

    .app-user-panel .app-user-card {
        margin-bottom: 0;
    }
}

@media (min-width: 640px) and (max-width: 1023px) {
    .app-user-panel {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: stretch;
    }

    .app-user-panel form {
        min-width: 10rem;
    }
}

.app-nav-link {
    display: flex;
    min-height: 3rem;
    align-items: center;
    gap: .7rem;
    border: 1px solid transparent;
    border-radius: var(--app-radius);
    padding: .52rem .58rem;
    color: #cbd5e1;
    font-size: .88rem;
    font-weight: 700;
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.app-nav-link:hover {
    border-color: rgba(148, 163, 184, .18);
    background: rgba(255, 255, 255, .06);
    color: #ffffff;
}

.app-nav-link.is-active {
    border-color: rgba(255, 255, 255, .86);
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .2);
}

.app-nav-icon {
    display: grid;
    width: 2rem;
    height: 2rem;
    flex: 0 0 auto;
    place-items: center;
    border-radius: var(--app-radius);
    background: rgba(148, 163, 184, .14);
    color: currentColor;
}

.app-nav-link.is-active .app-nav-icon {
    background: var(--app-primary);
    color: #ffffff;
}

.app-nav-icon svg {
    width: 1.05rem;
    height: 1.05rem;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.app-nav-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-user-panel {
    border-top: 1px solid #1f2a3b;
    padding: .9rem 1rem 1rem;
}

.app-user-card {
    display: flex;
    align-items: center;
    gap: .7rem;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: var(--app-radius);
    background: rgba(255, 255, 255, .05);
    padding: .7rem;
}

.app-user-avatar {
    display: grid;
    width: 2rem;
    height: 2rem;
    flex: 0 0 auto;
    place-items: center;
    border-radius: var(--app-radius);
    background: #1d4ed8;
    color: #ffffff;
    font-size: .8rem;
    font-weight: 850;
}

.app-sidebar .app-user-card .text-slate-950 {
    color: #ffffff;
}

.app-sidebar .app-user-card .text-slate-500 {
    color: #94a3b8;
}

.app-sidebar .app-btn-secondary {
    border-color: rgba(148, 163, 184, .25);
    background: rgba(255, 255, 255, .06);
    color: #e2e8f0;
}

.app-sidebar .app-btn-secondary:hover {
    background: rgba(255, 255, 255, .1);
    color: #ffffff;
}

.app-page-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .app-page-header {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
    }
}

.app-page-title {
    font-size: 1.65rem;
    line-height: 1.15;
    font-weight: 800;
    color: var(--app-text);
}

.app-page-subtitle {
    margin-top: .35rem;
    color: var(--app-muted);
    font-size: .9rem;
}

.app-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.app-card,
.app-filter-bar,
.app-table-card {
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    background: var(--app-surface);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.app-card {
    padding: 1.25rem;
}

.app-card-header {
    border-bottom: 1px solid var(--app-border);
    padding: 1rem 1.25rem;
}

.app-card-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--app-text);
}

.app-card-body {
    padding: 1.25rem;
}

.app-metric-grid {
    display: grid;
    gap: 1rem;
}

@media (min-width: 640px) {
    .app-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    .app-metric-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.app-metric-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    background: var(--app-surface);
    padding: 1.1rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.app-metric-card::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 3px;
    background: var(--app-primary);
}

.app-metric-label {
    color: var(--app-muted);
    font-size: .82rem;
    font-weight: 700;
}

.app-metric-value {
    margin-top: .5rem;
    color: var(--app-text);
    font-size: 2rem;
    line-height: 1;
    font-weight: 850;
}

.app-filter-bar {
    display: grid;
    gap: .75rem;
    margin-bottom: 1.25rem;
    padding: 1rem;
}

.app-form-grid {
    display: grid;
    gap: 1rem;
}

@media (min-width: 768px) {
    .app-filter-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .app-filter-5 {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .app-form-grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.app-label {
    display: block;
    color: #334155;
    font-size: .86rem;
    font-weight: 700;
}

.app-input {
    display: block;
    width: 100%;
    border: 1px solid var(--app-border-strong);
    border-radius: var(--app-radius);
    background: #ffffff;
    padding: .62rem .75rem;
    color: var(--app-text);
    font-size: .9rem;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.app-input::placeholder {
    color: #94a3b8;
}

.app-input:focus {
    border-color: var(--app-primary);
    box-shadow: 0 0 0 3px rgba(14, 116, 144, .12);
}

.app-input[type="file"] {
    padding: .45rem;
}

.app-help {
    margin-top: .35rem;
    color: var(--app-muted);
    font-size: .76rem;
}

.app-error {
    margin-top: .35rem;
    color: var(--app-danger);
    font-size: .83rem;
}

.app-btn {
    display: inline-flex;
    min-height: 2.5rem;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    border: 1px solid transparent;
    border-radius: var(--app-radius);
    padding: .55rem .95rem;
    font-size: .88rem;
    font-weight: 750;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.app-btn:hover {
    transform: translateY(-1px);
}

.app-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(14, 116, 144, .18);
}

.app-btn-primary {
    background: var(--app-primary);
    color: #ffffff;
}

.app-btn-primary:hover {
    background: var(--app-primary-dark);
}

.app-btn-dark {
    background: #0f172a;
    color: #ffffff;
}

.app-btn-dark:hover {
    background: #1e293b;
}

.app-btn-secondary {
    border-color: var(--app-border-strong);
    background: #ffffff;
    color: #334155;
}

.app-btn-secondary:hover {
    background: #f8fafc;
    color: var(--app-text);
}

.app-btn-success {
    border-color: #a7f3d0;
    background: #ecfdf5;
    color: var(--app-success);
}

.app-btn-danger {
    border-color: #fecdd3;
    background: #fff1f2;
    color: var(--app-danger);
}

.app-btn-warning {
    background: #f59e0b;
    color: #ffffff;
}

.app-btn-sm {
    min-height: 2rem;
    padding: .42rem .65rem;
    font-size: .78rem;
}

.app-btn-full {
    width: 100%;
}

.app-table-card {
    overflow: hidden;
}

.app-table-scroll {
    overflow-x: auto;
}

.app-table {
    width: 100%;
    min-width: 680px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: .9rem;
}

.app-table thead {
    background: var(--app-surface-muted);
}

.app-table th {
    padding: .85rem 1.25rem;
    color: var(--app-muted);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.app-table td {
    border-top: 1px solid #eef2f7;
    padding: 1rem 1.25rem;
    color: #475569;
    vertical-align: top;
}

.app-table th:first-child,
.app-table td:first-child {
    min-width: 16rem;
}

.app-table th:last-child,
.app-table td:last-child {
    white-space: nowrap;
}

.app-table tbody tr:hover {
    background: #fbfdff;
}

.app-table-title {
    color: var(--app-text);
    font-weight: 800;
}

.app-table-meta {
    margin-top: .25rem;
    color: var(--app-muted);
    font-size: .78rem;
    line-height: 1.45;
}

.app-empty {
    padding: 2rem 1rem;
    color: var(--app-muted);
    text-align: center;
}

.app-badge {
    display: inline-flex;
    align-items: center;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: .22rem .58rem;
    font-size: .72rem;
    font-weight: 800;
    line-height: 1.25;
    white-space: nowrap;
}

.app-badge-draft,
.app-badge-inactive,
.app-badge-role {
    border-color: #dbe3ee;
    background: #f1f5f9;
    color: #475569;
}

.app-badge-diajukan {
    border-color: #bae6fd;
    background: #e0f2fe;
    color: #0369a1;
}

.app-badge-revisi {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}

.app-badge-disetujui,
.app-badge-active {
    border-color: #bbf7d0;
    background: #ecfdf5;
    color: #047857;
}

.app-badge-ditolak {
    border-color: #fecdd3;
    background: #fff1f2;
    color: #be123c;
}

.app-flash {
    margin-bottom: 1rem;
    border: 1px solid;
    border-radius: var(--app-radius);
    padding: .85rem 1rem;
    font-size: .9rem;
    font-weight: 650;
}

.app-flash-error {
    border-color: #fecdd3;
    background: #fff1f2;
    color: #be123c;
}

.app-flash-success {
    border-color: #bbf7d0;
    background: #ecfdf5;
    color: #047857;
}

.app-login {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 1.5rem;
    background: #eef4f8;
}

.app-login-card {
    width: 100%;
    max-width: 27rem;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    background: rgba(255, 255, 255, .98);
    padding: 2rem;
    box-shadow: var(--app-shadow);
}

.app-login-mark {
    display: grid;
    width: 3rem;
    height: 3rem;
    place-items: center;
    border-radius: var(--app-radius);
    background: #0f172a;
    color: #ffffff;
    font-weight: 850;
}

.app-article {
    overflow: hidden;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    background: var(--app-surface);
}

.app-article-image {
    height: 18rem;
    width: 100%;
    object-fit: cover;
}

.app-summary-box {
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    background: var(--app-surface-muted);
    padding: 1rem;
    color: #334155;
    font-size: .92rem;
    font-weight: 650;
    line-height: 1.7;
}

.app-detail-list {
    display: grid;
    gap: .85rem;
    font-size: .9rem;
}

.app-detail-list dt {
    color: var(--app-muted);
    font-weight: 750;
}

.app-detail-list dd {
    margin-top: .2rem;
    color: var(--app-text);
}

.app-note-card {
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    background: #ffffff;
    padding: .85rem;
}

.app-timeline-item {
    border-left: 2px solid #bfdbfe;
    padding-left: .85rem;
    font-size: .9rem;
}

.app-form-footer {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    border-top: 1px solid var(--app-border);
    padding-top: 1.25rem;
}

@media (min-width: 640px) {
    .app-form-footer {
        flex-direction: row;
        justify-content: flex-end;
    }
}

.rich-content h2 { margin: 1.25rem 0 .75rem; font-size: 1.35rem; font-weight: 700; line-height: 1.3; color: #0f172a; }
.rich-content h3 { margin: 1rem 0 .5rem; font-size: 1.15rem; font-weight: 700; line-height: 1.35; color: #0f172a; }
.rich-content h4 { margin: .9rem 0 .5rem; font-size: 1rem; font-weight: 700; color: #0f172a; }
.rich-content p { margin: .75rem 0; }
.rich-content ul, .rich-content ol { margin: .75rem 0 .75rem 1.5rem; }
.rich-content ul { list-style: disc; }
.rich-content ol { list-style: decimal; }
.rich-content li { margin: .25rem 0; }
.rich-content blockquote { margin: 1rem 0; border-left: 4px solid #bae6fd; padding-left: 1rem; color: #475569; }
.rich-content a { color: #0369a1; font-weight: 700; text-decoration: underline; }
.rich-content table { margin: 1rem 0; width: 100%; border-collapse: collapse; font-size: .875rem; }
.rich-content th, .rich-content td { border: 1px solid #cbd5e1; padding: .5rem; text-align: left; vertical-align: top; }
.rich-content th { background: #f8fafc; font-weight: 700; }
