:root {
    --gold: #1f7ab8;
    --gold-2: #2e9b4a;
    --gold-3: #b8e8d4;
    --gold-dark: #0d4a7a;
    --ink: #0a2135;
    --ink-2: #0d2b43;
    --ink-3: #114564;
    --panel: #0d2b43;
    --line: rgba(51, 232, 132, .18);
    --text: #f4fbf8;
    --muted: #9fc4b8;
    --paper: #eef6f4;
    --paper-2: #f7fcfb;
    --danger: #c0392b;
    --ok: #2e9b4a;
    --warn: #c47b12;
    --info: #1f7ab8;
    --shadow: 0 18px 50px rgba(10, 33, 53, .28);
    --radius: 18px;
    --side: 280px;
    --client: var(--gold);
    --font: Arial, Helvetica, sans-serif;
    --serif: Arial, Helvetica, sans-serif;
    --brand-blue: #1f7ab8;
    --brand-green: #2e9b4a;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    color: var(--ink);
    background: var(--paper);
}

img {
    max-width: 100%;
}

a {
    color: inherit;
}

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

/* ===== Landing / Login ===== */
.auth-body {
    position: relative;
    min-height: 100vh;
    background:
        radial-gradient(1100px 580px at 8% -8%, rgba(31, 122, 184, .42), transparent 56%),
        radial-gradient(920px 540px at 108% 12%, rgba(46, 155, 74, .36), transparent 54%),
        linear-gradient(135deg, #061a30 0%, #0a2740 48%, #0a2f28 100%);
    color: var(--text);
}

.auth-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 8;
    border-bottom: 1px solid var(--line);
    background: rgba(6, 26, 48, .72);
    backdrop-filter: blur(14px);
}

.auth-top-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 68px;
    padding: 12px 36px;
}

.auth-top-brand {
    font-size: 12px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--gold-3);
    white-space: nowrap;
}

.auth-switch {
    display: flex;
    padding: 4px;
    border: 1px solid rgba(46, 155, 74, .35);
    border-radius: 999px;
    background: #0a2135;
}

.auth-switch a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 138px;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 9px 18px;
    border-radius: 999px;
    transition: .2s ease;
}

.auth-switch a:hover {
    color: var(--gold-3);
}

.auth-switch a.active {
    color: #062018;
    background: linear-gradient(135deg, #1f7ab8 0%, #2e9b4a 100%);
    box-shadow: 0 6px 16px rgba(31, 122, 184, .28);
}

.auth-wrap {
    display: grid;
    grid-template-columns: 1.15fr .95fr;
    min-height: 100vh;
    padding-top: 68px;
}

.auth-hero {
    padding: 48px 64px;
    position: relative;
    overflow: hidden;
    border-right: 1px solid var(--line);
}

.auth-hero::after {
    content: "";
    position: absolute;
    inset: auto -80px -120px auto;
    width: 420px;
    height: 420px;
    background: url("../img/mssb-logo.png") no-repeat center / contain;
    opacity: .08;
    pointer-events: none;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.auth-logo img,
.brand-lotus {
    width: 52px;
    height: 52px;
    object-fit: contain;
    mix-blend-mode: normal;
}

.logo-word {
    font-family: var(--serif);
    letter-spacing: .28em;
    font-size: 18px;
    font-weight: 600;
}

.logo-word small {
    display: block;
    letter-spacing: .42em;
    font-size: 9px;
    color: var(--gold-2);
    margin-top: 2px;
}

.script {
    font-family: var(--serif);
    font-style: italic;
    color: var(--gold-3);
    margin: 72px 0 10px;
    font-size: 28px;
    letter-spacing: .02em;
}

.auth-hero h1 {
    font-family: var(--serif);
    font-size: clamp(36px, 5vw, 58px);
    line-height: .95;
    margin: 0 0 18px;
    font-weight: 600;
    letter-spacing: .02em;
}

.auth-hero p.lead {
    max-width: 520px;
    color: var(--muted);
    line-height: 1.7;
    font-weight: 300;
}

.portal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 42px;
    max-width: 640px;
}

.portal-card {
    display: block;
    text-decoration: none;
    padding: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .03);
    border-radius: 16px;
    transition: .22s ease;
    min-height: 128px;
}

.portal-card:hover,
.portal-card.active {
    border-color: var(--gold);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(46, 155, 74, .14);
    background: rgba(46, 155, 74, .08);
}

.portal-code {
    display: inline-block;
    font-size: 11px;
    letter-spacing: .18em;
    color: var(--gold);
    border: 1px solid var(--line);
    padding: 4px 8px;
    border-radius: 999px;
    margin-bottom: 10px;
}

.portal-card strong {
    display: block;
    font-size: 20px;
    margin-bottom: 4px;
}

.portal-card span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 32px;
}

.auth-card {
    width: 100%;
    max-width: 430px;
    background: #0d2847;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 36px 32px;
    box-shadow: var(--shadow);
}

.auth-card h2 {
    font-family: var(--serif);
    font-size: 34px;
    margin: 0 0 6px;
}

.auth-card .hint {
    color: var(--muted);
    margin-bottom: 28px;
    font-size: 14px;
}

.field {
    margin-bottom: 16px;
}

.field label {
    display: block;
    font-size: 12px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--gold-2);
    margin-bottom: 8px;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    background: #123355;
    border: 1px solid #1c4168;
    color: var(--text);
    border-radius: 12px;
    padding: 13px 14px;
    outline: none;
    transition: .2s;
}

