:root {
  --bg: #f2f5f3;
  --surface: #ffffff;
  --surface-soft: #f7faf8;
  --ink: #18231f;
  --muted: #6d7974;
  --line: #dbe4df;
  --primary: #123f36;
  --primary-2: #1f6254;
  --accent: #e7b94a;
  --danger: #ad332d;
  --warning: #9a6415;
  --success: #16714f;
  --shadow: 0 16px 45px rgba(21, 50, 42, .09);
  --radius: 18px;
  --sidebar: 272px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.eyebrow { margin: 0 0 4px; color: var(--primary-2); font-size: 11px; line-height: 1.2; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.eyebrow.light { color: #b8d9d0; }
h1, h2, h3, p { margin-top: 0; }
code { border-radius: 6px; padding: 2px 6px; background: #edf2ef; }

.boot-screen, .center-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.boot-card, .setup-card { display: flex; flex-direction: column; align-items: center; gap: 12px; width: min(520px, 100%); padding: 34px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); text-align: center; }
.boot-card img { animation: pulse 1.3s ease-in-out infinite; }
.boot-card span { color: var(--muted); font-size: 14px; }
@keyframes pulse { 50% { transform: scale(.95); opacity: .75; } }
.brand-lockup { display: flex; align-items: center; gap: 14px; text-align: left; }
.brand-lockup h1, .brand-lockup h2 { margin: 0; line-height: 1.15; }

.login-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(380px, .85fr); }
.login-visual { position: relative; display: flex; align-items: flex-end; overflow: hidden; padding: clamp(40px, 7vw, 100px); background: radial-gradient(circle at 76% 20%, rgba(231,185,74,.28), transparent 24%), linear-gradient(145deg, #0c3029 0%, #174f44 55%, #246d5e 100%); color: white; }
.login-visual::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(to top, black, transparent); }
.login-visual-inner { position: relative; z-index: 1; max-width: 700px; }
.login-visual h1 { margin-bottom: 18px; font-size: clamp(38px, 5vw, 68px); line-height: 1.02; letter-spacing: -.04em; }
.login-visual p { max-width: 650px; color: #d9ebe6; font-size: clamp(16px, 1.5vw, 20px); line-height: 1.7; }
.feature-pills { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 28px; }
.feature-pills span { padding: 9px 13px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; background: rgba(255,255,255,.08); color: #fff; font-size: 13px; }
.login-panel { display: grid; place-items: center; padding: 34px; background: #f8faf9; }
.auth-card { width: min(430px, 100%); padding: 34px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.auth-card .brand-lockup { margin-bottom: 32px; }
.auth-note { margin: 20px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; text-align: center; }

.btn { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 11px; padding: 10px 16px; font-weight: 750; transition: transform .15s ease, opacity .15s ease, background .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { cursor: not-allowed; opacity: .56; transform: none; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: #0d332c; }
.btn-soft { border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.btn-light { background: white; color: var(--primary); }
.btn-danger { background: var(--danger); color: white; }
.btn-block { width: 100%; }
.btn-small { min-height: 34px; padding: 7px 10px; font-size: 12px; }
.text-btn { border: 0; background: transparent; color: var(--primary-2); font-weight: 750; }
.icon-btn { display: grid; place-items: center; width: 42px; border: 0; background: transparent; color: var(--muted); }

.field { min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.field > span { color: #34413c; font-size: 12px; font-weight: 750; }
.field input, .field select, .field textarea { width: 100%; min-height: 44px; border: 1px solid #cdd8d2; border-radius: 11px; padding: 10px 12px; outline: 0; background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.field textarea { min-height: 90px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary-2); box-shadow: 0 0 0 3px rgba(31,98,84,.12); }
.field input[readonly] { background: #f0f4f2; color: #59655f; }
.field small { align-self: flex-end; color: var(--muted); font-size: 11px; }
.password-wrap { display: flex; border: 1px solid #cdd8d2; border-radius: 11px; overflow: hidden; background: #fff; }
.password-wrap:focus-within { border-color: var(--primary-2); box-shadow: 0 0 0 3px rgba(31,98,84,.12); }
.password-wrap input { border: 0; box-shadow: none !important; }
.form-message { min-height: 18px; margin: 12px 0 0; color: var(--danger); font-size: 13px; }
.form-message.success { color: var(--success); }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; width: var(--sidebar); min-width: 0; display: flex; flex-direction: column; overflow: hidden; padding: 18px 14px; background: #0e3029; color: white; }
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 22px; }
.sidebar-brand img { border-radius: 12px; }
.sidebar-brand strong, .sidebar-brand span { display: block; }
.sidebar-brand strong { font-size: 17px; }
.sidebar-brand span { margin-top: 2px; color: #a9c6be; font-size: 11px; }
.main-nav { display: flex; flex: 1; flex-direction: column; gap: 5px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 11px; border: 0; border-radius: 11px; padding: 11px 12px; background: transparent; color: #ccddd8; font-weight: 700; text-align: left; }
.nav-item span { width: 20px; color: #9fc2b9; font-size: 18px; text-align: center; }
.nav-item:hover, .nav-item.active { background: rgba(255,255,255,.1); color: #fff; }
.nav-item.active::after { content: ""; width: 4px; height: 18px; margin-left: auto; border-radius: 999px; background: var(--accent); }
.nav-separator { height: 1px; margin: 8px 6px; background: rgba(255,255,255,.12); }
.sidebar-footer { min-width: 0; display: grid; gap: 8px; margin-top: 14px; }
.user-card { width: 100%; min-width: 0; display: grid; grid-template-columns: 36px minmax(0,1fr); align-items: center; gap: 10px; overflow: hidden; border: 1px solid rgba(255,255,255,.1); border-radius: 13px; padding: 10px; background: rgba(255,255,255,.06); color: white; text-align: left; }
.avatar { flex: 0 0 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: var(--accent); color: #2c260f; font-weight: 900; }
.user-card-text { min-width: 0; display: grid; gap: 2px; overflow: hidden; }
.user-card-text strong, .user-card-text small, .user-card-role { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card-text strong { font-size: 12px; line-height: 1.3; }
.user-card-role { color: #f0cf76; font-size: 10px; font-weight: 800; line-height: 1.3; }
.user-card-text small { color: #a9c6be; font-size: 9.5px; line-height: 1.35; }
.logout-btn { border: 0; border-radius: 10px; padding: 9px; background: transparent; color: #d3e2de; font-weight: 700; }
.logout-btn:hover { background: rgba(255,255,255,.08); }

.app-main { min-height: 100vh; margin-left: var(--sidebar); }
.topbar { position: sticky; z-index: 20; top: 0; min-height: 84px; display: flex; align-items: center; gap: 16px; padding: 15px clamp(18px, 3vw, 42px); border-bottom: 1px solid rgba(210,220,215,.8); background: rgba(242,245,243,.92); backdrop-filter: blur(14px); }
.topbar h1 { margin: 0; font-size: 25px; line-height: 1.1; letter-spacing: -.02em; }
.topbar-actions { display: flex; align-items: center; gap: 9px; margin-left: auto; }
.menu-btn { display: none; border: 0; border-radius: 9px; padding: 8px 10px; background: var(--surface); color: var(--ink); font-size: 20px; }
.connection-badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 7px 10px; font-size: 11px; font-weight: 800; }
.connection-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.connection-badge.online { background: #dff3ea; color: #176949; }
.connection-badge.offline { background: #f6e5dd; color: #9b402f; }
.content { width: 100%; max-width: 1680px; margin: 0 auto; padding: clamp(18px, 2.4vw, 36px); }
.page { display: none; }
.page.active { display: block; animation: pageIn .18s ease; }
@keyframes pageIn { from { opacity: .3; transform: translateY(3px); } }

.welcome-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; overflow: hidden; padding: clamp(26px, 4vw, 42px); border-radius: 22px; background: radial-gradient(circle at 88% 0, rgba(231,185,74,.25), transparent 27%), linear-gradient(135deg, #123f36, #1d6253); color: white; box-shadow: var(--shadow); }
.welcome-card h2 { margin-bottom: 9px; font-size: clamp(27px, 3vw, 40px); letter-spacing: -.035em; }
.welcome-card p:last-child { max-width: 720px; margin: 0; color: #d9e9e5; line-height: 1.6; }
.stats-grid { display: grid; grid-template-columns: minmax(0,1.45fr) repeat(3, minmax(0,1fr)); gap: 14px; margin: 18px 0; }
.stat-card { min-height: 145px; display: flex; flex-direction: column; justify-content: space-between; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 6px 25px rgba(30,53,46,.04); }
.stat-card > span { color: var(--muted); font-size: 12px; font-weight: 700; }
.stat-card strong { overflow: hidden; color: var(--primary); font-size: clamp(27px, 3vw, 38px); letter-spacing: -.04em; text-overflow: ellipsis; white-space: nowrap; }
#statLastNumber { overflow: visible; font-size: clamp(17px, 1.7vw, 23px); line-height: 1.2; overflow-wrap: normal; word-break: normal; white-space: normal; }
.stat-card small { color: var(--muted); font-size: 11px; }
.two-column { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(300px,.65fr); gap: 18px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(17px, 2.3vw, 26px); background: var(--surface); box-shadow: 0 7px 28px rgba(23,52,44,.045); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.panel-head h3 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.wrap-head { flex-wrap: wrap; }
.recent-list { display: grid; }
.recent-item { display: grid; grid-template-columns: minmax(220px, .9fr) minmax(0,1.3fr) auto; gap: 14px; align-items: center; padding: 13px 0; border-top: 1px solid #ebf0ed; }
.recent-item:first-child { border-top: 0; }
.recent-number { color: var(--primary); font-size: 12px; font-weight: 850; line-height: 1.35; overflow-wrap: anywhere; }
.recent-main strong, .recent-main span { display: block; }
.recent-main strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.recent-main span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.steps { display: grid; gap: 15px; margin: 0; padding-left: 22px; color: #46524d; font-size: 13px; line-height: 1.55; }
.empty-state { padding: 28px; border: 1px dashed #cfdbd5; border-radius: 13px; color: var(--muted); font-size: 13px; text-align: center; }

.form-panel { max-width: 1000px; margin: 0 auto; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.field-wide { grid-column: 1 / -1; }
.required-note { color: var(--muted); font-size: 11px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.issue-warning { display: flex; flex-direction: column; gap: 4px; margin-top: 18px; border-left: 4px solid var(--accent); border-radius: 0 10px 10px 0; padding: 13px 15px; background: #fff9ea; color: #654c13; font-size: 12px; }
.notice-banner { display: flex; flex-direction: column; gap: 4px; max-width: 1000px; margin: 0 auto 14px; border: 1px solid #c7dded; border-radius: 13px; padding: 13px 16px; background: #eef8ff; color: #1f587b; font-size: 12px; }
.template-help { margin-top: 16px; border-radius: 10px; padding: 12px 14px; background: var(--surface-soft); color: var(--muted); font-size: 12px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-grid { display: grid; grid-template-columns: 1.4fr repeat(4,minmax(130px,.8fr)) auto; gap: 11px; align-items: end; margin-bottom: 20px; padding: 15px; border-radius: 14px; background: var(--surface-soft); }
.filter-actions { display: flex; gap: 7px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 13px; }
.data-table { width: 100%; min-width: 1050px; border-collapse: collapse; font-size: 12px; }
.data-table th { padding: 11px 13px; background: #eef3f0; color: #3b4943; font-size: 10px; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
.data-table td { padding: 12px 13px; border-top: 1px solid #e8eeeb; vertical-align: top; }
.data-table tr:hover td { background: #fbfdfc; }
.table-number { color: var(--primary); font-weight: 850; white-space: nowrap; }
.table-subject { max-width: 300px; }
.table-subject strong, .table-subject span { display: block; }
.table-subject span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.table-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.table-empty { padding: 34px !important; color: var(--muted); text-align: center; }
.status-badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 8px; font-size: 10px; font-weight: 850; white-space: nowrap; }
.status-issued { background: #dff4e9; color: #166844; }
.status-corrected { background: #e9eefc; color: #395d9d; }
.status-cancelled { background: #f8e4e1; color: #9b3832; }
.status-locked { background: #eee9f8; color: #624695; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; color: var(--muted); font-size: 12px; }
.pagination > div { display: flex; align-items: center; gap: 9px; }

.card-list { display: grid; gap: 10px; }
.register-card { display: grid; grid-template-columns: minmax(180px,.85fr) minmax(0,1.5fr) auto; gap: 16px; align-items: center; border: 1px solid var(--line); border-radius: 13px; padding: 14px; }
.register-card-number { color: var(--primary); font-weight: 850; }
.register-card-main strong, .register-card-main span { display: block; }
.register-card-main span { margin-top: 4px; color: var(--muted); font-size: 11px; }

.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.tab { border: 0; border-bottom: 3px solid transparent; padding: 10px 13px; background: transparent; color: var(--muted); font-weight: 750; white-space: nowrap; }
.tab.active { border-bottom-color: var(--primary); color: var(--primary); }
.master-toolbar { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.inline-form { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)) auto; gap: 9px; margin-bottom: 15px; padding: 13px; border-radius: 12px; background: var(--surface-soft); }
.master-list { display: grid; gap: 7px; }
.master-row { display: grid; grid-template-columns: minmax(120px,.6fr) minmax(0,1.4fr) auto; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 11px; padding: 11px 12px; font-size: 12px; }
.master-row small { color: var(--muted); }
.audit-list { display: grid; }
.audit-item { display: grid; grid-template-columns: 155px minmax(130px,.6fr) minmax(0,1.4fr); gap: 14px; padding: 13px 0; border-top: 1px solid #e8eeeb; font-size: 12px; }
.audit-item:first-child { border-top: 0; }
.audit-time { color: var(--muted); }
.audit-item strong, .audit-item span { display: block; }
.audit-item span { margin-top: 3px; color: var(--muted); }
.profile-panel { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: start; max-width: 860px; margin: 0 auto; }
.profile-avatar { width: 92px; height: 92px; display: grid; place-items: center; border-radius: 25px; background: linear-gradient(145deg,var(--primary),var(--primary-2)); color: white; font-size: 36px; font-weight: 900; }
.profile-info h3 { margin-bottom: 18px; font-size: 27px; }
.profile-info dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin: 0; }
.profile-info dl div { border-radius: 11px; padding: 11px; background: var(--surface-soft); }
.profile-info dt { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.profile-info dd { margin: 5px 0 0; font-size: 13px; font-weight: 700; }

.modal { width: min(620px, calc(100% - 24px)); max-height: calc(100vh - 30px); border: 0; border-radius: 20px; padding: 0; background: transparent; }
.modal::backdrop { background: rgba(8,26,21,.58); backdrop-filter: blur(3px); }
.modal-card { position: relative; overflow-y: auto; max-height: calc(100vh - 30px); padding: 28px; border-radius: 20px; background: white; box-shadow: 0 28px 90px rgba(7,25,20,.25); }
.modal-wide { width: min(760px, 100%); }
.modal-close { position: absolute; top: 13px; right: 13px; width: 34px; height: 34px; border: 0; border-radius: 10px; background: #eef3f0; color: var(--muted); font-size: 20px; }
.modal-card h2 { margin-bottom: 18px; }
.modal-subtitle { color: var(--muted); }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; margin-top: 20px; }
.result-card { text-align: center; }
.success-icon { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 14px; border-radius: 50%; background: #daf1e6; color: var(--success); font-size: 28px; font-weight: 900; }
.result-card h2 { overflow-wrap: anywhere; color: var(--primary); font-size: clamp(23px,4vw,34px); }
.result-details { display: grid; gap: 7px; border-radius: 12px; padding: 14px; background: var(--surface-soft); color: var(--muted); font-size: 12px; text-align: left; }
.result-details div { display: flex; justify-content: space-between; gap: 15px; }
.toast-region { position: fixed; z-index: 100; right: 18px; bottom: 18px; display: grid; gap: 8px; width: min(360px, calc(100% - 36px)); }
.toast { border-left: 4px solid var(--primary); border-radius: 11px; padding: 12px 14px; background: #fff; box-shadow: var(--shadow); font-size: 12px; animation: toastIn .2s ease; }
.toast.error { border-left-color: var(--danger); }
.toast.success { border-left-color: var(--success); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }
.sidebar-backdrop { display: none; }

@media (max-width: 1180px) {
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .filter-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .filter-actions { grid-column: span 1; }
}
@media (max-width: 900px) {
  :root { --sidebar: 276px; }
  .login-screen { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-panel { min-height: 100vh; }
  .sidebar { transform: translateX(-105%); box-shadow: 20px 0 60px rgba(7,25,20,.25); transition: transform .22s ease; }
  .sidebar.open { transform: translateX(0); }
  .app-main { margin-left: 0; }
  .menu-btn { display: block; }
  .sidebar-backdrop { position: fixed; z-index: 25; inset: 0; display: none; background: rgba(7,25,20,.46); }
  .sidebar-backdrop.show { display: block; }
  .two-column { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .content { padding: 14px; }
  .topbar { min-height: 72px; padding: 12px 14px; }
  .topbar h1 { font-size: 20px; }
  .topbar .btn { display: none; }
  .connection-badge { padding: 6px 8px; }
  .welcome-card { align-items: flex-start; flex-direction: column; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .stat-card { min-height: 118px; padding: 15px; }
  .stat-card strong { font-size: 27px; }
  .form-grid, .filter-grid, .inline-form { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .filter-actions { grid-column: auto; }
  .form-actions, .modal-actions { align-items: stretch; flex-direction: column-reverse; }
  .form-actions .btn, .modal-actions .btn { width: 100%; }
  .recent-item, .register-card, .audit-item { grid-template-columns: 1fr; gap: 7px; }
  .recent-item > :last-child { justify-self: start; }
  .profile-panel { grid-template-columns: 1fr; }
  .profile-info dl { grid-template-columns: 1fr; }
  .profile-actions .btn { width: 100%; }
  .panel { border-radius: 15px; padding: 16px; }
  .auth-card { padding: 24px; }
}
@media (max-width: 420px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 104px; }
  .pagination { align-items: stretch; flex-direction: column; }
  .pagination > div { justify-content: space-between; }
}

@media print {
  body { background: white; }
  .sidebar, .topbar, .filter-grid, .toolbar, .pagination, .table-actions, .toast-region { display: none !important; }
  .app-main { margin: 0; }
  .content { padding: 0; }
  .page { display: none !important; }
  #page-register { display: block !important; }
  #page-register .panel { border: 0; padding: 0; box-shadow: none; }
  #page-register .panel-head { display: block; margin-bottom: 16px; }
  #page-register .panel-head::after { content: "Kecamatan Palabuhanratu"; color: #555; font-size: 11px; }
  .table-wrap { overflow: visible; border: 1px solid #999; }
  .data-table { min-width: 0; font-size: 9px; }
  .data-table th, .data-table td { padding: 6px; border: 1px solid #aaa; }
  .data-table th:last-child, .data-table td:last-child { display: none; }
  @page { size: A4 portrait; margin: 10mm; }
}

/* v1.0.4 - administrasi lengkap dan perapihan layout */
.panel-description { max-width: 720px; margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.master-caption { margin: -4px 0 14px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.inline-form-signatory { grid-template-columns: repeat(4,minmax(0,1fr)) auto; }
.master-row-profile { grid-template-columns: minmax(170px,.65fr) minmax(260px,1.35fr) minmax(260px,auto); }
.master-row .table-actions { justify-content: flex-end; }
.field input:disabled, .field select:disabled, .field textarea:disabled { cursor: not-allowed; background: #edf1ef; color: #74807a; opacity: 1; }
.modal-card .form-grid { align-items: start; }

@media (max-width: 1180px) {
  .master-row-profile { grid-template-columns: minmax(160px,.65fr) minmax(220px,1.35fr); }
  .master-row-profile .table-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .inline-form-signatory { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .inline-form-signatory .btn { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  .master-row, .master-row-profile { grid-template-columns: 1fr; gap: 8px; }
  .master-row .table-actions, .master-row-profile .table-actions { grid-column: auto; justify-content: stretch; }
  .master-row .table-actions .btn { flex: 1 1 auto; }
  .inline-form-signatory { grid-template-columns: 1fr; }
  .inline-form-signatory .btn { grid-column: auto; }
  .tabs { margin-inline: -4px; padding-inline: 4px; }
}
