:root {
    --bg: #eef3f8;
    --panel: #ffffff;
    --text: #142235;
    --muted: #66758a;
    --line: #dce5ef;
    --nav: #071b33;
    --nav-2: #0b335f;
    --primary: #0b63ce;
    --green: #10b981;
    --amber: #f59e0b;
    --red: #ef4444;
    --cyan: #06b6d4;
    --radius: 8px;
}

[data-theme="dark"] {
    --bg: #0d1624;
    --panel: #142235;
    --text: #edf4ff;
    --muted: #a7b5c8;
    --line: #263b56;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: "Inter", "Segoe UI", Arial, sans-serif; background: var(--bg); color: var(--text); }
a { text-decoration: none; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 286px; background: linear-gradient(180deg, var(--nav), var(--nav-2)); color: #fff; padding: 18px; position: fixed; inset: 0 auto 0 0; z-index: 20; overflow-y: auto; transition: width .18s ease, padding .18s ease, transform .22s ease; }
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 18;
    border: 0;
    background: rgba(2, 8, 23, .48);
    backdrop-filter: blur(2px);
}
body.sidebar-open { overflow: hidden; }
.brand { display: flex; align-items: center; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid rgba(255,255,255,.14); }
.brand-logo { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; background: #fff; padding: 4px; }
.brand > div { min-width: 0; }
.brand strong { display: block; line-height: 1.18; font-family: var(--brand-font-family, Arial), sans-serif; font-size: var(--brand-line-1-size, 14px); }
.brand span { font-family: var(--brand-font-family, Arial), sans-serif; font-size: var(--brand-line-2-size, 12px); }
.brand span, .user-chip small, .notice small { display: block; opacity: .74; }
.user-chip small, .notice small { font-size: 12px; }
.sidebar-collapse-toggle { flex: 0 0 auto; width: 30px; height: 30px; margin-left: auto; border: 1px solid rgba(255,255,255,.16); border-radius: var(--radius); background: rgba(255,255,255,.08); color: #fff; display: grid; place-items: center; }
.sidebar-collapse-toggle:hover { background: rgba(255,255,255,.16); }
.side-nav { gap: 4px; margin-top: 16px; }
.side-nav .nav-link, .logout-link { color: rgba(255,255,255,.84); border-radius: var(--radius); padding: 10px 12px; display: flex; gap: 10px; align-items: center; }
.side-nav button.nav-link { width: 100%; border: 0; background: transparent; text-align: left; }
.side-nav .nav-link:hover, .logout-link:hover { background: rgba(255,255,255,.11); color: #fff; }
.side-nav i { width: 20px; text-align: center; }
.nav-children { display: none; margin-top: 4px; }
.nav-children.open { display: grid; gap: 4px; }
.nav-parent.open .nav-chevron { transform: rotate(180deg); }
.nav-chevron { transition: .18s ease; }
.side-nav .nav-child { margin-left: 28px; padding: 8px 10px; font-size: 14px; background: rgba(255,255,255,.05); }
.side-nav .nav-child i { width: 18px; }
.side-nav .nav-grandchild { margin-left: 44px; font-size: 13px; background: rgba(255,255,255,.035); }
.logout-link { margin-top: 18px; border: 1px solid rgba(255,255,255,.16); }
.main-panel { margin-left: 286px; width: calc(100% - 286px); min-height: 100vh; transition: margin-left .18s ease, width .18s ease; }
body.sidebar-collapsed .sidebar { width: 86px; padding: 18px 12px; overflow-x: hidden; }
body.sidebar-collapsed .brand { justify-content: center; gap: 0; padding-bottom: 14px; }
body.sidebar-collapsed .brand-logo { width: 50px; height: 50px; }
body.sidebar-collapsed .brand-text,
body.sidebar-collapsed .side-nav .nav-link span,
body.sidebar-collapsed .logout-link span,
body.sidebar-collapsed .nav-chevron {
    display: none !important;
}
body.sidebar-collapsed .sidebar-collapse-toggle {
    position: absolute;
    right: 8px;
    top: 8px;
    width: 24px;
    height: 24px;
    font-size: 11px;
}
body.sidebar-collapsed .sidebar-collapse-toggle i { transform: rotate(180deg); }
body.sidebar-collapsed .side-nav { align-items: center; }
body.sidebar-collapsed .side-nav .nav-link,
body.sidebar-collapsed .logout-link {
    width: 54px;
    min-height: 46px;
    justify-content: center;
    padding: 10px 0;
    gap: 0;
}
body.sidebar-collapsed .side-nav i,
body.sidebar-collapsed .logout-link i {
    width: auto;
    font-size: 18px;
}
body.sidebar-collapsed .nav-children { display: none !important; }
body.sidebar-collapsed .main-panel { margin-left: 86px; width: calc(100% - 86px); }
.topbar { height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 24px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar h1 { font-size: 22px; margin: 0; font-weight: 800; }
.topbar small { color: var(--muted); }
.topbar-actions { display: flex; gap: 12px; align-items: center; }
.icon-button { width: 42px; height: 42px; border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: var(--radius); }
a.icon-button { display: grid; place-items: center; }
.alarm-dropdown { position: relative; }
.alarm-button { position: relative; }
.alarm-button span { position: absolute; right: -5px; top: -6px; min-width: 20px; height: 20px; display: grid; place-items: center; border-radius: 999px; background: #ef4444; color: #fff; font-size: 11px; font-weight: 900; }
.chat-topbar-button:hover { color: var(--primary); background: rgba(11, 99, 206, .08); }
.alarm-menu { display: none; position: absolute; right: 0; top: 48px; width: 320px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 18px 45px rgba(15, 23, 42, .18); padding: 10px; z-index: 50; }
.alarm-menu.open { display: grid; gap: 8px; }
.alarm-menu strong { padding: 4px 6px; }
.alarm-menu a { color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); padding: 9px; font-weight: 800; }
.alarm-menu a:hover { background: rgba(11, 99, 206, .08); }
.alarm-menu small, .alarm-menu p { display: block; color: var(--muted); font-size: 12px; margin: 2px 0 0; }
.language-select { min-width: 132px; height: 42px; border-radius: var(--radius); background: var(--panel); color: var(--text); border-color: var(--line); }
.user-chip { padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); min-width: 150px; }
.content-area { padding: 18px; }
.panel, .stat-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 14px 34px rgba(10, 28, 50, .07); }
.panel { padding: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-head h2 { margin: 0; font-size: 18px; font-weight: 800; }
.stats-grid { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 14px; }
.stat-card { padding: 18px; display: flex; align-items: center; gap: 14px; border-left: 5px solid var(--primary); }
.stat-card i { width: 44px; height: 44px; display: grid; place-items: center; color: #fff; border-radius: var(--radius); background: var(--primary); }
.stat-card span { font-size: 26px; font-weight: 900; }
.stat-card p { margin: 0; color: var(--muted); font-size: 13px; }
.stat-card.green { border-color: var(--green); } .stat-card.green i { background: var(--green); }
.stat-card.amber { border-color: var(--amber); } .stat-card.amber i { background: var(--amber); }
.stat-card.red { border-color: var(--red); } .stat-card.red i { background: var(--red); }
.stat-card.cyan { border-color: var(--cyan); } .stat-card.cyan i { background: var(--cyan); }
.quick-actions { display: grid; gap: 10px; }
.quick-actions a { padding: 12px; border: 1px solid var(--line); color: var(--text); border-radius: var(--radius); display: flex; gap: 10px; align-items: center; }
.quick-actions a i { width: 22px; color: var(--primary); text-align: center; }
.activity-list, .detail-grid { display: grid; gap: 12px; }
.activity-item, .notice { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); }
.activity-item span { width: 10px; height: 10px; background: var(--green); border-radius: 99px; }
.activity-item p { margin: 0; color: var(--muted); }
.activity-item time { margin-left: auto; color: var(--muted); font-size: 12px; }
.notice i { color: var(--primary); }
.notice.danger i { color: var(--red); }
.notice.alarm i { color: var(--amber); }
.filter-bar { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto; gap: 10px; margin-bottom: 14px; }
.table { color: var(--text); }
.soldier-cell { display: flex; align-items: center; gap: 10px; }
.soldier-cell img { width: 42px; height: 42px; object-fit: cover; border-radius: 8px; }
.status-pill { padding: 5px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: #e8eef5; color: #334155; }
.status-pill.active { background: #dcfce7; color: #166534; }
.status-pill.suspended { background: #fef3c7; color: #92400e; }
.status-pill.retired { background: #fee2e2; color: #991b1b; }
.pagination-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.form-step { border-left: 4px solid var(--primary); padding-left: 12px; margin-bottom: 14px; }
.form-step span { color: var(--primary); font-weight: 800; font-size: 12px; text-transform: uppercase; }
.form-step h3 { margin: 0; font-size: 17px; }
.profile-layout { display: grid; grid-template-columns: 320px 1fr; gap: 16px; }
.profile-card { text-align: center; }
.profile-photo { width: 170px; height: 190px; object-fit: cover; border-radius: var(--radius); border: 4px solid var(--line); }
.profile-signature-preview { margin: 12px auto 16px; display: grid; gap: 5px; justify-items: center; }
.profile-signature-preview img { width: min(220px, 100%); max-height: 82px; object-fit: contain; padding: 8px; border: 1px dashed var(--line); border-radius: 6px; background: repeating-conic-gradient(#f8fafc 0% 25%, #e5e7eb 0% 50%) 50% / 16px 16px; }
.profile-signature-preview small { color: var(--muted); font-weight: 800; }
.qr { width: 128px; height: 128px; margin: 12px auto; display: block; }
.profile-id-qr-link {
    display: block;
    width: max-content;
    margin: 12px auto;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}
.profile-id-qr {
    margin: 0;
    background: #fff;
}
.detail-grid { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
.detail-grid div { padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.detail-grid small { display: block; color: var(--muted); margin-bottom: 4px; }
.module-panel { max-width: 760px; margin: 40px auto; text-align: center; }
.module-icon { width: 74px; height: 74px; display: grid; place-items: center; margin: 0 auto 16px; border-radius: 20px; background: #dbeafe; color: var(--primary); font-size: 30px; }
.commander-card { text-align: center; }
.detail-grid.single { grid-template-columns: 1fr; text-align: left; margin-top: 16px; }
.empty-state { padding: 30px 10px; color: var(--muted); }
.empty-state i { font-size: 48px; color: var(--primary); margin-bottom: 14px; }
.soldier-search-results { margin-top: 8px; border: 1px solid var(--line); border-radius: var(--radius); max-height: 278px; overflow-y: auto; background: var(--panel); }
.weapon-numbers-input { min-height: 38px; height: 38px; }
.combo-text { position: relative; }
.combo-text-menu { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); max-height: 220px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: 0 12px 28px rgba(15, 23, 42, .16); }
.combo-text-option { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); text-align: left; padding: 10px 12px; }
.combo-text-option:last-child { border-bottom: 0; }
.combo-text-option:hover { background: rgba(11, 99, 206, .08); }
.soldier-result { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); text-align: left; padding: 10px 12px; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.soldier-result:hover { background: rgba(11, 99, 206, .08); }
.soldier-result strong { font-size: 14px; }
.soldier-result span, .search-empty { color: var(--muted); font-size: 13px; }
.search-empty { padding: 12px; }
.chat-shell {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 12px;
    height: calc(100vh - 120px);
    min-height: 520px;
}
.chat-users,
.chat-panel {
    min-height: 0;
    height: 100%;
}
.chat-user-list {
    display: grid;
    gap: 6px;
    max-height: calc(100vh - 210px);
    overflow-y: auto;
}
.chat-list-head { align-items: center; gap: 10px; }
.chat-list-actions { display: flex; align-items: center; gap: 6px; }
.chat-user {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
}
.chat-user:hover,
.chat-user.active {
    background: rgba(11, 99, 206, .08);
    border-color: rgba(11, 99, 206, .35);
}
.chat-avatar {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: #dbeafe;
    color: var(--primary);
    display: grid;
    place-items: center;
    font-weight: 900;
    overflow: hidden;
}
.chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.chat-user-main { min-width: 0; display: grid; gap: 2px; }
.chat-user-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: baseline; }
.chat-user strong,
.chat-user small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chat-user time { color: var(--muted); font-size: 11px; font-weight: 800; }
.chat-user small {
    color: var(--muted);
    font-size: 12px;
}
.chat-user em {
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--red);
    color: #fff;
    font-style: normal;
    font-size: 12px;
    font-weight: 900;
}
.chat-panel {
    display: grid;
    grid-template-rows: auto 1fr auto;
    padding: 0;
    overflow: hidden;
}
.chat-head {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
}
.chat-head h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 900;
}
.chat-head small {
    color: var(--muted);
}
.chat-messages {
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: #eef2f7;
}
.chat-date-separator { display: flex; justify-content: center; margin: 8px 0; }
.chat-date-separator span { border: 1px solid #d6e5fa; border-radius: 999px; padding: 4px 10px; background: #fff; color: var(--muted); font-size: 11px; font-weight: 900; }
.chat-message {
    display: flex;
}
.chat-message.mine {
    justify-content: flex-end;
}
.chat-message > div {
    max-width: min(560px, 72%);
    border: 1px solid var(--line);
    border-radius: 12px 12px 12px 4px;
    padding: 7px 10px 6px;
    background: var(--panel);
    box-shadow: 0 1px 1px rgba(15, 23, 42, .04);
}
.chat-message.mine > div {
    background: #0b63ce;
    border-color: #0b63ce;
    color: #fff;
    border-radius: 12px 12px 4px 12px;
}
.chat-message p {
    margin: 0 0 3px;
    white-space: pre-wrap;
}
.chat-message time {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    color: var(--muted);
    font-size: 11px;
    text-align: right;
}
.chat-message time span {
    display: inline-flex;
    align-items: center;
    font-weight: 800;
}
.chat-message.mine time {
    color: rgba(255, 255, 255, .82);
}
.chat-read-receipt.sent { color: rgba(255, 255, 255, .82); }
.chat-read-receipt.read { color: #4cc9ff; }
.new-message-list { display: grid; gap: 8px; }
.new-message-user { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); }
.new-message-user:hover { background: rgba(11, 99, 206, .08); border-color: rgba(11, 99, 206, .35); }
.new-message-user strong,
.new-message-user small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.new-message-user small { color: var(--muted); font-size: 12px; }
.chat-admin-shell .chat-message > div {
    max-width: min(760px, 88%);
}
.chat-admin-sender {
    display: block;
    margin-bottom: 6px;
    color: var(--primary);
    font-size: 12px;
}
.chat-admin-sender span {
    color: var(--muted);
    font-weight: 700;
}
.chat-message.mine .chat-admin-sender,
.chat-message.mine .chat-admin-sender span {
    color: rgba(255, 255, 255, .9);
}
.chat-compose {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid var(--line);
}
.chat-compose textarea {
    resize: none;
    border: 1px solid var(--line);
    border-radius: 8px;
    min-height: 44px;
    max-height: 76px;
    padding: 8px 10px;
    background: var(--panel);
    color: var(--text);
}
.chat-empty {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    min-height: 220px;
    color: var(--muted);
    text-align: center;
}
.chat-empty i {
    font-size: 44px;
    color: var(--primary);
}
.chat-empty p {
    margin: 0;
}
.selected-soldier { margin-top: 8px; padding: 10px 12px; border-radius: var(--radius); background: #dcfce7; color: #166534; font-weight: 700; font-size: 13px; }
.attendance-filter { grid-template-columns: repeat(7, minmax(120px, 1fr)) auto; }
.attendance-stats .stat-card { min-height: 96px; }
.attendance-table thead th { color: #66758a; font-size: 12px; text-transform: uppercase; }
.attendance-table td { padding-top: 16px; padding-bottom: 16px; }
.attendance-table td small { display: block; color: var(--muted); margin-top: 5px; }
.row-number { font-weight: 800; color: var(--muted); }
.leave-badge { display: inline-flex; margin-top: 8px; padding: 4px 8px; border-radius: 6px; background: #15803d; color: #fff; font-size: 11px; font-weight: 800; }
.attendance-choice-group { display: flex; flex-wrap: wrap; gap: 8px; max-width: 280px; }
.attendance-radio { position: absolute; opacity: 0; pointer-events: none; }
.attendance-pill { min-width: 82px; text-align: center; padding: 8px 14px; border: 1px solid #cbd6e5; border-radius: 999px; color: #40516a; font-size: 13px; font-weight: 800; cursor: pointer; transition: .16s ease; background: var(--panel); }
.attendance-pill:hover { border-color: var(--primary); color: var(--primary); }
.attendance-radio:checked + .attendance-pill { color: #fff; border-color: transparent; box-shadow: 0 12px 22px rgba(8, 86, 150, .22); }
.attendance-radio:checked + .attendance-pill.present { background: linear-gradient(135deg, #0f8f82, #2563eb); }
.attendance-radio:checked + .attendance-pill.shaqo { background: linear-gradient(135deg, #0891b2, #2563eb); }
.attendance-radio:checked + .attendance-pill.absent { background: linear-gradient(135deg, #0f8f82, #2563eb); }
.attendance-radio:checked + .attendance-pill.sick { background: linear-gradient(135deg, #0f8f82, #2563eb); }
.attendance-radio:checked + .attendance-pill.death { background: linear-gradient(135deg, #991b1b, #ef4444); }
.attendance-radio:checked + .attendance-pill.fakad { background: linear-gradient(135deg, #0f8f82, #2563eb); }
.attendance-radio:checked + .attendance-pill.on_leave { background: linear-gradient(135deg, #0f8f82, #2563eb); }
.attendance-save-line { display: flex; justify-content: flex-end; padding-top: 16px; border-top: 1px solid var(--line); }
.attendance-save-line .btn { min-width: 250px; font-weight: 800; background: linear-gradient(135deg, #0f8f82, #2563eb); border: 0; }
.attendance-calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.calendar-day { min-height: 70px; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; display: grid; gap: 2px; background: rgba(11, 99, 206, .03); }
.calendar-day strong { color: var(--primary); }
.calendar-day span { color: var(--muted); font-size: 12px; }
.report-filter { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.report-filter label { display: grid; gap: 5px; margin: 0; color: var(--muted); font-size: 12px; font-weight: 800; }
.report-filter input, .report-filter select, .report-filter button { height: 38px; border: 1px solid #c7d2e1; border-radius: 4px; padding: 0 10px; background: #fff; color: #111827; }
.report-filter button { align-self: end; background: var(--primary); color: #fff; font-weight: 900; }
.official-report { background: #fff; color: #111827; border: 1px solid #5f7ea6; padding: 9mm 5mm 5mm; font-family: var(--report-font-family, Calibri), Arial, sans-serif; }
.official-report-header { display: grid; grid-template-columns: 30mm 1fr 40mm; align-items: start; min-height: 23mm; border-bottom: 2px solid #111827; margin-bottom: 5mm; padding-bottom: 3mm; }
.official-report-header img { width: var(--report-logo-size, 18mm); height: var(--report-logo-size, 18mm); object-fit: contain; margin-left: 5mm; }
.official-report-header div { text-align: center; }
.official-report-header h1, .official-report-header h2, .official-report-header h3 { margin: 0; font-family: var(--report-font-family, "Times New Roman"), Times, serif; font-size: var(--report-header-font-size, 18pt); line-height: 1.05; font-weight: 800; }
.official-report-header strong { display: block; margin-top: 2mm; font-family: var(--report-font-family, "Times New Roman"), Times, serif; font-size: var(--report-title-font-size, 12pt); letter-spacing: .4px; }
.official-report-header p { margin: 0; text-align: right; font-size: 8pt; font-weight: 800; }
.official-report-subtitle { margin: 0 0 2mm; color: #002b7f; font-size: 12pt; font-weight: 900; }
.official-report-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: var(--report-table-font-size, 8pt); margin-bottom: 6mm; }
.official-report-table th, .official-report-table td { border: 1px solid #111827; padding: 1.4mm 1.2mm; vertical-align: middle; overflow-wrap: anywhere; }
.report-truncate-text { display: block; max-width: none; white-space: normal; overflow: visible; text-overflow: clip; }
.official-report-table th { background: #edf3ff; color: #002b7f; text-align: center; font-weight: 900; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.official-report-table td:first-child, .official-report-table th:first-child { width: 9mm; text-align: center; }
.official-report-table.compact { font-size: 7.2pt; }
.official-report-section-title { margin: 5mm 0 2mm; color: #002b7f; font-size: var(--report-section-font-size, 11pt); font-weight: 900; text-transform: uppercase; }
.official-report-filter-line { margin: 0 0 4mm; color: #111827; font-size: 10pt; font-weight: 700; text-align: center; }
.report-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2mm; margin-bottom: 5mm; }
.report-summary-grid div { border: 1px solid #111827; background: #f8fbff; padding: 2mm; text-align: center; }
.report-summary-grid span { display: block; color: #475569; font-size: 7pt; font-weight: 800; text-transform: uppercase; }
.report-summary-grid strong { display: block; color: #002b7f; font-size: 14pt; line-height: 1.15; font-weight: 900; }
.weapon-report-font .official-report-table {
    font-family: "Times New Roman", Times, serif;
    font-size: 14px;
}
.weapon-report-font .official-report-table th {
    font-family: "Times New Roman", Times, serif;
    font-size: 14px;
}
.weapon-report-font .official-report-table tr.weapon-transaction-linked-row-a td {
    background: #fff3bd;
}
.weapon-report-font .official-report-table tr.weapon-transaction-linked-row-b td {
    background: #dff7ea;
}
.weapon-report-font .official-report-table tr.weapon-transaction-linked-row td {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}
.weapon-issue-return-form {
    box-sizing: border-box;
    width: 210mm;
    min-height: 297mm;
    margin: 0 auto;
    padding: 10mm 8mm 8mm;
}
.weapon-issue-return-form-page {
    break-after: page;
    page-break-after: always;
}
.weapon-issue-return-header {
    display: grid;
    grid-template-columns: 28mm 1fr 28mm;
    align-items: start;
    border-bottom: 2px solid #111827;
    margin-bottom: 5mm;
    padding-bottom: 3mm;
}
.weapon-issue-return-header img {
    width: 20mm;
    height: 20mm;
    object-fit: contain;
    margin-left: 4mm;
}
.weapon-issue-return-header div {
    text-align: center;
}
.weapon-issue-return-header h1,
.weapon-issue-return-header h2 {
    margin: 0;
    font-family: "Times New Roman", Times, serif;
    font-size: 18pt;
    line-height: 1.05;
    font-weight: 800;
}
.weapon-issue-return-header strong {
    display: block;
    margin-top: 2mm;
    font-family: "Times New Roman", Times, serif;
    font-size: 13pt;
    font-weight: 900;
}
.weapon-issue-return-meta {
    display: grid;
    grid-template-columns: 1.2fr .9fr 1fr;
    gap: 8mm;
    margin: 0 0 5mm;
    font-family: "Times New Roman", Times, serif;
    font-size: 12pt;
    font-weight: 900;
}
.weapon-issue-return-meta div {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: end;
    gap: 3mm;
}
.weapon-issue-return-meta b {
    display: block;
    min-height: 8mm;
    border-bottom: 1.5px solid #111827;
}
.weapon-issue-return-table {
    font-family: "Times New Roman", Times, serif;
    font-size: 10.5pt;
    margin-bottom: 0;
}
.weapon-issue-return-table th,
.weapon-issue-return-table td {
    height: 7.8mm;
    padding: .8mm 1.2mm;
}
.weapon-issue-return-table th:nth-child(1),
.weapon-issue-return-table td:nth-child(1) {
    width: 10mm;
    text-align: center;
}
.weapon-issue-return-table th:nth-child(2) { width: 34mm; }
.weapon-issue-return-table th:nth-child(3) { width: 36mm; }
.weapon-issue-return-table th:nth-child(4) { width: 28mm; }
.weapon-issue-return-table th:nth-child(5) { width: 34mm; }
.official-report {
    display: flex;
    flex-direction: column;
}
.official-report-signature {
    order: 999;
}
@media print {
    .official-report,
    .official-report * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    .official-report-table th {
        background: #edf3ff !important;
        color: #002b7f !important;
    }
    .report-summary-grid div {
        background: #f8fbff !important;
    }
    .weapon-report-font .official-report-table tr.weapon-transaction-linked-row-a td {
        background: #fff3bd !important;
    }
    .weapon-report-font .official-report-table tr.weapon-transaction-linked-row-b td {
        background: #dff7ea !important;
    }
}
.backup-summary { display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr)); gap: 12px; margin-top: 12px; }
.backup-summary div { border: 1px solid var(--line); border-radius: 8px; padding: 14px; background: #f8fafc; }
.backup-summary strong { display: block; color: var(--primary); font-size: 22px; font-weight: 900; }
.backup-summary span { color: var(--muted); font-size: 12px; font-weight: 800; }
.automatic-backup-panel { border: 1px solid var(--line); border-radius: 8px; padding: 14px; background: var(--panel); }
.automatic-backup-status { display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)); gap: 12px; }
.automatic-backup-status div { border: 1px solid var(--line); border-radius: 8px; padding: 14px; background: #f8fafc; }
.automatic-backup-status strong { display: block; color: #047857; font-size: 18px; font-weight: 900; }
.automatic-backup-status span { color: var(--muted); font-size: 12px; font-weight: 800; }
.automatic-backup-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; border: 1px solid #bfdbfe; border-radius: 8px; padding: 12px; color: #1e3a8a; background: #eff6ff; font-weight: 700; }
.automatic-backup-note i { margin-top: 3px; }
.backup-toggle { display: flex !important; align-items: center; gap: 8px; min-height: 38px; color: #111827 !important; }
.backup-toggle input { width: 18px; height: 18px; }
.backup-restore-box { border: 1px solid #f4d48b; border-radius: 8px; padding: 14px; background: #fffbeb; }
.backup-restore-box h3 { margin: 0 0 6px; color: #92400e; font-size: 18px; font-weight: 900; }
.backup-restore-box p { margin: 0 0 12px; color: #7c2d12; }
.backup-restore-box form { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) 180px auto; gap: 10px; }
.backup-restore-box .clear-db-form { grid-template-columns: 1fr; align-items: start; }
.filesystem-backup-panel { display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid var(--line); border-radius: 8px; padding: 16px; background: var(--panel); }
.filesystem-backup-panel h3 { margin: 0 0 6px; color: var(--primary); font-size: 18px; font-weight: 900; }
.filesystem-backup-panel p { margin: 0; color: var(--muted); font-weight: 700; }
.clear-db-form .btn { justify-self: start; }
.clear-db-select-all,
.clear-db-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
    background: var(--panel);
}
.clear-db-select-all { align-items: center; margin-bottom: 12px; font-weight: 900; }
.clear-db-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 10px;
}
.clear-db-option input,
.clear-db-select-all input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
}
.clear-db-option strong,
.clear-db-option small { display: block; }
.clear-db-option small { color: var(--muted); margin-top: 2px; }
.settings-grid { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 16px; align-items: start; }
.configuration-panel { padding-bottom: 18px; }
.configuration-tabs { margin-top: 12px; }
.configuration-tab-content { padding-top: 16px; }
.configuration-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; align-items: start; }
.config-card { border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.config-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: #f8fafc; }
.config-card-head h3 { margin: 0; font-size: 15px; font-weight: 900; color: var(--ink); }
.config-card-head span { min-width: 28px; height: 24px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 900; }
.config-inline-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.config-inline-form select { grid-column: 1 / -1; }
.config-inline-form .btn { width: 42px; min-height: 38px; }
.config-manage-form { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.config-manage-form .form-label { margin: 0; font-size: 12px; font-weight: 900; color: var(--muted); }
.config-action-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
.config-action-row .btn { min-height: 38px; font-weight: 800; }
.configuration-panel .form-label { margin: 12px 0 6px; font-weight: 800; color: var(--muted); }
.configuration-panel .form-control,
.configuration-panel .form-select { min-height: 42px; padding: 9px 12px; border-radius: 6px; }
.configuration-panel .row.g-3 { --bs-gutter-y: 14px; }
.configuration-panel small.text-muted { line-height: 1.35; }
.report-design-form { padding-top: 2px; }
.report-design-inner-head { margin: 12px 0 4px; border: 1px solid var(--line); border-radius: 8px; }
.report-design-body { display: block; }
.report-design-picker { max-width: none; margin-bottom: 12px; }
.report-design-workbench { display: grid; grid-template-columns: minmax(520px, .78fr) minmax(760px, 1.22fr); gap: 12px; align-items: start; }
.report-design-editor { min-width: 0; display: grid; align-content: start; }
.report-design-preview-panel { position: sticky; top: 92px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; padding: 6px; max-height: calc(100vh - 112px); overflow: auto; }
.report-preview-page { width: 100%; min-width: 740px; min-height: 760px; margin: 0; background: #fff; color: #111827; border: 1px solid #cbd5e1; box-shadow: 0 14px 32px rgba(15, 23, 42, .08); padding: 18px; font-family: var(--preview-font-family, "Times New Roman"), serif; font-size: var(--preview-body-size, 8pt); }
.report-preview-page.letter-preview-page { min-height: 860px; font-family: var(--preview-body-font-family, var(--preview-font-family, "Times New Roman")), serif; font-size: var(--preview-body-size, 12pt); line-height: 1.25; }
.report-preview-header { display: grid; grid-template-columns: 70px minmax(0, 1fr) 86px; gap: 8px; align-items: start; border-bottom: 2px solid #111827; padding-bottom: 8px; margin-bottom: 12px; }
.report-preview-header img { width: var(--preview-logo-size, 18mm); height: var(--preview-logo-size, 18mm); max-width: 64px; max-height: 64px; object-fit: contain; }
.report-preview-header div { text-align: center; min-width: 0; }
.report-preview-header h1,
.report-preview-header h2 { margin: 0; font-size: var(--preview-header-size, 18pt); line-height: 1.05; font-weight: 800; overflow-wrap: anywhere; }
.report-preview-header strong { display: block; margin-top: 5px; font-size: var(--preview-title-size, 12pt); overflow-wrap: anywhere; }
.report-preview-header p { margin: 0; text-align: right; font-size: 8pt; font-weight: 800; }
.report-preview-letter-body { font-family: var(--preview-body-font-family, var(--preview-font-family, "Times New Roman")), serif; font-size: var(--preview-body-size, 12pt); font-weight: var(--preview-body-weight, 400); text-align: var(--preview-body-align, left); white-space: pre-wrap; overflow-wrap: anywhere; }
.report-preview-section { margin: 14px 0 6px; color: #002b7f; font-size: var(--preview-section-size, 11pt); font-weight: 900; }
.report-preview-table { width: 100%; border-collapse: collapse; font-size: var(--preview-body-size, 8pt); }
.report-preview-table th,
.report-preview-table td { border: 1px solid #111827; padding: 5px; }
.report-preview-table th { background: #edf3ff; color: #002b7f; }
.report-preview-footer { display: grid; justify-items: center; gap: 8px; margin-top: 34px; font-weight: 800; }
.report-text-toolbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px; border: 1px solid #b8c2cf; border-bottom: 0; border-radius: 6px 6px 0 0; background: #c9cfd6; }
.report-text-toolbar .form-select, .report-text-toolbar .form-control, .report-text-toolbar .btn { height: 40px; border-radius: 6px; font-size: 14px; }
.report-toolbar-font { flex: 1 1 310px; min-width: 240px; }
.report-toolbar-size { flex: 0 0 86px; max-width: 86px; padding-inline: 9px; }
.report-toolbar-button { width: 42px; padding: 0; display: grid; place-items: center; color: #0f172a; background: #dbe1e8; border-color: #aeb8c4; }
.report-toolbar-button:hover, .report-toolbar-button.active { background: #eef4fb; border-color: #8ba3bd; color: #0b63ce; }
.report-toolbar-separator { width: 1px; align-self: stretch; min-height: 34px; background: #98a4b3; margin: 0 4px; }
.btn-check:checked + .report-toolbar-button { background: #eef4fb; border-color: #8ba3bd; color: #0b63ce; }
.report-design-body-text { min-height: 690px; border-top-left-radius: 0; border-top-right-radius: 0; font-family: Consolas, "Courier New", monospace; line-height: 1.45; resize: vertical; overflow: auto; white-space: pre-wrap; }
.config-table-wrap { max-height: 360px; overflow: auto; }
.config-table { margin: 0; }
.config-table th { position: sticky; top: 0; z-index: 1; background: #fff; }
.config-wide-card { grid-column: 1 / -1; }
.config-upload-body { display: grid; grid-template-columns: minmax(220px, 320px) minmax(280px, 1fr); gap: 16px; padding: 14px; align-items: start; }
.config-image-preview { display: grid; justify-items: center; gap: 8px; padding: 14px; border: 1px dashed var(--line); border-radius: 8px; background: repeating-conic-gradient(#f8fafc 0% 25%, #e5e7eb 0% 50%) 50% / 16px 16px; }
.config-image-preview img { max-width: 260px; max-height: 170px; object-fit: contain; }
.config-image-preview small { color: var(--muted); font-weight: 800; }
.config-signature-thumb { width: 160px; max-height: 58px; object-fit: contain; padding: 5px; border: 1px dashed var(--line); border-radius: 6px; background: repeating-conic-gradient(#f8fafc 0% 25%, #e5e7eb 0% 50%) 50% / 14px 14px; }
.signature-upload-form { display: grid; grid-template-columns: minmax(180px, 1fr) 42px; gap: 8px; align-items: center; }
.signatures-table-wrap { max-height: 520px; }
.notification-main-column { display: grid; gap: 16px; min-width: 0; }
.stack-form { display: grid; gap: 8px; }
.notice-form-panel { padding: 18px 16px; }
.notice-form-head { display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: center; margin-bottom: 14px; }
.notice-form-head > i { color: var(--muted); font-size: 14px; }
.notice-form-head h2 { margin: 0; color: var(--dark); font-size: 18px; font-weight: 900; }
.notice-form-head p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.notice-form-panel .form-label { margin: 6px 0 2px; color: #1f2937; font-size: 12px; font-weight: 700; }
.notice-form-panel .form-control, .notice-form-panel .form-select { min-height: 36px; border-color: #cbd5e1; border-radius: 4px; font-size: 12px; background: #f8fafc; }
.notice-form-panel textarea.form-control { min-height: 106px; resize: vertical; }
.btn-notice-submit { width: 100%; margin-top: 4px; min-height: 36px; border: 0; background: linear-gradient(135deg, #0f8f82, #2563eb); font-size: 13px; font-weight: 900; border-radius: 4px; }
.notice-list { display: grid; gap: 12px; }
.notice-card { display: flex; justify-content: space-between; gap: 14px; border: 1px solid var(--line); border-left: 5px solid #2563eb; border-radius: 8px; padding: 14px; background: #fff; }
.notice-card.success { border-left-color: #16a34a; }
.notice-card.warning { border-left-color: #f59e0b; }
.notice-card.danger { border-left-color: #dc2626; }
.notice-card span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.notice-card h3 { margin: 4px 0 6px; color: var(--dark); font-size: 18px; font-weight: 900; }
.notice-card p { margin: 0 0 8px; color: #334155; }
.notice-card small { color: var(--muted); }
.notice-actions { display: flex; align-items: flex-start; gap: 8px; flex-shrink: 0; }
.notice-modal-content { border: 0; border-radius: 10px; box-shadow: 0 24px 70px rgba(15, 23, 42, .28); }
.notice-modal-type { display: inline-flex; border-radius: 999px; background: rgba(11, 99, 206, .1); color: var(--primary); padding: 4px 9px; font-size: 11px; font-weight: 900; text-transform: uppercase; margin-bottom: 6px; }
.notice-modal-message { white-space: pre-wrap; color: #1e293b; line-height: 1.7; margin-bottom: 18px; }
.notice-modal-meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 800; }
.notice-modal-meta span { border: 1px solid var(--line); border-radius: 999px; padding: 5px 9px; }
.pending-approval-panel { background: #fff; }
.pending-approval-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.pending-approval-head h2 { margin: 0; color: var(--dark); font-size: 20px; font-weight: 900; }
.pending-approval-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.pending-approval-head > span { display: inline-flex; align-items: center; border-radius: 5px; background: #f4b400; color: #0f172a; padding: 4px 8px; font-size: 11px; font-weight: 900; }
.pending-task-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.pending-task-card { display: flex; justify-content: space-between; align-items: center; gap: 14px; border: 1px solid #9ab8e8; border-left: 4px solid var(--primary); border-radius: 6px; padding: 12px; background: #eef6ff; color: inherit; }
.pending-task-card.leave { border-color: #8fb5ee; background: #f3f8ff; }
.pending-task-card.approval { border-color: #9ab8e8; background: #eef6ff; }
.pending-task-card span { display: inline-flex; align-items: center; gap: 4px; width: fit-content; border-radius: 4px; background: var(--primary); color: #fff; padding: 3px 6px; font-size: 10px; font-weight: 900; }
.pending-task-card.leave span { background: #0f8f82; }
.pending-task-card strong { display: block; margin-top: 8px; color: var(--dark); font-size: 14px; font-weight: 900; }
.pending-task-card p { margin: 3px 0; color: #27364f; font-size: 12px; }
.pending-task-card small { color: var(--muted); font-size: 11px; }
.pending-task-card > a { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; border-radius: 4px; background: var(--primary); color: #fff; padding: 7px 10px; font-size: 12px; font-weight: 900; text-decoration: none; }
.pending-task-card.leave > a { background: #0f8f82; }
.pending-task-list { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.pending-task-list thead th { background: #f8fafc; color: var(--muted); font-size: 12px; text-transform: uppercase; }
.pending-type { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; background: var(--primary); color: #fff; padding: 5px 8px; font-size: 11px; font-weight: 900; white-space: nowrap; }
.pending-type.leave { background: #0f8f82; }
.pending-type.approval { background: var(--primary); }
.pending-type.danger { background: #dc3545; }
.user-grid-person { display: flex; align-items: center; gap: 8px; min-width: 170px; }
.user-grid-person img,
.user-grid-person span { width: 30px; height: 30px; border-radius: 6px; border: 1px solid #d6e5fa; background: #eaf3ff; object-fit: cover; flex: 0 0 30px; display: grid; place-items: center; color: var(--primary); }
.user-grid-person strong { line-height: 1.2; }
.user-profile-card { border: 1px solid var(--line); border-radius: 8px; padding: 18px; background: #fff; }
.user-profile-head { display: flex; align-items: center; gap: 16px; }
.user-profile-head img, .user-avatar { width: 86px; height: 86px; border-radius: 12px; object-fit: cover; background: #eaf3ff; border: 2px solid #d6e5fa; display: grid; place-items: center; color: var(--primary); font-size: 32px; }
.user-profile-head h3 { margin: 0 0 4px; color: var(--dark); font-size: 24px; font-weight: 900; }
.user-profile-head p { margin: 0 0 8px; color: var(--muted); }
.permission-summary { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: #f8fafc; color: #334155; }
.user-actions-column { width: 124px; min-width: 124px; white-space: nowrap; }
.user-actions { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: flex-end; gap: 6px; width: 112px; white-space: nowrap; }
.user-actions form { display: flex; margin: 0; }
.user-actions .btn { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px; padding: 0; }
.user-form-officer .user-field-type, .user-form-soldier .user-field-type { order: 1; }
.user-form-officer .user-field-role, .user-form-soldier .user-field-role { order: 2; }
.user-form-officer .user-field-username, .user-form-soldier .user-field-username { order: 3; }
.user-form-officer .user-field-name { order: 4; }
.user-form-officer .user-field-email { order: 5; }
.user-form-officer .user-field-status { order: 6; }
.user-form-officer .user-field-password { order: 7; }
.user-form-soldier .user-field-soldier { order: 4; }
.user-form-soldier .user-field-password { order: 5; }
.user-form-soldier .user-field-email { order: 6; }
.user-form-soldier .user-field-status { order: 7; }
.user-form #officerProfileFields { order: 8; }
.user-form .user-permission-box:not(.officer-profile-box) { order: 9; }
.user-permission-box { border: 1px solid var(--line); border-radius: 8px; padding: 14px; background: #f8fafc; }
.user-permission-box h3 { margin: 0 0 4px; color: var(--dark); font-size: 18px; font-weight: 900; }
.user-permission-box p { margin: 0 0 12px; color: var(--muted); }
.role-create-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.role-permission-list { display: grid; gap: 16px; }
.role-card .panel-head small { color: var(--muted); font-weight: 700; }
.role-badge { display: inline-flex; align-items: center; border-radius: 999px; background: #e8f1ff; color: var(--primary); padding: 5px 10px; font-size: 12px; font-weight: 900; }
.role-manager { padding: 10px; }
.role-tabs { border-bottom: 1px solid var(--line); }
.role-tabs .nav-link { color: #2b658f; border-radius: 4px 4px 0 0; font-size: 13px; padding: 11px 18px; }
.role-tabs .nav-link.active { color: #111827; background: #fff; border-color: var(--line) var(--line) #fff; }
.role-tab-content { min-height: 420px; padding: 18px 10px 10px; }
.role-layout { display: grid; grid-template-columns: 245px 1fr; gap: 18px; align-items: start; }
.role-side { display: grid; gap: 12px; }
.role-list-box { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; }
.role-select { width: 100%; display: flex; align-items: center; gap: 9px; border: 0; border-bottom: 1px solid var(--line); background: #fff; color: #334155; padding: 11px 12px; text-align: left; font-weight: 800; }
.role-select:last-child { border-bottom: 0; }
.role-select.active { background: #eaf3ff; color: var(--primary); }
.role-permission-workspace { min-width: 0; }
.role-pane { display: none; }
.role-pane.active { display: block; }
.role-pane-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.role-pane-head h3 { margin: 0; color: var(--dark); font-size: 18px; font-weight: 900; }
.role-pane-head small { color: var(--muted); }
.permission-tree { min-height: 300px; border: 1px solid #edf2f7; border-radius: 4px; padding: 8px 12px; background: #fff; font-family: "Segoe UI", Arial, sans-serif; font-size: 13px; color: #2c6790; }
.tree-group { position: relative; display: grid; grid-template-columns: 18px 18px 1fr; align-items: start; column-gap: 2px; min-height: 23px; }
.tree-group::before { content: ""; position: absolute; left: 8px; top: 20px; bottom: -3px; border-left: 1px dotted #777; }
.tree-group:last-child::before { display: none; }
.tree-toggle, .tree-spacer { width: 14px; height: 14px; margin-top: 3px; border: 1px solid #8aa1b3; background: #fff; color: #111827; display: grid; place-items: center; font-size: 8px; padding: 0; }
.tree-spacer { border: 0; background: transparent; }
.tree-folder { color: #d8a928; margin-top: 2px; font-size: 15px; filter: drop-shadow(0 1px 0 rgba(0,0,0,.1)); }
.tree-group > label { display: flex; align-items: center; gap: 3px; margin: 0; min-height: 22px; }
.tree-group input { width: 13px; height: 13px; margin: 0; }
.tree-children { display: none; grid-column: 2 / -1; margin: 1px 0 5px 12px; padding-left: 12px; border-left: 1px dotted #777; }
.tree-group.open .tree-children { display: grid; }
.tree-permission { position: relative; display: grid; grid-template-columns: 16px 15px minmax(150px, auto) 1fr; align-items: center; gap: 3px; min-height: 22px; margin: 0; color: #2c6790; }
.tree-permission::before { content: ""; position: absolute; left: -12px; top: 11px; width: 11px; border-top: 1px dotted #777; }
.tree-permission i { color: #caa84f; font-size: 13px; }
.tree-permission span { white-space: nowrap; }
.tree-permission small { color: #8aa1b3; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-action-line { display: flex; justify-content: center; gap: 4px; margin-top: 18px; }
.role-action-line .btn { min-width: 70px; border-radius: 3px; }
.permission-grid { display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)); gap: 10px; }
.permission-check { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; min-height: 58px; border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: #f8fafc; cursor: pointer; }
.permission-check input { margin-top: 3px; }
.permission-check strong { display: block; color: var(--dark); font-size: 13px; }
.permission-check small { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.login-body { min-height: 100vh; background: #f0f1f3; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(420px, 100%); background: #fff; border: 1px solid #dde1e7; padding: 34px 24px 24px; box-shadow: 0 18px 45px rgba(15, 23, 42, .08); }
.login-card-head { text-align: center; margin-bottom: 26px; }
.login-logo { width: 84px; height: 84px; object-fit: contain; margin-bottom: 18px; }
.login-card h1 { color: #061b3a; font-size: 24px; font-weight: 900; margin: 0 0 10px; letter-spacing: 0; }
.login-card p { color: #657287; margin: 0; font-size: 14px; }
.login-card .form-label { color: #17233a; margin-bottom: 8px; }
.login-card .form-control { border-color: #cfd6df; border-radius: 5px; font-size: 15px; }
.login-card .form-control:focus { border-color: #9aa7b8; box-shadow: 0 0 0 .2rem rgba(100, 116, 139, .12); }
.password-field { position: relative; }
.password-field .form-control { padding-right: 48px; }
.password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    width: 34px;
    height: 34px;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #64748b;
    display: grid;
    place-items: center;
    border-radius: 5px;
}
.password-toggle:hover,
.password-toggle:focus {
    background: #eef2f7;
    color: #17233a;
}
.btn-login { background: #aeb5c0; border-color: #aeb5c0; color: #07162d; font-weight: 800; border-radius: 5px; }
.btn-login:hover { background: #9ca5b2; border-color: #9ca5b2; color: #07162d; }
.login-help { margin-top: 16px; color: #7a8494; font-size: 12px; text-align: center; }
.id-card-print { min-height: 100vh; display: grid; place-items: center; background: #eef3f8; }
.ppf-new-id-card {
    width: 85.6mm;
    height: 53.98mm;
    position: relative;
    overflow: hidden;
    border-radius: 4mm;
    background:
        radial-gradient(circle at 52% 53%, rgba(7, 36, 92, .055) 0 13mm, transparent 13.5mm),
        linear-gradient(135deg, rgba(9, 42, 99, .032) 0 25%, transparent 25% 50%, rgba(9, 42, 99, .024) 50% 75%, transparent 75%) 0 0 / 3mm 3mm,
        #fff;
    color: #07111f;
    border: .15mm solid rgba(6, 28, 73, .16);
    box-shadow: 0 5mm 12mm rgba(4, 18, 48, .24);
    font-family: "Montserrat", Arial, sans-serif;
}
.ppf-new-id-card::before {
    content: "";
    position: absolute;
    left: -6mm;
    top: -3mm;
    width: 28mm;
    height: 61mm;
    background: linear-gradient(180deg, #061b45 0%, #062e70 100%);
    border-radius: 0 0 25mm 0;
    z-index: 1;
}
.ppf-new-id-card::after {
    content: "";
    position: absolute;
    right: -7mm;
    bottom: -3mm;
    width: 37mm;
    height: 14mm;
    background: linear-gradient(180deg, #061b45 0%, #062e70 100%);
    border-radius: 25mm 0 0 0;
    border-top: .85mm solid #d5a43a;
    z-index: 2;
}
.ppf-new-left-panel {
    position: absolute;
    inset: 0 auto 0 0;
    width: 22mm;
    z-index: 4;
    color: #d9a73b;
    display: grid;
    grid-template-rows: 26mm 1fr auto;
    justify-items: center;
    padding: 3mm 0 2.4mm;
}
.ppf-new-left-panel::after {
    content: "";
    position: absolute;
    left: 17.7mm;
    top: -3mm;
    width: 1.1mm;
    height: 61mm;
    background: #d5a43a;
    border-radius: 0 0 20mm 20mm;
    transform: rotate(12deg);
    transform-origin: top center;
    z-index: -1;
}
.ppf-new-id-header {
    position: absolute;
    left: 25.6mm;
    top: 1.5mm;
    right: 2.8mm;
    z-index: 5;
    color: #061b45;
}
.ppf-new-logo-wrap {
    width: 18mm;
    height: 18mm;
    display: grid;
    place-items: center;
}
.ppf-new-logo-wrap img {
    width: 18mm;
    height: 18mm;
    object-fit: contain;
    filter: drop-shadow(0 .35mm .35mm rgba(0,0,0,.18)) saturate(1.05);
}
.ppf-new-id-header h1,
.ppf-new-id-header h2 {
    margin: 0;
    color: #061b45;
    font-family: "Bebas Neue", "Oswald", Impact, "Arial Narrow", sans-serif;
    font-weight: 400;
    letter-spacing: .25mm;
    line-height: .95;
    white-space: nowrap;
}
.ppf-new-id-header h1 { font-size: 6.5mm; }
.ppf-new-id-header h2 { font-size: 4.2mm; margin-top: 1.2mm; letter-spacing: .05mm; }
.ppf-new-motto-line {
    display: grid;
    grid-template-columns: 15mm 3mm 15mm;
    gap: 2mm;
    align-items: center;
    margin: 2.4mm 0 1.7mm 15mm;
    color: #d5a43a;
}
.ppf-new-motto-line span {
    height: .25mm;
    background: #d5a43a;
}
.ppf-new-motto-line i { font-size: 2.7mm; }
.ppf-new-id-header > strong {
    display: block;
    text-align: center;
    margin-right: 17mm;
    color: #082b72;
    font-size: 1.8mm;
    line-height: 1;
    font-weight: 900;
    letter-spacing: .08mm;
}
.ppf-new-id-body {
    position: absolute;
    left: 22.2mm;
    top: 19.8mm;
    right: 3.8mm;
    bottom: 6.4mm;
    display: grid;
    grid-template-columns: 1fr 18.8mm;
    gap: 4.5mm;
    z-index: 5;
}
.ppf-new-id-body::before {
    content: "";
    position: absolute;
    left: 17mm;
    top: -2mm;
    width: 27mm;
    height: 27mm;
    background: url("../birmad-police-logo.png") center / contain no-repeat;
    opacity: .075;
    filter: grayscale(1);
    pointer-events: none;
}
.ppf-new-photo-panel {
    position: relative;
    width: 18.8mm;
    height: 25.5mm;
    border: .35mm solid #072b72;
    border-radius: .7mm;
    background: #fff;
    overflow: hidden;
    z-index: 5;
}
.ppf-new-photo-panel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}
.ppf-new-info-panel {
    position: relative;
    padding: .5mm 0 0 0;
    min-width: 0;
    z-index: 2;
}
.ppf-new-watermark {
    display: none;
}
.ppf-new-info-row {
    position: relative;
    z-index: 1;
    margin-bottom: 2mm;
}
.ppf-new-info-row label {
    display: block;
    margin: 0 0 .45mm;
    font-size: 1.55mm;
    line-height: 1.05;
    font-weight: 900;
    color: #111827;
}
.ppf-new-info-row strong {
    display: block;
    color: #101827;
    font-size: 2.45mm;
    line-height: 1.05;
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ppf-new-info-row .ppf-new-blue,
.ppf-new-blue {
    color: #07306f !important;
}
.ppf-new-date-row { margin-bottom: 2mm; }
.ppf-new-qr-panel {
    display: grid;
    align-content: end;
    justify-content: center;
    width: 9.5mm;
    height: 9.5mm;
    margin-top: auto;
    background: #fff;
    border-radius: .4mm;
    overflow: hidden;
}
.ppf-new-qr-panel img {
    width: 9.5mm;
    height: 9.5mm;
    object-fit: contain;
    background: #fff;
}
.ppf-new-site {
    align-self: end;
    color: #d5a43a;
    font-size: 2mm;
    line-height: 1;
    font-weight: 900;
    letter-spacing: .08mm;
}
.ppf-new-id-footer {
    position: absolute;
    right: 3.5mm;
    bottom: 0;
    height: 8mm;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.7mm;
    color: #d5a43a;
    font-size: 2.8mm;
    font-weight: 900;
    letter-spacing: .08mm;
}
.ppf-new-id-footer > i {
    color: #d5a43a;
    font-size: 5mm;
}

/* CR80 Puntland Police ID card based on the provided reference template. */
.ppf-new-id-card {
    width: 85.6mm !important;
    height: 53.98mm !important;
    border-radius: 3.6mm !important;
    border: .16mm solid #d6dbe5 !important;
    background:
        radial-gradient(circle at 50% 55%, rgba(4, 27, 70, .065) 0 14mm, transparent 14.4mm),
        repeating-linear-gradient(165deg, rgba(4, 27, 70, .024) 0 .18mm, transparent .18mm 1.55mm),
        #fff !important;
    box-shadow: 0 3mm 8mm rgba(0, 0, 0, .24) !important;
    font-family: "Arial Narrow", "Montserrat", Arial, sans-serif !important;
}
.ppf-new-id-card::before {
    left: -10.8mm !important;
    top: -5.5mm !important;
    width: 32.2mm !important;
    height: 67mm !important;
    background: #031f4d !important;
    border-radius: 0 0 25mm 0 !important;
    transform: rotate(-5deg);
    transform-origin: top left;
    z-index: 1 !important;
}
.ppf-new-id-card::after {
    right: -5.4mm !important;
    bottom: -3.8mm !important;
    width: 36mm !important;
    height: 12.2mm !important;
    background: #031f4d !important;
    border-top: .75mm solid #d7a842 !important;
    border-radius: 26mm 0 0 0 !important;
    z-index: 2 !important;
}
.ppf-new-left-panel {
    width: 20.5mm !important;
    padding: 4.2mm 0 2.1mm !important;
    grid-template-rows: 21.5mm 1fr auto !important;
    z-index: 6 !important;
}
.ppf-new-left-panel::after {
    left: 17.9mm !important;
    top: -6mm !important;
    width: 1.25mm !important;
    height: 70mm !important;
    background: #d7a842 !important;
    border-radius: 0 0 22mm 22mm !important;
    transform: rotate(15deg) !important;
}
.ppf-new-logo-wrap,
.ppf-new-logo-wrap img {
    width: 16.7mm !important;
    height: 16.7mm !important;
}
.ppf-new-logo-wrap img {
    mix-blend-mode: screen;
    filter: sepia(1) saturate(2.1) hue-rotate(350deg) brightness(1.06) contrast(1.12) drop-shadow(0 .25mm .25mm rgba(0,0,0,.25)) !important;
}
.ppf-new-qr-panel {
    width: 8.9mm !important;
    height: 8.9mm !important;
    align-self: end;
    margin-bottom: 1.6mm;
    border-radius: .25mm !important;
    padding: .45mm;
}
.ppf-new-qr-panel img {
    width: 8mm !important;
    height: 8mm !important;
}
.ppf-new-site {
    font-size: 1.75mm !important;
    color: #d7a842 !important;
}
.ppf-new-id-header {
    left: 25.2mm !important;
    top: 2.1mm !important;
    right: 2.6mm !important;
    z-index: 7 !important;
}
.ppf-new-id-header h1 {
    font-family: "Bebas Neue", "Arial Narrow", Impact, sans-serif !important;
    color: #031f4d !important;
    font-size: 5.35mm !important;
    letter-spacing: .26mm !important;
    line-height: .9 !important;
}
.ppf-new-id-header h2 {
    font-family: "Arial Narrow", "Montserrat", Arial, sans-serif !important;
    color: #031f4d !important;
    font-size: 3.35mm !important;
    font-weight: 900 !important;
    letter-spacing: .11mm !important;
    margin-top: 1.15mm !important;
}
.ppf-new-motto-line {
    grid-template-columns: 15mm 2.4mm 15mm !important;
    gap: 1.4mm !important;
    margin: 2mm 0 1.25mm 14.6mm !important;
    color: #d7a842 !important;
}
.ppf-new-motto-line span { height: .22mm !important; background: #d7a842 !important; }
.ppf-new-motto-line i { font-size: 2.25mm !important; }
.ppf-new-id-header > strong {
    margin-right: 17.5mm !important;
    color: #082b72 !important;
    font-size: 1.75mm !important;
    letter-spacing: .08mm !important;
}
.ppf-new-gold-curve {
    position: absolute;
    right: 21mm;
    bottom: 6.7mm;
    width: 34mm;
    height: 9.5mm;
    border-top: .8mm solid #d7a842;
    border-radius: 100% 0 0 0;
    transform: rotate(-8deg);
    z-index: 3;
    pointer-events: none;
}
.ppf-new-id-body {
    left: 22.6mm !important;
    top: 22.1mm !important;
    right: 4.2mm !important;
    bottom: 5.7mm !important;
    grid-template-columns: 1fr 18.7mm !important;
    gap: 4mm !important;
    z-index: 7 !important;
}
.ppf-new-id-body::before {
    left: 16.5mm !important;
    top: -3.3mm !important;
    width: 27mm !important;
    height: 27mm !important;
    opacity: .085 !important;
}
.ppf-new-info-panel { padding-top: 0 !important; }
.ppf-new-info-row { margin-bottom: 1.8mm !important; }
.ppf-new-info-row label {
    font-family: Arial, sans-serif !important;
    color: #101827 !important;
    font-size: 1.45mm !important;
    font-weight: 900 !important;
    margin-bottom: .55mm !important;
}
.ppf-new-info-row strong {
    font-family: Arial, sans-serif !important;
    color: #0c1220 !important;
    font-size: 2.25mm !important;
    font-weight: 900 !important;
    letter-spacing: .02mm;
}
.ppf-new-info-row .ppf-new-blue,
.ppf-new-blue { color: #082b72 !important; }
.ppf-new-photo-panel {
    width: 18.8mm !important;
    height: 25.1mm !important;
    border: .33mm solid #082b72 !important;
    border-radius: .45mm !important;
}
.ppf-new-id-footer {
    right: 3.1mm !important;
    bottom: .7mm !important;
    height: 6.6mm !important;
    color: #d7a842 !important;
    font-family: Arial, sans-serif !important;
    font-size: 2.45mm !important;
    gap: 1.35mm !important;
    z-index: 8 !important;
}
.ppf-new-id-footer > i {
    color: #d7a842 !important;
    font-size: 4.4mm !important;
}

.ppf-template-id-card {
    width: 85.6mm;
    height: 53.98mm;
    position: relative;
    overflow: hidden;
    border-radius: 3.6mm;
    background: url("../id-card-birmad-template-fields-clean.png") center / 100% 100% no-repeat;
    box-shadow: 0 3mm 8mm rgba(0, 0, 0, .24);
    font-family: Arial, Helvetica, sans-serif;
}
.ppf-template-photo {
    position: absolute;
    left: 63.55mm;
    top: 13.8mm;
    width: 19.55mm;
    height: 28.95mm;
    object-fit: cover;
    object-position: center top;
    border-radius: .8mm;
    z-index: 8;
}
.ppf-template-qr {
    position: absolute;
    left: 5.35mm;
    top: 35.1mm;
    width: 11.85mm;
    height: 11.85mm;
    object-fit: contain;
    background: #fff;
    padding: .25mm;
    border-radius: .55mm;
    box-sizing: border-box;
    z-index: 8;
}
.ppf-template-label {
    position: absolute;
    left: 25.7mm;
    width: 39mm;
    color: #050914;
    font-family: "Arial Narrow", Arial, Helvetica, sans-serif;
    font-size: 1.18mm;
    line-height: 1;
    font-weight: 900;
    white-space: nowrap;
    z-index: 9;
}
.ppf-template-value {
    position: absolute;
    left: 25.7mm;
    width: 36.5mm;
    color: #050914;
    font-family: "Arial Narrow", "Bebas Neue", Arial, Helvetica, sans-serif;
    font-size: 1.85mm;
    line-height: 1;
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.5mm;
    display: flex;
    align-items: center;
    background: transparent;
    box-shadow: none;
    padding: 0 .5mm 0 0;
    z-index: 9;
}
.ppf-template-label-name { top: 20.05mm; }
.ppf-template-name { top: 22.15mm; font-size: 1.82mm; width: 36.5mm; }
.ppf-template-label-rank { top: 26.15mm; }
.ppf-template-rank { top: 28.25mm; width: 18.5mm; font-size: 1.85mm; }
.ppf-template-label-id { top: 32.2mm; }
.ppf-template-id { top: 34.4mm; color: #082b72; width: 21mm; font-size: 1.95mm; }
.ppf-template-label-issued { top: 38.65mm; }
.ppf-template-issued { top: 40.85mm; width: 19mm; font-size: 1.85mm; }
.ppf-template-label-expires { top: 45.25mm; }
.ppf-template-expires { top: 47.45mm; width: 19mm; font-size: 1.85mm; }
.id-card-print-batch {
    display: grid;
    gap: 16px;
    justify-items: center;
    padding: 24px;
}
.verify-id-card-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #eef3f8; }
.verify-id-card { width: min(460px, 100%); border-radius: 8px; background: #fff; padding: 28px; text-align: center; border: 1px solid #dbe4ef; box-shadow: 0 18px 45px rgba(15, 23, 42, .14); }
.verify-icon { width: 70px; height: 70px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 50%; font-size: 34px; }
.verify-id-card.valid .verify-icon { background: #dcfce7; color: #166534; }
.verify-id-card.invalid .verify-icon { background: #fee2e2; color: #991b1b; }
.verify-id-card h1 { margin: 0 0 8px; color: #061b45; font-size: 26px; font-weight: 900; }
.verify-id-card p { margin: 0 0 20px; color: #64748b; }
.verify-id-card dl { display: grid; gap: 8px; margin: 0; text-align: left; }
.verify-id-card dl div { display: grid; grid-template-columns: 110px 1fr; gap: 10px; border-top: 1px solid #e5edf6; padding-top: 8px; }
.verify-id-card dt { color: #64748b; font-weight: 800; }
.verify-id-card dd { margin: 0; color: #0f172a; font-weight: 900; }
.verify-id-card-preview { display: flex; justify-content: center; margin: 18px 0; overflow-x: auto; }
.verify-id-card-preview .ppf-template-id-card { flex: 0 0 auto; transform: scale(.74); transform-origin: top center; margin-bottom: -54px; }
.verify-id-card-full-page { align-content: start; justify-items: center; padding: 18px; overflow-x: auto; }
.verify-id-card-clean { display: grid; justify-items: center; gap: 14px; width: min-content; max-width: 100%; }
.verify-id-card-clean .ppf-template-id-card { flex: 0 0 auto; box-shadow: 0 3mm 8mm rgba(0, 0, 0, .24); }
.verify-id-card-clean dl { width: min(85.6mm, calc(100vw - 36px)); display: grid; gap: 6px; margin: 0; padding: 12px; border: 1px solid #dbe4ef; border-radius: 8px; background: #fff; }
.verify-id-card-clean dl div { display: grid; grid-template-columns: 90px 1fr; gap: 8px; }
.verify-id-card-clean dt { color: #64748b; font-weight: 800; }
.verify-id-card-clean dd { margin: 0; color: #0f172a; font-weight: 900; }
.ppf-id-card { width: 420px; height: 640px; overflow: hidden; border-radius: 24px; background: #f8f8f5; color: #06256b; box-shadow: 0 18px 45px rgba(0,0,0,.18); position: relative; border: 2px solid #0a2b78; }
.ppf-id-header { height: 104px; background: #082a78; color: #fff; display: flex; align-items: center; gap: 14px; padding: 10px 22px; border-bottom: 6px solid #c99a17; }
.ppf-id-header img { width: 108px; height: 108px; object-fit: contain; margin-top: 46px; z-index: 2; }
.ppf-id-header h1 { margin: 0 0 0 8px; font-size: 29px; font-weight: 900; letter-spacing: 1px; line-height: 1; }
.ppf-id-main { display: grid; grid-template-columns: 190px 1fr; gap: 16px; padding: 70px 20px 0; }
.ppf-id-photo { width: 170px; height: 260px; object-fit: cover; border: 4px solid #082a78; border-radius: 12px; background: #cfe0ff; }
.ppf-id-qr { width: 108px; height: 108px; margin: 28px 0 0 12px; border: 3px solid #082a78; border-radius: 10px; padding: 6px; background: #fff; }
.ppf-id-fields { display: grid; gap: 14px; padding-top: 8px; }
.ppf-id-field { display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 10px; }
.ppf-id-field span { width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center; background: #082a78; color: #fff; font-size: 17px; }
.ppf-id-field label { display: block; font-size: 13px; font-weight: 900; color: #082a78; margin-bottom: 5px; }
.ppf-id-field strong { display: block; min-height: 23px; border-bottom: 2px solid #082a78; color: #111827; font-size: 13px; line-height: 1.1; padding-bottom: 3px; }
.ppf-id-signature { text-align: center; margin-top: 2px; color: #082a78; font-size: 11px; font-weight: 900; }
.signature-line { font-family: cursive; font-size: 18px; margin-bottom: 2px; color: #082a78; }
.ppf-id-footer { position: absolute; left: 0; right: 0; bottom: 0; height: 58px; background: #082a78; color: #fff; border-top: 5px solid #c99a17; display: flex; align-items: center; justify-content: space-around; font-size: 10px; letter-spacing: 1px; }
.ppf-id-footer i { color: #d7a11d; font-size: 24px; }
.ppf-id-card.exact-design { width: 426px; height: 640px; border: 0; border-radius: 22px; background: url("../id-card-reference.jpeg") center / 100% 100% no-repeat; position: relative; box-shadow: 0 18px 45px rgba(0,0,0,.18); overflow: hidden; }
.exact-id-photo { position: absolute; left: 22px; top: 170px; width: 170px; height: 265px; object-fit: cover; border-radius: 8px; }
.exact-id-qr { position: absolute; left: 34px; top: 467px; width: 96px; height: 96px; object-fit: contain; background: #fff; }
.exact-value { position: absolute; left: 245px; width: 150px; color: #082a78; font-family: "Arial Narrow", Arial, sans-serif; font-size: 13px; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exact-value.number { top: 205px; }
.exact-value.name { top: 267px; }
.exact-value.rank { top: 326px; }
.exact-value.brigade { top: 387px; }
.exact-value.issued { top: 445px; }
.exact-value.expires { top: 505px; }
.ppf-id-card.clean-design { width: 426px; height: 640px; border-radius: 22px; overflow: hidden; background: #f8f8f5; position: relative; border: 2px solid #082a78; box-shadow: 0 18px 45px rgba(0,0,0,.18); }
.clean-id-top { height: 100px; background: #082a78; display: flex; align-items: center; gap: 16px; padding: 12px 20px; color: #fff; }
.clean-id-top img { width: 118px; height: 118px; object-fit: contain; align-self: flex-start; margin-top: 8px; z-index: 2; }
.clean-id-top h1 { font-family: Impact, "Arial Narrow", Arial, sans-serif; font-size: 30px; letter-spacing: 1px; margin: 0; line-height: 1; }
.clean-id-gold { height: 7px; background: #c99715; }
.clean-id-body { display: grid; grid-template-columns: 178px 1fr; gap: 14px; padding: 66px 18px 70px; }
.clean-id-photo { width: 170px; height: 265px; object-fit: cover; border: 4px solid #082a78; border-radius: 12px; background: #b9d2ff; }
.clean-id-qr { width: 106px; height: 106px; object-fit: contain; background: #fff; border: 3px solid #082a78; border-radius: 10px; padding: 5px; margin: 26px 0 0 10px; }
.clean-id-right { display: grid; gap: 10px; padding-top: 10px; }
.clean-id-field { display: grid; grid-template-columns: 38px 1fr; gap: 10px; align-items: center; min-width: 0; }
.clean-id-field span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 999px; background: #082a78; color: #fff; font-size: 16px; }
.clean-id-field label { display: block; color: #082a78; font-family: Impact, "Arial Narrow", Arial, sans-serif; font-size: 14px; letter-spacing: .2px; }
.clean-id-field strong { display: block; min-height: 25px; border-bottom: 2px solid #082a78; color: #111827; font-size: 12px; line-height: 1.1; padding: 4px 0 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clean-id-sign { text-align: center; color: #082a78; font-size: 11px; font-weight: 900; margin-top: 4px; }
.clean-id-sign div { font-family: cursive; font-size: 18px; }
.clean-id-footer { position: absolute; left: 0; right: 0; bottom: 0; height: 58px; background: #082a78; border-top: 6px solid #c99715; color: #fff; display: flex; align-items: center; justify-content: space-around; font-size: 10px; letter-spacing: 1px; }
.clean-id-footer i { color: #d7a11d; font-size: 25px; }
.id-card-print { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #e9eef5; }
.ppf-id-card.pro-id-card {
    width: 85.6mm;
    height: 125mm;
    border: 0;
    border-radius: 25px;
    overflow: hidden;
    position: relative;
    background: #fff;
    color: #002b7f;
    box-shadow: 0 24px 55px rgba(0, 21, 70, .24), 0 2px 0 rgba(255, 255, 255, .8) inset;
    font-family: "Montserrat", "Poppins", Arial, sans-serif;
}
.pro-id-header {
    height: 20.5mm;
    background: #002b7f;
    display: grid;
    grid-template-columns: 28mm 1fr;
    align-items: center;
    color: #fff;
    padding: 2mm 4.8mm 0 3.3mm;
    position: relative;
    z-index: 2;
}
.pro-id-logo {
    width: 25.8mm;
    height: 25.8mm;
    object-fit: contain;
    align-self: start;
    margin-top: .5mm;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,.16));
}
.pro-id-header h1 {
    margin: 0 0 1mm;
    color: #fff;
    font-family: "Bebas Neue", "Oswald", Impact, "Arial Narrow", sans-serif;
    font-size: 33px;
    font-weight: 400;
    line-height: .93;
    letter-spacing: .8px;
    text-transform: uppercase;
    white-space: nowrap;
}
.pro-id-gold-line {
    height: 2.2mm;
    background: linear-gradient(90deg, #b8891e, #d7b85a 42%, #b8891e);
    box-shadow: 0 1px 0 rgba(0,0,0,.12);
    position: relative;
    z-index: 1;
}
.pro-id-body {
    height: calc(125mm - 20.5mm - 2.2mm - 13.5mm);
    display: grid;
    grid-template-columns: 37.8mm 1fr;
    gap: 3.6mm;
    padding: 20.2mm 5.6mm 3mm 4.2mm;
    position: relative;
    background:
        radial-gradient(circle at 50% 78%, rgba(0, 43, 127, .055), transparent 18mm),
        linear-gradient(180deg, #fff 0%, #fbfbf8 100%);
}
.pro-id-watermark {
    position: absolute;
    width: 34mm;
    height: 34mm;
    object-fit: contain;
    left: 50%;
    bottom: 8mm;
    transform: translateX(-2mm);
    opacity: .055;
    filter: grayscale(1);
    pointer-events: none;
}
.pro-id-left {
    display: grid;
    align-content: start;
    justify-items: center;
    gap: 7.2mm;
    position: relative;
    z-index: 1;
}
.pro-id-photo {
    width: 34.7mm;
    height: 56.2mm;
    object-fit: cover;
    object-position: center top;
    border: 1.05mm solid #002b7f;
    border-radius: 12px;
    background: #bdd4ff;
    box-shadow: 0 2px 0 rgba(255,255,255,.8) inset, 0 8px 16px rgba(0,43,127,.15);
}
.pro-id-qr {
    width: 21.3mm;
    height: 21.3mm;
    object-fit: contain;
    background: #fff;
    border: .9mm solid #002b7f;
    border-radius: 8px;
    padding: 1.7mm;
    box-shadow: 0 6px 12px rgba(0,43,127,.12);
}
.pro-id-right {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 4.1mm;
    align-content: start;
    padding-top: 1.4mm;
    min-width: 0;
}
.pro-id-field {
    display: grid;
    grid-template-columns: 8.8mm 1fr;
    gap: 4.1mm;
    align-items: center;
    min-width: 0;
}
.pro-id-icon {
    width: 8.8mm;
    height: 8.8mm;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #002b7f;
    color: #fff;
    font-size: 15px;
    box-shadow: 0 3px 8px rgba(0,43,127,.24);
}
.pro-id-field-text {
    min-width: 0;
}
.pro-id-field-text label {
    display: block;
    margin: 0;
    color: #002b7f;
    font-family: "Bebas Neue", "Oswald", Impact, "Arial Narrow", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: .9;
    letter-spacing: .35px;
    text-transform: uppercase;
}
.pro-id-field-text strong {
    display: block;
    height: 7.2mm;
    border-bottom: .75mm solid #002b7f;
    color: #14213d;
    font-size: 9px;
    font-weight: 800;
    line-height: 1.05;
    padding: 2mm .5mm .8mm 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
}
.pro-id-signature {
    justify-self: end;
    width: 32mm;
    margin-top: .3mm;
    text-align: center;
    color: #002b7f;
}
.pro-id-sign-mark {
    height: 6.5mm;
    font-family: "Brush Script MT", "Segoe Script", cursive;
    font-size: 18px;
    line-height: 1;
    transform: rotate(-7deg);
    opacity: .9;
}
.pro-id-sign-line {
    width: 25mm;
    height: .6mm;
    margin: 0 auto 1.4mm;
    background: #002b7f;
}
.pro-id-signature strong {
    display: block;
    font-size: 7px;
    line-height: 1.22;
    font-weight: 900;
    letter-spacing: .15px;
}
.pro-id-footer {
    height: 13.5mm;
    display: grid;
    grid-template-columns: 1fr 12mm 1fr;
    align-items: center;
    gap: 2mm;
    padding: 0 6mm;
    background: #002b7f;
    color: #fff;
    border-top: 1.5mm solid #caa84f;
    font-family: "Montserrat", Arial, sans-serif;
    font-size: 7.5px;
    font-weight: 700;
    letter-spacing: 1.15px;
    text-transform: uppercase;
}
.pro-id-footer span:first-child { text-align: left; }
.pro-id-footer span:last-child { text-align: right; }
.pro-id-footer i {
    color: #caa84f;
    font-size: 20px;
    text-align: center;
    text-shadow: 0 1px 1px rgba(0,0,0,.25);
}
.leave-letter { width: 210mm; height: 287mm; overflow: hidden; margin: 0 auto; background: #fff; color: #111827; padding: 7mm 20mm 8mm; font-family: var(--letter-font-family, Calibri), Aptos, Arial, sans-serif; font-size: var(--letter-body-font-size, 12pt); line-height: 1.16; display: flex; flex-direction: column; }
.letter-header { text-align: center; border-bottom: 2px solid #111827; padding-bottom: 6px; margin-bottom: 8px; }
.letter-header h1 { font-family: var(--letter-font-family, Calibri), Arial, sans-serif; font-size: var(--letter-header-font-size, 18pt); margin: 0; font-weight: 800; }
.letter-header h2 { font-family: var(--letter-font-family, Calibri), Arial, sans-serif; font-size: var(--letter-header-font-size, 18pt); margin: 1px 0 0; font-weight: 700; }
.letter-header img { width: 82px; height: 82px; object-fit: contain; display: block; margin: 0 auto 3px; }
.letter-meta { display: flex; justify-content: space-between; margin-bottom: 7px; }
.letter-meta p, .letter-body p { margin: 0 0 8pt; }
.approval-letter-office { display: block; width: 100%; text-align: center !important; font-family: var(--letter-font-family, "Times New Roman"), Times, serif; font-size: var(--letter-title-font-size, 14pt); font-weight: 900 !important; }
.letter-body strong { font-weight: 800; }
.letter-body { flex: 1; font-family: var(--letter-body-font-family, var(--letter-font-family, Calibri)), Arial, sans-serif; font-size: var(--letter-body-font-size, 12pt); font-weight: var(--letter-body-weight, 400); text-align: var(--letter-body-align, left); }
.letter-template-content { white-space: pre-wrap; }
.letter-template-content p, .letter-template-content div { margin: 0 0 8pt; }
.letter-footer { margin-top: auto; text-align: center; display: grid; justify-items: center; gap: 2mm; padding-bottom: 5mm; }
.letter-footer strong { font-size: 18px; }
.letter-signer-name { display: block; max-width: 100%; font-family: var(--letter-font-family, "Times New Roman"), Times, serif; font-size: 14pt; line-height: 1.15; font-weight: 900; overflow-wrap: anywhere; }
.letter-signature-line { position: relative; width: min(100%, 126mm); min-height: calc(34mm + var(--letter-line-offset, 0px)); margin-top: -1mm; display: grid; place-items: center; transform: translateY(var(--letter-line-offset, 0px)); }
.letter-signature-line::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px solid #111827; z-index: 1; }
.letter-signature-line .letter-stamp { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-6deg); width: var(--letter-stamp-size, 145px); max-height: var(--letter-stamp-size, 145px); object-fit: contain; opacity: var(--letter-stamp-opacity, .22); filter: contrast(var(--letter-stamp-contrast, 1)) saturate(var(--letter-stamp-saturation, 1)) brightness(var(--letter-stamp-brightness, 1)); z-index: 2; }
.letter-signature-line .letter-signature { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -58%); max-width: 118mm; max-height: 28mm; object-fit: contain; z-index: 3; }
.stamp-line-hidden .letter-signature-line::after { visibility: hidden; }
.paperwork-stack { display: grid; gap: 14px; }
.paperwork-editor-panel { min-width: 0; }
.paperwork-list-panel { min-width: 0; }
.paperwork-word-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 7px; border: 1px solid #b9c3cf; border-radius: 6px 6px 0 0; background: #c9cdd2; }
.paperwork-word-toolbar .form-select, .paperwork-word-toolbar .form-control, .paperwork-word-toolbar .btn { height: 32px; border-radius: 4px; font-size: 13px; }
.paperwork-word-toolbar .btn { width: 34px; padding: 0; display: grid; place-items: center; color: #1f2937; background: #d8dce0; border-color: #aeb6bf; }
.paperwork-word-toolbar .btn:hover { background: #eef2f7; color: #0b63ce; }
.paperwork-font { flex: 1 1 210px; min-width: 180px; max-width: 260px; }
.paperwork-size { flex: 0 0 70px; max-width: 70px; padding-inline: 7px; }
.paperwork-toolbar-separator { width: 1px; align-self: stretch; background: #9ca3af; margin: 0 4px; }
.paperwork-page-editor { min-height: 720px; padding: 28px 34px; border: 1px solid #b9c3cf; border-top: 0; border-radius: 0 0 6px 6px; background: #fff; color: #111827; outline: none; overflow: auto; line-height: 1.25; white-space: pre-wrap; }
.paperwork-repeat-group { display: grid; gap: 6px; }
.paperwork-repeat-row { display: grid; grid-template-columns: minmax(0, 1fr) 38px; gap: 6px; }
.paperwork-repeat-row .btn { width: 38px; padding-inline: 0; }
.paperwork-page-editor:empty::before { content: ""; display: block; min-height: 1.2em; }
.paperwork-print-page { width: 210mm; min-height: 297mm; margin: 0 auto; background: #fff; color: #111827; padding: 8mm 20mm 10mm; font-family: var(--paperwork-font-family, Calibri), Arial, sans-serif; font-size: var(--paperwork-font-size, 18pt); line-height: 1.18; display: flex; flex-direction: column; }
.paperwork-print-header { position: relative; display: grid; justify-items: center; border-bottom: 2px solid #111827; padding: 0 0 3mm; margin-bottom: 5mm; min-height: 36mm; }
.paperwork-print-brand { display: grid; justify-items: center; text-align: center; min-width: 0; width: 100%; }
.paperwork-print-header img { object-fit: contain; display: block; margin: 0 auto 1.5mm; }
.paperwork-print-header h1, .paperwork-print-header h2 { max-width: 100%; margin: 0; font-family: var(--paperwork-header-family, "Times New Roman"), Times, serif; font-size: var(--paperwork-header-size, 18pt); line-height: 1.04; font-weight: 900; white-space: nowrap; }
.paperwork-meta { display: flex; justify-content: space-between; gap: 10mm; margin-bottom: 4mm; font-size: 12pt; }
.paperwork-meta p, .paperwork-recipients p { margin: 0 0 4mm; }
.paperwork-recipients { font-family: var(--paperwork-font-family, Calibri), Arial, sans-serif; font-size: var(--paperwork-font-size, 18pt); line-height: 1.18; }
.paperwork-print-body { flex: 1; margin-top: 5mm; font-family: var(--paperwork-font-family, Calibri), Arial, sans-serif; font-size: var(--paperwork-font-size, 18pt); text-align: var(--paperwork-align, left); line-height: 1.25; overflow-wrap: anywhere; }
.paperwork-print-body p, .paperwork-print-body div { margin: 0 0 4mm; }
.paperwork-signer-footer { margin-top: 8mm; padding-bottom: 0; }
.discipline-letter {
    width: 210mm;
    min-height: 297mm;
    margin: 0 auto;
    background: #fff;
    color: #111827;
    padding: 8mm 20mm 10mm;
    font-family: var(--letter-font-family, Calibri), Aptos, Arial, sans-serif;
    font-size: var(--letter-body-font-size, 14pt);
    line-height: 1.12;
    display: flex;
    flex-direction: column;
}
.discipline-letter-body {
    display: flex;
    flex-direction: column;
    gap: 1.5mm;
}
.discipline-letter-details {
    display: grid;
    gap: 1.5mm;
    margin: 1mm 0;
}
.discipline-letter-details div {
    display: grid;
    grid-template-columns: 58mm 1fr;
    gap: 5mm;
}
.discipline-letter-details dt {
    font-weight: 900;
}
.discipline-letter-details dd {
    margin: 0;
    font-weight: 800;
}
.discipline-letter h3 {
    margin: 1mm 0 0;
    text-align: center;
    font-size: var(--letter-section-font-size, 13pt);
    font-weight: 900;
    text-decoration: underline;
}
.discipline-letter-description {
    min-height: 8mm;
    margin: 0;
    padding: 0;
}

@media (max-width: 1100px) {
    .stats-grid { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
    .profile-layout { grid-template-columns: 1fr; }
    .topbar-actions { gap: 8px; }
    .user-chip { min-width: 120px; }
}
@media (max-width: 992px) {
    .sidebar {
        width: min(318px, 88vw);
        transform: translateX(-105%);
        transition: transform .22s ease;
        box-shadow: 18px 0 45px rgba(2, 8, 23, .25);
    }
    .sidebar-collapse-toggle { display: none; }
    body.sidebar-collapsed .sidebar {
        width: min(318px, 88vw);
        padding: 18px;
    }
    body.sidebar-collapsed .brand { justify-content: flex-start; gap: 12px; padding-bottom: 18px; }
    body.sidebar-collapsed .brand-logo { width: 54px; height: 54px; }
    body.sidebar-collapsed .brand-text,
    body.sidebar-collapsed .side-nav .nav-link span,
    body.sidebar-collapsed .logout-link span,
    body.sidebar-collapsed .nav-chevron {
        display: block !important;
    }
    body.sidebar-collapsed .side-nav { align-items: stretch; }
    body.sidebar-collapsed .side-nav .nav-link,
    body.sidebar-collapsed .logout-link {
        width: auto;
        justify-content: flex-start;
        padding: 10px 12px;
        gap: 10px;
    }
    body.sidebar-collapsed .nav-children.open { display: grid !important; }
    .sidebar.open { transform: translateX(0); }
    .sidebar.open + .sidebar-overlay,
    body.sidebar-open .sidebar-overlay { display: block; }
    .main-panel { margin-left: 0; width: 100%; }
    .topbar {
        min-height: 74px;
        height: auto;
        padding: 12px 16px;
    }
    .topbar > div:first-of-type { min-width: 0; }
    .topbar h1,
    .topbar small {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 46vw;
    }
    .topbar-actions {
        margin-left: auto;
        gap: 8px;
    }
    .language-select,
    .user-chip { display: none; }
    .content-area { padding: 14px; }
    .panel { padding: 14px; }
    .panel-head { gap: 10px; }
    .panel-head .btn { white-space: nowrap; }
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .stat-card {
        min-width: 0;
        padding: 14px;
        gap: 10px;
    }
    .stat-card i { width: 40px; height: 40px; flex: 0 0 40px; }
    .stat-card span { font-size: 23px; }
    .quick-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .quick-actions .panel-head { grid-column: 1 / -1; }
    .activity-item {
        align-items: flex-start;
        display: grid;
        grid-template-columns: 10px minmax(0, 1fr);
    }
    .activity-item time {
        grid-column: 2;
        margin-left: 0;
    }
    .alarm-menu {
        position: fixed;
        right: 12px;
        left: 12px;
        top: 70px;
        width: auto;
        max-height: 72vh;
        overflow-y: auto;
    }
    .chat-shell { grid-template-columns: 1fr; height: auto; min-height: 0; }
    .chat-users { height: auto; }
    .chat-panel { height: 70vh; min-height: 480px; }
    .chat-user-list { max-height: 240px; }
    .chat-messages { max-height: none; }
    .filter-bar { grid-template-columns: 1fr; }
    .attendance-filter { grid-template-columns: 1fr; }
    .settings-grid { grid-template-columns: 1fr; }
    .pending-task-grid { grid-template-columns: 1fr; }
    .role-layout { grid-template-columns: 1fr; }
    .permission-grid { grid-template-columns: 1fr; }
    .backup-restore-box form { grid-template-columns: 1fr; }
    .automatic-backup-status { grid-template-columns: 1fr; }
    .filesystem-backup-panel { align-items: stretch; flex-direction: column; }
}
@media (max-width: 640px) {
    .content-area, .topbar { padding: 12px; }
    .topbar h1 { font-size: 18px; }
    .topbar small { display: none; }
    .topbar h1 { max-width: 40vw; }
    .icon-button { width: 40px; height: 40px; }
    .topbar-actions { gap: 6px; }
    .stats-grid, .detail-grid { grid-template-columns: 1fr; }
    .stat-card {
        min-height: 86px;
        border-left-width: 0;
        border-top: 5px solid var(--primary);
    }
    .quick-actions { grid-template-columns: 1fr; }
    .quick-actions a {
        min-height: 48px;
        padding: 12px 14px;
    }
    .panel-head .d-flex {
        width: 100%;
        flex-wrap: wrap;
    }
    .panel-head .btn,
    .panel-head form {
        flex: 1 1 auto;
    }
    .panel-head form .btn { width: 100%; }
    .activity-item p,
    .notice small {
        overflow-wrap: anywhere;
    }
    .attendance-calendar { grid-template-columns: repeat(2, 1fr); }
    .panel-head, .pagination-line { align-items: stretch; flex-direction: column; }
    .login-card { padding: 30px 20px 22px; }
    .id-card-print { padding: 16px; }
    .ppf-id-card.pro-id-card {
        transform: scale(.92);
        transform-origin: top center;
        margin-bottom: -36px;
    }
    .ppf-new-id-card {
        transform: scale(1);
        transform-origin: top center;
        margin-bottom: 0;
    }
}
@media print {
    *,
    *::before,
    *::after {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }
    @page { size: A4; margin: 0; }
    @page report-landscape { size: A4 landscape; margin: 0; }
    @page report-portrait { size: A4 portrait; margin: 0; }
    @page discipline-letter-page { size: A4 portrait; margin: 0; }
    html, body { width: 210mm; height: 297mm; }
    .sidebar, .topbar, .btn, .alert { display: none !important; }
    .no-print, .report-filter { display: none !important; }
    .main-panel { margin: 0; width: 100%; }
    .panel { box-shadow: none; border: 0; }
    .content-area { padding: 0; }
    .tab-content { padding-top: 0 !important; }
    .official-report { border: 0; padding: 8mm 5mm 5mm; }
    .weapon-issue-return-form { padding: 10mm 8mm 8mm; }
    .official-report-table { page-break-inside: auto; break-inside: auto; }
    .official-report-table thead { display: table-header-group; }
    .official-report-table tfoot { display: table-footer-group; }
    .official-report-table tr { page-break-inside: avoid; break-inside: avoid; }
    .report-embedded-print-header { border: 0; padding: 0 0 4mm; }
    .report-a4-landscape { page: report-landscape; width: 297mm; min-height: 210mm; }
    .report-a4-portrait { page: report-portrait; width: 210mm; min-height: 297mm; }
    body.print-page.official-letter-page {
        width: 210mm;
        height: 297mm;
        background: #fff !important;
    }
    .discipline-letter {
        page: discipline-letter-page;
        box-shadow: none;
        margin: 0;
        width: 210mm;
        min-height: 297mm;
        break-inside: avoid;
        page-break-inside: avoid;
    }
}
@media print {
    @page id-card-page { size: 3.37in 2.1267in; margin: 0; }
    body.print-page:not(.official-letter-page) {
        width: 85.6mm;
        height: 53.98mm;
        margin: 0;
        padding: 0;
        background: #fff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .id-card-print {
        width: 3.37in;
        height: 2.1267in;
        min-height: 0;
        padding: 0;
        margin: 0;
        background: #fff !important;
        display: block;
    }
    .ppf-id-card.pro-id-card {
        width: 85.6mm;
        height: 125mm;
        border-radius: 25px;
        box-shadow: none;
        margin: 0;
        break-inside: avoid;
        page-break-inside: avoid;
    }
    .ppf-new-id-card {
        page: id-card-page;
        width: 3.37in;
        height: 2.1267in;
        border-radius: 4mm;
        box-shadow: none;
        margin: 0;
        break-inside: avoid;
        page-break-inside: avoid;
    }
    .ppf-template-id-card {
        page: id-card-page;
        width: 3.37in;
        height: 2.1267in;
        border-radius: 3.6mm;
        box-shadow: none;
        margin: 0;
        break-inside: avoid;
        page-break-inside: avoid;
    }
    body.print-page.id-card-batch-page {
        width: 3.37in;
        height: auto;
    }
    .id-card-print-batch {
        width: 3.37in;
        height: auto;
        min-height: 0;
        padding: 0;
        margin: 0;
        background: #fff !important;
        display: block;
    }
    .id-card-print-batch .ppf-template-id-card {
        margin: 0;
        page-break-after: always;
        break-after: page;
    }
    .id-card-print-batch .ppf-template-id-card:last-child {
        page-break-after: auto;
        break-after: auto;
    }
}

.command-hero { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(135deg, rgba(7, 27, 51, .96), rgba(11, 99, 206, .88)); color: #fff; box-shadow: 0 18px 42px rgba(7, 27, 51, .18); }
.command-hero span { font-size: 12px; font-weight: 900; text-transform: uppercase; opacity: .78; }
.command-hero h2 { margin: 4px 0; font-size: 28px; font-weight: 900; }
.command-hero p { margin: 0; opacity: .84; }
.command-form { display: grid; gap: 7px; }
.command-form .form-label, .emergency-panel .form-label { margin: 4px 0 0; color: var(--muted); font-size: 12px; font-weight: 900; }
.command-priority { display: inline-flex; border-radius: 999px; padding: 5px 9px; font-size: 12px; font-weight: 900; background: #dbeafe; color: #1d4ed8; }
.command-priority.high { background: #fef3c7; color: #92400e; }
.command-priority.critical { background: #fee2e2; color: #991b1b; }
.command-priority.low { background: #dcfce7; color: #166534; }
.command-chat-shell { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 12px; height: calc(100vh - 120px); min-height: 560px; }
.command-chat-side { overflow-y: auto; }
.command-group { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 9px; margin-bottom: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); }
.command-group:hover, .command-group.active { background: rgba(11, 99, 206, .08); border-color: rgba(11, 99, 206, .35); }
.command-group i { color: var(--primary); }
.command-group small { display: block; color: var(--muted); font-size: 11px; }
.command-compose { grid-template-columns: 120px minmax(0, 1fr) 210px 48px; }
.command-media-link { display: inline-flex; gap: 6px; align-items: center; margin: 4px 0 7px; font-weight: 800; }
.emergency-panel { display: grid; gap: 7px; text-align: center; }
.emergency-button { width: 96px; height: 96px; display: grid; place-items: center; margin: 0 auto 4px; border-radius: 999px; background: #dc2626; color: #fff; font-size: 38px; box-shadow: 0 18px 36px rgba(220, 38, 38, .28); }
.emergency-panel h2 { margin: 0 0 8px; font-size: 22px; font-weight: 900; }
.command-alert-card { align-items: flex-start; }
@media (max-width: 1100px) { .command-stats { grid-template-columns: repeat(2, minmax(150px, 1fr)); } .command-chat-shell { grid-template-columns: 1fr; height: auto; } .command-compose { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .command-hero { display: grid; } .command-stats { grid-template-columns: 1fr; } }

/* WhatsApp-style chat refresh */
.chat-panel .chat-head {
    background: #075e54;
    color: #fff;
}
.chat-panel .chat-head small {
    color: rgba(255, 255, 255, .78);
}
.chat-messages {
    background: #efeae2;
}
[data-theme="dark"] .chat-messages {
    background: #0b141a;
}
.chat-message.mine > div {
    background: #dcf8c6;
    border-color: #b7e7a8;
    color: #111b21;
}
.chat-message.theirs > div {
    background: #fff;
    border-color: #e7ded7;
    color: #111b21;
}
[data-theme="dark"] .chat-message.mine > div {
    background: #005c4b;
    border-color: #005c4b;
    color: #e9edef;
}
[data-theme="dark"] .chat-message.theirs > div {
    background: #202c33;
    border-color: #202c33;
    color: #e9edef;
}
.chat-message time,
.chat-message.mine time {
    color: rgba(17, 27, 33, .62);
}
[data-theme="dark"] .chat-message time,
[data-theme="dark"] .chat-message.mine time {
    color: rgba(233, 237, 239, .68);
}
.chat-read-receipt {
    display: inline-flex !important;
    justify-content: flex-end;
    margin-top: 3px;
    font-size: 13px;
}
.chat-read-receipt.sent {
    color: rgba(17, 27, 33, .58);
}
.chat-read-receipt.read {
    color: #34b7f1;
}
.chat-user:hover,
.chat-user.active {
    background: rgba(37, 211, 102, .12);
    border-color: rgba(37, 211, 102, .42);
}
.chat-user em {
    background: #25d366;
    color: #063b30;
}
.chat-compose .btn-primary {
    background: #128c7e;
    border-color: #128c7e;
}
.chat-compose .btn-primary:hover {
    background: #075e54;
    border-color: #075e54;
}


.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.chat-head-person { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 10px; min-width: 0; }
.chat-head-person h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-head-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.chat-head-actions .btn { width: 34px; height: 34px; display: inline-grid; place-items: center; padding: 0; }
.chat-avatar { position: relative; }
.chat-avatar.online::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border: 2px solid #fff; border-radius: 999px; background: #22c55e; }
.chat-body { min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 250px; }
.chat-profile-panel { min-height: 0; overflow-y: auto; border-left: 1px solid var(--line); padding: 14px; background: #f8fafc; color: #111827; }
.chat-profile-photo { width: 82px; height: 82px; margin: 0 auto 10px; border-radius: 12px; display: grid; place-items: center; overflow: hidden; border: 1px solid #d6e5fa; background: #dbeafe; color: var(--primary); font-size: 30px; font-weight: 900; }
.chat-profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.chat-profile-panel h3, .chat-profile-modal-body h3 { margin: 0; text-align: center; font-size: 17px; font-weight: 900; color: #111827; }
.chat-presence { display: block; width: fit-content; margin: 8px auto 12px; border-radius: 999px; background: #e5e7eb; color: #374151; padding: 4px 9px; font-size: 11px; font-weight: 900; }
.chat-presence.online { background: #dcfce7; color: #166534; }
.chat-profile-panel dl, .chat-profile-modal-body dl { display: grid; gap: 8px; margin: 0; }
.chat-profile-panel dl div, .chat-profile-modal-body dl div { border: 1px solid #e5e7eb; border-radius: 7px; padding: 8px; background: #fff; }
.chat-profile-panel dt, .chat-profile-modal-body dt { color: #64748b; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.chat-profile-panel dd, .chat-profile-modal-body dd { margin: 2px 0 0; color: #111827; font-size: 13px; font-weight: 800; overflow-wrap: anywhere; }
.chat-profile-modal-body { display: grid; gap: 8px; }
.chat-profile-modal-body p { margin: 0 0 8px; text-align: center; color: var(--muted); font-weight: 800; }
.chat-image-link { display: block; margin-bottom: 5px; }
.chat-image-link img { display: block; width: min(260px, 100%); max-height: 280px; border-radius: 9px; object-fit: cover; }
.chat-file-link { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 9px; min-width: min(280px, 100%); margin-bottom: 5px; border-radius: 9px; padding: 9px; background: rgba(15, 23, 42, .08); color: inherit; text-decoration: none; }
.chat-file-link i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; background: rgba(255, 255, 255, .7); color: #0f766e; }
.chat-file-link strong, .chat-file-link small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-file-link small { color: inherit; opacity: .7; font-size: 11px; }
.chat-compose { grid-template-columns: 42px minmax(0, 1fr) minmax(90px, auto) 46px; align-items: end; }
.chat-attach-button { width: 42px; height: 44px; display: inline-grid; place-items: center; padding: 0; border-radius: 8px; }
.chat-file-name { align-self: center; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; font-weight: 800; }
.chat-compose .btn-primary { width: 46px; height: 44px; display: inline-grid; place-items: center; padding: 0; }
@media (max-width: 1100px) { .chat-body { grid-template-columns: 1fr; } .chat-profile-panel { display: none; } }
@media (max-width: 700px) { .chat-head { align-items: flex-start; } .chat-head-actions { flex-wrap: wrap; justify-content: flex-end; } .chat-compose { grid-template-columns: 42px minmax(0, 1fr) 46px; } .chat-file-name { grid-column: 2 / -1; max-width: 100%; } }
.config-checkbox-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.config-check-item { border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px 10px 34px; background: #fff; min-height: 44px; display: flex; align-items: center; }
.config-check-item .form-check-input { margin-left: -22px; }
.official-report-signature { width: min(100%, 126mm); margin: auto 0 2mm auto; padding-top: 8mm; display: grid; justify-items: center; gap: 1mm; color: #111827; font-weight: 800; }
.official-report-signature .letter-signature-line { margin-top: 0; }
.official-report-signature .letter-signer-name { min-height: 6mm; }
.soldier-file-signature.soldier-file-signature-configured { grid-template-columns: 1fr; justify-items: center; gap: 1mm; width: min(100%, 126mm); margin-left: auto; }
.soldier-file-signature.soldier-file-signature-configured .letter-signature-line { margin-top: 0; }
.official-report-signature strong,
.official-report-signature .letter-signer-name,
.soldier-file-signature.soldier-file-signature-configured strong,
.soldier-file-signature.soldier-file-signature-configured span {
    text-transform: uppercase;
}
.letter-signer-position { display: block; max-width: 100%; font-family: var(--letter-font-family, "Times New Roman"), Times, serif; font-size: 12pt; line-height: 1.12; font-weight: 900; text-transform: uppercase; overflow-wrap: anywhere; }
.official-report-signature .letter-signer-position,
.soldier-file-signature.soldier-file-signature-configured .letter-signer-position { text-transform: uppercase; }
.letter-signer-position { font-size: inherit; line-height: inherit; }
.letter-footer,
.official-report-signature,
.soldier-file-signature.soldier-file-signature-configured {
    font-size: 14pt;
}
