:root {
    --sky-dark: #1f78a8;
    --sky-darker: #155b83;
    --sky-soft: #e7f5fb;
    --ink: #14212b;
    --muted: #647484;
    --line: #d9e5ec;
    --bg: #f6fafc;
    --white: #ffffff;
    --success: #16805d;
    --warn: #b7791f;
    --danger: #b83232;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: var(--bg);
}
a { color: var(--sky-darker); text-decoration: none; font-weight: 700; }
.topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px 32px;
    background: rgba(255,255,255,.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
}
.topbar > div { display: flex; align-items: center; gap: 12px; }
.topbar strong { display: block; color: var(--sky-darker); }
.topbar span { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.brand-text { display: grid; gap: 2px; }
.brand-text strong, .brand-text span { display: block; line-height: 1.2; }
.brand-mark {
    width: 106px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: white;
    border: 1px solid var(--line);
    overflow: hidden;
}
.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}
.main-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nav-link,
.nav-trigger {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 8px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 800;
    background: transparent;
    box-shadow: none;
}
.nav-link:hover,
.nav-trigger:hover,
.nav-group:focus-within .nav-trigger,
.nav-group:hover .nav-trigger { background: var(--sky-soft); color: var(--sky-darker); filter: none; }
.nav-group { position: relative; }
.nav-trigger { gap: 8px; border: 0; cursor: default; }
.nav-trigger span {
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
}
.nav-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    display: none;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 38px rgba(20,33,43,.14);
    z-index: 20;
}
.nav-group:hover .nav-menu,
.nav-group:focus-within .nav-menu { display: grid; }
.nav-menu a {
    display: block;
    padding: 10px 11px;
    border-radius: 7px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}