.app-body .field input,
.app-body .field select,
.app-body .field textarea {
    background: #fff;
    color: var(--ink);
    border-color: #d4e1ec;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(46, 155, 74, .18);
}

.field textarea {
    min-height: 140px;
    resize: vertical;
}

.staff-link {
    display: inline-block;
    margin-top: 18px;
    color: var(--gold-2);
    font-size: 13px;
}

.auth-foot {
    margin-top: 28px;
    color: #61768b;
    font-size: 12px;
}

/* ===== App shell ===== */
.app-body {
    display: flex;
    min-height: 100vh;
    background:
        radial-gradient(820px 380px at 0% 0, rgba(31, 122, 184, .12), transparent 52%),
        radial-gradient(900px 420px at 100% 0, rgba(46, 155, 74, .12), transparent 50%),
        var(--paper);
}

.sidebar {
    width: var(--side);
    min-width: 200px;
    max-width: 420px;
    flex-shrink: 0;
    background: linear-gradient(180deg, #0a2744 0%, #0d3558 46%, #0e3d36 100%);
    color: var(--text);
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-right: 1px solid var(--line);
    z-index: 20;
    scrollbar-width: thin;
    scrollbar-color: rgba(46, 155, 74, .45) transparent;
}

.sidebar-resizer {
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 100%;
    cursor: col-resize;
    z-index: 30;
    touch-action: none;
}

.sidebar-resizer::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 2px;
    width: 3px;
    height: 42px;
    margin-top: -21px;
    border-radius: 999px;
    background: rgba(46, 155, 74, .4);
    transition: .15s ease;
}

.sidebar-resizer:hover::after,
body.resizing-sidebar .sidebar-resizer::after {
    background: var(--gold);
    height: 64px;
    margin-top: -32px;
}

body.resizing-sidebar {
    cursor: col-resize;
    user-select: none;
}

body.resizing-sidebar .app-main {
    pointer-events: none;
}

.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(46, 155, 74, .4);
    border-radius: 999px;
}

.sidebar-brand {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 6px 8px 12px;
    border-bottom: 1px solid var(--line);
}

.brand-name {
    font-family: var(--serif);
    letter-spacing: .32em;
    font-size: 15px;
}

.brand-sub {
    color: var(--gold-2);
    font-size: 11px;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.sidebar-portal {
    background: rgba(46, 155, 74, .08);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 14px;
}

.portal-kicker {
    display: block;
    font-size: 10px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 4px;
}

.sidebar-portal strong {
    display: block;
    font-size: 16px;
}

.sidebar-portal small {
    color: var(--muted);
    font-size: 12px;
}

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.side-nav a,
.side-nav summary {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #d1dde8;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 14px;
    position: relative;
}

.side-nav a:hover,
.side-nav a.active,
.side-nav summary:hover,
.side-nav summary.active {
    background: rgba(46, 155, 74, .12);
    color: var(--gold-3);
}

.nav-more summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.nav-more summary::-webkit-details-marker {
    display: none;
}

.nav-caret {
    margin-left: auto;
    display: inline-flex;
    transition: transform .2s;
}

.nav-caret svg {
    width: 16px;
    height: 16px;
}

.nav-more[open] .nav-caret {
    transform: rotate(180deg);
}

.nav-more-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 4px 0 0 18px;
    padding-left: 10px;
    border-left: 1px solid rgba(46, 155, 74, .22);
}

.nav-more-items a {
    font-size: 13px;
    padding: 8px 10px;
}

