:root {
    --navy: #0c1730;
    --navy-2: #111f3e;
    --blue: #1769e0;
    --blue-2: #3f8cff;
    --cyan: #24b7d3;
    --green: #189b63;
    --red: #d94a4a;
    --amber: #d98b19;
    --bg: #f4f7fb;
    --card: #ffffff;
    --text: #172033;
    --muted: #6d778b;
    --line: #e3e9f2;
    --shadow: 0 18px 50px rgba(24, 40, 72, .08);
    --radius: 16px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; min-height: 100%; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text); background: var(--bg); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
code { background: #eef3fb; color: #295791; padding: 3px 7px; border-radius: 6px; font-size: .84rem; }
small { color: var(--muted); display: block; margin-top: 4px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.eyebrow { display: inline-block; color: var(--blue); font-weight: 800; font-size: .72rem; letter-spacing: .13em; text-transform: uppercase; margin-bottom: 9px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 268px 1fr; }
.sidebar { background: linear-gradient(180deg, var(--navy), #081122); color: #dce6f7; min-height: 100vh; padding: 24px 18px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; z-index: 30; }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px; }
.brand strong { color: #fff; letter-spacing: .08em; font-size: 1rem; display: block; }
.brand small { color: #8fa4c7; font-size: .72rem; margin: 1px 0 0; }
.brand.centered { justify-content: center; margin-bottom: 24px; }
.brand-mark { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, var(--blue-2), var(--cyan)); box-shadow: 0 12px 30px rgba(32, 132, 234, .32); font-weight: 900; font-size: 1.2rem; }
.brand-mark.large { width: 54px; height: 54px; border-radius: 15px; font-size: 1.5rem; }
.nav { margin-top: 34px; display: flex; flex-direction: column; gap: 5px; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 11px 13px; color: #aebcd2; border-radius: 10px; font-weight: 650; font-size: .91rem; transition: .18s ease; }
.nav-link:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-link.active { color: #fff; background: linear-gradient(90deg, rgba(38,126,241,.28), rgba(31,183,211,.12)); box-shadow: inset 3px 0 0 var(--blue-2); }
.nav-icon { width: 22px; text-align: center; font-size: 1.05rem; }
.nav-separator { height: 1px; background: rgba(255,255,255,.08); margin: 12px 8px; }
.sidebar-footer { margin-top: auto; border-top: 1px solid rgba(255,255,255,.09); padding: 18px 7px 2px; }
.profile { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: rgba(63,140,255,.2); color: #fff; font-weight: 800; }
.profile-text strong { display: block; color: #fff; font-size: .88rem; }
.profile-text small { font-size: .7rem; margin: 1px 0 0; color: #8fa4c7; }
.link-button { border: 0; background: transparent; color: #9fb1cd; padding: 0; font-size: .82rem; }
.link-button:hover { color: #fff; }

.main { min-width: 0; }
.topbar { min-height: 91px; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 18px 30px; position: sticky; top: 0; z-index: 20; backdrop-filter: blur(12px); }
.topbar h1 { margin: 0 0 4px; font-size: 1.45rem; letter-spacing: -.02em; }
.topbar p { margin: 0; color: var(--muted); font-size: .84rem; }
.security-pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid #d7e7dc; background: #f1fbf5; color: #167147; border-radius: 999px; padding: 8px 12px; font-size: .78rem; font-weight: 750; }
.security-pill span { width: 8px; height: 8px; border-radius: 50%; background: #25ad70; box-shadow: 0 0 0 4px rgba(37,173,112,.12); }
.mobile-menu { display: none; border: 0; background: #edf3fb; width: 40px; height: 40px; border-radius: 10px; color: var(--navy); }
.content { padding: 28px 30px 44px; max-width: 1720px; margin: 0 auto; }

.grid { display: grid; gap: 20px; }
.stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 20px; }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; align-items: center; gap: 15px; box-shadow: var(--shadow); }
.stat-card span { color: var(--muted); font-size: .78rem; font-weight: 700; }
.stat-card strong { display: block; font-size: 1.95rem; margin-top: 3px; letter-spacing: -.04em; }
.stat-card small { font-size: .72rem; }
.stat-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-weight: 900; font-size: 1.1rem; flex: 0 0 auto; }
.stat-icon.blue { color: #1d64bd; background: #eaf3ff; }
.stat-icon.green { color: #168a59; background: #e9f8f0; }
.stat-icon.red { color: #c74444; background: #fff0f0; }
.stat-icon.amber { color: #b97012; background: #fff6e7; }
.compact-stats .stat-card { padding: 16px 18px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card-header { padding: 20px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.card-header > div:first-child { min-width: 0; }
.card-header h2, .card h2 { margin: 0; font-size: 1.05rem; letter-spacing: -.01em; }
.card-header p { margin: 5px 0 0; color: var(--muted); font-size: .78rem; }
.dashboard-grid { grid-template-columns: minmax(0, 1.8fr) minmax(300px, .7fr); margin-bottom: 20px; }
.job-detail-grid { grid-template-columns: minmax(0, 1.75fr) minmax(320px, .7fr); margin-top: 20px; }
.settings-grid { grid-template-columns: minmax(0, 1.55fr) minmax(300px, .65fr); }
.wizard-grid { display: grid; grid-template-columns: minmax(360px, .78fr) minmax(520px, 1.22fr); gap: 20px; align-items: start; }

.btn { border: 1px solid transparent; border-radius: 9px; min-height: 40px; padding: 9px 15px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 750; font-size: .84rem; transition: .16s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--blue), #2787ee); color: #fff; box-shadow: 0 8px 20px rgba(23,105,224,.2); }
.btn-secondary { background: #f5f8fc; border-color: #dbe4ef; color: #31425f; }
.btn-ghost { background: transparent; color: #53637e; }
.btn-danger { background: linear-gradient(135deg, #c93d3d, #e15a5a); color: #fff; box-shadow: 0 8px 20px rgba(217,74,74,.18); }
.btn-sm { min-height: 32px; padding: 6px 10px; font-size: .75rem; border-radius: 8px; }
.btn-block { width: 100%; }

.alert { padding: 13px 15px; border-radius: 10px; border: 1px solid; margin-bottom: 18px; font-size: .85rem; font-weight: 650; }
.alert-success { color: #166d49; background: #effaf4; border-color: #cbead8; }
.alert-danger { color: #9d3333; background: #fff2f2; border-color: #f1cece; }
.notice { margin: 18px 22px 22px; border: 1px solid #d8e7fb; background: #f5f9ff; border-radius: 11px; padding: 13px 15px; }
.notice strong { font-size: .85rem; }
.notice p { color: #5f6f88; font-size: .78rem; margin: 4px 0 0; line-height: 1.5; }
.danger-soft { border-color: #f1d6d6; background: #fff7f7; }

.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th { color: #748098; background: #fbfcfe; text-align: left; font-size: .68rem; letter-spacing: .055em; text-transform: uppercase; font-weight: 850; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 13px 16px; border-bottom: 1px solid #edf1f6; font-size: .8rem; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fbfdff; }
td strong { display: block; font-size: .82rem; }
td small { font-size: .69rem; max-width: 370px; overflow: hidden; text-overflow: ellipsis; }
.table-link { color: var(--blue); font-weight: 850; }
.empty-cell { text-align: center; color: var(--muted); padding: 30px; }
.detail-cell { max-width: 320px; color: var(--muted); }

.status { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; padding: 5px 8px; font-size: .63rem; font-weight: 900; letter-spacing: .04em; white-space: nowrap; }
.status.large { padding: 8px 12px; font-size: .72rem; }
.status-succeeded, .status-success { color: #16724a; background: #eaf8f0; }
.status-failed, .status-failure, .status-denied { color: #a33a3a; background: #fff0f0; }
.status-running { color: #1c67b8; background: #eaf3ff; }
.status-queued, .status-pending { color: #946011; background: #fff6e6; }
.status-skipped, .status-blocked, .status-cancelled, .status-neutral, .status-info { color: #5d6675; background: #edf0f5; }
.tag { display: inline-block; padding: 5px 8px; border-radius: 7px; background: #eef4fb; color: #4a617f; font-size: .67rem; font-weight: 800; }

.mini-progress { width: 92px; height: 6px; background: #e9edf3; border-radius: 999px; overflow: hidden; display: inline-block; vertical-align: middle; margin-right: 7px; }
.mini-progress span, .progress-large span { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--cyan)); border-radius: inherit; transition: width .35s ease; }
.progress-large { height: 12px; border-radius: 999px; background: #e7edf5; overflow: hidden; margin: 22px 0 12px; }
.progress-meta { display: flex; flex-wrap: wrap; gap: 18px; color: var(--muted); font-size: .78rem; align-items: baseline; }
.progress-meta strong { font-size: 1.2rem; color: var(--text); }

.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: .76rem; font-weight: 800; color: #3d4d68; }
.field small { font-size: .69rem; line-height: 1.45; }
input, select, textarea { width: 100%; border: 1px solid #d9e1ec; border-radius: 9px; background: #fff; color: var(--text); padding: 10px 11px; outline: none; transition: .15s ease; }
input:focus, select:focus, textarea:focus { border-color: #77aaf0; box-shadow: 0 0 0 3px rgba(23,105,224,.10); }
textarea { resize: vertical; min-height: 90px; }
.form-stack { display: flex; flex-direction: column; gap: 15px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 20px 22px; }
.form-stack:not(.auth-card .form-stack) { padding: 20px 22px; }
.form-actions { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; border-top: 1px solid var(--line); }
.sticky-actions { position: sticky; bottom: 0; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); z-index: 4; }
.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 13px 0; border-bottom: 1px solid #edf1f5; }
.switch-row.compact { margin: 0 22px; }
.switch-row strong { display: block; font-size: .81rem; }
.switch-row small { max-width: 420px; font-size: .69rem; }
.switch-row input[type="checkbox"] { appearance: none; width: 42px; height: 23px; background: #cdd5df; border: 0; border-radius: 999px; position: relative; flex: 0 0 auto; padding: 0; }
.switch-row input[type="checkbox"]::after { content: ""; width: 17px; height: 17px; background: #fff; border-radius: 50%; position: absolute; left: 3px; top: 3px; box-shadow: 0 2px 5px rgba(0,0,0,.16); transition: .18s; }
.switch-row input[type="checkbox"]:checked { background: var(--blue); }
.switch-row input[type="checkbox"]:checked::after { transform: translateX(19px); }

.step { width: 28px; height: 28px; border-radius: 8px; background: #eaf3ff; color: var(--blue); display: inline-grid; place-items: center; font-weight: 900; margin-right: 9px; float: left; }
.selection-actions { display: flex; gap: 6px; }
.search-box { min-width: 210px; }
.search-box input { min-height: 36px; padding: 8px 11px; font-size: .78rem; }
.search-box.full { padding: 14px 22px; border-bottom: 1px solid var(--line); }
.system-selector { max-height: 630px; overflow: auto; padding: 10px 14px; }
.system-option { display: flex; align-items: center; gap: 12px; border: 1px solid transparent; border-radius: 10px; padding: 10px 9px; transition: .14s; }
.system-option:hover { background: #f7faff; border-color: #e1eaf5; }
.system-option input { width: 17px; height: 17px; flex: 0 0 auto; }
.system-option span { min-width: 0; flex: 1; }
.system-option strong { display: block; font-size: .79rem; }
.system-option small { font-size: .67rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.system-option em { font-style: normal; color: var(--blue); font-size: .65rem; font-weight: 800; }
.system-option.disabled { opacity: .48; background: #fafafa; }
.schema-definition, .risk-options { border-top: 1px solid var(--line); padding-bottom: 20px; }
.schema-definition h3, .risk-options h3 { margin: 20px 22px 0; font-size: .9rem; }
.risk-options { padding-top: 4px; }

.job-hero { padding: 23px; }
.job-heading { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.job-heading h2 { font-size: 1.24rem; margin: 0 0 5px; }
.job-heading p { margin: 0; color: var(--muted); font-size: .78rem; }
.approval-box { margin-top: 20px; background: #fff9ec; border: 1px solid #f2dfae; border-radius: 12px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.approval-box strong { font-size: .85rem; }
.approval-box p { margin: 4px 0 0; color: #806638; font-size: .75rem; }
.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form input { width: 190px; }
.cancel-form { margin-top: 15px; }
.log-list { max-height: 660px; overflow: auto; padding: 13px 18px 20px; }
.log-entry { display: grid; grid-template-columns: 54px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid #edf1f5; }
.log-entry time { color: #8792a6; font-size: .65rem; }
.log-entry strong { font-size: .75rem; }
.log-entry p { margin: 3px 0 0; color: var(--muted); font-size: .72rem; line-height: 1.42; }
.log-error { border-left: 3px solid var(--red); padding-left: 9px; }
.log-warning { border-left: 3px solid var(--amber); padding-left: 9px; }

.alert-list { padding: 12px 18px 20px; }
.alert-item { display: flex; gap: 11px; padding: 12px 0; border-bottom: 1px solid #edf1f5; }
.alert-item:last-child { border-bottom: 0; }
.alert-dot { width: 9px; height: 9px; background: var(--red); border-radius: 50%; margin-top: 5px; flex: 0 0 auto; box-shadow: 0 0 0 4px rgba(217,74,74,.1); }
.alert-item strong { font-size: .78rem; }
.alert-item p { margin: 3px 0; color: #5f6c80; font-size: .71rem; }
.alert-item small { font-size: .66rem; line-height: 1.35; }
.empty-inline { display: flex; gap: 11px; align-items: center; color: #347154; padding: 18px 2px; }
.empty-inline span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #eaf8f0; font-weight: 900; }
.empty-inline p { font-size: .77rem; }
.security-overview { padding: 24px; display: flex; justify-content: space-between; align-items: center; gap: 30px; background: linear-gradient(135deg, #fff, #f3f8ff); }
.security-overview p { color: var(--muted); max-width: 710px; line-height: 1.55; font-size: .82rem; margin: 7px 0 0; }
.security-points { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; min-width: 350px; }
.security-points span { font-size: .7rem; color: #35547c; border: 1px solid #dce8f7; background: rgba(255,255,255,.75); border-radius: 8px; padding: 9px; font-weight: 750; }

.modal { width: min(560px, calc(100vw - 32px)); border: 0; border-radius: 16px; padding: 0; box-shadow: 0 30px 100px rgba(9,23,47,.28); }
.modal::backdrop { background: rgba(6,15,31,.56); backdrop-filter: blur(3px); }
.modal-header { display: flex; justify-content: space-between; padding: 19px 21px; border-bottom: 1px solid var(--line); }
.modal-header h3 { margin: 0; font-size: 1rem; }
.modal-header p { margin: 4px 0 0; color: var(--muted); font-size: .74rem; }
.modal-close { width: 34px; height: 34px; border: 0; border-radius: 9px; background: #f0f3f7; font-size: 1.2rem; }
.modal .form-stack { padding: 10px 21px 4px; }
.modal-actions { border-top: 1px solid var(--line); padding: 14px 21px; display: flex; justify-content: flex-end; gap: 8px; }

.secure-list { list-style: none; padding: 6px 22px 22px; margin: 0; }
.secure-list li { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #edf1f5; padding: 12px 0; font-size: .78rem; font-weight: 700; }
.secure-list li span { color: var(--green); font-weight: 900; }
.empty-state { max-width: 560px; margin: 50px auto; padding: 40px; text-align: center; }
.empty-icon { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: #fff0f0; color: var(--red); font-size: 1.4rem; font-weight: 900; margin: 0 auto 15px; }
.empty-state p { color: var(--muted); margin-bottom: 20px; }

.auth-body { background: #091329; min-height: 100vh; }
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.15fr .85fr; }
.auth-visual { padding: 52px 6vw; background:
    radial-gradient(circle at 20% 20%, rgba(39,135,238,.28), transparent 32%),
    radial-gradient(circle at 75% 75%, rgba(36,183,211,.18), transparent 29%),
    linear-gradient(145deg, #0c1730, #091329);
    color: #fff; display: flex; flex-direction: column; }
.auth-brand { display: flex; gap: 13px; align-items: center; }
.auth-brand strong { display: block; letter-spacing: .09em; }
.auth-brand small { color: #8fa4c7; font-size: .75rem; }
.auth-copy { margin: auto 0; max-width: 660px; }
.auth-copy .eyebrow { color: #65cbe0; }
.auth-copy h1 { font-size: clamp(2.2rem, 4vw, 4rem); line-height: 1.04; letter-spacing: -.05em; margin: 0 0 22px; }
.auth-copy > p { color: #a9b8cf; line-height: 1.7; max-width: 590px; font-size: 1rem; }
.auth-features { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.auth-features span { border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.05); border-radius: 999px; padding: 8px 12px; color: #dce7f8; font-size: .75rem; }
.auth-card { background: #f7f9fc; display: grid; place-items: center; padding: 30px; }
.auth-card-inner { width: min(420px, 100%); background: #fff; border: 1px solid #e1e7f0; border-radius: 20px; padding: 34px; box-shadow: 0 25px 70px rgba(6,21,49,.12); }
.auth-card h2 { font-size: 1.6rem; margin: 0 0 6px; }
.auth-card .muted { margin: 0 0 23px; font-size: .83rem; }
.auth-card .form-stack { padding: 0; }
.auth-link { display: block; text-align: center; color: var(--blue); font-size: .78rem; font-weight: 750; margin-top: 18px; }
.auth-simple { min-height: 100vh; display: grid; place-content: center; padding: 30px; }
.auth-card.standalone { display: block; background: transparent; padding: 0; }
.auth-simple .auth-card-inner { min-width: min(420px, calc(100vw - 40px)); }

@media (max-width: 1180px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid, .job-detail-grid, .settings-grid, .wizard-grid { grid-template-columns: 1fr; }
    .security-overview { align-items: flex-start; flex-direction: column; }
    .security-points { min-width: 0; width: 100%; }
}
@media (max-width: 860px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: fixed; left: -290px; width: 268px; transition: left .2s ease; }
    .sidebar.open { left: 0; }
    .mobile-menu { display: inline-grid; place-items: center; margin-right: 12px; }
    .topbar { justify-content: flex-start; padding: 15px 18px; }
    .topbar .security-pill { margin-left: auto; }
    .content { padding: 20px 16px 35px; }
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-visual { display: none; }
    .auth-card { min-height: 100vh; }
}
@media (max-width: 620px) {
    .stats-grid, .form-grid, .security-points { grid-template-columns: 1fr; }
    .card-header { align-items: flex-start; flex-direction: column; }
    .search-box { width: 100%; }
    .topbar p, .security-pill { display: none; }
    .content { padding-left: 12px; padding-right: 12px; }
    .job-heading, .approval-box, .inline-form { flex-direction: column; align-items: stretch; }
    .inline-form input { width: 100%; }
    .progress-meta { gap: 9px 14px; }
    .selection-actions { width: 100%; }
    .selection-actions .btn { flex: 1; }
}

.operation-summary { margin: 20px 0; }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding: 20px 22px; }
.summary-grid > div { border: 1px solid var(--line); background: #f8faff; border-radius: 12px; padding: 13px 14px; min-width: 0; }
.summary-grid span { display: block; color: var(--muted); font-size: .69rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 5px; }
.summary-grid strong { display: block; font-size: .85rem; overflow-wrap: anywhere; }
.summary-grid .summary-wide { grid-column: span 2; }
.operation-summary .notice { margin: 0 22px 20px; }
@media (max-width: 1000px) { .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .summary-grid { grid-template-columns: 1fr; } .summary-grid .summary-wide { grid-column: auto; } }
.smtp-test-form { padding: 0 22px 22px; }

/* DEPLOY_HOSTMARQ_LOGO_START */

.brand-logo {
    display: block;
    width: auto;
    height: auto;
    object-fit: contain;
}

.brand-logo-sidebar {
    max-width: 220px;
    max-height: 82px;
}

.brand-logo-login {
    max-width: 270px;
    max-height: 105px;
}

.brand-logo-auth {
    max-width: 240px;
    max-height: 90px;
    margin-left: auto;
    margin-right: auto;
}

.auth-brand {
    display: flex;
    align-items: center;
}

.brand.centered {
    justify-content: center;
}

@media (max-width: 700px) {
    .brand-logo-sidebar {
        max-width: 185px;
        max-height: 68px;
    }

    .brand-logo-login {
        max-width: 220px;
        max-height: 85px;
    }

    .brand-logo-auth {
        max-width: 210px;
        max-height: 80px;
    }
}

/* DEPLOY_HOSTMARQ_LOGO_END */

/* DEPLOY_NOTICE_GROUPS_UI_START */

.notice-groups-page {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.notice-groups-section {
    margin: 0;
}

.notice-auto-grid {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 14px;
    padding: 20px 22px 22px;
}

.notice-auto-card {
    min-width: 0;
    min-height: 150px;
    padding: 18px;
    border: 1px solid #dfe7f2;
    border-radius: 14px;
    background:
        linear-gradient(
            145deg,
            #ffffff,
            #f7faff
        );
    display: flex;
    flex-direction: column;
    box-shadow:
        0 8px 22px rgba(19, 43, 82, .04);
}

.notice-auto-card-top {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.notice-auto-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #eaf3ff;
    color: #1769e0;
    font-size: .72rem;
    font-weight: 900;
}

.notice-auto-label {
    min-width: 0;
    color: #32435f;
    font-size: .77rem;
    font-weight: 800;
    line-height: 1.25;
}

.notice-auto-number {
    margin-top: 15px;
    color: #12213c;
    font-size: 2rem;
    line-height: 1;
    letter-spacing: -.04em;
}

.notice-auto-description {
    margin-top: 7px;
    color: #7a879b;
    font-size: .7rem;
    line-height: 1.45;
}

.notice-state-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 12px;
}

.notice-state-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 7px;
    border-radius: 999px;
    background: #edf4fd;
    color: #46617f;
    font-size: .62rem;
    font-weight: 800;
}

.notice-state-pill strong {
    color: #1769e0;
}

.notice-state-empty {
    color: #8a96a8;
    font-size: .66rem;
}

.notice-group-form {
    padding: 0;
}

.notice-group-name {
    padding: 20px 22px;
}

.notice-picker-header {
    min-height: 64px;
    padding: 14px 22px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: #fbfcfe;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.notice-picker-header strong {
    display: block;
    color: #263954;
    font-size: .8rem;
}

.notice-picker-header small {
    display: block;
    margin-top: 3px;
    color: #7b8799;
    font-size: .68rem;
}

.notice-picker-count,
.notice-group-badge {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eaf3ff;
    color: #1769e0;
    font-size: .66rem;
    font-weight: 850;
    white-space: nowrap;
}

.notice-client-picker {
    max-height: 390px;
    overflow-y: auto;
    overscroll-behavior: contain;
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 14px 18px;
    background: #fff;
}

.notice-client-option {
    position: relative;
    min-width: 0;
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border: 1px solid #e3e9f2;
    border-radius: 11px;
    background: #fff;
    cursor: pointer;
    transition:
        border-color .14s ease,
        background .14s ease,
        box-shadow .14s ease;
}

.notice-client-option:hover {
    border-color: #bcd3f1;
    background: #f8fbff;
}

.notice-client-option:has(
    input[type="checkbox"]:checked
) {
    border-color: #8bb6ef;
    background: #f4f9ff;
    box-shadow:
        inset 0 0 0 1px rgba(23,105,224,.04);
}

/*
 * Corrige especificamente o problema
 * causado pelo input global width:100%.
 */
.notice-client-option
input[type="checkbox"] {
    position: absolute;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: 0 !important;
    opacity: 0;
    pointer-events: none;
}

.notice-client-check {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    border: 1.5px solid #bdc9d9;
    border-radius: 6px;
    background: #fff;
    position: relative;
    transition: .15s ease;
}

.notice-client-option
input[type="checkbox"]:checked
+ .notice-client-check {
    border-color: #1769e0;
    background: #1769e0;
}

.notice-client-option
input[type="checkbox"]:checked
+ .notice-client-check::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

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

.notice-client-body strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #263954;
    font-size: .76rem;
    line-height: 1.3;
}

.notice-client-body small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #8a95a7;
    font-size: .64rem;
}

.notice-client-state {
    flex: 0 0 auto;
    padding: 3px 6px;
    border-radius: 6px;
    background: #eef3f8;
    color: #687994;
    font-size: .59rem;
    font-weight: 900;
}

.notice-picker-empty {
    grid-column: 1 / -1;
    padding: 30px;
    text-align: center;
    color: #7b8799;
    font-size: .76rem;
}

.notice-group-actions {
    padding: 15px 22px;
    border-top: 1px solid var(--line);
    background: #fbfcfe;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.notice-group-actions > span {
    color: #8490a2;
    font-size: .67rem;
}

.notice-delete-area {
    display: flex;
    justify-content: flex-end;
    padding: 12px 22px 18px;
    border-top: 1px solid #f0f2f6;
}

.notice-no-custom-groups {
    padding: 26px;
    border: 1px dashed #cbd7e7;
    border-radius: 14px;
    background: #f9fbfe;
    text-align: center;
}

.notice-no-custom-groups strong {
    display: block;
    color: #405574;
    font-size: .82rem;
}

.notice-no-custom-groups p {
    margin: 5px 0 0;
    color: #8490a2;
    font-size: .72rem;
}


/* Tablets */
@media (max-width: 1180px) {

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

}


/* Tablet / mobile */
@media (max-width: 820px) {

    .notice-client-picker {
        grid-template-columns: 1fr;
    }

}


/* Mobile */
@media (max-width: 620px) {

    .notice-auto-grid {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .notice-group-name {
        padding: 16px;
    }

    .notice-picker-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 13px 16px;
    }

    .notice-client-picker {
        max-height: 480px;
        padding: 10px;
    }

    .notice-client-option {
        padding: 10px;
    }

    .notice-group-actions {
        align-items: stretch;
        flex-direction: column;
        padding: 13px 16px;
    }

    .notice-group-actions .btn {
        width: 100%;
    }

    .notice-delete-area {
        padding: 12px 16px 16px;
    }

}

/* DEPLOY_NOTICE_GROUPS_UI_END */

/* DEPLOY_NOTICE_SETTINGS_UI_START */

/* ==========================================================
   AVISO DE ATUALIZAÇÕES - CONFIGURAÇÕES
   ========================================================== */

.notice-settings-form {
    width: 100%;
    display: flex !important;
    flex-direction: column !important;
    gap: 22px !important;
}


/* CARD */

.notice-settings-form > section.card,
.notice-settings-form > .notice-settings-card {
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #dbe4ef !important;
    border-radius: 18px !important;
    background: #fff !important;
    overflow: hidden !important;
}


/* CABEÇALHO */

.notice-settings-form
.notice-settings-card
> .card-header {
    min-height: 84px !important;
    padding: 22px 27px !important;
    margin: 0 !important;
    background: #fff !important;
    border-bottom: 1px solid #e4eaf2 !important;
}

.notice-settings-form
.notice-settings-card
> .card-header h2 {
    margin: 0 !important;
    color: #10213f !important;
    font-size: 1.05rem !important;
    line-height: 1.3 !important;
}

.notice-settings-form
.notice-settings-card
> .card-header p {
    margin: 6px 0 0 !important;
    color: #718099 !important;
    font-size: .76rem !important;
    line-height: 1.5 !important;
}


/* ==========================================================
   SWITCH
   ========================================================== */

.notice-settings-form
.notice-settings-card
> .notice-settings-switch {
    width: 100% !important;
    min-height: 70px !important;

    margin: 0 !important;
    padding: 16px 27px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 24px !important;

    border: 0 !important;
    border-bottom: 1px solid #e4eaf2 !important;

    background: #fbfcfe !important;
}

.notice-settings-form
.notice-settings-switch
> span {
    display: block !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
}

.notice-settings-form
.notice-settings-switch strong {
    display: block !important;
    margin: 0 !important;
    color: #243854 !important;
    font-size: .8rem !important;
    line-height: 1.35 !important;
}

.notice-settings-form
.notice-settings-switch small {
    display: block !important;
    margin: 4px 0 0 !important;
    color: #77859a !important;
    font-size: .68rem !important;
    line-height: 1.4 !important;
}

.notice-settings-form
.notice-settings-switch
input[type="checkbox"] {
    width: 46px !important;
    height: 25px !important;
    min-width: 46px !important;
    flex: 0 0 46px !important;
    padding: 0 !important;
    margin: 0 !important;
}


/* ==========================================================
   CAMPOS DIRETOS DO CARD
   Ex.: mensagem automática / cooldown
   ========================================================== */

.notice-settings-form
.notice-settings-card
> .field {
    width: auto !important;

    margin-left: 27px !important;
    margin-right: 27px !important;

    padding: 0 !important;
}


/*
   ESTA É A CORREÇÃO PRINCIPAL:
   o campo imediatamente depois do switch recebe
   espaçamento superior real.
 */
.notice-settings-form
.notice-settings-card
> .notice-settings-switch
+ .field {
    margin-top: 22px !important;
}


/* Espaço entre campos diretos */

.notice-settings-form
.notice-settings-card
> .field
+ .field {
    margin-top: 16px !important;
}


/* Último campo ganha respiro inferior */

.notice-settings-form
.notice-settings-card
> .field:last-child {
    margin-bottom: 25px !important;
}


/* ==========================================================
   GRID
   ========================================================== */

.notice-settings-form
.notice-settings-card
> .form-grid {
    width: 100% !important;

    display: grid !important;
    grid-template-columns:
        repeat(2, minmax(0, 1fr)) !important;

    gap: 19px 20px !important;

    margin: 0 !important;
    padding: 22px 27px 25px !important;
}


/* ==========================================================
   LABELS
   ========================================================== */

.notice-settings-form .field {
    display: flex !important;
    flex-direction: column !important;
    gap: 7px !important;
    min-width: 0 !important;
}

.notice-settings-form
.field > span {
    display: block !important;

    margin: 0 !important;

    color: #344761 !important;
    font-size: .76rem !important;
    font-weight: 800 !important;
    line-height: 1.35 !important;
}

.notice-settings-form
.field > small {
    display: block !important;

    margin: 2px 0 0 !important;

    color: #718099 !important;
    font-size: .68rem !important;
    line-height: 1.5 !important;
}


/* ==========================================================
   INPUTS
   ========================================================== */

.notice-settings-form
input:not([type="checkbox"]),
.notice-settings-form
select {
    box-sizing: border-box !important;

    width: 100% !important;
    min-height: 49px !important;

    margin: 0 !important;
    padding: 11px 14px !important;

    border: 1px solid #d5dfec !important;
    border-radius: 11px !important;

    background: #fff !important;
    color: #142641 !important;

    font-size: .88rem !important;
    line-height: 1.4 !important;
}

.notice-settings-form
textarea {
    box-sizing: border-box !important;

    width: 100% !important;
    min-height: 132px !important;

    margin: 0 !important;
    padding: 13px 14px !important;

    border: 1px solid #d5dfec !important;
    border-radius: 11px !important;

    background: #fff !important;
    color: #142641 !important;

    font-size: .88rem !important;
    line-height: 1.55 !important;
}

.notice-settings-form
input:not([type="checkbox"]):focus,
.notice-settings-form
select:focus,
.notice-settings-form
textarea:focus {
    border-color: #6fa6ed !important;

    box-shadow:
        0 0 0 3px rgba(23,105,224,.10)
        !important;
}


/* ==========================================================
   BOTÕES
   ========================================================== */

.notice-settings-actions {
    width: 100% !important;

    box-sizing: border-box !important;

    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;

    gap: 10px !important;

    margin: 0 !important;
    padding: 17px 20px !important;

    border: 1px solid #dbe4ef !important;
    border-radius: 16px !important;

    background: #fff !important;
}

.notice-settings-actions .btn {
    min-height: 44px !important;
    padding-left: 19px !important;
    padding-right: 19px !important;
}

.notice-settings-help {
    display: block !important;

    margin: -11px 4px 2px !important;

    color: #74829a !important;
    font-size: .69rem !important;
    line-height: 1.5 !important;
}


/* ==========================================================
   TABLET
   ========================================================== */

@media (max-width: 920px) {

    .notice-settings-form
    .notice-settings-card
    > .form-grid {
        grid-template-columns: 1fr !important;
    }

}


/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 620px) {

    .notice-settings-form {
        gap: 15px !important;
    }

    .notice-settings-form
    .notice-settings-card
    > .card-header {
        min-height: auto !important;
        padding: 18px !important;
    }

    .notice-settings-form
    .notice-settings-card
    > .notice-settings-switch {
        min-height: 64px !important;
        padding: 14px 18px !important;
    }

    .notice-settings-form
    .notice-settings-card
    > .field {
        margin-left: 18px !important;
        margin-right: 18px !important;
    }

    .notice-settings-form
    .notice-settings-card
    > .notice-settings-switch
    + .field {
        margin-top: 19px !important;
    }

    .notice-settings-form
    .notice-settings-card
    > .form-grid {
        padding: 19px 18px 21px !important;
    }

    .notice-settings-actions {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 14px !important;
    }

    .notice-settings-actions .btn {
        width: 100% !important;
    }

}

/* DEPLOY_NOTICE_SETTINGS_UI_END */

/* DEPLOY_NOTICE_SETTINGS_FORM_RESET_START */

form.form-stack.notice-settings-form {
    padding: 0 !important;
    margin: 0 !important;
}

/* DEPLOY_NOTICE_SETTINGS_FORM_RESET_END */
