@font-face { font-family: "Cairo"; src: url("../fonts/cairo-regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Cairo"; src: url("../fonts/cairo-semibold.ttf") format("truetype"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Cairo"; src: url("../fonts/cairo-bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Cairo"; src: url("../fonts/cairo-extrabold.ttf") format("truetype"); font-weight: 800 900; font-style: normal; font-display: swap; }

:root {
    --brand: #951737;
    --brand-dark: #681026;
    --brand-bright: #bd3659;
    --brand-soft: #faebef;
    --brand-wash: #fff7f9;
    --ink: #21181d;
    --ink-soft: #4f454a;
    --muted: #766b71;
    --line: #ebe3e6;
    --surface: #ffffff;
    --canvas: #f8f6f7;
    --nav: #25151d;
    --admin-canvas: #f3efef;
    --admin-surface: #fffdfd;
    --admin-ink: #24171d;
    --accent-hot: #e45f83;
    --success: #14835e;
    --warning: #c57a12;
    --danger: #c33f4f;
    --shadow-sm: 0 10px 26px rgba(45, 19, 29, .07);
    --shadow: 0 24px 65px rgba(45, 19, 29, .12);
    --ease: cubic-bezier(.2, .75, .25, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: "Cairo", Tahoma, Arial, sans-serif; font-size: 16px; font-weight: 600; line-height: 1.65; text-rendering: optimizeLegibility; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
.container-wide { width: min(100% - 28px, 1180px); margin-inline: auto; }

/* Public verification experience - mobile first */
.public-page { min-height: 100vh; }
.site-shell { min-height: 100vh; overflow: hidden; background: radial-gradient(circle at 14% 17%, rgba(149, 23, 55, .09), transparent 28rem), radial-gradient(circle at 87% 40%, rgba(189,54,89,.06), transparent 24rem), linear-gradient(180deg, #fff 0, #fcf8f9 52rem, #fff 100%); }
.public-header { height: 76px; display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 5; }
.brand img { width: 158px; max-width: 50vw; display: block; }
.admin-link { display: inline-grid; place-items: center; width: 40px; height: 40px; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.82); box-shadow: 0 4px 14px rgba(35, 20, 26, .03); transition: transform .22s var(--ease), color .22s var(--ease), border-color .22s var(--ease), background .22s var(--ease); font-size: 0; }
.admin-link:hover { color: var(--brand); background: white; border-color: #dfbdc8; transform: translateY(-2px); }
.admin-link svg { width: 16px; fill: currentColor; }
.hero { display: grid; gap: 31px; align-items: center; padding: 31px 0 54px; position: relative; text-align: center; }
.hero::before { content: ""; width: 380px; height: 380px; border: 1px solid rgba(149,23,55,.065); border-radius: 50%; position: absolute; left: -235px; top: 4px; box-shadow: 0 0 0 55px rgba(149,23,55,.022), 0 0 0 112px rgba(149,23,55,.016); pointer-events: none; }
.hero-copy { position: relative; z-index: 1; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--brand); font-size: .75rem; font-weight: 800; letter-spacing: .01em; margin-bottom: 16px; }
.eyebrow span { width: 24px; height: 2px; background: var(--brand); border-radius: 4px; }
.hero h1 { margin: 0; font-size: clamp(2.15rem, 10.8vw, 3rem); line-height: 1.27; letter-spacing: -.035em; font-weight: 800; }
.hero h1 strong { color: var(--brand); font-weight: 900; }
.hero-lead { color: var(--muted); font-size: .96rem; line-height: 2; max-width: 34rem; margin: 18px auto 25px; }
.trust-row { display: flex; justify-content: center; gap: 12px 18px; flex-wrap: wrap; }
.trust-row > div { display: flex; gap: 9px; align-items: center; text-align: right; }
.trust-icon { width: 34px; height: 34px; display: grid; place-items: center; color: var(--brand); background: var(--brand-soft); border-radius: 11px; font-weight: 900; }
.trust-row b, .trust-row small { display: block; }
.trust-row b { font-size: .72rem; margin-bottom: 1px; }
.trust-row small { color: #8d8388; font-size: .6rem; font-weight: 600; }
.verify-card-wrap { position: relative; z-index: 2; width: min(100%, 550px); margin-inline: auto; text-align: right; }
.card-glow { position: absolute; width: 82%; height: 66%; background: rgba(149,23,55,.2); filter: blur(74px); left: 9%; top: 22%; border-radius: 50%; }
.verify-card { overflow: hidden; background: rgba(255,255,255,.98); border: 1px solid #ebdce1; padding: 23px 18px 20px; border-radius: 27px; box-shadow: 0 24px 58px rgba(57,21,34,.12), 0 4px 13px rgba(57,21,34,.04); position: relative; backdrop-filter: blur(14px); }
.verify-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--brand-dark), var(--brand-bright), #e986a1); pointer-events: none; }
.verify-card::after { content: ""; position: absolute; width: 210px; height: 210px; left: -133px; bottom: -152px; border-radius: 50%; background: rgba(149,23,55,.035); pointer-events: none; }
.card-head { display: flex; align-items: center; gap: 13px; margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid #f0e7ea; position: relative; }
.shield-badge { width: 53px; height: 53px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 17px; background: linear-gradient(145deg, var(--brand-bright), var(--brand-dark)); box-shadow: 0 11px 23px rgba(149,23,55,.22); }
.shield-badge svg { width: 27px; fill: white; }
.card-head h2 { margin: 0 0 4px; font-size: 1.36rem; line-height: 1.35; }
.card-head p { margin: 0; color: var(--muted); font-size: .68rem; font-weight: 600; }
.verify-card label, .form-group label { display: block; font-size: .76rem; font-weight: 800; margin-bottom: 7px; }
.code-field { height: 61px; border: 1.5px solid #e2d4d9; border-radius: 15px; display: flex; align-items: center; gap: 12px; padding: 0 15px; background: #fcf7f8; transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), transform .2s var(--ease); position: relative; }
.code-field:hover { border-color: #d4b7c1; background: #fffafb; }
.code-field:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(149,23,55,.09); background: white; transform: translateY(-1px); }
.code-field svg { width: 24px; fill: var(--brand); flex: 0 0 auto; }
.code-field input { border: 0; outline: 0; background: transparent; width: 100%; height: 100%; direction: ltr; text-align: left; letter-spacing: .07em; font-size: .97rem; font-weight: 700; color: var(--ink); text-transform: uppercase; }
.code-field input::placeholder { color: #afa5aa; font-weight: 500; letter-spacing: .02em; }
.field-hint { color: #958a90; font-size: .6rem; font-weight: 600; margin: 7px 2px 15px; }
.form-alert { background: #fff2f4; border: 1px solid #ffcbd3; color: #a82335; border-radius: 12px; padding: 11px 13px; font-size: .75rem; margin-bottom: 16px; }
.owner-fields { margin: 3px 0 19px; padding: 15px; border: 1px solid #eadce1; border-radius: 18px; background: linear-gradient(145deg, #fffafa, #fff); position: relative; z-index: 1; }
.owner-fields-head { display: flex; align-items: center; gap: 10px; padding-bottom: 13px; border-bottom: 1px solid #f0e7ea; }
.owner-fields-icon { width: 31px; height: 31px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; color: #fff; background: linear-gradient(145deg, var(--brand-bright), var(--brand-dark)); font-size: .82rem; font-weight: 900; box-shadow: 0 7px 14px rgba(149,23,55,.16); }
.owner-fields-head h3 { margin: 0; color: #41363b; font-size: .79rem; line-height: 1.35; }
.owner-fields-head p { margin: 2px 0 0; color: var(--muted); font-size: .57rem; font-weight: 600; }
.optional-grid { display: grid; gap: 12px; padding-top: 14px; }
.optional-grid input, .form-control { width: 100%; min-height: 47px; border: 1px solid var(--line); background: white; border-radius: 11px; padding: 11px 13px; outline: 0; font-size: .86rem; color: var(--ink); transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), transform .2s var(--ease); }
.optional-grid input:hover, .form-control:hover { border-color: #cbb6bf; }
.optional-grid input:focus, .form-control:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(149,23,55,.08); background: #fff; }
.activation-field label { display: inline-flex; align-items: center; gap: 5px; color: #55484e; font-size: .7rem; margin-bottom: 7px; }
.activation-field label svg { width: 14px; height: 14px; fill: var(--brand); }
.activation-field input { min-height: 49px; border-color: #e5d9dd; background: #fff; box-shadow: inset 0 1px 0 rgba(76,30,45,.025); }
.activation-field input::placeholder { color: #b7aaaf; font-size: .74rem; }
.activation-field input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(149,23,55,.08); }
.activation-role-fieldset { min-width: 0; border: 0; padding: 0; margin: 15px 0 0; }
.activation-role-fieldset legend { color: #55484e; font-size: .7rem; font-weight: 800; margin-bottom: 8px; padding: 0; }
.role-options { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.role-option { position: relative; cursor: pointer; }
.role-option input { position: absolute; opacity: 0; pointer-events: none; }
.role-option-content { min-height: 76px; display: flex; align-items: center; gap: 8px; padding: 10px 8px; border: 1px dashed #d8bec6; border-radius: 13px; background: #fff; color: #64595e; transition: border-color .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease); }
.role-option-content i { width: 27px; height: 27px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px; background: #f7eef1; color: var(--brand); font-size: .72rem; font-style: normal; font-weight: 900; transition: color .2s var(--ease), background .2s var(--ease); }
.role-option-content b, .role-option-content small { display: block; }
.role-option-content b { font-size: .64rem; line-height: 1.45; }
.role-option-content small { color: #978b90; font-size: .49rem; line-height: 1.45; margin-top: 2px; }
.role-option:hover .role-option-content { border-color: var(--brand); background: #fff9fa; transform: translateY(-1px); }
.role-option input:checked + .role-option-content { color: #fff; border-color: var(--brand); border-style: solid; background: linear-gradient(135deg, var(--brand-bright), var(--brand-dark)); box-shadow: 0 9px 17px rgba(149,23,55,.18); }
.role-option input:checked + .role-option-content i { color: var(--brand); background: #fff; }
.role-option input:checked + .role-option-content small { color: #f7dbe3; }
.role-option input:focus-visible + .role-option-content { outline: 2px solid var(--brand); outline-offset: 2px; }
.activation-vehicle-field { margin-top: 15px; }
.activation-vehicle-field input { width: 100%; min-height: 49px; border: 1px solid #e5d9dd; background: #fff; border-radius: 11px; padding: 11px 13px; outline: 0; font-size: .86rem; color: var(--ink); transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease); }
.activation-vehicle-field input:hover { border-color: #cbb6bf; }
.activation-vehicle-field input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(149,23,55,.08); }
.select-control { appearance: none; cursor: pointer; padding-inline-start: 38px; background-image: linear-gradient(45deg, transparent 50%, var(--brand) 50%), linear-gradient(135deg, var(--brand) 50%, transparent 50%); background-position: calc(1em + 4px) 52%, 1em 52%; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; }
.select-control:focus { background-color: #fffafa; }
.primary-button { width: 100%; min-height: 56px; border: 0; border-radius: 14px; background: linear-gradient(135deg, var(--brand-bright), var(--brand-dark)); color: white; font-size: .92rem; font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 13px 28px rgba(149,23,55,.22); transition: transform .22s var(--ease), box-shadow .22s var(--ease), filter .22s var(--ease); }
.primary-button:hover { transform: translateY(-2px); filter: saturate(1.08); box-shadow: 0 18px 34px rgba(149,23,55,.29); }
.primary-button:active { transform: translateY(0); }
.primary-button:disabled { opacity: .72; cursor: wait; transform: none; }
.primary-button svg { width: 20px; fill: currentColor; }
.secure-note { color: #90858a; font-size: .59rem; display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 14px; }
.secure-note svg { width: 12px; fill: #90858a; }
.public-footer { border-top: 1px solid var(--line); padding: 34px 0; background: white; text-align: center; }
.public-footer img { width: 150px; margin: 0 auto 12px; }
.public-footer p { color: #70676b; font-size: .72rem; margin: 0 0 10px; }
.public-footer small { color: #a69ca0; font-size: .61rem; }

/* Verification result */
.result-modal { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 16px; }
.result-modal.is-open { display: grid; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(21,13,17,.74); backdrop-filter: blur(8px); animation: fade-in .25s ease both; }
.result-dialog { --result-color: var(--danger); width: min(455px, 100%); background: white; border-radius: 25px; padding: 31px 20px 23px; position: relative; text-align: center; box-shadow: 0 35px 90px rgba(0,0,0,.25); animation: dialog-in .42s var(--ease) both; overflow: hidden; }
.result-dialog::before { content: ""; height: 5px; position: absolute; inset: 0 0 auto; background: var(--result-color); }
.result-verified { --result-color: var(--success); }
.result-already_verified { --result-color: var(--warning); }
.result-expired, .result-disabled { --result-color: #7c6670; }
.modal-close { position: absolute; left: 14px; top: 13px; border: 0; background: #f4f1f2; width: 34px; height: 34px; border-radius: 50%; color: #756d71; font-size: 1.4rem; cursor: pointer; z-index: 2; transition: transform .2s var(--ease), background .2s var(--ease); }
.modal-close:hover { transform: rotate(90deg); background: var(--brand-soft); }
.result-rings { width: 100px; height: 100px; margin: 1px auto 17px; position: relative; display: grid; place-items: center; }
.result-rings > span { position: absolute; inset: 8px; border-radius: 50%; background: color-mix(in srgb, var(--result-color) 8%, white); animation: pulse-ring 2.2s ease-out infinite; }
.result-rings > span:nth-child(2) { inset: 0; animation-delay: .6s; }
.result-icon { width: 68px; height: 68px; display: grid; place-items: center; background: var(--result-color); border-radius: 50%; box-shadow: 0 12px 28px color-mix(in srgb, var(--result-color) 28%, transparent); position: relative; z-index: 1; }
.result-icon svg { width: 33px; fill: white; }
.result-kicker { color: var(--result-color); font-size: .66rem; font-weight: 800; letter-spacing: .06em; }
.result-dialog h2 { font-size: 1.4rem; line-height: 1.5; margin: 7px 0 9px; }
.result-dialog > p { color: var(--muted); font-size: .78rem; line-height: 1.9; margin: 0 auto 18px; max-width: 345px; }
.result-code { border: 1px dashed color-mix(in srgb, var(--result-color) 35%, white); background: color-mix(in srgb, var(--result-color) 5%, white); border-radius: 13px; padding: 11px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.result-code span { color: var(--muted); font-size: .61rem; }
.result-code b { color: var(--result-color); font-size: .79rem; letter-spacing: .045em; }
.result-date { color: #81787c; font-size: .61rem; margin: 12px 0 17px; }
.modal-action { width: 100%; min-height: 48px; border: 0; border-radius: 12px; color: white; background: var(--result-color); font-size: .85rem; font-weight: 800; cursor: pointer; transition: transform .2s var(--ease), filter .2s var(--ease); }
.modal-action:hover { transform: translateY(-1px); filter: brightness(1.04); }
body.modal-open { overflow: hidden; }

/* Administration - mobile first */
.admin-body { min-height: 100vh; background: radial-gradient(circle at 8% -8%, rgba(149,23,55,.07), transparent 28rem), #f6f4f5; }
.admin-shell { min-height: 100vh; }
.admin-sidebar { background: linear-gradient(165deg, #301820, var(--nav) 48%, #1b1216); color: white; padding: 23px 16px 18px; position: fixed; width: min(274px, 82vw); inset: 0 0 0 auto; z-index: 50; display: flex; flex-direction: column; transform: translateX(105%); box-shadow: -15px 0 45px rgba(17,8,12,.21); transition: transform .34s var(--ease), box-shadow .34s var(--ease); }
.admin-sidebar.is-open { transform: translateX(0); }
.admin-brand { display: block; padding: 6px 11px 23px; border-bottom: 1px solid rgba(255,255,255,.09); }
.admin-brand img { width: 166px; filter: brightness(0) invert(1); }
.admin-nav { margin-top: 23px; display: grid; gap: 6px; }
.admin-nav a { position: relative; display: flex; align-items: center; gap: 12px; color: #d0c1c7; padding: 12px 13px; border: 1px solid transparent; border-radius: 12px; font-size: .78rem; font-weight: 700; transition: background .22s var(--ease), color .22s var(--ease), transform .22s var(--ease), border-color .22s var(--ease); }
.admin-nav a:hover { color: white; background: rgba(255,255,255,.07); transform: translateX(-3px); }
.admin-nav a.active { color: white; background: linear-gradient(135deg, var(--brand-bright), var(--brand)); border-color: rgba(255,255,255,.08); box-shadow: 0 10px 22px rgba(112,12,40,.24); }
.admin-nav svg { width: 18px; fill: currentColor; }
.admin-sidebar-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.09); padding-top: 16px; }
.admin-user { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding: 0 6px; }
.admin-avatar { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(145deg, #d34a6c, #7a1130); color: white; font-weight: 800; }
.admin-user b, .admin-user small { display: block; }
.admin-user b { font-size: .68rem; }
.admin-user small { color: #aa9ba2; font-size: .56rem; margin-top: 2px; direction: ltr; text-align: right; }
.logout-button { width: 100%; border: 0; background: transparent; color: #c9b9c0; padding: 9px 7px; text-align: right; cursor: pointer; font-weight: 700; font-size: .67rem; transition: color .2s var(--ease), transform .2s var(--ease); }
.logout-button:hover { color: #fff; transform: translateX(-2px); }
.admin-main { min-width: 0; min-height: 100vh; }
.admin-topbar { min-height: 74px; background: rgba(255,255,255,.9); backdrop-filter: blur(13px); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 15px; position: sticky; top: 0; z-index: 30; }
.admin-topbar > div { min-width: 0; }
.admin-topbar h1 { font-size: 1.03rem; line-height: 1.3; margin: 0; }
.admin-topbar p { margin: 3px 0 0; color: var(--muted); font-size: .59rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-link { color: var(--brand); font-size: .59rem; font-weight: 800; border: 1px solid #e3c8d0; border-radius: 9px; padding: 8px 10px; white-space: nowrap; background: #fffafa; transition: transform .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease); }
.topbar-link:hover { transform: translateY(-1px); background: var(--brand-soft); border-color: #d6a9b8; }
.mobile-menu { display: inline-grid; place-items: center; border: 0; background: var(--brand-soft); color: var(--brand); width: 39px; height: 39px; border-radius: 11px; font-size: 1.15rem; cursor: pointer; transition: transform .2s var(--ease), background .2s var(--ease); }
.mobile-menu:hover { transform: scale(1.04); background: #f4dce3; }
.admin-content { padding: 20px 14px 42px; max-width: 1500px; margin-inline: auto; }
.flash { padding: 12px 14px; border-radius: 12px; font-size: .74rem; margin-bottom: 17px; border: 1px solid; }
.flash-success { background: #edfaf5; color: #176849; border-color: #c1e7d7; }
.flash-error { background: #fff1f3; color: #a32939; border-color: #f4c3ca; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-card { background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 16px; padding: 15px; min-width: 0; box-shadow: 0 6px 17px rgba(50,27,37,.035); transition: transform .23s var(--ease), box-shadow .23s var(--ease), border-color .23s var(--ease); }
.stat-card:hover { transform: translateY(-3px); border-color: #e1c6ce; box-shadow: var(--shadow-sm); }
.stat-card-head { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: .59rem; gap: 5px; }
.stat-card-icon { width: 32px; height: 32px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); border-radius: 10px; font-size: .85rem; }
.stat-card:nth-child(2) .stat-card-icon { background: #e9f8f2; color: var(--success); }
.stat-card:nth-child(3) .stat-card-icon { background: #eef5fc; color: #3971a8; }
.stat-card:nth-child(4) .stat-card-icon { background: #f5eef1; color: #896573; }
.stat-card:nth-child(5) .stat-card-icon { background: #fff3e6; color: #bb731d; }
.stat-value { display: block; font-size: 1.62rem; line-height: 1.15; margin-top: 13px; letter-spacing: -.04em; }
.stat-note { color: #9a9095; font-size: .55rem; }
.dashboard-grid { display: grid; gap: 13px; margin-top: 13px; }
.panel { background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 17px; padding: 17px; box-shadow: 0 7px 18px rgba(50,27,37,.03); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.panel-head h2 { font-size: .9rem; margin: 0; }
.panel-head p { color: var(--muted); font-size: .59rem; margin: 3px 0 0; }
.panel-link { color: var(--brand); font-size: .65rem; font-weight: 800; }
.bar-chart { display: flex; align-items: end; gap: 8px; height: 150px; padding-top: 18px; }
.bar-item { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: end; gap: 6px; }
.bar { width: min(31px, 72%); min-height: 5px; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, #d44d6d, var(--brand)); position: relative; transition: height .5s var(--ease); }
.bar span { position: absolute; top: -18px; width: 100%; text-align: center; font-size: .5rem; color: #81777c; }
.bar-label { color: #8b8286; font-size: .53rem; }
.progress-ring { width: 126px; height: 126px; margin: 10px auto; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--brand) calc(var(--rate) * 1%), #f0eaed 0); position: relative; }
.progress-ring::after { content: ""; width: 91px; height: 91px; border-radius: 50%; background: white; position: absolute; }
.progress-ring strong { position: relative; z-index: 1; font-size: 1.35rem; }
.progress-label { text-align: center; color: var(--muted); font-size: .62rem; }
.table-panel { margin-top: 13px; padding: 0; overflow: hidden; }
.table-panel .panel-head { padding: 17px 17px 0; }
.table-scroll { overflow-x: auto; scrollbar-color: #d6c7cc transparent; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .68rem; }
.admin-table th { background: #fcfafb; color: #82787d; padding: 11px 15px; text-align: right; white-space: nowrap; font-size: .57rem; }
.admin-table td { padding: 13px 15px; border-top: 1px solid #f0ebed; white-space: nowrap; }
.admin-table tbody tr { transition: background .18s var(--ease); }
.admin-table tbody tr:hover { background: #fffafd; }
.code-text { direction: ltr; text-align: right; font-family: Consolas, "Cascadia Code", monospace; font-weight: 700; color: #3b2d33; letter-spacing: .025em; }
.status { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 20px; font-weight: 800; font-size: .57rem; }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-verified { color: #137453; background: #e9f8f2; }
.status-unused { color: #326b9e; background: #edf6fd; }
.status-disabled { color: #8a6875; background: #f3edf0; }
.status-expired { color: #ad6420; background: #fff4e8; }
.activation-meta { display: grid; gap: 3px; min-width: 150px; }
.activation-meta b { font-size: .64rem; }
.activation-meta small { color: #82777c; font-size: .57rem; }
.activation-meta .activation-role { display: inline-flex; width: fit-content; color: #7a1835; background: #fff0f4; border-radius: 5px; padding: 2px 6px; font-size: .52rem; font-weight: 800; }
.empty-state { padding: 46px 20px !important; text-align: center; color: var(--muted); }
.page-actions { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; flex-direction: column; margin-bottom: 17px; }
.page-actions h2 { margin: 0; font-size: 1.05rem; }
.page-actions p { color: var(--muted); margin: 4px 0 0; font-size: .64rem; }
.button { border: 0; border-radius: 10px; min-height: 39px; padding: 9px 12px; cursor: pointer; font-size: .64rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: 7px; transition: transform .2s var(--ease), box-shadow .2s var(--ease), filter .2s var(--ease); }
.button:hover { transform: translateY(-1px); filter: brightness(1.02); }
.button-primary { color: white; background: linear-gradient(135deg, var(--brand-bright), var(--brand)); box-shadow: 0 8px 18px rgba(149,23,55,.16); }
.button-secondary { color: var(--brand); background: var(--brand-soft); }
.button-danger { color: #a22536; background: #fff0f2; }
.generation-layout { display: grid; gap: 13px; align-items: start; }
.generation-form h2 { margin: 0 0 5px; font-size: 1rem; }
.generation-form > p { color: var(--muted); font-size: .64rem; line-height: 1.8; margin: 0 0 18px; }
.form-group { margin-bottom: 14px; }
.form-row { display: grid; gap: 11px; }
.quantity-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 7px; }
.quantity-presets button { border: 1px solid var(--line); background: white; border-radius: 8px; min-height: 34px; color: #756c70; font-size: .6rem; cursor: pointer; transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease); }
.quantity-presets button:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-wash); }
.form-error { color: var(--danger); font-size: .6rem; margin-top: 5px; display: block; }
.filters { display: grid; gap: 9px; padding: 15px 17px; border-bottom: 1px solid var(--line); }
.filters .form-control { min-height: 41px; padding-block: 8px; font-size: .68rem; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 17px; border-top: 1px solid var(--line); color: var(--muted); font-size: .58rem; }
.pagination-links { display: flex; gap: 5px; direction: ltr; }
.pagination-links a, .pagination-links span { min-width: 29px; height: 29px; padding: 0 8px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 7px; }
.pagination-links .current { background: var(--brand); color: white; border-color: var(--brand); }

/* Login */
.login-page { min-height: 100vh; display: grid; background: white; }
.login-visual { min-height: 272px; display: flex; align-items: stretch; position: relative; overflow: hidden; color: white; background: #211318; isolation: isolate; }
.login-visual::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(18,7,11,.96) 0%, rgba(31,12,20,.72) 59%, rgba(52,17,29,.24) 100%); }
.login-visual-art { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: center 61%; }
.login-visual-content { width: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: 24px 21px 20px; }
.login-brand { width: 155px; filter: brightness(0) invert(1); }
.login-visual-copy { max-width: 370px; }
.login-kicker { display: inline-flex; align-items: center; gap: 7px; color: #f3c6d3; font-size: .65rem; font-weight: 800; letter-spacing: .02em; }
.login-kicker i { width: 7px; height: 7px; border-radius: 50%; background: #f285a2; box-shadow: 0 0 0 5px rgba(242,133,162,.14); }
.login-visual h1 { font-size: 1.7rem; line-height: 1.32; margin: 8px 0 6px; }
.login-visual h1 span { color: #f18aa5; }
.login-visual p { margin: 0; color: #e4cbd2; font-size: .68rem; line-height: 1.9; max-width: 335px; }
.login-form-side { display: grid; place-items: center; padding: 31px 20px 36px; background: radial-gradient(circle at 10% 10%, rgba(149,23,55,.07), transparent 25rem), #fff; }
.login-box { width: min(430px, 100%); }
.login-box h2 { font-size: 1.55rem; line-height: 1.35; margin: 0 0 7px; }
.login-box > p { color: var(--muted); font-size: .76rem; margin: 0 0 25px; }
.login-box .form-control { min-height: 54px; padding: 13px; }
.checkbox { display: flex; align-items: center; gap: 7px; font-size: .69rem; color: var(--muted); margin: 14px 0 20px; }
.checkbox input { width: 17px; height: 17px; accent-color: var(--brand); }
.login-home-link { display: block; text-align: center; color: var(--brand); font-size: .67rem; font-weight: 800; margin-top: 17px; }

@keyframes fade-in { from { opacity: 0; } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(18px) scale(.96); } }
@keyframes pulse-ring { 0% { transform: scale(.7); opacity: .7; } 80%,100% { transform: scale(1.18); opacity: 0; } }

@media (min-width: 560px) {
    .container-wide { width: min(100% - 44px, 1180px); }
    .brand img { width: 182px; }
    .admin-link { width: auto; height: auto; display: inline-flex; gap: 8px; padding: 10px 14px; font-size: .7rem; }
    .hero { padding-top: 46px; }
    .hero h1 { font-size: clamp(2.7rem, 8vw, 3.8rem); }
    .verify-card { padding: 28px; }
    .optional-grid, .form-row { grid-template-columns: 1fr 1fr; }
    .stats-grid { grid-template-columns: repeat(3, 1fr); }
    .filters { grid-template-columns: 2fr 1fr; }
    .page-actions { align-items: center; flex-direction: row; }
    .login-form-side { padding: 40px; }
}

@media (min-width: 820px) {
    .public-header { height: 92px; }
    .brand img { width: 220px; }
    .hero { min-height: 640px; grid-template-columns: 1fr .95fr; gap: clamp(42px, 7vw, 100px); padding: 34px 0 68px; text-align: right; }
    .hero::before { width: 520px; height: 520px; left: -250px; top: 20px; box-shadow: 0 0 0 70px rgba(149,23,55,.025), 0 0 0 140px rgba(149,23,55,.018); }
    .eyebrow { margin-bottom: 20px; font-size: .8rem; }
    .hero h1 { font-size: clamp(3.1rem, 5vw, 4.35rem); line-height: 1.2; }
    .hero-lead { margin: 23px 0 31px; font-size: 1.06rem; }
    .trust-row { justify-content: flex-start; gap: 28px; }
    .verify-card { padding: clamp(28px, 3.4vw, 40px); border-radius: 28px; }
    .card-head h2 { font-size: 1.52rem; }
    .admin-sidebar { width: 258px; transform: none; position: fixed; padding: 28px 18px; }
    .admin-main { margin-right: 258px; }
    .mobile-menu { display: none; }
    .admin-topbar { min-height: 78px; padding: 14px 32px; }
    .admin-topbar h1 { font-size: 1.2rem; }
    .admin-topbar p { font-size: .65rem; }
    .topbar-link { font-size: .67rem; padding: 9px 12px; }
    .admin-content { padding: 30px 32px 52px; }
    .stats-grid { grid-template-columns: repeat(5, 1fr); gap: 14px; }
    .stat-card { padding: 18px; }
    .dashboard-grid { grid-template-columns: 1.3fr .7fr; gap: 16px; margin-top: 16px; }
    .panel { padding: 21px; }
    .bar-chart { height: 180px; gap: 13px; }
    .table-panel { margin-top: 16px; }
    .table-panel .panel-head { padding: 20px 21px 0; }
    .generation-layout { grid-template-columns: 360px 1fr; gap: 16px; }
    .generation-form { position: sticky; top: 98px; }
    .filters { grid-template-columns: 2fr 1fr 1fr auto; padding: 18px 21px; }
    .login-page { grid-template-columns: 1fr 1fr; }
    .login-visual { min-height: 100vh; }
    .login-visual-content { justify-content: center; padding: clamp(42px, 7vw, 100px); }
    .login-brand { width: min(360px, 80%); }
    .login-visual-copy { margin-top: clamp(40px, 5vw, 70px); max-width: 510px; }
    .login-visual h1 { font-size: clamp(2.4rem, 4vw, 3.6rem); margin: 10px 0 15px; }
    .login-visual p { font-size: .91rem; max-width: 460px; }
    .login-form-side { min-height: 100vh; padding: 28px 34px; }
    .login-box h2 { font-size: 1.7rem; }
}

/* OTO motion and administration art direction */
.page-transition-curtain { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; overflow: hidden; visibility: hidden; background: linear-gradient(145deg, #190c12 0%, #3c1421 48%, #8e1635 100%); clip-path: inset(100% 0 0); transition: clip-path .46s cubic-bezier(.76,0,.24,1), visibility 0s linear .46s; pointer-events: none; }
.page-transition-curtain::before { content: ""; position: absolute; inset: -40%; background: repeating-radial-gradient(circle at 50% 50%, transparent 0 58px, rgba(255,255,255,.045) 59px 60px); transform: rotate(-12deg); }
.page-transition-curtain::after { content: ""; position: absolute; width: 34vw; min-width: 220px; aspect-ratio: 1; border-radius: 50%; background: rgba(229,93,130,.18); filter: blur(70px); }
.page-transition-curtain img { width: min(310px, 58vw); position: relative; z-index: 1; filter: brightness(0) invert(1); opacity: 0; transform: translateY(18px); transition: opacity .24s ease .16s, transform .35s var(--ease) .1s; }
html.page-leaving .page-transition-curtain { visibility: visible; clip-path: inset(0); transition: clip-path .46s cubic-bezier(.76,0,.24,1), visibility 0s; pointer-events: all; }
html.page-leaving .page-transition-curtain img { opacity: 1; transform: translateY(0); }
.public-page, .admin-body, .login-page { animation: page-arrival .55s var(--ease) both; }

/* Public activation flow: task first, brand second */
.hero { align-items: start; }
.hero-copy { padding-top: 18px; }
.hero .eyebrow { font-size: .62rem; letter-spacing: .12em; }
.hero h1 { max-width: 9ch; }
.hero-lead { max-width: 29rem; }
.trust-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; max-width: 390px; margin-inline: auto; }
.trust-row > div { min-height: 65px; padding: 9px; gap: 8px; border: 1px solid rgba(149,23,55,.1); border-radius: 14px; background: rgba(255,255,255,.62); box-shadow: 0 8px 18px rgba(59,19,34,.035); }
.trust-icon { width: 30px; height: 30px; border-radius: 9px; font-size: .62rem; }
.trust-row b { font-size: .62rem; line-height: 1.4; }
.trust-row small { font-size: .5rem; line-height: 1.45; }
.verify-card-wrap { margin-top: 0; }
.verify-card { padding: 22px 18px 21px; }
.card-head { margin-bottom: 14px; padding-bottom: 14px; }
.card-head h2 { font-size: 1.24rem; }
.form-kicker { display: block; color: var(--brand); font-size: .55rem; font-weight: 800; letter-spacing: .08em; margin-bottom: 2px; }
.activation-progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; list-style: none; padding: 8px; margin: 0 0 17px; border: 1px solid #eee2e6; border-radius: 14px; background: #fcf8f9; }
.activation-progress li { display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 27px; color: #9a8b91; font-size: .54rem; font-weight: 800; }
.activation-progress span { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; color: #96848b; background: #eee6e9; font-size: .5rem; }
.activation-progress .is-current { color: var(--brand); }
.activation-progress .is-current span { color: white; background: var(--brand); box-shadow: 0 4px 9px rgba(149,23,55,.2); }
.form-stage-label { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.form-stage-label > span { width: 27px; height: 27px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px; color: var(--brand); background: var(--brand-soft); font-size: .54rem; font-weight: 900; }
.form-stage-label b, .form-stage-label small { display: block; }
.form-stage-label b { color: #493b41; font-size: .72rem; line-height: 1.3; }
.form-stage-label small { color: #98898f; font-size: .52rem; margin-top: 1px; }
.code-field { height: 64px; border-width: 1px; background: #fff; box-shadow: 0 5px 13px rgba(74,23,43,.04); }
.code-field input { font-size: 1rem; }
.owner-fields { margin-top: 18px; }
.primary-button { position: relative; overflow: hidden; min-height: 59px; }
.primary-button::before { content: ""; position: absolute; width: 70px; height: 140%; top: -20%; left: -90px; transform: rotate(18deg); background: rgba(255,255,255,.2); transition: left .55s var(--ease); }
.primary-button:hover::before { left: 115%; }
.primary-button span, .primary-button svg { position: relative; z-index: 1; }

@media (max-width: 819px) {
    .hero { gap: 26px; padding-top: 11px; }
    .verify-card-wrap { order: -1; }
    .hero-copy { padding: 0; }
}

@media (min-width: 820px) {
    .hero { align-items: center; }
    .hero-copy { padding-top: 0; }
    .trust-row { margin-inline: 0; }
    .verify-card { padding: 30px; }
    .activation-progress { margin-bottom: 19px; }
}

.admin-body { color: var(--admin-ink); background-color: var(--admin-canvas); background-image: radial-gradient(circle at 5% 0%, rgba(149,23,55,.12), transparent 25rem), radial-gradient(circle at 82% 38%, rgba(228,95,131,.07), transparent 24rem), linear-gradient(135deg, rgba(255,255,255,.62), transparent 40%); position: relative; }
.admin-body::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .28; background-image: linear-gradient(rgba(68,29,42,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(68,29,42,.035) 1px, transparent 1px); background-size: 34px 34px; mask-image: linear-gradient(to bottom, #000, transparent 78%); }
.admin-sidebar { background: linear-gradient(165deg, #381522 0%, #241218 53%, #160c10 100%); padding: 25px 17px 20px; box-shadow: -18px 0 55px rgba(27,9,15,.22); }
.admin-sidebar::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 78% 8%, rgba(228,95,131,.2), transparent 13rem), repeating-linear-gradient(145deg, transparent 0 41px, rgba(255,255,255,.018) 42px 43px); }
.admin-sidebar > * { position: relative; z-index: 1; }
.admin-brand { padding: 7px 12px 24px; }
.admin-brand img { width: 174px; }
.admin-brand span { display: block; color: #9e818c; font-size: .47rem; font-weight: 800; letter-spacing: .22em; margin-top: 9px; direction: ltr; text-align: left; }
.admin-nav { gap: 7px; }
.admin-nav a { min-height: 47px; padding: 12px 14px; border-radius: 13px; color: #cdbac2; font-size: .75rem; }
.admin-nav a::after { content: ""; position: absolute; right: 0; width: 3px; height: 0; border-radius: 4px; background: #f58baa; transition: height .24s var(--ease); }
.admin-nav a:hover::after, .admin-nav a.active::after { height: 21px; }
.admin-nav a.active { background: linear-gradient(100deg, rgba(208,50,91,.95), rgba(129,17,48,.92)); box-shadow: 0 13px 26px rgba(84,7,29,.32), inset 0 1px rgba(255,255,255,.15); }
.admin-nav svg { width: 19px; }
.admin-avatar { border-radius: 50%; background: linear-gradient(145deg, #ed6e92, #871333); box-shadow: 0 8px 18px rgba(0,0,0,.22); }
.admin-topbar { min-height: 82px; padding: 13px 16px; background: rgba(255,253,253,.78); border-color: rgba(109,55,73,.11); backdrop-filter: blur(20px) saturate(1.2); box-shadow: 0 7px 24px rgba(56,24,36,.045); }
.topbar-heading { min-width: 0; display: flex; align-items: center; gap: 12px; }
.topbar-kicker { display: block; color: var(--brand); direction: ltr; text-align: right; font-size: .44rem; font-weight: 800; letter-spacing: .14em; margin-bottom: 2px; }
.admin-topbar h1 { font-size: 1.08rem; letter-spacing: -.02em; }
.topbar-link { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 8px 11px; border-color: #dcbac5; border-radius: 12px; background: rgba(255,255,255,.72); box-shadow: 0 5px 14px rgba(91,31,52,.05); }
.topbar-link:hover { color: white; background: var(--brand); border-color: var(--brand); box-shadow: 0 9px 20px rgba(149,23,55,.2); }
.admin-content { position: relative; z-index: 1; }
.admin-content > * { animation: admin-reveal .58s var(--ease) both; }
.admin-content > *:nth-child(2) { animation-delay: .07s; }
.admin-content > *:nth-child(3) { animation-delay: .14s; }
.admin-content > *:nth-child(4) { animation-delay: .2s; }
.stat-card { overflow: hidden; position: relative; background: rgba(255,253,253,.9); border-color: rgba(100,50,67,.1); border-radius: 18px; box-shadow: 0 11px 28px rgba(54,21,33,.055); }
.stat-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: linear-gradient(to bottom, var(--brand-bright), transparent 78%); opacity: .7; }
.stat-card::after { content: ""; position: absolute; width: 95px; height: 95px; left: -52px; top: -55px; border-radius: 50%; background: rgba(149,23,55,.045); }
.stat-card:hover { transform: translateY(-4px); border-color: rgba(149,23,55,.23); box-shadow: 0 18px 36px rgba(54,21,33,.09); }
.stat-card-head { font-size: .62rem; font-weight: 700; }
.stat-card-icon { width: 35px; height: 35px; border-radius: 50%; }
.stat-value { font-size: 1.8rem; font-weight: 800; }
.panel { background: rgba(255,253,253,.92); border-color: rgba(100,50,67,.1); border-radius: 20px; box-shadow: 0 12px 32px rgba(54,21,33,.05); backdrop-filter: blur(12px); }
.panel-head h2 { color: #34232a; font-size: .94rem; }
.panel-head p { color: #8a7a80; }
.panel-link { display: inline-flex; align-items: center; min-height: 34px; padding: 6px 10px; border-radius: 9px; background: #fff2f6; transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease); }
.panel-link:hover { color: white; background: var(--brand); transform: translateY(-1px); }
.bar { background: linear-gradient(180deg, #ef7697 0%, #a31840 70%, #71102d 100%); box-shadow: 0 7px 15px rgba(149,23,55,.13); }
.progress-ring { box-shadow: inset 0 0 0 1px rgba(149,23,55,.05), 0 12px 24px rgba(149,23,55,.08); }
.admin-table th { background: #faf6f7; color: #7d6b72; padding-block: 13px; letter-spacing: .01em; }
.admin-table td { padding-block: 15px; }
.admin-table tbody tr:hover { background: #fff7fa; }
.page-actions h2 { font-size: 1.14rem; }
.page-actions p { font-size: .66rem; }
.button { border-radius: 11px; }
.button-primary { background: linear-gradient(110deg, #c42f58, #821431); box-shadow: 0 9px 20px rgba(149,23,55,.2); }

.generation-form { overflow: hidden; padding: 0 !important; border-radius: 23px; border-color: rgba(149,23,55,.16); box-shadow: 0 18px 45px rgba(62,22,37,.1); }
.generation-form-head { padding: 22px 20px 19px; margin-bottom: 19px; color: white; background: radial-gradient(circle at 8% 0%, rgba(239,118,151,.32), transparent 11rem), linear-gradient(135deg, #35131f, #811633); position: relative; }
.generation-form-head::after { content: ""; position: absolute; width: 80px; height: 80px; left: -32px; bottom: -54px; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; box-shadow: 0 0 0 22px rgba(255,255,255,.035); }
.generation-form-head > span { color: #f4afc2; display: block; direction: ltr; text-align: right; font-size: .48rem; font-weight: 800; letter-spacing: .14em; margin-bottom: 7px; }
.generation-form-head h2 { color: white; font-size: 1.17rem; margin: 0 0 4px; }
.generation-form-head p { color: #ddc4cc; font-size: .62rem; margin: 0; }
.generation-form > .form-group, .generation-form > .form-row, .generation-form > .primary-button, .generation-form > .generator-assurance { width: calc(100% - 40px); margin-inline: 20px; }
.generation-form .form-group { margin-bottom: 16px; }
.generation-form .form-row { gap: 10px; }
.generation-form .form-group label { color: #514047; font-size: .69rem; margin-bottom: 7px; }
.generation-form .form-control, .login-box .form-control { min-height: 53px; padding: 12px 14px; border: 1px solid #e3d7db; border-radius: 13px; background: #fcf9fa; font-size: .79rem; box-shadow: inset 0 1px rgba(73,29,45,.025); }
.generation-form .form-control:hover, .login-box .form-control:hover { border-color: #cdaebb; background: white; }
.generation-form .form-control:focus, .login-box .form-control:focus { border-color: var(--brand); background: white; box-shadow: 0 0 0 4px rgba(149,23,55,.09), 0 10px 22px rgba(81,25,45,.06); transform: translateY(-1px); }
.quantity-presets { gap: 7px; margin-top: 8px; }
.quantity-presets button { min-height: 38px; border-style: dashed; border-color: #d9c5cc; border-radius: 10px; background: #fffafa; color: #755f68; font-weight: 800; }
.quantity-presets button:hover, .quantity-presets button.is-selected { color: white; border-color: var(--brand); border-style: solid; background: linear-gradient(120deg, var(--brand-bright), var(--brand)); box-shadow: 0 7px 14px rgba(149,23,55,.16); }
.generation-form > .primary-button { margin-top: 4px; min-height: 55px; }
.generator-assurance { display: flex; align-items: center; gap: 9px; padding: 14px 0 19px; color: #786970; }
.generator-assurance > span { width: 27px; height: 27px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: #147453; background: #eaf8f2; font-size: .68rem; font-weight: 900; }
.generator-assurance p { margin: 0; }
.generator-assurance b, .generator-assurance small { display: block; }
.generator-assurance b { color: #58474e; font-size: .59rem; }
.generator-assurance small { font-size: .51rem; margin-top: 1px; }
.filters { background: linear-gradient(90deg, #fffdfd, #fbf5f7); }
.filters .form-control { min-height: 45px; border-radius: 11px; background-color: white; }

.login-form-side { background: radial-gradient(circle at 15% 13%, rgba(149,23,55,.12), transparent 21rem), linear-gradient(145deg, #fff, #faf4f6); }
.login-box { padding: 28px 22px; border: 1px solid rgba(149,23,55,.12); border-radius: 24px; background: rgba(255,255,255,.88); box-shadow: 0 24px 60px rgba(59,19,34,.1); backdrop-filter: blur(18px); }
.login-box h2 { letter-spacing: -.035em; }
.login-box .form-group label { color: #49383f; font-size: .72rem; }
.login-box .primary-button { min-height: 57px; }
.login-home-link { width: fit-content; margin-inline: auto; padding-bottom: 3px; border-bottom: 1px solid rgba(149,23,55,.25); transition: color .2s var(--ease), border-color .2s var(--ease); }
.login-home-link:hover { color: var(--brand-dark); border-color: var(--brand); }

@keyframes page-arrival { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
@keyframes admin-reveal { from { opacity: 0; transform: translateY(17px); } to { opacity: 1; transform: none; } }

@media (max-width: 559px) {
    .topbar-link span { display: none; }
    .topbar-link { width: 40px; justify-content: center; padding: 0; }
    .topbar-kicker { display: none; }
    .login-box { padding: 25px 19px; }
}

@media (min-width: 820px) {
    .admin-sidebar { width: 274px; padding: 30px 19px 21px; }
    .admin-main { margin-right: 274px; }
    .admin-topbar { min-height: 88px; padding: 15px 34px; }
    .admin-topbar h1 { font-size: 1.28rem; }
    .admin-content { padding: 34px 34px 58px; }
    .stats-grid { gap: 16px; }
    .stat-card { padding: 20px; }
    .generation-layout { grid-template-columns: 420px 1fr; gap: 20px; }
    .generation-form { top: 108px; }
    .login-box { width: min(465px, 100%); padding: 36px 34px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Focused two-step public activation flow */
.public-page .hero { align-items: center; }
.public-page .trust-row { display: none; }
.public-page .hero-copy { max-width: 31rem; }
.public-page .hero-lead { margin-bottom: 0; }
.owner-fields { margin: 0 0 14px; padding: 0; overflow: hidden; border: 0; border-radius: 0; background: transparent; }
.optional-grid { padding-top: 12px; gap: 11px; }
.activation-role-fieldset { margin-top: 13px; }
.role-options { gap: 8px; }
.role-option-content { min-height: 54px; padding: 9px; }
.role-option-content small { display: none; }
.activation-vehicle-field { margin-top: 12px; }
@media (max-width: 819px) {
    .public-page .hero { gap: 22px; padding-bottom: 38px; }
    .public-page .hero-copy { display: none; }
    .public-page .verify-card-wrap { width: min(100%, 510px); }
    .public-page .card-head { margin-bottom: 12px; }
    .public-page .card-head p { display: none; }
    .public-page .verify-card { padding: 20px 17px; border-radius: 23px; }
    .public-page .code-field { height: 60px; }
}

@media (min-width: 820px) {
    .public-page .hero { min-height: 610px; gap: clamp(46px, 8vw, 116px); }
    .public-page .verify-card-wrap { width: min(100%, 510px); }
    .public-page .verify-card { padding: 30px 32px; }
    .public-page .optional-grid { grid-template-columns: 1fr 1fr; }
}

/* Legible type scale for public pages and daily admin work */
body { font-size: 17px; font-weight: 500; line-height: 1.75; }
button, input, select, textarea { font-weight: 600; }

.public-page .admin-link { font-size: .8rem; }
.public-page .hero-lead { font-size: 1.02rem; line-height: 2; }
.public-page .card-head h2 { font-size: 1.46rem; }
.public-page .card-head p { font-size: .8rem; line-height: 1.7; }
.public-page .form-kicker { font-size: .66rem; }
.public-page .activation-progress li { font-size: .68rem; min-height: 31px; }
.public-page .activation-progress span { width: 21px; height: 21px; font-size: .62rem; }
.public-page .form-stage-label b { font-size: .84rem; }
.public-page .form-stage-label small { font-size: .66rem; }
.public-page .verify-card label { font-size: .84rem; }
.public-page .code-field input, .public-page .optional-grid input, .public-page .activation-vehicle-field input { font-size: .96rem; }
.public-page .field-hint { font-size: .72rem; }
.public-page .role-option-content b { font-size: .76rem; }
.public-page .primary-button { font-size: .96rem; }
.public-page .secure-note { font-size: .7rem; }
.public-page .public-footer p { font-size: .8rem; }
.public-page .public-footer small { font-size: .7rem; }

.admin-body { font-size: 16px; line-height: 1.7; }
.admin-nav a { min-height: 50px; font-size: .86rem; }
.admin-user b { font-size: .78rem; }
.admin-user small, .admin-brand span { font-size: .64rem; }
.admin-topbar h1 { font-size: 1.25rem; }
.admin-topbar p { font-size: .72rem; }
.topbar-link { min-height: 43px; font-size: .74rem; }
.admin-content { padding: 24px 16px 48px; }
.flash { font-size: .84rem; }
.stats-grid { gap: 12px; }
.stat-card { padding: 17px; }
.stat-card-head { font-size: .76rem; }
.stat-card-icon { width: 38px; height: 38px; font-size: 1rem; }
.stat-value { font-size: 1.95rem; margin-top: 14px; }
.stat-note { font-size: .68rem; }
.panel { padding: 20px; }
.panel-head h2 { font-size: 1.08rem; }
.panel-head p { font-size: .74rem; line-height: 1.65; }
.panel-link { font-size: .76rem; }
.bar span, .bar-label { font-size: .64rem; }
.progress-label { font-size: .76rem; }
.table-panel .panel-head { padding: 20px 20px 0; }
.admin-table { min-width: 740px; font-size: .84rem; }
.admin-table th { font-size: .72rem; padding: 13px 16px; }
.admin-table td { padding: 15px 16px; }
.status { font-size: .68rem; padding: 6px 10px; }
.activation-meta b { font-size: .8rem; }
.activation-meta small { font-size: .7rem; }
.activation-meta .activation-role { font-size: .65rem; }
.page-actions h2 { font-size: 1.28rem; }
.page-actions p, .generation-form > p { font-size: .78rem; }
.button { min-height: 44px; padding: 10px 14px; font-size: .78rem; }
.generation-form h2 { font-size: 1.18rem; }
.generation-form .form-group label, .login-box .form-group label { font-size: .82rem; }
.generation-form .form-control, .login-box .form-control, .filters .form-control { font-size: .84rem; }
.quantity-presets button { min-height: 40px; font-size: .72rem; }
.form-error { font-size: .7rem; }
.pagination { font-size: .72rem; }
.login-kicker { font-size: .72rem; }
.login-visual p, .login-box > p { font-size: .84rem; }
.login-home-link { font-size: .76rem; }

@media (max-width: 559px) {
    body { font-size: 16px; }
    .public-page .card-head h2 { font-size: 1.32rem; }
    .public-page .verify-card label { font-size: .8rem; }
    .admin-topbar { min-height: 78px; padding: 12px 14px; }
    .admin-topbar h1 { font-size: 1.08rem; }
    .admin-topbar p { font-size: .66rem; }
    .admin-content { padding: 18px 12px 40px; }
    .stats-grid { grid-template-columns: 1fr; }
    .stat-card { padding: 16px; }
    .stat-value { font-size: 1.85rem; }
    .panel { padding: 17px; }
    .panel-head { align-items: flex-start; }
    .panel-head h2 { font-size: 1rem; }
    .panel-head p { font-size: .7rem; }
    .table-panel .panel-head { padding: 17px 17px 0; }
    .button { min-height: 43px; }
}

@media (min-width: 820px) {
    body { font-size: 18px; }
    .admin-content { padding: 34px 36px 60px; }
    .admin-topbar { padding-inline: 36px; }
    .admin-topbar h1 { font-size: 1.38rem; }
    .admin-topbar p { font-size: .78rem; }
    .stat-card-head { font-size: .82rem; }
    .panel-head h2 { font-size: 1.14rem; }
    .admin-table { font-size: .88rem; }
}

/* One-screen warranty activation: information on one side, one compact form on the other. */
.public-page .verify-card-wrap { width: min(100%, 660px); }
.public-page .verify-card { padding: 25px 22px 22px; }
.public-page .card-head { margin-bottom: 16px; }
.public-page .form-stage-label { margin-bottom: 7px; }
.public-page .field-hint { margin-bottom: 13px; }
.public-page .owner-fields { display: grid; gap: 12px; margin: 0 0 16px; }
.public-page .optional-grid { padding: 0; }
.public-page .activation-role-fieldset { margin: 0; }
.public-page .activation-vehicle-field { margin: 0; }
.public-page .role-option-content { min-height: 50px; }
.public-page .primary-button { min-height: 56px; }

@media (min-width: 560px) {
    .public-page .verify-card { padding: 29px 30px 26px; }
    .public-page .owner-fields { grid-template-columns: 1.15fr .85fr; column-gap: 14px; align-items: end; }
    .public-page .optional-grid { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
    .public-page .activation-role-fieldset { grid-column: 1; }
    .public-page .activation-vehicle-field { grid-column: 2; }
    .public-page .role-options { gap: 7px; }
    .public-page .role-option-content { min-height: 53px; padding: 8px; }
}

@media (min-width: 820px) {
    .public-page .hero { grid-template-columns: minmax(330px, .76fr) minmax(560px, 1.24fr); gap: clamp(36px, 5vw, 72px); min-height: 690px; padding-block: 46px 68px; }
    .public-page .hero-copy { min-height: 570px; display: flex; flex-direction: column; justify-content: center; padding: clamp(34px, 4vw, 58px); color: white; overflow: hidden; border-radius: 32px; background: radial-gradient(circle at 12% 10%, rgba(241,123,157,.28), transparent 14rem), linear-gradient(145deg, #2b1019, #61142d 57%, #8c1736); box-shadow: 0 28px 60px rgba(68,16,35,.2); }
    .public-page .hero-copy::after { content: ""; position: absolute; width: 250px; height: 250px; left: -115px; bottom: -118px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; box-shadow: 0 0 0 34px rgba(255,255,255,.035), 0 0 0 70px rgba(255,255,255,.02); }
    .public-page .hero-copy > * { position: relative; z-index: 1; }
    .public-page .hero-copy .eyebrow { color: #f6b7ca; }
    .public-page .hero-copy .eyebrow span { background: #f6b7ca; }
    .public-page .hero-copy h1 { max-width: 8ch; color: white; font-size: clamp(3rem, 4.2vw, 4rem); }
    .public-page .hero-copy h1 strong { color: #f799b4; }
    .public-page .hero-copy .hero-lead { color: #ead3da; font-size: .98rem; }
    .public-page .hero-copy .trust-row { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 30px 0 0; }
    .public-page .hero-copy .trust-row > div { min-height: 0; padding: 10px; color: #f3e4e8; border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.07); box-shadow: none; }
    .public-page .hero-copy .trust-icon { color: #fff; background: rgba(255,255,255,.14); }
    .public-page .hero-copy .trust-row b { color: white; font-size: .72rem; }
    .public-page .hero-copy .trust-row small { color: #e7cbd4; font-size: .62rem; }
    .public-page .verify-card-wrap { width: min(100%, 660px); }
    .public-page .verify-card { padding: 32px 34px 29px; border-radius: 29px; }
    .public-page .code-field { height: 62px; }
    .public-page .optional-grid input, .public-page .activation-vehicle-field input { min-height: 54px; }
}

@media (max-width: 559px) {
    .public-header { height: 74px; }
    .public-page .admin-link { width: auto; min-height: 42px; height: auto; display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; color: white; border: 0; border-radius: 13px; background: linear-gradient(135deg, var(--brand-bright), var(--brand-dark)); box-shadow: 0 9px 18px rgba(149,23,55,.2); font-size: .72rem; font-weight: 800; line-height: 1; white-space: nowrap; }
    .public-page .admin-link svg { width: 17px; }
    .public-page .admin-link:hover { color: white; border: 0; background: linear-gradient(135deg, #ce4168, var(--brand)); transform: translateY(-1px); }
}

.field-help { display: block; margin-top: 6px; color: var(--muted); font-size: .68rem; font-weight: 600; line-height: 1.55; }
.pagination-links .pagination-direction { min-width: auto; padding-inline: 11px; font-size: .68rem; font-weight: 800; }
.pagination-links .pagination-direction.is-disabled { color: #afa3a8; background: #faf7f8; }

@media (max-width: 559px) {
    .pagination { align-items: flex-start; flex-direction: column; }
    .pagination-links { width: 100%; justify-content: space-between; }
    .pagination-links .pagination-direction { padding-inline: 10px; }
}

/* Activation records: readable customer details on desktop, full cards on small screens. */
.code-chip { display: inline-flex; padding: 7px 9px; direction: ltr; border: 1px solid #eadce1; border-radius: 9px; background: #fff8fa; color: #5c1c32; font-family: Consolas, "Cascadia Code", monospace; font-size: .76rem; font-weight: 800; letter-spacing: .035em; }
.batch-name { color: #4f3f45; font-weight: 700; }
.customer-card { display: inline-flex; align-items: center; gap: 9px; min-width: 152px; }
.customer-avatar { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: var(--brand); background: linear-gradient(145deg, #f9dce5, #fff5f7); font-size: .82rem; font-weight: 900; }
.customer-copy { display: grid; gap: 1px; min-width: 0; }
.customer-copy b { overflow: hidden; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.customer-copy small { color: #83767c; font-size: .68rem; }
.check-count { min-width: 32px; height: 30px; display: inline-grid; place-items: center; border-radius: 9px; color: #6b5960; background: #f5eff1; font-size: .76rem; font-weight: 800; }
.activation-date { color: #64575d; font-size: .76rem; }
.code-action form, .batch-actions form { margin: 0; }
.code-action-buttons, .batch-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.button-delete { color: #9b2638; border: 1px solid #edcbd2; background: #fff; }
.button-delete:hover { color: #fff; border-color: #a22536; background: #a22536; }
.record-protected { display: inline-flex; align-items: center; width: fit-content; padding: 6px 8px; border: 1px solid #eadfe2; border-radius: 8px; color: #76656b; background: #faf7f8; font-size: .67rem; font-weight: 800; line-height: 1.35; }
.empty-value { color: #afa3a8; }

@media (max-width: 819px) {
    .responsive-table-wrap { overflow: visible; }
    .responsive-table { width: 100%; min-width: 0; border-collapse: separate; border-spacing: 0 11px; }
    .responsive-table thead { display: none; }
    .responsive-table tbody, .responsive-table tr, .responsive-table td { display: block; width: 100%; }
    .responsive-table tbody tr { padding: 5px 14px; border: 1px solid #e9dce1; border-radius: 16px; background: #fff; box-shadow: 0 8px 20px rgba(67,24,41,.055); }
    .responsive-table td { display: grid; grid-template-columns: minmax(94px, .78fr) minmax(0, 1.22fr); align-items: center; gap: 12px; padding: 10px 0; border: 0; text-align: right; white-space: normal; }
    .responsive-table td + td { border-top: 1px solid #f2eaed; }
    .responsive-table td::before { content: attr(data-label); color: #8a797f; font-size: .7rem; font-weight: 800; }
    .responsive-table .code-text { direction: rtl; text-align: right; }
    .responsive-table .code-chip { justify-self: start; }
    .responsive-table .customer-card, .responsive-table .activation-meta { min-width: 0; }
    .responsive-table .code-action .button { width: fit-content; }
    .responsive-table .code-action-buttons { justify-content: start; }
    .compact-activation-table tbody tr { padding-block: 5px; }
}

/* Full activation register: make submitted customer data the visual priority. */
.records-page-head { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-bottom: 19px; padding: 23px 24px; border: 1px solid rgba(149,23,55,.12); border-radius: 20px; background: radial-gradient(circle at 8% 0%, rgba(149,23,55,.1), transparent 14rem), linear-gradient(120deg, #fff, #fff8fa); box-shadow: 0 10px 27px rgba(57,22,35,.045); }
.records-kicker { display: block; color: var(--brand); direction: ltr; font-size: .62rem; font-weight: 900; letter-spacing: .13em; }
.records-page-head h2 { margin: 3px 0 4px; color: #332229; font-size: 1.35rem; }
.records-page-head p { max-width: 45rem; margin: 0; color: var(--muted); font-size: .8rem; }
.records-total { display: inline-flex; margin-top: 12px; padding: 5px 9px; border-radius: 8px; color: #754454; background: #fbeef2; font-size: .7rem; font-weight: 800; }
.records-filters { align-items: end; grid-template-columns: 1.45fr 1fr 1fr auto; }
.records-filters label { display: grid; gap: 6px; color: #65545a; font-size: .7rem; font-weight: 800; }
.records-filters label .form-control { width: 100%; }
.filter-actions { display: flex; align-items: center; gap: 10px; min-height: 42px; }
.filter-reset { color: var(--brand); font-size: .72rem; font-weight: 800; white-space: nowrap; }
.filter-reset:hover { color: var(--brand-dark); text-decoration: underline; }
.code-summary { display: grid; gap: 7px; }
.code-summary small { color: #8d7c82; font-family: "Cairo", Tahoma, Arial, sans-serif; font-size: .68rem; font-weight: 700; }
.detail-stack, .activity-stack { display: grid; gap: 6px; }
.detail-stack { color: #6b5c62; font-size: .72rem; }
.detail-stack .activation-role { width: fit-content; }
.activity-date { color: #75676d; font-size: .7rem; }
.activity-checks { width: fit-content; padding: 3px 7px; border-radius: 7px; color: #6d5c63; background: #f6eff1; font-size: .65rem; font-weight: 800; }
.codes-table th { padding-block: 15px; }

@media (max-width: 819px) {
    .records-page-head { align-items: flex-start; flex-direction: column; padding: 19px; }
    .records-page-head .button { width: 100%; }
    .records-page-head h2 { font-size: 1.16rem; }
    .records-page-head p { font-size: .74rem; }
    .records-filters { grid-template-columns: 1fr; }
    .filter-actions { justify-content: space-between; }
    .codes-table td { grid-template-columns: minmax(100px, .82fr) minmax(0, 1.18fr); }
    .codes-table .activity-stack, .codes-table .detail-stack { justify-items: start; }
}

.optional-label { display: inline-flex; margin-right: 5px; padding: 2px 6px; border-radius: 5px; color: #7b5260; background: #f7ecef; font-size: .58rem; font-weight: 800; vertical-align: middle; }
.fixed-length-note > div { min-height: 53px; display: grid; align-content: center; gap: 2px; padding: 10px 13px; border: 1px solid #e4d7dc; border-radius: 13px; background: linear-gradient(135deg, #fff9fa, #fff); }
.fixed-length-note b { color: var(--brand); font-size: .82rem; }
.fixed-length-note small { color: var(--muted); font-size: .66rem; line-height: 1.45; }

/* Result dialogs stay centered in the viewport and prioritize the outcome. */
.result-modal { display: none; align-items: center; justify-content: center; padding: max(20px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); isolation: isolate; }
.result-modal.is-open { display: flex; }
.modal-backdrop { z-index: 0; background: radial-gradient(circle at 50% 42%, rgba(184,46,82,.22), transparent 28rem), rgba(20,11,16,.78); backdrop-filter: blur(11px) saturate(1.08); }
.result-dialog { z-index: 1; width: min(520px, 100%); max-height: calc(100dvh - 40px); margin: auto; padding: 38px 30px 28px; border: 1px solid rgba(255,255,255,.7); border-radius: 30px; background: radial-gradient(circle at 50% 0, color-mix(in srgb, var(--result-color) 9%, white), white 17rem); box-shadow: 0 34px 90px rgba(10,4,8,.38), 0 2px 0 rgba(255,255,255,.85) inset; overflow: auto; scrollbar-width: thin; }
.result-dialog::before { height: 6px; }
.modal-close { right: 16px; left: auto; top: 16px; width: 36px; height: 36px; background: rgba(255,255,255,.82); box-shadow: 0 5px 14px rgba(57,22,35,.09); }
.result-rings { width: 112px; height: 112px; margin: 3px auto 18px; }
.result-icon { width: 74px; height: 74px; box-shadow: 0 15px 30px color-mix(in srgb, var(--result-color) 32%, transparent); }
.result-icon svg { width: 36px; }
.result-kicker { font-size: .72rem; letter-spacing: .08em; }
.result-dialog h2 { margin: 8px 0 10px; font-size: 1.58rem; }
.result-dialog > p { max-width: 390px; font-size: .88rem; line-height: 1.85; }
.result-code { margin: 21px 0 10px; padding: 13px 15px; border-radius: 15px; }
.result-code span { font-size: .72rem; }
.result-code b { font-size: .9rem; }
.result-date { font-size: .71rem; margin: 13px 0 20px; }
.modal-action { min-height: 54px; border-radius: 14px; box-shadow: 0 12px 22px color-mix(in srgb, var(--result-color) 23%, transparent); font-size: .94rem; }

@media (max-width: 559px) {
    .result-dialog { max-height: calc(100dvh - 28px); padding: 34px 20px 21px; border-radius: 24px; }
    .result-rings { transform: scale(.9); margin-block: -3px 10px; }
    .result-dialog h2 { font-size: 1.32rem; }
    .result-dialog > p { font-size: .8rem; }
}

/* Keep fixed dialogs relative to the browser viewport, not the full document. */
.public-page { animation: none; }
.public-page .site-shell { animation: page-arrival .55s var(--ease) both; }

/* Activation and batch records: prioritize practical customer information. */
.customer-record { min-width: 188px; padding: 7px 9px; border: 1px solid #efe2e6; border-radius: 12px; background: linear-gradient(135deg, #fff, #fff8fa); }
.customer-record .customer-avatar { width: 36px; height: 36px; }
.customer-label { display: block; color: #97727d; font-size: .6rem; font-weight: 800; letter-spacing: .02em; line-height: 1.3; }
.customer-copy b { overflow: visible; color: #3e2b31; font-size: .76rem; line-height: 1.45; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
.customer-phone { width: fit-content; color: var(--brand); font-size: .71rem; font-weight: 800; letter-spacing: .02em; line-height: 1.35; text-decoration: none; }
.customer-phone:hover { color: var(--brand-dark); text-decoration: underline; }
.activation-details { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; min-width: 200px; }
.activation-details > span { display: grid; gap: 2px; min-height: 45px; padding: 7px 8px; border-radius: 9px; background: #faf6f7; }
.activation-details small { color: #927b83; font-size: .61rem; font-weight: 800; line-height: 1.25; }
.activation-details b { color: #4a353c; font-size: .7rem; line-height: 1.35; overflow-wrap: anywhere; }
.activation-details .activation-role { padding: 0; color: #6d263d; background: transparent; font-size: .68rem; }
.batch-meta { color: #958b90; font-size: .68rem; font-weight: 700; }
.metric-value { display: inline-grid; min-width: 34px; place-items: center; padding: 3px 7px; border-radius: 7px; color: #56444a; background: #f6eff1; font-size: .72rem; }
.metric-verified { color: #176047; background: #e5f5ed; }

@media (max-width: 819px) {
    .responsive-table .customer-card { justify-self: start; }
    .responsive-table .customer-record { width: min(100%, 270px); }
    .responsive-table .activation-details { width: min(100%, 270px); justify-self: start; }
    .responsive-table .batch-actions { justify-content: start; }
    .responsive-table .batch-actions .button { width: auto; }
}

@media (max-width: 419px) {
    .responsive-table td { grid-template-columns: minmax(88px, .78fr) minmax(0, 1.22fr); gap: 9px; }
    .customer-record { min-width: 0; }
    .activation-details { grid-template-columns: 1fr; min-width: 0; }
    .responsive-table .batch-actions { align-items: stretch; flex-direction: column; }
    .responsive-table .batch-actions .button { width: 100%; }
}

/* Clear action hierarchy and calmer data-dense tables. */
.admin-table thead { border-bottom: 1px solid #eadde1; }
.admin-table tbody tr:nth-child(even) { background: #fdfafb; }
.admin-table tbody tr:hover { background: #fff4f7; }
.admin-table td { vertical-align: middle; }
.codes-table tbody tr { box-shadow: inset 3px 0 0 transparent; }
.codes-table tbody .code-row-verified { box-shadow: inset 3px 0 0 #50a77d; }
.codes-table tbody .code-row-disabled { box-shadow: inset 3px 0 0 #c6adb7; }
.codes-table tbody .code-row-expired { box-shadow: inset 3px 0 0 #e0a05b; }
.code-action-buttons, .batch-actions { gap: 8px; }
.button-delete { color: #fff; border: 1px solid #a91f3b; background: linear-gradient(135deg, #d13b5a, #a91f3b); box-shadow: 0 7px 15px rgba(169,31,59,.2); }
.button-delete:hover { color: #fff; border-color: #81142d; background: linear-gradient(135deg, #e04a69, #8d1731); box-shadow: 0 10px 20px rgba(137,20,48,.28); filter: none; }
.button-delete:focus-visible { outline: 3px solid rgba(209,59,90,.3); outline-offset: 2px; }
.code-action-buttons .button, .batch-actions .button { min-width: 82px; }

@media (min-width: 820px) {
    .codes-table td { padding-block: 17px; }
    .batches-table td, .dashboard-batches-table td { padding-block: 16px; }
    .codes-table .code-action { min-width: 176px; }
}

@media (max-width: 819px) {
    .responsive-table tbody tr:nth-child(even) { background: linear-gradient(135deg, #fff, #fdf9fa); }
    .responsive-table tbody tr:hover { background: #fff; }
    .responsive-table .code-action-buttons { gap: 8px; }
}

/* Semantic actions: green restores access, amber pauses it, red removes it. */
.button-reactivate { color: #fff; border: 1px solid #147354; background: linear-gradient(135deg, #239b72, #147354); box-shadow: 0 7px 15px rgba(20,115,84,.18); }
.button-reactivate:hover { color: #fff; border-color: #0e5c43; background: linear-gradient(135deg, #2aaa7d, #106344); box-shadow: 0 10px 20px rgba(20,115,84,.24); filter: none; }
.button-disable { color: #fff; border: 1px solid #b86a08; background: linear-gradient(135deg, #d99125, #b86a08); box-shadow: 0 7px 15px rgba(184,106,8,.17); }
.button-disable:hover { color: #fff; border-color: #955306; background: linear-gradient(135deg, #e3a039, #a45e07); box-shadow: 0 10px 20px rgba(184,106,8,.23); filter: none; }
.customer-whatsapp { display: inline-flex; align-items: center; gap: 5px; width: fit-content; color: #147d5d; font-size: .71rem; font-weight: 800; letter-spacing: .02em; line-height: 1.35; text-decoration: none; }
.customer-whatsapp span { padding: 1px 5px; border-radius: 5px; color: #fff; background: #24a579; font-size: .56rem; line-height: 1.45; }
.customer-whatsapp:hover { color: #0d6449; text-decoration: underline; }
.button-export { color: #7c243e; border: 1px solid #e3cbd3; background: linear-gradient(135deg, #fffafa, #f6e8ed); box-shadow: 0 6px 14px rgba(112,29,54,.08); }
.button-export:hover { color: #fff; border-color: var(--brand); background: linear-gradient(135deg, var(--brand-bright), var(--brand)); box-shadow: 0 10px 20px rgba(149,23,55,.2); filter: none; }

/* Unified action palette: restrained hues with one consistent button language. */
:root {
    --action-download-light: #5d7da7;
    --action-download-dark: #3f628d;
    --action-success-light: #3e9272;
    --action-success-dark: #276b54;
    --action-warning-light: #c4883e;
    --action-warning-dark: #935b1c;
    --action-danger-light: #c9586c;
    --action-danger-dark: #963246;
}

.button { min-height: 43px; padding: 10px 15px; border: 1px solid transparent; border-radius: 12px; font-size: .76rem; font-weight: 800; letter-spacing: .005em; line-height: 1.2; box-shadow: 0 6px 14px rgba(48,25,35,.1); transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease), filter .18s var(--ease); }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); box-shadow: none; }
.button:focus-visible { outline: 3px solid rgba(149,23,55,.23); outline-offset: 2px; }
.button-primary { color: #fff; border-color: #8e1734; background: linear-gradient(135deg, #c93f61, #8e1734); box-shadow: 0 8px 18px rgba(142,23,52,.22); }
.button-primary:hover { color: #fff; background: linear-gradient(135deg, #d64c6d, #7b112d); box-shadow: 0 11px 22px rgba(142,23,52,.27); filter: none; }
.button-secondary { color: #7b2941; border-color: #ead4dc; background: #fff8fa; box-shadow: 0 4px 11px rgba(83,31,49,.06); }
.button-secondary:hover { color: var(--brand); border-color: #d8b8c4; background: #fbeef2; box-shadow: 0 8px 16px rgba(83,31,49,.1); filter: none; }
.button-export { color: #fff; border-color: var(--action-download-dark); background: linear-gradient(135deg, var(--action-download-light), var(--action-download-dark)); box-shadow: 0 8px 17px rgba(63,98,141,.19); }
.button-export:hover { color: #fff; border-color: #315274; background: linear-gradient(135deg, #6b8bb4, #365a83); box-shadow: 0 11px 22px rgba(63,98,141,.26); filter: none; }
.button-reactivate { color: #fff; border-color: var(--action-success-dark); background: linear-gradient(135deg, var(--action-success-light), var(--action-success-dark)); box-shadow: 0 8px 17px rgba(39,107,84,.18); }
.button-reactivate:hover { color: #fff; border-color: #1d563f; background: linear-gradient(135deg, #4ba07f, #225f49); box-shadow: 0 11px 22px rgba(39,107,84,.24); filter: none; }
.button-disable { color: #fff; border-color: var(--action-warning-dark); background: linear-gradient(135deg, var(--action-warning-light), var(--action-warning-dark)); box-shadow: 0 8px 17px rgba(147,91,28,.17); }
.button-disable:hover { color: #fff; border-color: #754512; background: linear-gradient(135deg, #cf954e, #854f16); box-shadow: 0 11px 22px rgba(147,91,28,.23); filter: none; }
.button-delete { color: #fff; border-color: var(--action-danger-dark); background: linear-gradient(135deg, var(--action-danger-light), var(--action-danger-dark)); box-shadow: 0 8px 17px rgba(150,50,70,.2); }
.button-delete:hover { color: #fff; border-color: #792336; background: linear-gradient(135deg, #d76679, #842a3e); box-shadow: 0 11px 22px rgba(150,50,70,.28); filter: none; }

@media (max-width: 819px) {
    .responsive-table .code-action-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: min(100%, 290px); justify-self: start; }
    .responsive-table .code-action-buttons form { min-width: 0; }
    .responsive-table .code-action .button { width: 100%; min-width: 0; }
    .responsive-table .batch-actions .button { min-width: 108px; }
}

@media (max-width: 559px) {
    .button { min-height: 42px; padding-inline: 13px; font-size: .74rem; }
    .responsive-table .code-action-buttons { grid-template-columns: 1fr; }
    .responsive-table .batch-actions { align-items: stretch; flex-direction: column; width: min(100%, 290px); }
    .responsive-table .batch-actions .button { width: 100%; }
    .dashboard-batches-table .button-export { width: min(100%, 190px); }
}