.nav-cta {
    background: linear-gradient(135deg, #1f7ab8 0%, #2e9b4a 100%) !important;
    color: #062018 !important;
    font-weight: 600;
    margin-top: 6px;
}

.nav-cta.active,
.nav-cta:hover {
    filter: brightness(1.05);
}

.nav-ico {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    flex: 0 0 22px;
}

.nav-label {
    line-height: 1.3;
}

.nav-ico svg {
    width: 18px;
    height: 18px;
}

.nav-badge {
    margin-left: auto;
    background: linear-gradient(135deg, #1f7ab8, #2e9b4a);
    color: #062018;
    font-style: normal;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
    border-radius: 999px;
    padding: 2px 6px;
}

.nav-cta .nav-badge {
    background: #062018;
    color: var(--gold-3);
}

.side-projects {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.side-projects a {
    text-decoration: none;
    font-size: 11px;
    letter-spacing: .08em;
    border: 1px solid var(--line);
    color: var(--gold-2);
    padding: 5px 8px;
    border-radius: 999px;
}

.side-projects a.active {
    background: linear-gradient(135deg, #1f7ab8, #2e9b4a);
    color: #062018;
    border-color: transparent;
}

.sidebar-foot {
    margin-top: auto;
    position: sticky;
    bottom: 0;
    z-index: 2;
    padding-top: 14px;
    background: linear-gradient(180deg, rgba(14, 61, 54, 0), #0e3d36 16px);
}

.side-portal-link {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(51, 232, 132, .15);
}
.side-portal-link a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    color: #9fc4b8;
    font-weight: 600;
    font-size: 13px;
}
.side-portal-link a svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.side-portal-link a:hover {
    color: #fff;
    background: rgba(46, 155, 74, .12);
}

.user-chip {
    display: flex;
    gap: 10px;
    align-items: center;
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #1f7ab8, #2e9b4a);
    color: #062018;
    font-weight: 700;
    font-size: 12px;
}
.avatar-img {
    padding: 0;
    object-fit: cover;
    background: transparent;
}

.user-chip strong {
    display: block;
    font-size: 13px;
}

.user-chip small {
    color: var(--muted);
    font-size: 11px;
}

.logout-link {
    display: inline-block;
    margin-top: 10px;
    color: var(--gold-2);
    font-size: 12px;
}

.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 28px 10px;
    position: relative;
    z-index: 30;
}

.topbar h1 {
    margin: 0;
    font-family: var(--serif);
    font-size: 34px;
    font-weight: 600;
}

.crumb {
    margin: 0;
    color: #647a8f;
    font-size: 12px;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.menu-btn {
    display: none;
    border: 1px solid #d4e1ec;
    background: #fff;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    z-index: 40;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(31, 122, 184, .2);
    color: #0a2744;
    font-size: 20px;
    line-height: 1;
}

.app-content {
    padding: 10px 28px 40px;
    flex: 1;
}

.app-footer {
    padding: 8px 28px 22px;
    color: #647a8f;
    font-size: 12px;
}

.sidebar-overlay {
    display: none;
}

/* ===== Buttons / UI ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    cursor: pointer;
    text-decoration: none;
    border-radius: 12px;
    padding: 12px 18px;
    font-weight: 600;
    font-size: 14px;
}

.btn-gold {
    background: linear-gradient(135deg, #1f7ab8 0%, #217a7a 48%, #2e9b4a 100%);
    color: #fff;
    box-shadow: 0 10px 24px rgba(31, 122, 184, .28);
}

.btn-gold:hover {
    filter: brightness(1.05);
}

.btn-dark {
    background: var(--ink);
    color: var(--gold-3);
}

.btn-ghost {
    background: transparent;
    border: 1px solid #cfdce7;
    color: var(--ink);
}

.btn-danger {
    background: #8b1e1e;
    color: #fff;
}

.btn-danger:hover {
    filter: brightness(1.08);
}

.btn-sm {
    padding: 7px 11px;
    font-size: 12px;
    border-radius: 10px;
}

.btn-block {
    width: 100%;
}

.reset-pass {
    display: flex;
    gap: 6px;
    align-items: center;
    min-width: 230px;
}

.reset-pass input[type="password"] {
    flex: 1;
    min-width: 0;
    border: 1px solid #d4e1ec;
    background: #fff;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 12px;
    font-family: Arial, Helvetica, sans-serif;
}

.raise-top,
.back-btn {
    margin-left: auto;
}

.back-btn[hidden] {
    display: none;
}

.topbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

.flash {
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 14px;
}

.flash-success {
    background: #e8f6ee;
    color: #1e5c3a;
}

.flash-error {
    background: #fdecea;
    color: #8a241c;
}

.flash-info {
    background: #eef4fb;
    color: #1d4e7a;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 22px;
}

.stat {
    background: var(--paper-2);
    border: 1px solid #d9e5ef;
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: 0 8px 24px rgba(12, 35, 62, .04);
}

a.stat {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}

a.stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(12, 35, 62, .1);
}

.stat span {
    display: block;
    color: #647a8f;
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.stat strong {
    font-family: var(--serif);
    font-size: 36px;
    display: block;
    margin: 6px 0 0;
}

.stat.gold {
    background: linear-gradient(135deg, #0d2f52 0%, #14566d 48%, #1f6a45 100%);
    color: var(--gold-3);
    border-color: rgba(46, 155, 74, .35);
}

.stat.gold span {
    color: var(--gold-2);
}

.panel {
    background: var(--paper-2);
    border: 1px solid #d9e5ef;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 8px 24px rgba(12, 35, 62, .04);
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 14px;
}

.panel-head h2,
.panel h2 {
    font-family: var(--serif);
    margin: 0;
    font-size: 26px;
}

.memo-panel,
.memo-board {
    margin-bottom: 22px;
}

.memo-form {
    margin-top: 14px;
}

.memo-list,
.memo-board {
    display: grid;
    gap: 12px;
}

.memo-list {
    margin-top: 18px;
}

.memo-card {
    background: #f6fafe;
    border: 1px solid #d9e5ef;
    border-left: 4px solid #2e9b4a;
    border-radius: 14px;
    padding: 14px 16px;
}

.memo-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.memo-card-top .memo-time {
    margin: 0;
}

.memo-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.memo-edit-form {
    margin-top: 10px;
}

.memo-card h3 {
    margin: 0 0 4px;
    font-family: var(--serif);
    font-size: 22px;
}

.memo-subject {
    margin: 0 0 8px;
    font-weight: 700;
}

.memo-body {
    margin: 0;
    white-space: pre-wrap;
}

.memo-time {
    margin: 0 0 6px;
    color: #647a8f;
    font-size: 12px;
    letter-spacing: .04em;
}

.memo-files {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
    align-items: flex-start;
}

.memo-photo {
    display: block;
    max-width: 280px;
    border: 1px solid #d9e5ef;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.memo-photo img {
    display: block;
    width: 100%;
    max-height: 220px;
    object-fit: cover;
}

.memo-doc {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid #d9e5ef;
    border-radius: 10px;
    background: #fff;
    color: #0f2a47;
    font-size: 13px;
}

.hero-cta {
    display: grid;
    grid-template-columns: 1.4fr .8fr;
    gap: 16px;
    margin-bottom: 22px;
}

.next-ticket-panel .next-ticket-value {
    margin: 8px 0 6px;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #0f2a47;
}

.jpph-printer-block {
    grid-column: 1 / -1;
}

.jpph-printer-card {
    border: 1px solid #bfe0f3;
    background: #f6fafe;
    border-radius: 14px;
    padding: 14px 16px;
}

.jpph-printer-card .form-section-title {
    color: #1f6a45;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}

.hero-cta .copy {
    background: linear-gradient(135deg, #0d2f52 0%, #14566d 48%, #1f6a45 100%);
    color: var(--text);
    border-radius: 22px;
    padding: 28px;
    border: 1px solid var(--line);
    position: relative;
    overflow: hidden;
}

.hero-cta .copy::after {
    content: "";
    position: absolute;
    right: -30px;
    bottom: -40px;
    width: 180px;
    height: 180px;
    background: url("../img/mssb-logo.png") no-repeat center / contain;
    opacity: .12;
}

.hero-cta h2 {
    font-family: var(--serif);
    font-size: 34px;
    margin: 0 0 8px;
}

.hero-cta p {
    color: var(--muted);
    max-width: 560px;
}

.hero-cta .btn-ghost {
    color: #fff;
    border-color: rgba(255, 255, 255, .5);
}

.hero-cta .btn-ghost:hover {
    background: rgba(255, 255, 255, .08);
    border-color: #fff;
}

.create-user-panel {
    background:
        linear-gradient(180deg, #fdfeff 0%, #f3f8fc 100%);
    border: 1px solid #cfe3f1;
    box-shadow: 0 14px 36px rgba(18, 58, 99, .08);
    padding: 0;
    overflow: hidden;
}

.create-user-head {
    padding: 22px 22px 16px;
    border-bottom: 1px solid #d9e5ef;
    background:
        radial-gradient(420px 120px at 0% 0%, rgba(31, 122, 184, .16), transparent 60%),
        radial-gradient(420px 120px at 100% 0%, rgba(46, 155, 74, .16), transparent 60%),
        #fbfdff;
}

.create-user-badge {
    display: inline-block;
    font-size: 10px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #0f2a47;
    background: linear-gradient(135deg, #1f7ab8, #2e9b4a);
    border-radius: 999px;
    padding: 4px 10px;
    margin-bottom: 10px;
    font-weight: 700;
}

.create-user-head h2 {
    margin: 0 0 6px;
}

.create-user-form {
    padding: 18px 22px 22px;
}

.form-section {
    margin-bottom: 18px;
    padding: 14px 14px 4px;
    border: 1px solid #d9e5ef;
    border-radius: 14px;
    background: rgba(255, 255, 255, .72);
}

.form-section-title {
    margin: 0 0 12px;
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--gold-dark);
    font-weight: 700;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.create-user-form .btn-block {
    margin-top: 4px;
}

.client-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.compact-cards {
    margin-bottom: 0;
}

.client-mini {
    text-decoration: none;
    background: var(--paper-2);
    border: 1px solid #d9e5ef;
    border-radius: 16px;
    padding: 16px;
    display: block;
}

.client-mini:hover {
    border-color: var(--gold);
}

.client-mini b {
    display: block;
    font-size: 18px;
}

.client-mini small {
    color: #647a8f;
    display: block;
    margin-top: 4px;
}

.table-wrap {
    overflow: auto;
}

table.tickets {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    font-size: 14px;
    table-layout: auto;
}

table.tickets th {
    text-align: center;
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #647a8f;
    padding: 10px 12px;
    border-bottom: 1px solid #d9e5ef;
    border-right: 1px solid #d9e5ef;
    vertical-align: bottom;
    white-space: normal;
    line-height: 1.35;
}

table.tickets td {
    padding: 13px 12px;
    border-bottom: 1px solid #d9e5ef;
    border-right: 1px solid #d9e5ef;
    vertical-align: middle;
    text-align: left;
}

table.tickets th:last-child,
table.tickets td:last-child {
    border-right: none;
}

table.tickets tr:hover td {
    background: #f3f8fc;
}

table.tickets.wide {
    min-width: 2100px;
    font-size: 12px;
}

table.tickets.wide th,
table.tickets.wide td {
    font-size: 12px;
    padding: 10px 12px;
    vertical-align: middle;
}

table.tickets.wide th {
    white-space: normal;
    line-height: 1.35;
}

table.tickets.wide td {
    white-space: nowrap;
}

table.tickets th.one-line,
table.tickets.wide th.one-line {
    white-space: nowrap;
    text-align: center;
    max-width: none;
}

table.tickets th.col-center,
table.tickets td.col-center {
    text-align: center;
}

table.tickets th.col-center {
    max-width: 8.6rem;
}

table.tickets.wide td.wrap {
    white-space: normal;
    min-width: 160px;
    max-width: 240px;
}

/* Jangan set display pada <td> — pecahkan align lajur */
.desc-clip {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
    line-height: 1.4;
    max-width: 240px;
}

td.row-actions {
    white-space: nowrap;
    vertical-align: middle;
}

div.row-actions,
.row-actions-inner {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

div.row-actions form,
.row-actions-inner form {
    margin: 0;
    display: inline;
}

.sla-met {
    color: #1e5c3a;
    font-weight: 700;
    white-space: nowrap;
}

.sla-lad {
    color: #9a2f1c;
    font-weight: 700;
    white-space: nowrap;
}

.solution-box {
    margin-top: 16px;
    padding: 12px 14px;
    background: #f3f8f4;
    border: 1px solid #cfe3d4;
    border-radius: 12px;
}

.solution-box p {
    margin: 6px 0 0;
    white-space: pre-wrap;
    line-height: 1.55;
}

.ticket-title {
    display: block;
    font-weight: 600;
    color: var(--ink);
    text-decoration: none;
}

.ticket-title:hover {
    color: var(--gold-dark);
}

.mono {
    font-variant-numeric: tabular-nums;
    font-size: 12px;
    color: #54687c;
}

.pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
}

.st-new { background: #ece6ff; color: #4b35a0; }
.st-open { background: #e7f1fb; color: #1d4e7a; }
.st-in_progress { background: #fff4d8; color: #8a5a00; }
.st-pending { background: #fdecd8; color: #9a4b12; }
.st-resolved { background: #e5f6ec; color: #1e5c3a; }
.st-closed { background: #e8eef3; color: #475a6d; }

.pr-low { background: #eef2f5; color: #44505c; }
.pr-medium { background: #e7f1fb; color: #1d4e7a; }
.pr-high { background: #fff0d8; color: #8a4b00; }
.pr-critical { background: #fde8e6; color: #9a1f16; }

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
    align-items: flex-end;
}

.filters input,
.filters select {
    border: 1px solid #d4e1ec;
    background: #fff;
    border-radius: 12px;
    padding: 10px 12px;
}

.filters input {
    min-width: 240px;
}

.filters input[type="date"] {
    min-width: 150px;
}

.filter-date {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
    color: #647a8f;
}

.filter-date span {
    padding-left: 2px;
}

.lad-total-badge {
    margin-left: auto;
    font-size: 13px;
    color: #0f2a47;
    background: #fff6e0;
    border: 1px solid #bfe0f3;
    border-radius: 999px;
    padding: 6px 12px;
}

.tickets-lad-footer td {
    background: #f6fafe;
    border-top: 2px solid #bfe0f3;
    padding-top: 12px;
    padding-bottom: 12px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1.4fr .8fr;
    gap: 16px;
}

.users-layout {
    display: grid;
    grid-template-columns: minmax(260px, .72fr) minmax(320px, 1.1fr);
    gap: 16px;
    align-items: start;
}

.users-list-panel {
    max-height: calc(100vh - 160px);
    overflow: auto;
}

.users-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.user-card {
    border: 1px solid #d9e5ef;
    border-radius: 12px;
    padding: 12px;
    background: #fbfdff;
}

.user-card-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 10px;
}

.user-card-top strong {
    display: block;
    font-size: 14px;
}

.user-card .mono {
    font-size: 12px;
    color: #54687c;
}

.user-card .reset-pass {
    margin-top: 0;
}

.nav-badge[hidden] {
    display: none;
}

.notif-list {
    margin-top: 14px;
    border: 1px solid #d9e5ef;
    border-radius: 14px;
    overflow: hidden;
    background: #fbfdff;
}

.notif-item {
    display: flex;
    align-items: flex-start;
    border-bottom: 1px solid #e4edf5;
}

.notif-link {
    flex: 1;
    min-width: 0;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 8px 12px 16px;
    color: inherit;
    text-decoration: none;
}

.notif-dismiss {
    flex: 0 0 auto;
    padding: 8px 10px 0 0;
}

.notif-dismiss button {
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #8aa0b5;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.notif-dismiss button:hover {
    background: #e1ecf5;
    color: #8b1e1e;
}

.notif-item:last-child {
    border-bottom: 0;
}

.notif-item:hover {
    background: #eff6fb;
}

.notif-dot {
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    margin-top: 5px;
    border-radius: 50%;
    background: transparent;
}

.notif-item.is-unread {
    background: #f1f7fb;
}

.notif-item.is-unread .notif-dot {
    background: var(--gold);
}

.notif-item.is-unread .notif-text {
    font-weight: 700;
}

.notif-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.notif-meta {
    font-size: 12px;
    color: #567890;
}

.notif-overdue .notif-meta strong {
    color: #8b1e1e;
}

.notif-text {
    font-size: 14px;
    color: #0f2a47;
}

.notif-toasts {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(360px, calc(100vw - 40px));
}

.notif-toast {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 36px 14px 16px;
    border-radius: 14px;
    background: #0f2a47;
    color: #ebf3f9;
    border-left: 4px solid var(--gold);
    box-shadow: 0 12px 30px rgba(12, 35, 62, .28);
    text-decoration: none;
    font-size: 13px;
    line-height: 1.45;
    animation: notif-in .25s ease-out;
    transition: opacity .5s, transform .5s;
}

.notif-toast strong {
    color: var(--gold);
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.notif-toast.notif-overdue {
    border-left-color: #c0392b;
}

.notif-toast.notif-overdue strong {
    color: #f08a7e;
}

.notif-toast.is-hiding {
    opacity: 0;
    transform: translateY(8px);
}

.notif-toast-close {
    position: absolute;
    top: 6px;
    right: 8px;
    border: 0;
    background: transparent;
    color: #c0d0de;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

@keyframes notif-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

.status-tabs {
    display: flex;
    gap: 4px 18px;
    overflow-x: auto;
    border-bottom: 1px solid #d4e1ec;
    margin-bottom: 16px;
    scrollbar-width: none;
}

.status-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    padding: 10px 2px;
    color: #647a8f;
    text-decoration: none;
    font-size: 14px;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.status-tabs a:hover {
    color: var(--ink);
}

.status-tabs a.active {
    color: var(--ink);
    font-weight: 700;
    border-bottom-color: var(--gold);
}

.status-tabs em {
    font-style: normal;
    font-size: 12px;
    background: #e5edf4;
    color: #52667a;
    border-radius: 999px;
    padding: 1px 8px;
}

.status-tabs a.active em {
    background: linear-gradient(135deg, #1f7ab8, #2e9b4a);
    color: #062018;
}

.project-search {
    width: 100%;
    max-width: 260px;
    border: 1px solid #d4e1ec;
    background: #fff;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    font-family: inherit;
}

.project-search:focus {
    outline: none;
    border-color: var(--gold);
}

.admin-list {
    margin-top: 14px;
    border: 1px solid #d9e5ef;
    border-radius: 14px;
    background: #fbfdff;
    overflow: hidden;
}

.admin-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 16px;
    border: 0;
    border-bottom: 1px solid #e4edf5;
    background: transparent;
    font: inherit;
    color: inherit;
    text-align: left;
}

.admin-row:last-child {
    border-bottom: 0;
}

.admin-row.is-clickable {
    cursor: pointer;
}

.admin-row.is-clickable:hover {
    background: #eff6fb;
}

.admin-row.is-active {
    background: #e7f1f8;
    box-shadow: inset 3px 0 0 var(--gold);
}

.admin-avatar {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
}

.admin-row-id {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.admin-row-id strong {
    font-size: 14px;
}

.admin-row-id .mono {
    font-size: 12px;
    color: #54687c;
}

.admin-row-action {
    font-size: 12px;
    font-weight: 700;
    color: #1f6fb2;
    min-width: 48px;
    text-align: right;
}

.rank-badge {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.rank-power {
    background: linear-gradient(135deg, #1f7ab8, #2e9b4a);
    color: #062018;
}

.rank-super {
    background: #e3eef7;
    color: #174f86;
    border: 1px solid #b9dcf0;
}

.admin-detail {
    margin-top: 12px;
    border: 1px solid #b9dcf0;
    border-radius: 14px;
    background: #fff;
    padding: 16px 18px;
    display: grid;
    gap: 18px;
}

.admin-detail[hidden] {
    display: none;
}

.admin-detail-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #d9e5ef;
}

.admin-detail-head strong {
    display: block;
    font-size: 15px;
}

.admin-detail-head .mono {
    font-size: 12px;
    color: #54687c;
}

.admin-detail .reset-pass {
    max-width: 420px;
}

.admin-detail-danger {
    padding-top: 12px;
    border-top: 1px dashed #d9e5ef;
}

.admin-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #5d7f99;
}

.admin-count {
    font-size: 11px;
    letter-spacing: 0;
    color: #54687c;
    background: #e3eef7;
    border-radius: 999px;
    padding: 1px 8px;
}

.project-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.project-chip {
    cursor: pointer;
}

.project-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.project-chip span {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid #d4e1ec;
    background: #fff;
    font-size: 12px;
    color: #54687c;
    transition: background .15s, color .15s, border-color .15s;
}

.project-chip span:hover {
    border-color: var(--gold);
}

.project-chip input:checked + span {
    background: #0f2a47;
    border-color: #0f2a47;
    color: var(--gold);
    font-weight: 700;
}

.project-chip input:focus-visible + span {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}



.grid-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.grid-form .full {
    grid-column: 1 / -1;
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.comment {
    display: flex;
    gap: 12px;
}

.comment .bubble {
    background: #f3f8fc;
    border: 1px solid #d9e5ef;
    border-radius: 14px;
    padding: 12px 14px;
    flex: 1;
}

.comment.internal .bubble {
    background: #0e2a4a;
    color: #eef5fb;
    border-color: #1c4168;
}

.comment .meta {
    font-size: 12px;
    color: #647a8f;
    margin-bottom: 6px;
}

.comment.internal .meta {
    color: var(--gold-2);
}

.meta-list {
    display: grid;
    gap: 10px;
}

.meta-list div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #d9e5ef;
}

.empty {
    text-align: center;
    padding: 40px 16px;
    color: #647a8f;
}

.file-box {
    border: 1px dashed #c6d5e2;
    border-radius: 14px;
    padding: 16px;
    background: #f7fafd;
}

.multi-upload #attachmentPicker,
.multi-upload .sr-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.multi-upload #attachment[hidden] {
    display: none !important;
}

.multi-upload {
    position: relative;
}

.multi-upload-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.multi-upload-btn {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

.file-preview-list {
    margin: 10px 0 0;
    padding-left: 18px;
    color: #475a6d;
    font-size: 12px;
}

.upload-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.upload-preview-item {
    position: relative;
    border: 1px solid #d5e2ec;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    min-height: 92px;
}

.upload-preview-item img {
    width: 100%;
    height: 88px;
    object-fit: cover;
    display: block;
    background: #e9f1f7;
}

.upload-preview-file {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 88px;
    font-size: 12px;
    font-weight: 700;
    color: #647a8f;
    background: #e9f1f7;
}

.upload-preview-name {
    display: block;
    padding: 4px 8px 8px;
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #475a6d;
}

.upload-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 999px;
    background: rgba(12, 35, 62, 0.72);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.upload-preview-remove:hover {
    background: #b42318;
}

.attach-list a {
    display: flex;
    justify-content: space-between;
    text-decoration: none;
    padding: 8px 0;
    border-bottom: 1px solid #e6eef5;
    color: var(--ink);
    font-size: 13px;
}

.attach-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 10px;
    margin: 8px 0 14px;
}

.attach-thumb {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0;
    border: 1px solid #d5e2ec;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
    text-align: left;
    color: var(--ink);
}

.attach-thumb img {
    width: 100%;
    height: 88px;
    object-fit: cover;
    display: block;
    background: #e9f1f7;
}

.attach-thumb span {
    display: block;
    padding: 0 8px 8px;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attach-thumb:hover {
    border-color: #2e9b4a;
}

body.lightbox-open {
    overflow: hidden;
}

.photo-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(12, 35, 62, 0.88);
    padding: 48px 20px 24px;
}

.photo-lightbox.open {
    display: flex;
}

.photo-lightbox-img {
    max-width: min(96vw, 1100px);
    max-height: calc(100vh - 100px);
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.photo-lightbox-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 16px;
    margin: 0;
    text-align: center;
    color: #eaf2f8;
    font-size: 13px;
    padding: 0 48px;
}

.photo-lightbox-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.photo-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.28);
}

.check {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 13px;
}

.help {
    color: #647a8f;
    font-size: 12px;
    margin-top: 6px;
}

@media (max-width: 1080px) {
    .stats,
    .client-cards,
    .hero-cta,
    .grid-2,
    .users-layout,
    .auth-wrap,
    .portal-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .hero-cta > *,
    .grid-2 > *,
    .users-layout > * {
        min-width: 0;
    }
    .users-list-panel {
        max-height: none;
    }
    .raise-top {
        display: none;
    }
    .auth-top-inner {
        padding: 12px 18px;
    }
    .auth-switch a {
        min-width: 0;
        padding: 9px 14px;
    }
}

@media (max-width: 860px) {
    .sidebar {
        position: fixed !important;
        top: 0;
        bottom: 0;
        width: min(86vw, 300px) !important;
        min-width: 0 !important;
        max-width: 300px !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-height: none !important;
        overflow-y: auto;
        /* left: lebih stabil pada phone / WebView berbanding transform */
        left: -110% !important;
        right: auto !important;
        transform: none !important;
        translate: none !important;
        transition: left .22s ease;
        z-index: 1000 !important;
        pointer-events: none;
        box-shadow: none;
    }
    .sidebar-resizer {
        display: none !important;
        pointer-events: none !important;
    }
    .sidebar.open {
        left: 0 !important;
        pointer-events: auto;
        box-shadow: 16px 0 40px rgba(0, 0, 0, .35);
    }
    .menu-btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        z-index: 1100 !important;
    }
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, .45);
        z-index: 900;
        pointer-events: none;
        border: 0;
        padding: 0;
        margin: 0;
        width: 100%;
        height: 100%;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    .sidebar-overlay.show {
        display: block !important;
        pointer-events: auto;
    }
    body.sidebar-drawer-open {
        overflow: hidden;
        touch-action: none;
    }
    .app-content, .topbar, .app-footer {
        padding-left: 16px;
        padding-right: 16px;
    }
    .topbar {
        z-index: 50;
    }
    .grid-form {
        grid-template-columns: 1fr;
    }
    .field-row {
        grid-template-columns: 1fr;
    }
    .auth-top-brand {
        display: none;
    }
    .auth-top-inner {
        justify-content: center;
    }
    .auth-switch {
        width: 100%;
        max-width: 380px;
    }
    .auth-switch a {
        flex: 1;
    }
    .panel-head {
        flex-wrap: wrap;
        align-items: center;
    }
    .panel-head .project-search {
        max-width: none;
    }
    .panel-head h2,
    .panel h2 {
        font-size: 22px;
    }
    .hero-cta h2 {
        font-size: 26px;
    }
    .hero-cta .copy {
        padding: 22px;
    }
    .row-actions-inner {
        flex-wrap: wrap;
    }
}

/* —— Company home / Create User / Profile (Meta Sigma) —— */
.meta-hub-body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    color: var(--ink);
    background:
        radial-gradient(820px 380px at 0% 0, rgba(31, 122, 184, .12), transparent 52%),
        radial-gradient(900px 420px at 100% 0, rgba(46, 155, 74, .12), transparent 50%),
        var(--paper);
}

.meta-hub-top {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    padding: 14px 28px 12px;
    background: linear-gradient(90deg, #0a2744 0%, #0d3558 48%, #0e3d36 100%);
    border-bottom: 1px solid var(--line);
    color: var(--text);
}
.meta-hub-top-row {
    display: contents;
}
.meta-hub-brand { order: 1; }
.meta-hub-nav {
    order: 2;
    flex: 1 1 auto;
    justify-content: center;
}
.meta-hub-actions { order: 3; }

.meta-hub-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}
.meta-hub-brand img { height: 42px; width: auto; flex-shrink: 0; }
.meta-hub-brand-text { min-width: 0; }
.meta-hub-brand strong {
    display: block;
    font-size: 13px;
    letter-spacing: .12em;
}
.meta-hub-brand small { color: var(--muted); font-size: 11px; }

.meta-hub-nav {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.meta-hub-nav a {
    min-height: 38px;
    padding: 0 16px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #d7e8e2;
    border: 1px solid transparent;
    text-decoration: none;
}
.meta-hub-nav a:hover { background: rgba(46, 155, 74, .12); color: #fff; }
.meta-hub-nav a.active {
    background: rgba(46, 155, 74, .18);
    border-color: rgba(46, 155, 74, .35);
    color: #fff;
}

.meta-hub-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.meta-hub-user {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}
.meta-hub-user img,
.meta-hub-user > span {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #1f7ab8, #2e9b4a);
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}
.meta-hub-user-meta strong { display: block; font-size: 13px; color: #fff; }
.meta-hub-user-meta small { color: var(--muted); font-size: 11px; }
.meta-hub-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.28);
    color: #e8f6ef;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.meta-hub-logout:hover {
    background: rgba(46, 155, 74, .16);
    color: #fff;
}
.meta-hub-logout-short { display: none; }

.meta-hub-main {
    width: min(1080px, calc(100% - 40px));
    margin: 0 auto;
    padding: 28px 0 48px;
    flex: 1;
}
.meta-hub-head { margin-bottom: 22px; }
.meta-hub-kicker {
    margin: 0 0 6px;
    color: #5f8a7e;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.meta-hub-head h1 {
    margin: 0;
    font-size: clamp(26px, 3vw, 34px);
    color: var(--ink);
}
.meta-hub-lead {
    margin: 8px 0 0;
    color: #5f8a7e;
    max-width: 620px;
}

.meta-hub-foot {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px 28px;
    border-top: 1px solid #d9e8e2;
    color: #5f8a7e;
    font-size: 12px;
    background: rgba(247, 252, 251, .8);
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    margin-top: 28px;
    align-items: start;
}
.module-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    text-decoration: none;
    color: inherit;
    text-align: center;
    transition: transform .18s ease;
}
.module-card:hover { transform: translateY(-6px); }
.module-tile {
    display: grid;
    place-items: center;
    width: 100%;
    max-width: 240px;
    aspect-ratio: 0.78;
    border-radius: 22px;
    color: #fff;
    box-shadow: 0 16px 36px rgba(10, 33, 53, .18);
}
.module-tile svg { width: 52%; height: 52%; }
.module-helpdesk .module-tile { background: linear-gradient(160deg, #1f7ab8, #155a8a); }
.module-inventory .module-tile { background: linear-gradient(160deg, #0f8f7a, #2e9b4a); }
.module-tasklist .module-tile { background: linear-gradient(160deg, #1f7ab8, #2e9b4a); }
.module-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.module-label strong { display: block; font-size: 22px; color: var(--ink); }
.module-label small { color: #5f8a7e; font-size: 14px; }

.hub-panel {
    background: #fff;
    border: 1px solid #d9e8e2;
    border-radius: 18px;
    padding: 22px;
    box-shadow: var(--shadow);
    margin-bottom: 18px;
}
.hub-panel h2 {
    margin: 0 0 14px;
    font-size: 18px;
    color: var(--ink);
}
.hub-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.hub-grid .full { grid-column: 1 / -1; }
.hub-form label,
.hub-label {
    display: grid;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #345066;
}
.hub-form input,
.hub-form select,
.hub-inline input {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 11px;
    border: 1px solid #c9dae6;
    background: #fff;
    color: var(--ink);
}
.hub-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hub-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 10px;
    background: #f3faf7;
    border: 1px solid #d9e8e2;
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
}
.hub-admin-list { display: grid; gap: 10px; }
.hub-admin-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f7fcfb;
    border: 1px solid #d9e8e2;
}
.hub-admin-row strong { display: block; color: var(--ink); }
.hub-admin-row small { color: #5f8a7e; }
.hub-admin-detail {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #d9e8e2;
}
.hub-admin-detail h3 { margin: 0 0 12px; color: var(--ink); }
.hub-inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hub-inline input { max-width: 260px; }
.badge-soft {
    font-size: 12px;
    color: #0d4a7a;
    font-weight: 700;
    background: rgba(31, 122, 184, .12);
    padding: 4px 10px;
    border-radius: 8px;
}
.hub-avatar-row {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
}
.hub-avatar-preview {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #1f7ab8, #2e9b4a);
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 700;
    font-size: 28px;
    flex-shrink: 0;
}
.hub-avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hub-avatar-upload small { color: #5f8a7e; font-weight: 500; }

@media (max-width: 900px) {
    .module-grid {
        grid-template-columns: 1fr;
        max-width: 280px;
        margin-left: auto;
        margin-right: auto;
    }
    .module-tile {
        max-width: none;
        aspect-ratio: 1.1;
    }
}
@media (max-width: 720px) {
    .hub-grid { grid-template-columns: 1fr; }

    .meta-hub-top {
        flex-direction: column;
        align-items: stretch;
        padding: 12px 14px 10px;
        gap: 10px;
        position: sticky;
        top: 0;
        z-index: 40;
    }
    .meta-hub-top-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        order: 1;
    }
    .meta-hub-brand { order: unset; }
    .meta-hub-actions { order: unset; }
    .meta-hub-nav { order: 2; flex: none; }
    .meta-hub-brand {
        gap: 10px;
    }
    .meta-hub-brand img { height: 34px; }
    .meta-hub-brand strong {
        font-size: 12px;
        letter-spacing: .1em;
    }
    .meta-hub-brand small { display: none; }

    .meta-hub-user-meta { display: none; }
    .meta-hub-user img,
    .meta-hub-user > span {
        width: 34px;
        height: 34px;
    }

    .meta-hub-logout {
        min-height: 34px;
        padding: 0 12px;
        font-size: 12px;
    }
    .meta-hub-logout-full { display: none; }
    .meta-hub-logout-short { display: inline; }

    /* Nav penuh lebar, sama rata — nampak kemas di phone */
    .meta-hub-nav {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
        gap: 6px;
        width: 100%;
    }
    .meta-hub-nav a {
        min-height: 36px;
        padding: 0 8px;
        font-size: 13px;
        width: 100%;
    }

    .meta-hub-main {
        width: calc(100% - 28px);
        padding: 18px 0 40px;
    }
    .meta-hub-foot {
        padding: 14px;
        flex-direction: column;
        gap: 4px;
    }
}

.contents {
    display: contents;
}

.sla-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.col-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.col-card {
    border: 1px solid #d9e5ef;
    border-radius: 14px;
    padding: 12px;
    background: #f3f8fc;
}

.col-card form + form {
    margin-top: 8px;
}

.extra-col-head {
    margin-top: 4px;
}