.nav-menu a:hover { background: var(--sky-soft); color: var(--sky-darker); }
.container { max-width: 1180px; margin: 0 auto; padding: 28px 24px 60px; }
.hero, .page-head, .detail-hero {
    border: 1px solid var(--line);
    background: linear-gradient(135deg, var(--sky-darker), var(--sky-dark));
    color: white;
    border-radius: 8px;
    padding: 38px;
    margin-bottom: 22px;
}
.hero h1, .page-head h1, .detail-hero h1 { margin: 4px 0 12px; font-size: 38px; line-height: 1.14; letter-spacing: 0; }
.hero p, .page-head p, .detail-hero p { max-width: 760px; margin: 0; color: rgba(255,255,255,.86); line-height: 1.6; }
.user-page-head {
    padding: 20px 24px;
    margin-bottom: 16px;
}
.user-page-head .eyebrow {
    font-size: 10px;
}
.user-page-head h1 {
    margin: 2px 0 6px;
    font-size: 26px;
}
.user-page-head p {
    font-size: 13px;
    line-height: 1.45;
}
.dashboard-hero {
    position: relative;
    overflow: hidden;
    padding-top: 10px;
    padding-bottom: 19px;
    background:
        linear-gradient(135deg, rgba(21,91,131,.98), rgba(31,120,168,.94)),
        repeating-linear-gradient(135deg, transparent 0 24px, rgba(255,255,255,.11) 24px 25px);
    box-shadow: 0 18px 38px rgba(21,91,131,.14);
}
.dashboard-hero::before,
.dashboard-hero::after {
    content: "";
    position: absolute;
    pointer-events: none;
}
.dashboard-hero::before {
    inset: 0;
    background:
        linear-gradient(100deg, transparent 0 62%, rgba(255,255,255,.14) 62% 63%, transparent 63%),
        linear-gradient(160deg, transparent 0 74%, rgba(45,212,191,.24) 74% 75%, transparent 75%);
}
.dashboard-hero::after {
    left: 0;
    right: 0;
    top: 0;
    height: 4px;
    background: linear-gradient(90deg, #f2b84b 0%, #2dd4bf 45%, #7bdce5 100%);
}
.dashboard-hero > div {
    position: relative;
    z-index: 1;
}
.dashboard-hero-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.dashboard-hero h1 {
    font-size: 34px;
}
.dashboard-clock {
    flex: 0 0 auto;
    color: rgba(255,255,255,.94);
    font-size: 15px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.dashboard-hero .hero-actions {
    margin-top: 11px;
}
.dashboard-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}
.dashboard-summary li {
    position: relative;
    padding: 8px 11px 8px 28px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 8px;
    background: rgba(255,255,255,.12);
    color: rgba(255,255,255,.9);
    font-size: 12px;
    font-weight: 800;
}
.dashboard-summary li::before {
    content: "";
    position: absolute;
    left: 11px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #f2b84b;
    box-shadow: 0 0 0 4px rgba(242,184,75,.18);
    transform: translateY(-50%);
}
.eyebrow { text-transform: uppercase; font-size: 12px; letter-spacing: 0; font-weight: 800; opacity: .78; }
.hero-actions, .actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.button, button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border: 0;
    border-radius: 8px;
    background: var(--sky-dark);
    color: white;
    font-weight: 800;
    cursor: pointer;
}
.hero .button { background: white; color: var(--sky-darker); }
.button.ghost { background: rgba(255,255,255,.16); color: white; border: 1px solid rgba(255,255,255,.35); }
.button.secondary { background: #e8eef2; color: var(--ink); }
.button.disabled {
    opacity: .45;
    cursor: not-allowed;
    filter: grayscale(.25);
}
button:hover, .button:hover { filter: brightness(.96); }
.button.disabled:hover { filter: grayscale(.25); }
.thread-panel a.button.small[href*="tindak-lanjut"] {
    position: relative;
    width: 38px;
    min-width: 38px;
    padding: 0;
    white-space: nowrap;
}
.thread-panel a.button.small[href*="tindak-lanjut"] {
    font-size: 0;
}
.thread-panel a.button.small[href*="tindak-lanjut"]::before {
    content: "";
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    background: center / contain no-repeat url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3v4a1 1 0 0 0 1 1h4'/%3E%3Cpath d='M17 21H7a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7l5 5v11a2 2 0 0 1-2 2Z'/%3E%3Cpath d='M9 15h5'/%3E%3Cpath d='m13 12 3 3-3 3'/%3E%3C/svg%3E");
}
.thread-panel a.button.small[href*="tindak-lanjut"]::after {
    content: "Tindak Lanjut";
    position: absolute;
    right: 0;
    bottom: calc(100% + 4px);
    z-index: 12;
    padding: 8px 10px;
    border: 1px solid rgba(203, 220, 230, .85);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    box-shadow: 0 14px 30px rgba(20,33,43,.14);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px) scale(.96);
    transform-origin: right bottom;
    transition: opacity .16s ease, transform .16s ease;
}
.thread-panel a.button.small[href*="tindak-lanjut"]:hover::after,
.thread-panel a.button.small[href*="tindak-lanjut"]:focus-visible::after {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.kpi-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.kpi-grid div, .meta-grid div, .panel, .form-grid, .search-panel {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(20,33,43,.05);
}
.kpi-grid div {
    --kpi-accent: var(--sky-dark);
    --kpi-tint: #eef8fc;
    position: relative;
    min-height: 116px;
    overflow: hidden;
    padding: 20px 18px 18px;
    background: linear-gradient(180deg, var(--kpi-tint) 0, var(--white) 58px);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.kpi-grid div::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: var(--kpi-accent);
}
.kpi-grid div::after {
    content: "";
    position: absolute;
    top: 14px;
    right: 14px;
    width: 20px;
    height: 20px;
    border-top: 2px solid var(--kpi-accent);
    border-right: 2px solid var(--kpi-accent);
    opacity: .38;
}
.kpi-grid div:nth-child(1) { --kpi-accent: #1976a5; --kpi-tint: #edf7fb; }
.kpi-grid div:nth-child(2) { --kpi-accent: #16805d; --kpi-tint: #edf9f4; }
.kpi-grid div:nth-child(3) { --kpi-accent: #c33b3b; --kpi-tint: #fff2f2; }
.kpi-grid div:nth-child(4) { --kpi-accent: #c78316; --kpi-tint: #fff8e9; }
.kpi-grid div:nth-child(5) { --kpi-accent: #5969b8; --kpi-tint: #f2f3fc; }
.kpi-grid.pts-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kpi-grid .kpi-incoming-month { --kpi-accent: #c78316; --kpi-tint: #fff8e9; }
.kpi-grid .kpi-outgoing-month { --kpi-accent: #5969b8; --kpi-tint: #f2f3fc; }
.kpi-grid div:hover {
    border-color: var(--kpi-accent);
    box-shadow: 0 14px 28px rgba(20,33,43,.1);
    transform: translateY(-2px);
}
.kpi-grid span, .meta-grid span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.kpi-grid span { min-height: 31px; padding-right: 24px; line-height: 1.3; }
.kpi-grid .kpi-month { color: var(--kpi-accent); font-weight: 900; }
.kpi-grid strong { display: block; font-size: 32px; color: var(--kpi-accent); font-variant-numeric: tabular-nums; }
.panel { padding: 22px; margin-bottom: 20px; }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
h2 { margin: 0 0 16px; font-size: 20px; }
.table-search {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}
.table-search input {
    min-width: 0;
}
.table-search select {
    width: 92px;
    flex: 0 0 92px;
    margin-right: 18px;
}
.table-search button[type="submit"] {
    gap: 8px;
}
.table-search button[type="submit"]::before {
    content: "";
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    background: center / contain no-repeat url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' fill='none' stroke='white' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
}
.table-search .letter-add-inline {
    position: relative;
    gap: 8px;
    margin-left: 60px;
}
.table-search .letter-add-inline::before {
    content: "";
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    background: center / contain no-repeat url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' fill='none' stroke='white' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14'/%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E");
}
.table-search .letter-add-inline::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 4px);
    z-index: 12;
    padding: 8px 10px;
    border: 1px solid rgba(203, 220, 230, .85);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    box-shadow: 0 14px 30px rgba(20,33,43,.14);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 4px) scale(.96);
    transform-origin: center bottom;
    transition: opacity .16s ease, transform .16s ease;
}
.table-search .letter-add-inline:hover::after,
.table-search .letter-add-inline:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
}
.thread-panel,
.users-panel {
    position: relative;
}
.users-lldikti-panel {
    padding-top: 12px;
}
.users-lldikti-panel h2 {
    font-size: 18px;
}
.table-loading {
    position: absolute;
    inset: 62px 22px 70px;
    z-index: 5;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, .72);
    backdrop-filter: blur(1px);
}
.table-loading span {
    width: 34px;
    height: 34px;
    border: 4px solid rgba(220, 38, 38, .18);
    border-top-color: #dc2626;
    border-radius: 50%;
    animation: tableSpinner .72s linear infinite;
}
.thread-panel.is-loading .table-loading {
    display: flex;
}
.thread-panel.is-loading .table-wrap,
.thread-panel.is-loading .pagination {
    opacity: .5;
}
.users-panel .table-loading {
    inset: 112px 22px 70px;
}
.users-panel.is-loading .table-loading {
    display: flex;
}
.users-panel.is-loading .table-wrap,
.users-panel.is-loading .user-pagination,
.users-panel.is-loading .unit-pagination,
.users-panel.is-loading .user-toolbar {
    opacity: .5;
    pointer-events: none;
}
@keyframes tableSpinner {
    to { transform: rotate(360deg); }
}
.table-wrap { overflow-x: auto; }
.thread-panel .table-wrap { overflow: visible; }
table { width: 100%; border-collapse: collapse; min-width: 850px; }
th, td { padding: 13px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
td { font-size: 14px; }
th { color: var(--muted); font-size: 13px; background: #f8fbfd; }
.letter-cell {
    display: grid;
    gap: 4px;
    min-width: 260px;
}
.letter-cell strong {
    color: var(--ink);
    font-size: 14px;
}
.letter-cell .letter-sent-date {
    font-size: 11px;
    line-height: 1.4;
}
.letter-cell span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
}
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 14px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}
.pagination div {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.page-numbers {
    display: flex;
    align-items: center;
    gap: 6px;
}
.page-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    font-weight: 800;
}
.page-number.active {
    border-color: var(--sky-dark);
    background: var(--sky-dark);
    color: #ffffff;
}
.page-ellipsis {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 4px;
    color: var(--muted);
    font-weight: 800;
}
.badge { display: inline-flex; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.badge.primary { background: var(--sky-soft); color: var(--sky-darker); }
.badge.info { background: #dff1fb; color: #155b83; }
.badge.warn { background: #fff3d7; color: var(--warn); }
.badge.danger { background: #ffe2e2; color: var(--danger); }
.badge.success { background: #def7ec; color: var(--success); }
.badge.muted { background: #edf2f7; color: #52616f; }
.users-lldikti-panel .user-status-badge { font-size: 11px; }
.users-panel .table-wrap { overflow: visible; }
.user-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 14px 0 18px;
}
.user-search {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(620px, 100%);
}
.user-search select {
    width: 92px;
    flex: 0 0 92px;
}
.user-search input {
    flex: 1;
    min-width: 280px;
}
.user-search button,
.user-add-trigger {
    min-height: 40px;
}
.user-add-trigger {
    background: linear-gradient(135deg, var(--sky-dark), #1f9d8a);
    white-space: nowrap;
}
.user-modal {
    position: fixed;
    inset: 0;
    z-index: 75;
    display: none;
    place-items: center;
    padding: 22px;
    background: rgba(10, 28, 42, .24);
    backdrop-filter: blur(5px);
}
.user-modal.is-open {
    display: grid;
}
.user-modal-card {
    width: min(760px, 100%);
    max-height: min(86vh, 760px);
    overflow: auto;
    padding: 24px;
    border: 1px solid rgba(203, 220, 230, .9);
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(16, 42, 67, .22);
    animation: confirm-in .18s ease-out;
}
.user-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}
.user-modal-head h2 {
    margin: 4px 0 0;
    font-size: 24px;
}
.user-modal-close {
    width: 36px;
    min-height: 36px;
    padding: 0;
    border-radius: 50%;
    background: #edf4f7;
    color: var(--ink);
    font-size: 24px;
    line-height: 1;
    box-shadow: none;
}
.user-modal .compact-form {
    padding-top: 18px;
}
.user-modal [data-password-row][hidden] {
    display: none !important;
}
.user-pts-autocomplete-field {
    z-index: 12;
}
.generated-password-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}
.generated-password-field button {
    min-width: 112px;
    min-height: 46px;
    padding: 0 13px;
    gap: 7px;
    border: 1px solid #acd5e6;
    background: #e7f4fa;
    color: var(--sky-darker);
    box-shadow: none;
}
.generated-password-field button:hover {
    background: #d8edf6;
    filter: none;
}
.generated-password-field button svg {
    width: 18px;
    height: 18px;
}
.unit-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
}
.unit-form textarea {
    min-height: 112px;
    resize: vertical;
}
.unit-form label small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}
.unit-function-cell {
    display: -webkit-box;
    max-width: 360px;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}
.unit-panel table input,
.unit-panel table select {
    min-height: 38px;
    padding: 9px 10px;
}
.unit-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.unit-actions form {
    margin: 0;
}
.danger-button {
    background: var(--danger);
}
.action-menu {
    position: relative;
    display: inline-block;
}
.action-menu summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 13px;
    border-radius: 8px;
    background: var(--sky-dark);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
}
.action-menu summary::-webkit-details-marker { display: none; }
.action-menu summary::after {
    content: "";
    width: 7px;
    height: 7px;
    margin-left: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
}
.action-menu[open] summary::after {
    transform: translateY(2px) rotate(225deg);
}
.action-menu > div {
    position: absolute;
    z-index: 20;
    right: 0;
    top: calc(100% + 8px);
    min-width: 205px;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 16px 34px rgba(16, 42, 67, .18);
}
.action-menu form { margin: 0; }
.action-menu button {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    width: 100%;
    min-height: 34px;
    column-gap: 11px;
    justify-content: stretch;
    border-radius: 7px;
    background: transparent;
    color: var(--ink);
    font-size: 12px;
    box-shadow: none;
    text-align: left;
}
.action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
}
.action-menu button > span:not(.action-icon) {
    min-width: 0;
    text-align: left;
    white-space: nowrap;
}
.action-icon svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.action-menu button:hover {
    background: var(--sky-soft);
    filter: none;
}
.action-menu button.suspend {
    color: var(--danger);
}
.action-menu button.suspend:hover {
    background: #ffe2e2;
}
.action-menu button.danger {
    color: var(--danger);
}
.action-menu button.danger:hover {
    background: #ffe2e2;
}
.confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    place-items: center;
    padding: 20px;
    background: rgba(10, 28, 42, .22);
    backdrop-filter: blur(5px);
}
.confirm-modal.is-open {
    display: grid;
}
.confirm-card {
    position: relative;
    width: min(420px, 100%);
    overflow: hidden;
    padding: 24px;
    border: 1px solid rgba(203, 220, 230, .9);
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(16, 42, 67, .2);
    animation: confirm-in .18s ease-out;
}
.confirm-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--danger), #f59e0b, var(--sky-dark));
}
.confirm-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}
.confirm-mark {
    display: inline-flex;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 50%, #ffffff 0 22%, transparent 23%),
        conic-gradient(from 210deg, var(--danger), #f59e0b, var(--sky-dark), var(--danger));
    box-shadow: 0 10px 24px rgba(197, 48, 48, .16);
}
.confirm-mark.success-mark {
    background:
        radial-gradient(circle at 50% 50%, #ffffff 0 22%, transparent 23%),
        conic-gradient(from 210deg, var(--success), #2dd4bf, var(--sky-dark), var(--success));
}
.confirm-card h2 {
    margin: 0;
    font-size: 22px;
}
.confirm-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}
.confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
}
.confirm-actions button {
    min-height: 38px;
}
.confirm-submit {
    background: var(--danger);
}
.confirm-submit.activate {
    background: linear-gradient(135deg, var(--sky-dark), #1f9d8a);
}
.reset-password-box {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}
.reset-password-box input {
    flex: 1;
    font-weight: 800;
    letter-spacing: 1px;
    background: #f8fbfd;
}
.reset-password-box button {
    flex: 0 0 auto;
}
@keyframes confirm-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; padding: 22px; }
label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 700; }
.pts-autocomplete-field {
    position: relative;
    z-index: 4;
    display: grid;
    align-content: start;
    gap: 7px;
    min-width: 0;
}
.sender-type-field {
    display: grid;
    gap: 7px;
}
.form-field-label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}
.sender-type-switch {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    width: min(100%, 340px);
    padding: 5px;
    border: 1px solid #b7d2df;
    border-radius: 8px;
    background: linear-gradient(90deg, #e6f5fb 0 50%, #fff1df 50% 100%);
    box-shadow: inset 0 1px 2px rgba(20,33,43,.06), 0 6px 16px rgba(20,33,43,.06);
}
.sender-type-switch label {
    display: block;
    cursor: pointer;
}
.sender-type-switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.sender-type-switch span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border-radius: 6px;
    color: #415767;
    font-size: 13px;
    font-weight: 800;
    transition: background .18s ease, box-shadow .18s ease, color .18s ease, transform .18s ease;
}
.sender-type-switch label:first-child input:not(:checked) + span {
    color: #126b98;
}
.sender-type-switch label:last-child input:not(:checked) + span {
    color: #a9570b;
}
.sender-type-switch label:first-child input:checked + span {
    background: linear-gradient(135deg, #126f9f, #159da1);
    color: #ffffff;
    box-shadow: 0 7px 16px rgba(18,111,159,.28);
    transform: translateY(-1px);
}
.sender-type-switch label:last-child input:checked + span {
    background: linear-gradient(135deg, #d35b1f, #ee9b18);
    color: #ffffff;
    box-shadow: 0 7px 16px rgba(211,91,31,.26);
    transform: translateY(-1px);
}
.sender-type-switch label:first-child input:not(:checked) + span:hover {
    background: rgba(255,255,255,.62);
}
.sender-type-switch label:last-child input:not(:checked) + span:hover {
    background: rgba(255,255,255,.62);
}
.sender-type-switch input:focus-visible + span {
    outline: 3px solid rgba(31,120,168,.18);
}
.form-grid [data-sender-panel][hidden] {
    display: none !important;
}
.pts-autocomplete {
    position: relative;
}
.pts-autocomplete-input {
    padding-right: 42px;
    background: #ffffff center right 14px / 17px 17px no-repeat url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23155b83' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
}
.pts-suggestions {
    position: absolute;
    top: calc(100% + 7px);
    left: 0;
    right: 0;
    z-index: 30;
    display: none;
    overflow: hidden;
    border: 1px solid #cbdce6;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 38px rgba(20,33,43,.16);
}
.pts-autocomplete.is-open .pts-suggestions {
    display: block;
}
.pts-suggestion {
    width: 100%;
    min-height: 46px;
    justify-content: space-between;
    gap: 14px;
    padding: 9px 12px;
    border-bottom: 1px solid #e5edf2;
    border-radius: 0;
    background: #ffffff;
    color: var(--ink);
    text-align: left;
}
.pts-suggestion:last-of-type {
    border-bottom: 0;
}
.pts-suggestion[hidden] {
    display: none;
}
.pts-suggestion:hover,
.pts-suggestion.is-active {
    background: #eaf6fb;
    color: var(--sky-darker);
    filter: none;
}
.pts-suggestion span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pts-suggestion small {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}
.pts-suggestion-empty {
    margin: 0;
    padding: 14px 12px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}
.pts-suggestion-empty[hidden] {
    display: none;
}
input, select, textarea {
    width: 100%;
    border: 1px solid #cbdce6;
    border-radius: 8px;
    padding: 12px;
    font: inherit;
    color: var(--ink);
    background: white;
}
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(31,120,168,.16); border-color: var(--sky-dark); }
.password-field {
    position: relative;
    display: block;
}
.password-field input {
    padding-right: 44px;
}
.password-page-head {
    position: relative;
    overflow: hidden;
    padding: 14px 24px;
    margin-bottom: 16px;
    background:
        linear-gradient(135deg, rgba(21,91,131,.98), rgba(31,120,168,.96)),
        repeating-linear-gradient(145deg, transparent 0 28px, rgba(255,255,255,.12) 28px 29px);
}
.password-page-head::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(105deg, transparent 0 68%, rgba(255,255,255,.13) 68% 68.4%, transparent 68.4%),
        linear-gradient(155deg, transparent 0 80%, rgba(45,212,191,.25) 80% 80.5%, transparent 80.5%);
    pointer-events: none;
}
.password-page-head::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #f2b84b, #2dd4bf 52%, #7bdce5);
}
.password-page-head > div { position: relative; z-index: 1; }
.password-page-head h1 {
    margin: 1px 0 3px;
    font-size: 26px;
}
.password-page-head p {
    font-size: 13px;
    line-height: 1.35;
}
.password-page-head .eyebrow { font-size: 10px; }
.password-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr);
    gap: 24px;
    align-items: start;
}
.password-panel {
    margin-bottom: 0;
}
.password-reset-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 13px;
    padding: 10px 0 0;
}
.password-reset-form .actions { margin-top: 8px; }
.password-divider {
    height: 3px;
    margin: 4px 0 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(31,120,168,.58) 22%, rgba(31,120,168,.92) 50%, rgba(31,120,168,.58) 78%, transparent);
}
.password-note {
    position: relative;
    align-self: start;
    display: grid;
    gap: 10px;
    margin-top: 68px;
    padding: 30px 18px;
    border: 1px solid #ffe08a;
    border-radius: 8px;
    background: #fff4bf;
    box-shadow: 0 14px 28px rgba(154,91,0,.12);
    color: #5f3a00;
    transform: rotate(1deg);
}
.password-note::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 50%;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 30%, rgba(255,255,255,.92) 0 18%, transparent 19%),
        linear-gradient(135deg, #ff7f6e 0%, #e94f47 58%, #b92f31 100%);
    box-shadow:
        0 2px 0 rgba(255,255,255,.7) inset,
        0 8px 16px rgba(146,47,33,.22);
    transform: translateX(-50%);
}
.password-note::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 50%;
    width: 2px;
    height: 18px;
    border-radius: 999px;
    background: linear-gradient(180deg, #f7c8be, #7a3f37);
    box-shadow: 0 1px 2px rgba(95,58,0,.18);
    transform: translateX(-50%) rotate(8deg);
    transform-origin: top center;
}
.password-note strong {
    font-size: 15px;
    color: #7a4800;
}
.password-note span {
    padding-left: 12px;
    border-left: 3px solid #f5b301;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
}
.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    width: 30px;
    height: 30px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
    transform: translateY(-50%);
}
.password-toggle svg {
    width: 21px;
    height: 21px;
    stroke: #4f6475;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}
.password-toggle:hover,
.password-toggle:focus {
    outline: 0;
    background: var(--sky-soft);
}
.password-toggle:hover svg,
.password-toggle:focus svg,
.password-toggle.is-visible svg {
    stroke: var(--sky-dark);
}
.password-toggle.is-visible .eye-slash {
    display: none;
}
.wide { grid-column: 1 / -1; }
.search-panel { display: flex; gap: 10px; padding: 18px; }
.detail-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.meta-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.meta-grid div { padding: 16px; }
.meta-grid strong { display: block; line-height: 1.35; }
.two-col { display: grid; grid-template-columns: 1.2fr .8fr; gap: 20px; align-items: start; }
.timeline { display: grid; gap: 12px; }
.timeline article { border-left: 3px solid var(--sky-dark); padding-left: 14px; }
.timeline time { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.timeline p { margin: 6px 0 0; color: var(--muted); line-height: 1.5; }
.doc-row { display: grid; gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.doc-row span, .muted { color: var(--muted); font-size: 13px; }
.status-form { display: grid; grid-template-columns: 260px 1fr auto; gap: 10px; }
.followup-hero {
    position: relative;
    isolation: isolate;
    align-items: flex-end;
    width: 100%;
    overflow: hidden;
    margin: 0 0 18px;
    padding: 23px 26px;
    border-color: #a85063;
    background:
        repeating-linear-gradient(135deg, transparent 0 28px, rgba(255,255,255,.055) 28px 29px),
        linear-gradient(125deg, #4e2037 0%, #7e2b49 58%, #a3434c 100%);
    box-shadow: 0 16px 32px rgba(91,31,54,.18);
}
.followup-hero::before,
.followup-hero::after {
    content: "";
    position: absolute;
    pointer-events: none;
}
.followup-hero::before {
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #f5c66c, #ef7a75 52%, #ffd9a1);
}
.followup-hero::after {
    top: -52px;
    right: -42px;
    width: 300px;
    height: 210px;
    border: 1px solid rgba(255,219,164,.24);
    border-right-width: 5px;
    transform: rotate(-14deg);
    box-shadow: -34px 28px 0 -33px rgba(255,255,255,.32), -72px 56px 0 -71px rgba(245,198,108,.38);
}
.followup-hero > * {
    position: relative;
    z-index: 1;
}
.followup-hero-content {
    display: grid;
    flex: 1 1 auto;
    gap: 5px;
    min-width: 0;
}
.followup-letter-heading {
    display: grid;
    grid-template-columns: max-content max-content minmax(220px, 1fr);
    align-items: flex-start;
    gap: 8px;
}
.followup-letter-heading > div,
.followup-letter-heading time {
    display: grid;
    gap: 3px;
}
.followup-letter-heading span,
.followup-subject > span,
.followup-sender small {
    color: rgba(255,241,224,.72);
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
    text-transform: uppercase;
}
.followup-letter-heading strong {
    color: #ffffff;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.followup-subject {
    display: grid;
    gap: 4px;
    margin-left: 20px;
}
.followup-hero .followup-subject h1 {
    max-width: 650px;
    margin: 0;
    color: #ffffff;
    font-size: 14px;
    line-height: 1.3;
}
.followup-origin {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
}
.followup-sender {
    display: grid;
    gap: 2px;
}
.followup-sender strong {
    color: #ffe4b8;
    font-size: 14px;
}
.submission-channel {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    min-width: 26px;
    min-height: 26px;
    padding: 0;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 7px;
    font-size: 0;
    font-weight: 800;
    cursor: help;
}
.submission-channel::before {
    content: "";
    width: 14px;
    height: 14px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}
.submission-channel::after {
    position: absolute;
    right: 0;
    bottom: calc(100% + 4px);
    z-index: 15;
    padding: 7px 9px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 7px;
    background: #ffffff;
    color: #3b2630;
    box-shadow: 0 12px 26px rgba(48,20,34,.2);
    font-size: 11px;
    line-height: 1;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateY(3px) scale(.97);
    transform-origin: right bottom;
    transition: opacity .15s ease, transform .15s ease;
}
.submission-channel:hover::after {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.submission-channel.system {
    background: rgba(45,190,139,.18);
    color: #c8ffe7;
}
.submission-channel.system::before {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23c8ffe7' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='13' rx='2'/%3E%3Cpath d='M8 21h8M12 17v4M8.5 10.5l2.2 2.2 4.8-5'/%3E%3C/svg%3E");
}
.submission-channel.system::after {
    content: "Dikirim melalui sistem";
}
.submission-channel.manual {
    background: rgba(245,198,108,.17);
    color: #ffe5ad;
}
.submission-channel.manual::before {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23ffe5ad' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8Z'/%3E%3Cpath d='M14 2v6h6M13.5 17.5l4.8-4.8 1.7 1.7-4.8 4.8-2.4.7Z'/%3E%3C/svg%3E");
}
.submission-channel.manual::after {
    content: "Dicatat manual";
}
.followup-hero .followup-actions .button.secondary {
    border: 1px solid rgba(255,255,255,.28);
    background: rgba(255,255,255,.12);
    color: #ffffff;
}
.followup-hero .followup-actions button {
    background: #f5c66c;
    color: #482235;
}
.followup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}
.followup-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
    align-items: stretch;
}
.followup-info-panel {
    position: relative;
    overflow: hidden;
    border-top: 3px solid #1b9a91;
}
.followup-info-panel .letter-info-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.letter-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.letter-info-grid div {
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbfd;
}
.letter-info-grid span,
.disposition-print-card span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 6px;
}
.letter-info-grid p {
    margin: 0;
    color: var(--ink);
    line-height: 1.5;
}
.disposition-print-card {
    display: grid;
    gap: 12px;
    position: relative;
    overflow: hidden;
    border-top: 3px solid #f2b84b;
}
.correspondence-workspace {
    display: grid;
    gap: 0;
    border-top: 3px solid var(--sky-dark);
}
.workspace-receipt-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: -22px -22px 22px;
    padding: 14px 18px;
    border-bottom: 1px solid #cfe4ed;
    background: linear-gradient(90deg, #edf8f6, #f1f8fc);
}
.workspace-receipt-bar > div {
    display: grid;
    gap: 3px;
}
.workspace-receipt-bar > div span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}
.workspace-receipt-bar > div strong {
    color: var(--sky-darker);
    font-size: 16px;
}
.workspace-receipt-bar form { margin: 0; }
.workspace-receipt-bar button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    background: #16805d;
}
.workspace-receipt-bar .action-icon,
.workspace-receipt-bar .action-icon svg {
    width: 19px;
    height: 19px;
}
.workspace-divider {
    height: 2px;
    margin: 28px 0;
    background: linear-gradient(90deg, transparent, #b9d3df 12%, #f2b84b 50%, #b9d3df 88%, transparent);
}
.workspace-disposition.disposition-print-card {
    position: static;
    overflow: visible;
    border-top: 0;
}
.receive-confirm-card::before {
    background: linear-gradient(90deg, #16805d, #1b9a91, #f2b84b);
}
.disposition-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.disposition-fields > div {
    display: grid;
    gap: 6px;
}
.disposition-tracking {
    color: var(--sky-darker);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
}
.disposition-print-card em {
    min-height: 42px;
    border: 1px dashed #aebfca;
    border-radius: 8px;
    background: #fbfdfe;
}
.disposition-print-card em.large {
    min-height: 94px;
}
.document-preview-panel {
    position: relative;
    overflow: hidden;
    margin-top: 0;
    border-top: 3px solid var(--sky-dark);
}

.agenda-settings-head {
    position: relative;
    overflow: hidden;
}
.agenda-settings-head::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #f2b84b, #1b9a91, #7bdce5);
}
.agenda-settings-panel {
    width: min(760px, 100%);
    margin-right: auto;
    margin-left: auto;
    padding: 26px 30px;
}
.agenda-settings-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}
.agenda-settings-title h2 { margin: 3px 0 0; }
.agenda-preview-label {
    color: var(--sky-darker);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}
.agenda-settings-form {
    display: grid;
    gap: 14px;
    padding-top: 20px;
}
.agenda-token-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.agenda-token-list span {
    padding: 6px 9px;
    border: 1px solid #c9dde7;
    border-radius: 6px;
    background: #f1f7fa;
    color: var(--sky-darker);
    font-family: Consolas, monospace;
    font-size: 12px;
    font-weight: 800;
}
.agenda-format-preview {
    min-height: 60px;
    display: flex;
    align-items: center;
    padding: 13px 16px;
    border-left: 4px solid #1b9a91;
    border-radius: 6px;
    background: #eef8f6;
    color: var(--ink);
    font-size: 22px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}
.agenda-settings-form > p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}
.document-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.document-tabs button {
    min-height: 34px;
    padding: 0 13px;
    background: #e8eef2;
    color: var(--ink);
    font-size: 12px;
}
.document-tabs button.active {
    background: var(--sky-dark);
    color: white;
}
.document-frames article {
    display: none;
}
.document-frames article.active {
    display: block;
}
.doc-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    background: #f8fbfd;
}
.doc-preview-head span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}
.document-frames iframe {
    width: 100%;
    height: 680px;
    border: 1px solid var(--line);
    border-radius: 0 0 8px 8px;
    background: #f8fbfd;
}
.alert {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 80;
    width: max-content;
    max-width: min(360px, calc(100vw - 48px));
    padding: 14px 16px;
    border: 1px solid transparent;
    border-radius: 8px;
    box-shadow: 0 18px 42px rgba(20,33,43,.18);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
    white-space: normal;
    animation: toast-in .22s ease-out;
}
.alert::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    background: currentColor;
    opacity: .45;
    transform-origin: right center;
    animation: toast-progress 2s linear forwards;
}
.alert.success {
    background: #e4f8ef;
    border-color: #b9ebd4;
    color: var(--success);
}
.alert.warning {
    background: #fff0c2;
    border-color: #ffd166;
    color: #9a5b00;
}
.alert.danger {
    background: #ffe2e2;
    border-color: #ffc9c9;
    color: var(--danger);
}
.alert.is-hiding {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease;
}
.letter-pulse-popup {
    position: fixed;
    top: 86px;
    right: 24px;
    z-index: 78;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    width: min(390px, calc(100vw - 48px));
    padding: 14px;
    border: 1px solid rgba(31,120,168,.2);
    border-radius: 8px;
    background: rgba(255,255,255,.94);
    color: var(--ink);
    box-shadow: 0 20px 48px rgba(20,33,43,.18);
    backdrop-filter: blur(12px);
    animation: letter-popup-in .28s ease-out;
}
.letter-pulse-popup.is-hiding {
    opacity: 0;
    transform: translateY(-8px) scale(.98);
    transition: opacity .24s ease, transform .24s ease;
}
.letter-pulse-popup span:last-child {
    display: grid;
    min-width: 0;
    gap: 3px;
}
.letter-pulse-popup strong {
    color: var(--sky-darker);
    font-size: 13px;
}
.letter-pulse-popup em {
    color: #1b9a91;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}
.letter-pulse-popup b {
    overflow: hidden;
    color: var(--ink);
    font-size: 13px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.letter-pulse-popup small {
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pulse-lamp {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 38% 32%, rgba(255,255,255,.95) 0 13%, transparent 14%),
        radial-gradient(circle, #fff36d 0 22%, #f8bd24 23% 48%, #f28322 49% 100%);
    box-shadow:
        0 0 0 7px rgba(248,189,36,.16),
        0 0 28px rgba(248,189,36,.72);
    animation: lamp-glow 1.15s ease-in-out infinite;
}
.pulse-lamp::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -5px;
    width: 18px;
    height: 8px;
    border-radius: 0 0 8px 8px;
    background: #1f78a8;
    transform: translateX(-50%);
}
@keyframes letter-popup-in {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
@keyframes lamp-glow {
    0%, 100% {
        box-shadow:
            0 0 0 7px rgba(248,189,36,.14),
            0 0 24px rgba(248,189,36,.58);
        filter: saturate(1);
    }
    50% {
        box-shadow:
            0 0 0 11px rgba(248,189,36,.2),
            0 0 38px rgba(248,189,36,.95);
        filter: saturate(1.15);
    }
}
@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes toast-progress {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}
.empty { padding: 28px; text-align: center; color: var(--muted); }
.footer { text-align: center; color: var(--muted); padding: 24px; font-size: 13px; }
@media (max-width: 820px) {
    .topbar { align-items: flex-start; flex-direction: column; padding: 14px 18px; }
    .main-nav { width: 100%; align-items: stretch; }
    .nav-group { width: 100%; }
    .nav-link, .nav-trigger { width: 100%; justify-content: space-between; }
    .nav-menu { position: static; width: 100%; margin-top: 4px; box-shadow: none; }
    .container { padding: 18px 14px 48px; }
    .hero, .page-head, .detail-hero { padding: 24px; }
    .hero h1, .page-head h1, .detail-hero h1 { font-size: 28px; }
    .dashboard-hero-heading { align-items: flex-start; flex-direction: column; gap: 2px; margin-bottom: 12px; }
    .dashboard-hero-heading h1 { margin-bottom: 4px; }
    .dashboard-clock { font-size: 13px; }
    .dashboard-summary { flex-direction: column; }
    .kpi-grid, .kpi-grid.pts-kpi-grid, .meta-grid, .two-col, .form-grid { grid-template-columns: 1fr; }
    .followup-grid,
    .letter-info-grid,
    .followup-info-panel .letter-info-grid,
    .disposition-fields { grid-template-columns: 1fr; }
    .followup-hero { align-items: flex-start; flex-direction: column; }
    .followup-letter-heading { grid-template-columns: 1fr; gap: 9px; }
    .followup-subject { margin-left: 0; }
    .followup-origin { align-items: flex-start; flex-direction: column; }
    .followup-actions { justify-content: flex-start; }
    .workspace-receipt-bar { align-items: stretch; flex-direction: column; }
    .workspace-receipt-bar button { width: 100%; }
    .document-frames iframe { height: 520px; }
    .search-panel, .status-form, .detail-hero { flex-direction: column; display: flex; }
    .table-search, .pagination, .pagination div { align-items: stretch; flex-direction: column; }
    .table-search .letter-add-inline { margin-left: 0; }
    .user-toolbar, .user-search { align-items: stretch; flex-direction: column; }
    .user-search { width: 100%; }
    .user-search input { min-width: 0; }
    .unit-form { grid-template-columns: 1fr; }
    .unit-actions { align-items: stretch; flex-direction: column; }
    .thread-panel .table-wrap,
    .users-panel .table-wrap { overflow-x: auto; }
}

@media print {
    body { background: white; }
    .topbar,
    .site-footer,
    .followup-hero,
    .workspace-preview,
    .workspace-receipt-bar,
    .workspace-divider,
    .alert {
        display: none !important;
    }
    .container {
        max-width: none;
        padding: 0;
    }
    .followup-grid {
        display: grid;
        grid-template-columns: 1fr 320px;
        gap: 14px;
    }
    .panel {
        box-shadow: none;
        break-inside: avoid;
    }
    .correspondence-workspace {
        border: 0;
        padding: 0;
    }
}

.user-chip {
    display: grid;
    gap: 2px;
    min-width: 210px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbfd;
}
.user-chip strong { color: var(--ink); font-size: 13px; }
.user-chip span { font-size: 12px; }
.user-chip a { font-size: 12px; margin-top: 4px; }
.login-shell {
    width: 100%;
    max-width: 1100px;
    min-height: 560px;
    margin: 36px auto;
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) 1px minmax(320px, .72fr);
    align-items: stretch;
    overflow: hidden;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(20,33,43,.16);
}
.login-copy {
    position: relative;
    border-radius: 0;
    padding: 44px 42px;
    background:
        linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.75), rgba(255,255,255,0)),
        linear-gradient(115deg, transparent 0 42%, rgba(255,255,255,.12) 42% 42.4%, transparent 42.4% 100%),
        linear-gradient(155deg, transparent 0 58%, rgba(255,255,255,.1) 58% 58.35%, transparent 58.35% 100%),
        repeating-linear-gradient(90deg, rgba(255,255,255,.055) 0 1px, transparent 1px 34px),
        repeating-linear-gradient(0deg, rgba(255,255,255,.04) 0 1px, transparent 1px 34px),
        radial-gradient(circle at 16% 10%, rgba(255,255,255,.18), transparent 30%),
        linear-gradient(135deg, #1d5f8b 0%, #1f78a8 64%, #238c99 100%);
    background-size: 42.5% 6.25px, auto, auto, auto, auto, auto, auto;
    background-position: -45% 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
    background-repeat: no-repeat, no-repeat, no-repeat, repeat, repeat, no-repeat, no-repeat;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    animation: login-light-sweep 7.98s ease-in-out infinite;
}
.login-copy::before {
    content: "";
    position: absolute;
    right: 38px;
    top: 42px;
    width: 190px;
    height: 190px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 8px;
    transform: rotate(45deg);
}
.login-copy::after {
    content: "";
    position: absolute;
    right: 88px;
    top: 92px;
    width: 90px;
    height: 90px;
    border-top: 2px solid rgba(255,255,255,.24);
    border-right: 2px solid rgba(255,255,255,.24);
    transform: rotate(45deg);
}
@keyframes login-light-sweep {
    0% {
        background-position: -45% 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
    }
    46% {
        background-position: 145% 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
    }
    100% {
        background-position: 145% 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
    }
}
.login-copy > * {
    position: relative;
    z-index: 1;
}
.login-copy h1 {
    max-width: 640px;
    font-size: 34px;
    line-height: 1.18;
    margin: 8px 0 14px;
    letter-spacing: 0;
}
.login-copy p {
    max-width: 620px;
    margin: 0;
    color: rgba(255,255,255,.88);
    line-height: 1.65;
}
.login-summary {
    max-width: 560px;
    margin: 26px 0 0;
    padding: 18px 20px 18px 36px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 8px;
    background: rgba(255,255,255,.12);
    color: rgba(255,255,255,.9);
    line-height: 1.8;
}
.login-summary li { padding-left: 4px; }
.login-divider { background: rgba(20,33,43,.12); }
.login-card {
    position: relative;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    min-width: 0;
    padding: 28px 32px 36px;
    border: 0;
    border-radius: 0;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    box-shadow: none;
}
.login-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #1f78a8, #1b9a91);
}
.login-card h2 {
    margin: 0 0 6px;
    color: #10233f;
    text-align: center;
    font-size: 22px;
    font-weight: 800;
}
.login-card input:not([type="checkbox"]) {
    min-height: 46px;
    border: 1px solid #dbe4ef;
    border-radius: 9px;
    background: #ffffff;
    color: #0f172a;
    font-weight: 600;
    box-shadow: 0 6px 16px rgba(15,23,42,.04);
}
.login-card input:not([type="checkbox"]):focus {
    border-color: #1b9a91;
    box-shadow: 0 0 0 4px rgba(27,154,145,.13);
}
.login-card button {
    min-height: 46px;
    margin-top: 2px;
    background: linear-gradient(135deg, #1f78a8, #1b9a91);
    box-shadow: 0 12px 24px rgba(31,120,168,.24);
}.check {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
    font-weight: 600;
}
.check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-height: 0;
    margin: 0;
    padding: 0;
    box-shadow: none;
    accent-color: #1f78a8;
}
.check input[type="checkbox"]:focus {
    outline: 0;
    box-shadow: none;
}
.readonly-field {
    background: #f8fbfd;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
}
.readonly-field span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.compact-form { box-shadow: none; border: 0; padding: 14px 0 0; }
details.panel summary { cursor: pointer; font-weight: 800; color: var(--sky-darker); }
.small { min-height: 34px; padding: 0 10px; font-size: 12px; }
.role-list { display: grid; gap: 14px; }
.role-list article {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    background: #fbfdfe;
}
.role-list h3 { margin: 0 0 6px; }
.role-list p { margin: 0 0 12px; color: var(--muted); }
.role-page-head {
    border-left: 5px solid #d84a3a;
    background:
        linear-gradient(112deg, transparent 58%, rgba(31, 157, 138, .08) 58.2%, transparent 58.7%),
        linear-gradient(68deg, transparent 76%, rgba(216, 74, 58, .08) 76.2%, transparent 76.7%),
        #ffffff;
}
.role-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}
.role-summary > div {
    position: relative;
    overflow: hidden;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(16, 42, 67, .06);
}
.role-summary > div::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #1f9d8a;
    content: '';
}
.role-summary > div:nth-child(2)::before { background: #2584b3; }
.role-summary > div:nth-child(3)::before { background: #d84a3a; }
.role-summary span { color: var(--muted); font-size: 13px; font-weight: 700; }
.role-summary strong { display: block; margin-top: 4px; font-size: 24px; }
.role-summary small { font-size: 13px; }
.role-section { margin: 0 0 26px; }
.role-section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
    padding: 0 4px 10px;
    border-bottom: 1px solid var(--line);
}
.role-section-head span { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.role-section-head h2 { margin: 2px 0 0; font-size: 22px; }
.role-section-head > strong { color: var(--sky-darker); font-size: 13px; }
.role-catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.role-catalog article {
    position: relative;
    padding: 18px;
    border-top: 4px solid #2584b3;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(16, 42, 67, .07);
}
.role-catalog .role-super-admin { border-top-color: #d84a3a; }
.role-catalog .role-kepala-lembaga,
.role-catalog .role-kepala-bagian-umum { border-top-color: #e0a11b; }
.role-catalog .role-admin-pts,
.role-catalog .role-operator-pts { border-top-color: #1f9d8a; }
.role-card-head { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-bottom: 14px; }
.role-symbol { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; background: #e7f4fa; color: var(--sky-darker); font-size: 13px; font-weight: 900; }
.role-card-head h3 { margin: 0 0 2px; font-size: 18px; }
.role-card-head code { color: var(--muted); font-size: 11px; }
.role-scope { padding: 5px 8px; border-radius: 999px; background: #edf4f7; color: #4e6574; font-size: 11px; font-weight: 800; }
.role-card > p { min-height: 42px; line-height: 1.5; }
.role-permissions { padding-top: 12px; border-top: 1px solid var(--line); }
.role-permissions > span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.role-rule { display: grid; gap: 3px; margin: 0 0 12px; padding: 10px 12px; border-left: 3px solid #e0a11b; background: #fff8df; color: #684b0d; font-size: 12px; }
.role-rule span { line-height: 1.45; }
.user-toolbar-actions { display: flex; align-items: center; gap: 12px; }
.operator-limit-status { padding: 9px 12px; border: 1px solid #b9ddd6; border-radius: 8px; background: #effaf7; color: #27685e; font-size: 12px; font-weight: 700; white-space: nowrap; }
.operator-limit-status strong { color: #0d7969; font-size: 16px; }
.primary-account-label { color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.readonly-field small { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
.pill {
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 999px;
    margin: 3px;
    background: var(--sky-soft);
    color: var(--sky-darker);
    font-size: 12px;
    font-weight: 700;
}
.forbidden h1 { font-size: 48px; color: var(--danger); margin: 0 0 8px; }
.forbidden-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
}
code { white-space: normal; font-size: 12px; color: #425466; }
@media (max-width: 980px) {
    .login-shell { grid-template-columns: 1fr; min-height: auto; }
    .login-copy { padding: 30px; }
    .login-copy h1 { font-size: 32px; }
    .user-chip { width: 100%; }
}
@media (max-width: 640px) {
    .alert {
        top: 16px;
        right: 16px;
        max-width: calc(100vw - 32px);
    }
}
@media (max-width: 820px) {
    .role-summary, .role-catalog { grid-template-columns: 1fr; }
    .role-card > p { min-height: 0; }
    .user-toolbar-actions { align-items: stretch; flex-direction: column; }
    .generated-password-field { grid-template-columns: 1fr; }
    .generated-password-field button { width: 100%; }
    .password-layout {
        grid-template-columns: 1fr;
    }
    .password-note {
        position: static;
        align-self: auto;
        margin-top: 0;
        transform: none;
    }
}








body:has(.secure-login) { overflow: hidden; }
body:has(.secure-login) .container { min-height: calc(100vh - 77px); display: flex; align-items: center; padding-top: 18px; padding-bottom: 18px; }
body:has(.secure-login) .login-shell { min-height: 520px; margin: 0 auto; }
body:has(.secure-login) .footer { display: none; }
@media (max-height: 680px) {
    body:has(.secure-login) { overflow: auto; }
    body:has(.secure-login) .container { align-items: flex-start; }
}





.site-footer {
    max-width: 1180px;
    margin: 0 auto 24px;
    min-height: 54px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid #cfe1ea;
    border-radius: 8px;
    background: linear-gradient(135deg, #ffffff, #eef8fc);
    box-shadow: 0 10px 26px rgba(20,33,43,.06);
    color: var(--ink);
}
.site-footer strong { display: block; color: var(--sky-darker); font-size: 14px; }
.site-footer span, .site-footer p { color: var(--muted); font-size: 13px; margin: 3px 0 0; }
.footer-accent {
    flex: 1;
    max-width: 320px;
    height: 6px;
    display: grid;
    grid-template-columns: 1.4fr .8fr .5fr;
    gap: 6px;
}
.footer-accent span {
    border-radius: 999px;
    margin: 0;
}
.footer-accent span:nth-child(1) { background: #1f78a8; }
.footer-accent span:nth-child(2) { background: #1b9a91; }
.footer-accent span:nth-child(3) { background: #f2b84b; }
body:has(.secure-login) .site-footer {
    min-height: 54px;
    margin-bottom: 14px;
    padding: 10px 20px;
    background: rgba(255,255,255,.88);
}
@media (max-width: 820px) {
    .site-footer { flex-direction: column; align-items: flex-start; margin-left: 14px; margin-right: 14px; }
    .footer-accent { width: 100%; max-width: none; }
}

body { padding-bottom: 72px; }
.site-footer {
    position: fixed;
    left: 24px;
    right: 24px;
    bottom: 14px;
    z-index: 30;
    max-width: none;
    margin: 0;
}
body:has(.secure-login) { padding-bottom: 70px; }
body:has(.secure-login) .site-footer { bottom: 12px; }
@media (max-width: 820px) {
    body { padding-bottom: 112px; }
    .site-footer { left: 14px; right: 14px; bottom: 10px; }
}






/* Header layout refinement */
.topbar {
    z-index: 50;
    display: grid;
    grid-template-columns: minmax(300px, 350px) minmax(0, 1fr) minmax(360px, 520px);
    align-items: center;
    gap: 22px;
    min-height: 92px;
    padding: 14px 28px;
}
.brand-block {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.main-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: nowrap;
    min-width: 0;
}
.nav-link,
.nav-trigger {
    min-height: 36px;
    padding: 0 10px;
    font-size: 13px;
    white-space: nowrap;
}
.nav-trigger {
    display: inline-flex;
    align-items: center;
}
.user-chip {
    justify-self: end;
    width: 100%;
    max-width: 520px;
    display: grid;
    grid-template-columns: minmax(125px, .72fr) minmax(190px, 1fr) auto;
    align-items: center;
    gap: 14px;
    min-height: 58px;
    padding: 10px 14px;
}
.user-chip strong {
    color: var(--ink);
    font-size: 13px;
    line-height: 1.2;
}
.user-chip span {
    margin: 0;
    font-size: 12px;
    line-height: 1.25;
}
.user-chip a {
    justify-self: end;
    margin: 0;
    font-size: 12px;
}
@media (max-width: 1180px) {
    .topbar {
        grid-template-columns: 1fr;
        align-items: stretch;
        min-height: auto;
        gap: 12px;
    }
    .main-nav {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    .user-chip {
        justify-self: stretch;
        max-width: none;
    }
}
@media (max-width: 820px) {
    .topbar {
        display: flex;
        align-items: flex-start;
        flex-direction: column;
        padding: 14px 18px;
    }
    .main-nav {
        width: 100%;
        align-items: stretch;
    }
    .nav-group {
        width: 100%;
    }
    .nav-link,
    .nav-trigger {
        width: 100%;
        justify-content: space-between;
    }
    .nav-menu {
        position: static;
        width: 100%;
        margin-top: 4px;
        box-shadow: none;
    }
    .user-chip {
        width: 100%;
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

.account-menu {
    position: relative;
    justify-self: end;
}
.account-trigger {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px 0 5px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbfd;
    color: var(--ink);
    box-shadow: none;
    white-space: nowrap;
}
.account-trigger .account-name {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--sky-darker);
    font-size: 13px;
    font-weight: 800;
}
.account-trigger .account-avatar {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: grid;
    place-items: center;
    overflow: hidden;
    margin-top: 0;
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: linear-gradient(135deg, #1f78a8, #1b9a91);
    color: #ffffff;
    box-shadow: 0 0 0 1px #c8dee9;
    font-size: 10px;
    font-weight: 900;
}
.account-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}
.account-trigger i {
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
}
.account-menu:hover .account-trigger,
.account-menu:focus-within .account-trigger {
    background: var(--sky-soft);
    filter: none;
}

.profile-page-head {
    position: relative;
    overflow: hidden;
    padding: 14px 24px;
    margin-bottom: 16px;
    background:
        linear-gradient(135deg, rgba(21,91,131,.98) 0%, rgba(31,120,168,.96) 68%, rgba(27,154,145,.96) 100%),
        repeating-linear-gradient(45deg, transparent 0 30px, rgba(255,255,255,.12) 30px 31px);
}
.profile-page-head::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(118deg, transparent 0 64%, rgba(255,255,255,.16) 64% 64.35%, transparent 64.35%),
        linear-gradient(28deg, transparent 0 78%, rgba(242,184,75,.30) 78% 78.45%, transparent 78.45%),
        linear-gradient(160deg, transparent 0 86%, rgba(123,220,229,.30) 86% 86.45%, transparent 86.45%);
    pointer-events: none;
}
.profile-page-head h1 {
    margin: 1px 0 3px;
    font-size: 26px;
}
.profile-page-head p {
    font-size: 13px;
    line-height: 1.35;
}
.profile-page-head .eyebrow { font-size: 10px; }
.profile-page-head > div { position: relative; z-index: 1; }
.profile-page-head::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 3px;
    background: linear-gradient(90deg, #f2b84b, #2dd4bf, #7bdce5);
}
.profile-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}
.profile-content {
    min-width: 0;
    display: grid;
    gap: 20px;
}
.profile-avatar-panel {
    text-align: center;
}
.profile-avatar-large {
    width: 142px;
    height: 142px;
    display: grid;
    place-items: center;
    overflow: hidden;
    margin: 2px auto 18px;
    border: 5px solid #ffffff;
    border-radius: 50%;
    background: linear-gradient(135deg, #1f78a8, #1b9a91);
    color: #ffffff;
    box-shadow: 0 0 0 1px #c8dee9, 0 14px 30px rgba(21,91,131,.18);
    font-size: 40px;
    font-weight: 900;
}
.profile-avatar-large img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}
.profile-avatar-panel h2 {
    margin: 0 0 5px;
    font-size: 21px;
}
.profile-avatar-panel > p {
    min-height: 20px;
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 13px;
}
.profile-upload-form {
    display: grid;
    gap: 10px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}
.profile-upload-form input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}
.profile-file-picker {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 14px;
    border: 1px solid #bcdcea;
    border-radius: 7px;
    background: var(--sky-soft);
    color: var(--sky-darker);
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
}
.profile-file-picker:hover { background: #d9eff8; }
.profile-file-picker > span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.profile-file-picker svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.profile-upload-form small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.4;
}
.profile-upload-form button:disabled {
    opacity: .48;
    cursor: not-allowed;
    filter: none;
}
.profile-info-panel { padding: 14px 30px 26px; }
.profile-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}
.profile-section-head h2 {
    margin: 3px 0 0;
    font-size: 22px;
}
.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 30px;
}
.profile-info-item {
    min-width: 0;
    display: grid;
    gap: 5px;
    padding: 16px 0;
    border-bottom: 1px solid #e4edf2;
}
.profile-info-item span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}
.profile-info-item strong {
    overflow-wrap: anywhere;
    font-size: 14px;
    line-height: 1.45;
}
.profile-edit-item input {
    min-height: 42px;
    padding: 9px 11px;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 700;
}
.profile-edit-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    justify-self: stretch;
    width: 100%;
    padding-top: 18px;
}
.profile-edit-actions button {
    width: auto;
    min-width: 170px;
    margin-left: auto;
}

@media (min-width: 821px) {
    .profile-layout { align-items: stretch; }
    .profile-avatar-panel,
    .profile-content,
    .profile-info-panel { height: 100%; }
    .profile-avatar-panel,
    .profile-info-panel { margin-bottom: 0; }
}

@media (max-width: 820px) {
    .profile-layout { grid-template-columns: 1fr; }
    .profile-info-grid { grid-template-columns: 1fr; }
    .profile-info-panel { padding: 14px 20px 22px; }
}
.account-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    display: none;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 38px rgba(20,33,43,.14);
    z-index: 25;
}
.account-menu:hover .account-dropdown,
.account-menu:focus-within .account-dropdown { display: grid; }
.account-meta {
    padding: 9px 10px 11px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}
.account-dropdown a,
.account-dropdown .link-button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    min-height: 40px;
    padding: 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}
.account-dropdown a {
    border-bottom: 1px solid var(--line);
    border-radius: 0;
}
.account-dropdown form {
    width: 100%;
    margin: 0;
}
.account-dropdown a .action-icon {
    color: var(--sky-dark);
}
.account-dropdown .link-button .action-icon {
    color: var(--danger);
}
.account-dropdown a > span:not(.action-icon),
.account-dropdown .link-button > span:not(.action-icon) {
    min-width: 0;
    margin: 0;
    color: inherit;
    font-size: 13px;
    text-align: left;
}
.account-dropdown a:hover,
.account-dropdown .link-button:hover { background: var(--sky-soft); color: var(--sky-darker); }
@media (max-width: 1180px) {
    .account-menu { justify-self: stretch; }
    .account-trigger { width: 100%; justify-content: space-between; }
}
@media (max-width: 820px) {
    .account-menu { width: 100%; }
    .account-dropdown { position: static; width: 100%; margin-top: 4px; box-shadow: none; }
}

/* Final navbar alignment and height reduction */
.topbar {
    grid-template-columns: minmax(270px, 320px) minmax(0, 1fr) auto;
    min-height: 63px;
    padding: 6px 22px;
    gap: 18px;
}
.brand-block {
    height: 48px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.brand-mark {
    width: 84px;
    height: 36px;
}
.brand-text strong {
    font-size: 17px;
    line-height: 1.15;
}
.brand-text span {
    font-size: 13px;
    line-height: 1.15;
    margin-top: 1px;
}
.main-nav {
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: nowrap;
}
.nav-link,
.nav-trigger {
    height: 34px;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 11px;
    line-height: 1;
    font-size: 14px;
    vertical-align: middle;
}
.nav-trigger span {
    flex: 0 0 auto;
    margin-left: 3px;
}
.account-menu {
    align-self: center;
}
.account-trigger {
    min-height: 36px;
    height: 36px;
    padding: 0 12px 0 3px;
}
@media (max-width: 1180px) {
    .topbar {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 10px 18px;
    }
    .brand-block { height: auto; }
    .main-nav {
        width: 100%;
        height: auto;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}


/* Modern dropdown list accent */
.nav-menu {
    background: linear-gradient(180deg, #ffffff 0%, #f3fbfe 100%);
    border-color: #b9d8e5;
    box-shadow: 0 18px 36px rgba(21,91,131,.18);
}
.nav-menu a {
    position: relative;
    color: #163247;
    border-left: 3px solid transparent;
}
.nav-menu a::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: transparent;
    transform: translateY(-50%);
}
.nav-menu a:hover {
    padding-left: 22px;
    background: linear-gradient(90deg, #dff4fb 0%, #edfdf8 100%);
    color: #155b83;
    border-left-color: #1b9a91;
}
.nav-menu a:hover::before {
    background: #1b9a91;
}
.account-dropdown {
    background: linear-gradient(180deg, #ffffff 0%, #f3fbfe 100%);
    border-color: #b9d8e5;
    box-shadow: 0 18px 36px rgba(21,91,131,.18);
}
.account-dropdown a:hover {
    background: linear-gradient(90deg, #dff4fb 0%, #edfdf8 100%);
    color: #155b83;
}

/* Navbar bottom modern accent */
.topbar {
    border-bottom: 0;
    box-shadow: 0 1px 0 #d8e6ee, 0 8px 22px rgba(20,33,43,.04);
}
.topbar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2.5px;
    background: linear-gradient(90deg, #155b83 0%, #1f78a8 38%, #1b9a91 72%, #f2b84b 100%);
}



.site-footer p {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    line-height: 18px;
}
.copyright-mark {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 18px;
    margin: 0;
    border: 1.7px solid #1f78a8;
    border-radius: 999px;
    color: #1f78a8;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
}


.upload-panel {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid #bddfed;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8fcff 0%, #eef9fc 55%, #f7fbf8 100%);
}
.upload-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.upload-head span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 4px;
}
.upload-head strong {
    color: var(--sky-darker);
    font-size: 15px;
}
.file-rows {
    display: grid;
    gap: 10px;
}
.file-row {
    display: grid;
    grid-template-columns: 1fr 42px;
    gap: 10px;
    align-items: center;
}
.file-row input[type="file"] {
    background: #ffffff;
    border-style: dashed;
}
.remove-file {
    width: 42px;
    height: 42px;
    border: 1px solid #f1c4c4;
    border-radius: 8px;
    background: #fff7f7;
    color: #b42318;
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}
.remove-file:hover {
    background: #ffe9e9;
}
.upload-note {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}
@media (max-width: 640px) {
    .upload-head {
        align-items: stretch;
        flex-direction: column;
    }
    .add-file {
        width: 100%;
        justify-content: center;
    }
    .file-row {
        grid-template-columns: 1fr 38px;
    }
    .remove-file {
        width: 38px;
        height: 38px;
    }
}

.create-head {
    position: relative;
    overflow: hidden;
    padding: 12px 30px 12px;
    margin-bottom: 18px;
    background:
        linear-gradient(135deg, rgba(21,91,131,.98), rgba(31,120,168,.94)),
        repeating-linear-gradient(90deg, transparent 0 26px, rgba(255,255,255,.14) 26px 27px);
    box-shadow: 0 16px 34px rgba(21,91,131,.13);
}
.create-head::before,
.create-head::after {
    content: "";
    position: absolute;
    pointer-events: none;
}
.create-head::before {
    inset: 0;
    background:
        linear-gradient(115deg, transparent 0 58%, rgba(123,220,229,.2) 58% 59%, transparent 59% 100%),
        linear-gradient(165deg, transparent 0 70%, rgba(242,184,75,.25) 70% 71%, transparent 71% 100%);
}
.create-head::after {
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, #7bdce5 0%, #1b9a91 45%, #f2b84b 100%);
}
.create-head > div {
    position: relative;
    z-index: 1;
}
.create-head h1 {
    margin: 2px 0 6px;
    font-size: 30px;
}
.create-head p {
    line-height: 1.35;
}
@media (max-width: 820px) {
    .create-head {
        padding: 10px 20px 10px;
    }
    .create-head h1 {
        font-size: 24px;
    }
}



.login-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(11, 32, 45, .48);
    backdrop-filter: blur(7px);
}
.login-modal-card {
    position: relative;
    width: min(760px, 100%);
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 22px;
    align-items: center;
    padding: 24px;
    border: 1px solid rgba(189, 223, 237, .95);
    border-radius: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #f2fbfe 58%, #f8fcf7 100%);
    box-shadow: 0 28px 70px rgba(11, 32, 45, .28);
    overflow: hidden;
}
.login-modal-card::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: linear-gradient(90deg, #1f78a8, #1b9a91, #f2b84b);
}
.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    border: 1px solid #cfe5ef;
    border-radius: 8px;
    background: #ffffff;
    color: var(--muted);
    font-size: 22px;
    line-height: 1;
}
.modal-visual img {
    width: 100%;
    max-height: 230px;
    object-fit: contain;
    display: block;
}
.modal-copy {
    padding-right: 16px;
}
.modal-copy .eyebrow {
    color: var(--sky-dark);
    opacity: 1;
    margin: 0 0 8px;
}
.modal-copy h2 {
    margin: 0 0 10px;
    color: var(--sky-darker);
    font-size: 26px;
    line-height: 1.18;
}
.modal-copy p {
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.55;
}
@media (max-width: 700px) {
    .login-modal-backdrop {
        padding: 14px;
        align-items: start;
        padding-top: 72px;
    }
    .login-modal-card {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 18px;
    }
    .modal-visual img {
        max-height: 170px;
    }
    .modal-copy {
        padding-right: 0;
    }
    .modal-copy h2 {
        font-size: 22px;
    }
    .modal-copy button {
        width: 100%;
    }
}

/* Keep the SLA date together, including on narrow screens. */
.thread-panel td.sla-date { white-space: nowrap; word-break: normal; overflow-wrap: normal; }
