/* ==========================================================
   DIGITAL ATTENDANCE REGISTER
   Enterprise Edition v2.0
   Agri-Impact Limited
========================================================== */


/* ==========================================================
   01. ROOT VARIABLES
========================================================== */

:root {

    --green: #00a651;
    --green-dark: #08743d;
    --green-pale: #eaf8f0;
    --green-row: #c6efcb;

    --ink: #15231b;
    --muted: #657069;

    --surface: #ffffff;
    --canvas: #f3f7f4;

    --line: #dfe7e2;

    --danger: #b42318;
    --danger-pale: #fff0ee;

    --warning: #a15c00;
    --warning-pale: #fff7e6;

    --shadow:
        0 18px 60px rgba(13, 51, 31, 0.11);

    --radius: 20px;

    --font:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

}


/* ==========================================================
   02. RESET & BASE
========================================================== */

*,
*::before,
*::after {

    box-sizing: border-box;

}

html {

    min-height: 100%;
    background: var(--canvas);

}

body {

    margin: 0;

    min-height: 100vh;

    background: var(--canvas);

    color: var(--ink);

    font-family: var(--font);

    line-height: 1.5;

}

img {

    display: block;

    max-width: 100%;

    height: auto;

}

a {

    color: inherit;

    text-decoration: none;

}

button,
input,
select,
textarea {

    font: inherit;

}


/* ==========================================================
   03. TYPOGRAPHY
========================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {

    margin-top: 0;

    color: var(--ink);

}

p {

    margin-top: 0;

}

strong {

    font-weight: 700;

}

.eyebrow {

    color: var(--green-dark);

    font-size: 12px;

    font-weight: 800;

    letter-spacing: .08em;

    text-transform: uppercase;

}


/* ==========================================================
   04. LAYOUT UTILITIES
========================================================== */

.hidden {

    display: none !important;

}

.text-center {

    text-align: center;

}

.full-width {

    width: 100%;

}

/* ==========================================================
   05. BUTTONS
========================================================== */

.button {

    appearance: none;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 11px 16px;

    border: 1px solid transparent;
    border-radius: 12px;

    background: transparent;

    cursor: pointer;

    font-size: 14px;
    font-weight: 700;
    line-height: 1.15;

    transition:
        background .18s ease,
        border-color .18s ease,
        color .18s ease,
        transform .18s ease,
        box-shadow .18s ease;

}

.button:hover {

    transform: translateY(-1px);

}

.button:active {

    transform: translateY(0);

}

.button-primary {

    background: var(--green);
    color: #fff;

    box-shadow:
        0 10px 24px rgba(0,166,81,.22);

}

.button-primary:hover {

    background: var(--green-dark);

}

.button-secondary {

    background: #fff;

    color: var(--green-dark);

    border-color: #b8d7c5;

}

.button-secondary:hover {

    background: var(--green-pale);

}

.button-ghost {

    background: transparent;

    color: #46534b;

    border-color: var(--line);

}

.button-ghost:hover {

    background: #fafcfa;

}

.button-danger {

    background: #fff;

    color: var(--danger);

    border-color: #efb8b3;

}

.button-danger:hover {

    background: var(--danger-pale);

}

.button-wide {

    width: 100%;

    min-height: 50px;

}

.button-small {

    padding: 9px 12px;

    font-size: 12px;

}


/* ==========================================================
   06. ALERTS
========================================================== */

.alert {

    margin-bottom: 18px;

    padding: 14px 16px;

    border: 1px solid;

    border-radius: 14px;

    font-size: 14px;

}

.alert-success {

    background: var(--green-pale);

    color: #08643a;

    border-color: #b9dec8;

}

.alert-error {

    background: var(--danger-pale);

    color: #8f1f16;

    border-color: #efb8b3;

}

.alert-warning {

    background: var(--warning-pale);

    color: var(--warning);

    border-color: #edd8ab;

}


/* ==========================================================
   07. FORM CONTROLS
========================================================== */

label {

    display: grid;

    gap: 8px;

}

input,
select,
textarea {

    width: 100%;

    padding: 12px 14px;

    border: 1px solid #cfd9d2;

    border-radius: 12px;

    background: #fff;

    color: var(--ink);

    transition:
        border-color .18s ease,
        box-shadow .18s ease;

}

input:focus,
select:focus,
textarea:focus {

    outline: none;

    border-color: var(--green);

    box-shadow:
        0 0 0 4px rgba(0,166,81,.10);

}

textarea {

    resize: vertical;

}

fieldset {

    margin: 28px 0 0;

    padding: 0;

    border: 0;

}

legend {

    padding: 0;

    font-size: 17px;

    font-weight: 800;

}

/* ==========================================================
   08. ATTENDEE REGISTRATION
========================================================== */

.attendee-page {

    background:
        radial-gradient(
            circle at 10% 0%,
            rgba(0,166,81,.13),
            transparent 33rem
        ),
        linear-gradient(
            180deg,
            #f7faf8 0%,
            #eef5f0 100%
        );

}

.attendee-shell {

    width: min(820px, calc(100% - 28px));

    margin: 28px auto 60px;

}

.attendee-card {

    position: relative;

    overflow: hidden;

    padding: 28px 32px 34px;

    background: var(--surface);

    border: 1px solid rgba(0,166,81,.12);

    border-radius: 25px;

    box-shadow: var(--shadow);

}

.attendee-card::before {

    content: "";

    position: absolute;

    inset: 0 0 auto 0;

    height: 6px;

    background:
        linear-gradient(
            90deg,
            #00a651,
            #f7a61b,
            #e6262a
        );

}

.programme-heading {

    max-width: 650px;

    margin: 10px auto 24px;

    text-align: center;

}

.programme-heading h1 {

    margin: 0;

    color: var(--green);

    font-size: clamp(19px,3vw,27px);

    line-height: 1.2;

}

.programme-heading p {

    margin: 6px 0 0;

    font-size: 14px;

    font-weight: 800;

    letter-spacing: .04em;

}

.meeting-summary {

    display: grid;

    grid-template-columns:
        1.6fr
        1.15fr
        .8fr;

    margin-bottom: 30px;

    overflow: hidden;

    border: 1px solid var(--line);

    border-radius: 16px;

    background: #fafcfb;

}

.meeting-summary > div {

    min-width: 0;

    padding: 14px 16px;

    border-right: 1px solid var(--line);

}

.meeting-summary > div:last-child {

    border-right: none;

}

.meeting-summary span {

    display: block;

    margin-bottom: 4px;

    color: var(--muted);

    font-size: 10px;

    font-weight: 800;

    letter-spacing: .08em;

    text-transform: uppercase;

}

.meeting-summary strong {

    display: block;

    font-size: 13px;

    overflow-wrap: anywhere;

}

.form-intro h2 {

    margin: 0;

    font-size: 24px;

}

.form-intro p {

    margin: 6px 0 22px;

    color: var(--muted);

}

.attendance-form {

    display: block;

}

.form-grid {

    display: grid;

    grid-template-columns:
        repeat(4,minmax(0,1fr));

    gap: 16px;

}

.attendee-grid {

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

}

.span-2 {

    grid-column: span 2;

}

.span-4 {

    grid-column: span 4;

}

.signature-wrap {

    position: relative;

    overflow: hidden;

    height: 190px;

    border: 2px dashed #b9c9bf;

    border-radius: 15px;

    background: #fcfefc;

    touch-action: none;

}

.signature-wrap canvas {

    position: relative;

    z-index: 2;

    width: 100%;

    height: 100%;

    display: block;

}

.signature-wrap span {

    position: absolute;

    inset: 0;

    display: grid;

    place-items: center;

    color: #a5afa8;

    font-size: 18px;

    font-weight: 700;

    pointer-events: none;

}

.signature-actions {

    display: flex;

    justify-content: flex-end;

    margin-top: 8px;

}

.text-button {

    padding: 6px 8px;

    border: none;

    background: transparent;

    color: var(--green-dark);

    font-weight: 700;

    cursor: pointer;

}

.notice-box {

    margin-top: 26px;

    padding: 16px;

    border: 1px solid #c4e1cf;

    border-radius: 15px;

    background: var(--green-pale);

}

.notice-box h3 {

    margin: 0 0 6px;

}

.notice-box p {

    margin: 0 0 12px;

    color: #405348;

}

.submit-button {

    margin-top: 28px;

}

.form-footer-note {

    margin-top: 12px;

    text-align: center;

    color: var(--muted);

    font-size: 11px;

}

.closed-state {

    padding: 46px 10px 28px;

    text-align: center;

}

.closed-state h2 {

    margin: 16px auto 8px;

}

.closed-state p {

    color: var(--muted);

}


/* ==========================================================
   09. CONFIRMATION PAGE
========================================================== */

.confirmation-shell {

    width: min(650px, calc(100% - 28px));

    margin: 60px auto;

}

.confirmation-card {

    padding: 36px 32px 48px;

    text-align: center;

}

.confirmation-card .branding-header {

    margin-bottom: 28px;

}

.confirmation-card h1 {

    margin: 8px 0;

    font-size: 32px;

    font-weight: 800;

}

.confirmation-card > p {

    max-width: 500px;

    margin: 0 auto 28px;

    color: var(--muted);

    line-height: 1.6;

}

.success-icon,
.error-icon {

    display: grid;

    place-items: center;

    width: 68px;
    height: 68px;

    margin: 10px auto 18px;

    border-radius: 50%;

    font-size: 34px;
    font-weight: 900;

}

.success-icon {

    background: var(--green-pale);

    color: var(--green);

}

.error-icon {

    background: var(--danger-pale);

    color: var(--danger);

}

.compact-summary {

    max-width: 520px;

    margin: 28px auto;

    display: grid;

    grid-template-columns: 1fr 1fr;

}

.close-note {

    margin-bottom: 0 !important;

    font-size: 12px !important;

}

/* ==========================================================
   10. ADMIN
========================================================== */

/* ---------- Page Layout ---------- */

.admin-page {
    background: #f3f6f4;
}

.admin-container {
    width: min(1240px, calc(100% - 40px));
    margin: 30px auto 60px;
}

/* ---------- Top Bar ---------- */

.admin-topbar {

    position: sticky;
    top: 0;
    z-index: 20;

    display: flex;
    align-items: center;
    justify-content: space-between;

    height: 76px;

    padding: 0 max(24px, calc((100vw - 1240px) / 2));

    background: #fff;

    border-bottom: 1px solid var(--line);

}

.admin-brand {

    display: flex;

    align-items: center;

    gap: 12px;

    min-width: 0;

}

.admin-brand img {

    width: 78px;
    height: 52px;

    object-fit: contain;

}

.admin-brand > div:last-child {

    display: grid;

    min-width: 0;

}

.admin-brand strong {

    font-size: 14px;

}

.admin-brand span {

    color: var(--muted);

    font-size: 11px;

}

/* ---------- Admin Brand Isolation ---------- */

.admin-brand > .branding-header {

    display: flex;

    align-items: center;

    justify-content: flex-start;

    width: auto;

    min-width: 0;

    padding: 0;

    margin: 0;

    background: transparent;

    border: 0;

    box-shadow: none;

}

.admin-brand > .branding-header .branding-title {

    display: none;

}

.admin-brand > .branding-header .branding-slot {

    min-height: 0;

    padding: 0;

}

.admin-brand > .branding-header .branding-slot-left,
.admin-brand > .branding-header .branding-slot-right {

    justify-content: flex-start;

}

.admin-brand > .branding-header .branding-logo {

    max-width: 78px;

    max-height: 52px;

    width: 78px;

    height: 52px;

    object-fit: contain;

}

/* ---------- Dashboard ---------- */

.dashboard-hero {

    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 24px;

    margin-bottom: 24px;

}

.dashboard-hero > div:first-child {

    min-width: 0;

}

.dashboard-hero h1 {

    margin: 6px 0 8px;

    max-width: 760px;

    font-size: clamp(26px,4vw,40px);

    line-height: 1.08;

}

.dashboard-hero p {

    margin: 0;

    color: var(--muted);

}

.summary-card {

    min-width: 170px;

    padding: 22px;

    border-radius: 18px;

    background: #102b1d;

    color: #fff;

    box-shadow: var(--shadow);

}

.summary-card strong {

    display: block;

    font-size: 35px;

    line-height: 1;

}

.summary-card span {

    display: block;

    margin-top: 6px;

    color: #c8d8cf;

    font-size: 12px;

}

/* ---------- Panels ---------- */

.panel {

    margin-bottom: 22px;

    padding: 22px;

    border: 1px solid #e1e8e3;

    border-radius: var(--radius);

    background: #fff;

    box-shadow:
        0 10px 34px rgba(20,48,31,.055);

}

.create-panel {

    border-top: 4px solid var(--green);

}

.panel-heading {

    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;

    margin-bottom: 20px;

}

.panel-heading h2 {

    margin: 0;

    font-size: 20px;

}

.panel-heading p {

    margin: 4px 0 0;

    color: var(--muted);

    font-size: 13px;

}

/* ---------- Meeting Cards ---------- */

.meeting-list {

    display: grid;

    gap: 12px;

}

.meeting-card {

    display: grid;

    grid-template-columns: 82px 1fr 34px;

    gap: 16px;

    align-items: center;

    padding: 14px;

    border: 1px solid var(--line);

    border-radius: 15px;

    background: #fff;

    transition:
        transform .18s,
        border-color .18s,
        box-shadow .18s;

}

.meeting-card:hover {

    transform: translateY(-2px);

    border-color: #a7d2b8;

    box-shadow:
        0 8px 24px rgba(12,70,37,.08);

}

.meeting-date-box {

    display: grid;
    place-content: center;

    width: 76px;
    height: 65px;

    border-radius: 11px;

    background: var(--green-pale);

    color: var(--green-dark);

    text-align: center;

}

.meeting-date-box strong {

    font-size: 22px;

}

.meeting-date-box span {

    margin-top: 4px;

    font-size: 9px;

    font-weight: 800;

    letter-spacing: .06em;

    text-transform: uppercase;

}

.meeting-card-content {

    min-width: 0;

}

.meeting-card-top {

    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 10px;

}

.meeting-card h3 {

    margin: 0;

    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;

    font-size: 15px;

}

.meeting-card p {

    margin: 4px 0 7px;

    color: var(--muted);

    font-size: 12px;

}

.meeting-count {

    color: var(--green-dark);

    font-size: 11px;

    font-weight: 700;

}

.card-arrow {

    color: var(--green-dark);

    font-size: 22px;

}

/* ---------- Status ---------- */

.status {

    display: inline-flex;
    align-items: center;

    padding: 5px 10px;

    border-radius: 999px;

    font-size: 9px;

    font-weight: 800;

    letter-spacing: .06em;

    text-transform: uppercase;

}

.status-open {

    background: var(--green-pale);

    color: var(--green-dark);

}

.status-closed {

    background: #ecefed;

    color: #59645e;

}

/* ---------- Empty State ---------- */

.empty-state {

    padding: 45px 20px;

    border: 1px dashed #cdd8d1;

    border-radius: 14px;

    background: #fbfcfb;

    text-align: center;

}

.empty-state p {

    color: var(--muted);

}

/* ---------- Admin QR ---------- */

.admin-qr-card {

    padding: 16px;

    border: 1px solid var(--line);

    border-radius: 16px;

    background: #f9fbf9;

    text-align: center;

}

.admin-qr-card img {

    width: 180px;

    margin: 0 auto 8px;

}

.admin-qr-card strong {

    display: block;

    margin-top: 8px;

}

.admin-qr-card a {

    display: block;

    margin-top: 6px;

    color: var(--green-dark);

    font-size: 10px;

    overflow-wrap: anywhere;

}

/* ==========================================================
   11. AUTHENTICATION
========================================================== */

.auth-page {

    min-height: 100vh;

    display: grid;
    place-items: center;

    padding: 40px;

    background:
        radial-gradient(circle at top right,
            rgba(0,166,81,.10),
            transparent 34rem),
        linear-gradient(
            180deg,
            #f7faf8 0%,
            #eef4f0 100%
        );

}

.auth-card {

    width: min(440px,100%);

    padding: 40px;

    border-radius: 22px;

    background: #fff;

    box-shadow: var(--shadow);

    border: 1px solid rgba(0,166,81,.08);

}

.auth-logo {

    width: 90px;

    margin: 0 auto 20px;

}

.auth-title {

    margin-bottom: 28px;

    text-align: center;

}

.auth-title h1 {

    margin-bottom: 8px;

    font-size: 30px;

}

.auth-title p {

    color: var(--muted);

}

.auth-form {

    display: grid;

    gap: 18px;

}

.auth-footer {

    margin-top: 26px;

    text-align: center;

    color: var(--muted);

    font-size: 13px;

}

/* ==========================================================
   12. TABLES
========================================================== */

.table-wrapper {

    overflow-x: auto;

    border-radius: 18px;

    border: 1px solid var(--line);

    background: #fff;

}

table {

    width: 100%;

    border-collapse: collapse;

}

thead {

    background: #f6faf7;

}

thead th {

    padding: 15px 18px;

    text-align: left;

    font-size: 12px;

    font-weight: 800;

    color: var(--green-dark);

    border-bottom: 1px solid var(--line);

}

tbody td {

    padding: 15px 18px;

    border-bottom: 1px solid #edf2ee;

    vertical-align: middle;

}

tbody tr:last-child td {

    border-bottom: none;

}

tbody tr:hover {

    background: #fbfdfb;

}

/* ==========================================================
   13. COMPONENT UTILITIES
========================================================== */

.stack {

    display: grid;

    gap: 18px;

}

.stack-sm {

    gap: 10px;

}

.stack-lg {

    gap: 32px;

}

.inline {

    display: flex;

    align-items: center;

    gap: 12px;

}

.inline-between {

    display: flex;

    justify-content: space-between;

    align-items: center;

}

.grid-2 {

    display: grid;

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

    gap: 18px;

}

.grid-3 {

    display: grid;

    grid-template-columns: repeat(3,minmax(0,1fr));

    gap: 18px;

}

.grid-4 {

    display: grid;

    grid-template-columns: repeat(4,minmax(0,1fr));

    gap: 18px;

}

.mt-0{margin-top:0;}
.mt-1{margin-top:8px;}
.mt-2{margin-top:16px;}
.mt-3{margin-top:24px;}
.mt-4{margin-top:32px;}

.mb-0{margin-bottom:0;}
.mb-1{margin-bottom:8px;}
.mb-2{margin-bottom:16px;}
.mb-3{margin-bottom:24px;}
.mb-4{margin-bottom:32px;}

.text-muted{

    color:var(--muted);

}

.text-success{

    color:var(--green-dark);

}

.text-danger{

    color:var(--danger);

}

/* ==========================================================
   14. BRANDING ENGINE
========================================================== */

.branding-header {

    display: grid;

    grid-template-columns: 220px 1fr 220px;

    align-items: center;

    width: 100%;

    padding: 24px 36px;

    margin-bottom: 28px;

    background: #fff;

    border-bottom: 4px solid var(--green);

}

.branding-slot {

    display: flex;

    align-items: center;

    min-height: 90px;

}

.branding-slot-left {

    justify-content: flex-start;

}

.branding-slot-right {

    justify-content: flex-end;

}

/* When only ONE logo exists */

.branding-slot-single {

    justify-content: flex-end;

}

.branding-title {

    text-align: center;

}

.branding-title h1 {

    margin: 0;

    font-size: clamp(30px,3vw,46px);

    font-weight: 800;

    line-height: 1.15;

    color: var(--green-dark);

}

.branding-title p {

    margin-top: 6px;

    color: var(--muted);

}

.branding-logo {

    display: block;

    object-fit: contain;

    transform:
        scale(var(--logo-scale, 1));

    transition:
        transform .18s ease;

}

.branding-logo-left {

    max-width: 180px;

    max-height: 90px;

}

.branding-logo-left {

    transform-origin: left center;

}

.branding-logo-right {

    max-width: 180px;

    max-height: 90px;

}

.branding-logo-right {

    transform-origin: right center;

}

/* ==========================================================
   DISPLAY MODE
========================================================== */

.branding-header--display {

    grid-template-columns: 240px 1fr 240px;

    padding: 28px 42px;

}

.branding-header--display .branding-title h1 {

    font-size: clamp(34px,4vw,56px);

}

.branding-header--display .branding-logo-left,

.branding-header--display .branding-logo-right {

    max-width: 210px;

    max-height: 100px;

}

/* ==========================================================
   COMPACT MODE
========================================================== */

.branding-header--compact {

    padding: 16px 24px;

    margin-bottom: 18px;

}

.branding-header--compact .branding-title h1 {

    font-size: 26px;

}

.branding-header--compact .branding-logo-left,

.branding-header--compact .branding-logo-right {

    max-width: 140px;

    max-height: 60px;

}

/* ==========================================================
   15. QR DISPLAY
========================================================== */

.qr-display-page {

    background:
        linear-gradient(
            180deg,
            #f5faf7 0%,
            #edf5ef 100%
        );

}

.qr-display-shell {

    width: min(1500px, calc(100% - 50px));

    margin: 30px auto 50px;

}

.qr-display-header {

    margin-bottom: 24px;

}

.qr-display-content {

    display: grid;

    grid-template-columns:
        minmax(440px,1fr)
        620px;

    gap: 70px;

    align-items: center;

}

.qr-display-left {

    display: flex;

    flex-direction: column;

    justify-content: center;

}

.qr-display-left h2 {

    margin: 10px 0;

    font-size: clamp(42px,5vw,64px);

    line-height: 1.05;

}

.qr-display-left h3 {

    margin: 0 0 18px;

    font-size: 28px;

    color: var(--green-dark);

}

.qr-display-left p {

    color: var(--muted);

    font-size: 18px;

}

.instruction-steps {

    display: grid;

    gap: 14px;

    margin-top: 30px;

}

.instruction-steps span {

    display: flex;

    align-items: center;

    gap: 12px;

    padding: 16px 20px;

    background: #fff;

    border: 1px solid var(--line);

    border-radius: 14px;

    box-shadow: 0 4px 18px rgba(0,0,0,.04);

    font-weight: 600;

}

.qr-display-right {

    display: flex;

    justify-content: center;

}

.qr-card {

    width: 100%;

    max-width: 620px;

    padding: 28px;

    background: #fff;

    border: 1px solid #dfe7e2;

    border-radius: 24px;

    box-shadow:
        0 20px 55px rgba(12,55,31,.08);

    text-align: center;

}

.qr-card img {

    display: block;

    width: 320px;

    max-width: 100%;

    margin: 0 auto 20px;

}

.qr-card small {

    display: block;

    color: var(--muted);

    font-size: 13px;

    line-height: 1.6;

    word-break: break-word;

}

.qr-link {

    margin: 0;

    color: var(--muted);

    font-size: 13px;

    line-height: 1.6;

    word-break: break-all;

}

/* ==========================================================
   16. RESPONSIVE DESIGN
========================================================== */

@media (max-width:1200px){

    .admin-container,
    .qr-display-shell{

        width:min(100%,calc(100% - 32px));

    }

    .dashboard-hero{

        flex-direction:column;
        align-items:flex-start;

    }

    .summary-card{

        width:100%;

    }

}


@media (max-width:992px){

    .branding-header{

        grid-template-columns:1fr;
        gap:20px;

        text-align:center;

    }

    .branding-slot{

        justify-content:center !important;

    }

    .meeting-summary{

        grid-template-columns:1fr;

    }

    .form-grid,
    .grid-4,
    .grid-3{

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

    }

    .qr-display-content{

        grid-template-columns:1fr;

        gap:48px;

        text-align:center;

    }

    .qr-display-left{

        align-items:center;

    }

    .instruction-steps{

        width:100%;
        max-width:620px;

    }

}


@media (max-width:768px){

    .admin-topbar{

        flex-direction:column;

        height:auto;

        padding:18px;

        gap:16px;

    }

    .panel-heading{

        flex-direction:column;
        align-items:flex-start;

    }

    .dashboard-hero{

        gap:18px;

    }

    .grid-2,
    .attendee-grid,
    .form-grid{

        grid-template-columns:1fr;

    }

    .span-2,
    .span-4{

        grid-column:auto;

    }

    .attendee-card{

        padding:22px;

    }

    .qr-card{

        padding:22px;

    }

    .branding-title h1{

        font-size:32px;

    }

    .qr-display-left h2{

        font-size:42px;

    }

    .qr-display-left h3{

        font-size:22px;

    }

}


@media (max-width:576px){

    body{

        font-size:14px;

    }

    .attendee-shell,
    .confirmation-shell{

        width:calc(100% - 20px);

    }

    .branding-header{

        padding:18px;

    }

    .branding-logo-left,
    .branding-logo-right{

        max-width:140px;

    }

    .programme-heading h1{

        font-size:22px;

    }

    .programme-heading p{

        font-size:13px;

    }

    .qr-card img{

        width:240px;

    }

    .instruction-steps span{

        padding:14px;

    }

}


/* ==========================================================
   17. PRINT
========================================================== */

@media print{

    body{

        background:#fff;

    }

    .button,
    .admin-topbar,
    .instruction-steps{

        display:none !important;

    }

    .panel,
    .attendee-card,
    .confirmation-card,
    .qr-card{

        box-shadow:none;

        border:1px solid #ccc;

    }

}

/* ==========================================================
   ADMIN HEADER — AIL BRAND LOGO
========================================================== */

.admin-brand-logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;

    width: 78px;
    height: 52px;

    flex: 0 0 78px;
}

.admin-brand-logo img {
    display: block;

    width: 78px;
    height: 52px;

    max-width: 100%;
    max-height: 52px;

    object-fit: contain;
}

/* ==========================================================
   BRANDING TEMPLATE BUILDER
========================================================== */

.branding-builder-field {

    display: grid;

    gap: 18px;

}

.logo-scale-control {

    display: flex;

    align-items: center;

    gap: 14px;

}

.logo-scale-control input[type="range"] {

    flex: 1;

    padding: 0;

}

.logo-scale-control output {

    min-width: 52px;

    color: var(--green-dark);

    font-size: 13px;

    font-weight: 800;

    text-align: right;

}


.branding-options {

    display: flex;

    flex-wrap: wrap;

    gap: 22px;

    margin-top: 14px;

}

.checkbox-option {

    display: flex;

    align-items: center;

    grid-template-columns: none;

    gap: 9px;

    cursor: pointer;

}

.checkbox-option input {

    width: 18px;

    height: 18px;

    margin: 0;

}


.branding-preview-section {

    margin-top: 12px;

    padding-top: 24px;

    border-top: 1px solid var(--line);

}

.branding-preview-heading {

    display: flex;

    align-items: flex-end;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 16px;

}

.branding-preview-heading h3 {

    margin: 4px 0 0;

}


.branding-live-preview {

    display: grid;

    grid-template-columns:
        minmax(180px, 1fr)
        minmax(300px, 2fr)
        minmax(180px, 1fr);

    align-items: center;

    min-height: 250px;

    padding: 28px;

    overflow: hidden;

    border: 1px solid var(--line);

    border-top: 5px solid var(--green);

    border-radius: 18px;

    background: #fff;

}

.branding-preview-logo-slot {

    display: grid;

    place-items: center;

    min-height: 150px;

}

.branding-preview-logo {

    display: block;

    width: 150px;

    height: 100px;

    object-fit: contain;

    transform-origin: center;

    transition: transform .15s ease;

}

.branding-preview-centre {

    text-align: center;

}

.branding-preview-centre h2 {

    margin: 0 0 14px;

    color: var(--green-dark);

}

.branding-preview-centre strong {

    display: block;

    margin-bottom: 5px;

}

.branding-preview-centre p {

    margin: 0;

    font-size: 12px;

    font-weight: 800;

}

.branding-preview-centre small {

    display: block;

    margin-top: 20px;

    color: var(--muted);

}


@media (max-width:768px) {

    .branding-live-preview {

        grid-template-columns: 1fr;

        gap: 20px;

    }

    .branding-preview-heading {

        align-items: flex-start;

        flex-direction: column;

    }

}

/* ==========================================================
   PEOPLE DIRECTORY — ATTENDANCE LOOKUP
========================================================== */

.participant-type-fieldset {
    margin-bottom: 24px;
}

.participant-type-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.participant-type-card {
    margin: 0;
}


.staff-lookup {
    margin-bottom: 26px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #f8faf9;
}

.staff-lookup[hidden] {
    display: none;
}

.staff-lookup-heading {
    margin-bottom: 14px;
}

.staff-lookup-heading h3 {
    margin: 4px 0 0;
}


.staff-search-results {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.staff-search-result {
    display: grid;
    gap: 4px;

    width: 100%;

    padding: 12px 14px;

    text-align: left;

    cursor: pointer;

    border: 1px solid var(--line);
    border-radius: 10px;

    background: #fff;
}

.staff-search-result:hover {
    border-color: var(--green);
}

.staff-search-result strong {
    font-size: 14px;
}

.staff-search-result span {
    color: var(--muted);
    font-size: 12px;
}


.staff-search-status {
    margin: 10px 0 0;

    color: var(--muted);

    font-size: 12px;
}

.staff-search-status-selected {
    color: var(--green-dark);
    font-weight: 700;
}


@media (max-width: 640px) {

    .participant-type-options {
        grid-template-columns: 1fr;
    }

}

/* ==========================================================
   PARTICIPANT TYPE — ALIGNMENT FIX
========================================================== */

.participant-type-card {
    display: grid !important;
    grid-template-columns: 22px 1fr !important;
    align-items: start !important;
    gap: 12px !important;

    padding: 14px 16px;
    margin: 0;

    cursor: pointer;
}

.participant-type-card input[type="radio"] {
    width: 18px !important;
    height: 18px !important;

    margin: 2px 0 0 !important;
    padding: 0 !important;

    justify-self: start;
}

.participant-type-card > span {
    display: grid !important;
    gap: 3px;

    min-width: 0;
}

.participant-type-card strong {
    display: block;
    margin: 0;

    font-size: 15px;
    line-height: 1.3;
}

.participant-type-card small {
    display: block;

    margin: 0;

    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

/* ==========================================================
   RADIO + CHECKBOX ALIGNMENT — GLOBAL FIX
========================================================== */

/*
 * Radios and checkboxes must never inherit the
 * full-width sizing used by normal form inputs.
 */
input[type="radio"],
input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;

    min-width: 18px;
    min-height: 18px;

    margin: 2px 0 0 !important;
    padding: 0 !important;

    flex: 0 0 18px;

    cursor: pointer;
}


/* ==========================================================
   RADIO CARDS
========================================================== */

.radio-card {
    display: grid !important;
    grid-template-columns: 22px minmax(0, 1fr) !important;

    align-items: start !important;

    gap: 12px !important;

    width: 100%;
}

.radio-card input[type="radio"] {
    grid-column: 1;

    justify-self: start;
    align-self: start;
}

.radio-card > span {
    grid-column: 2;

    display: grid !important;

    gap: 3px;

    min-width: 0;
}

.radio-card strong {
    display: block;
    margin: 0;
}

.radio-card small {
    display: block;

    margin: 0;

    line-height: 1.45;
}


/* ==========================================================
   STANDARD CHECKBOX LABELS
========================================================== */

.check-label {
    display: grid !important;

    grid-template-columns: 22px minmax(0, 1fr) !important;

    align-items: start !important;

    gap: 10px !important;
}

.check-label input[type="checkbox"] {
    grid-column: 1;

    justify-self: start;
    align-self: start;
}

.check-label > span {
    grid-column: 2;

    min-width: 0;
}


/* ==========================================================
   BRANDING / ADMIN CHECKBOX OPTIONS
========================================================== */

.checkbox-option {
    display: grid !important;

    grid-template-columns: 22px minmax(0, 1fr) !important;

    align-items: start !important;

    gap: 9px !important;
}

.checkbox-option input[type="checkbox"] {
    justify-self: start;
}

.checkbox-option > span {
    min-width: 0;
}

/* ==========================================================
   STAFF DIRECTORY — NOT FOUND OPTION
========================================================== */

.staff-not-found-option {
    margin-top: 18px;
    padding-top: 16px;

    border-top: 1px solid var(--line);
}

.staff-not-found-option .check-label {
    margin: 0;
}

.staff-not-found-option strong {
    display: block;
    margin-bottom: 2px;
}

.staff-not-found-option small {
    display: block;

    color: var(--muted);

    font-size: 12px;
    line-height: 1.45;
}

/* ==========================================================
   ADMIN LOGIN — FINAL LAYOUT
========================================================== */

.auth-page {
    min-height: 100vh;

    display: grid;
    place-items: center;

    padding: 32px 20px;

    background:
        radial-gradient(
            circle at top right,
            rgba(0, 166, 81, .09),
            transparent 34rem
        ),
        linear-gradient(
            180deg,
            #f7faf8 0%,
            #eef4f0 100%
        );
}


.auth-shell {
    width: 100%;

    display: grid;
    place-items: center;
}


.auth-card {
    width: min(500px, 100%);

    padding: 38px 42px 34px;

    border: 1px solid rgba(0, 166, 81, .08);
    border-radius: 22px;

    background: #fff;

    box-shadow: var(--shadow);
}


/* ==========================================================
   LOGIN LOGO
========================================================== */

.admin-login-brand {
    display: flex;
    justify-content: center;
    align-items: center;

    margin-bottom: 24px;
}

.admin-login-brand img {
    display: block;

    width: 190px;
    height: 110px;

    max-width: 100%;

    object-fit: contain;
}


/* ==========================================================
   LOGIN HEADING
========================================================== */

.auth-heading {
    margin-bottom: 26px;
}

.auth-heading h1 {
    margin: 0 0 22px;

    font-size: clamp(28px, 4vw, 34px);
    line-height: 1.15;

    color: var(--ink);
}

.auth-heading .eyebrow {
    display: block;

    margin-bottom: 8px;
}

.auth-heading p {
    margin: 0;

    max-width: 410px;

    color: var(--text);
    line-height: 1.55;
}


/* ==========================================================
   LOGIN FORM
========================================================== */

.auth-card .stack-form {
    display: grid;
    gap: 16px;
}

.auth-card .stack-form label {
    display: grid;
    gap: 7px;
}

.auth-card .stack-form input {
    width: 100%;
}

.auth-card .stack-form .button {
    margin-top: 2px;
}


/* ==========================================================
   LOGIN FOOTER
========================================================== */

.auth-footer {
    display: flex;
    flex-wrap: wrap;

    justify-content: center;
    align-items: baseline;

    gap: 4px;

    margin-top: 26px;

    text-align: center;

    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.auth-footer strong {
    color: var(--muted);
    font-weight: 800;
}

.auth-footer span {
    display: inline;
}


/* ==========================================================
   LOGIN RESPONSIVE
========================================================== */

@media (max-width: 560px) {

    .auth-page {
        padding: 20px 14px;
    }

    .auth-card {
        padding: 30px 24px;
    }

    .admin-login-brand img {
        width: 165px;
        height: 96px;
    }

    .auth-heading h1 {
        font-size: 28px;
    }

    .auth-footer {
        display: block;
    }

    .auth-footer strong,
    .auth-footer span {
        display: block;
    }

}

/* ==========================================================
   MEETING ADMIN — ACTION BAR & BUTTON POLISH
========================================================== */

.meeting-admin-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(340px, .7fr);
    gap: 32px;

    padding: 30px;
}

.meeting-admin-info {
    min-width: 0;
}


/* ----------------------------------------------------------
   Meeting title area
---------------------------------------------------------- */

.meeting-admin-kicker {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;

    margin-bottom: 10px;
}

.meeting-admin-title h1 {
    margin: 0 0 24px;

    font-size: clamp(30px, 3vw, 42px);
    line-height: 1.1;
}


/* ----------------------------------------------------------
   Meeting detail chips
---------------------------------------------------------- */

.meeting-admin-hero .detail-chips {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;

    margin-bottom: 28px;
}

.meeting-admin-hero .detail-chips > span {
    display: grid;
    gap: 3px;

    padding: 13px 15px;

    border: 1px solid var(--line);
    border-radius: 12px;

    background: #f8faf9;

    color: var(--muted);
    font-size: 13px;
}

.meeting-admin-hero .detail-chips strong {
    color: var(--ink);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}


/* ==========================================================
   ACTION GROUPS
========================================================== */

.meeting-action-section {
    margin-top: 22px;
}

.meeting-action-section > .eyebrow {
    display: block;

    margin-bottom: 9px;

    font-size: 11px;
    letter-spacing: .09em;
}


/*
 * This is important.
 * It stops the form/button from dropping awkwardly
 * onto a separate line.
 */
.meeting-action-section .action-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
}

.meeting-action-section .action-row form {
    display: inline-flex;
    margin: 0;
}


/* ==========================================================
   MEETING ACTION BUTTONS
========================================================== */

.meeting-action-section .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 44px;

    padding: 0 18px;

    border-radius: 10px;

    font-size: 13px;
    font-weight: 800;
    line-height: 1;

    white-space: nowrap;

    transition:
        transform .14s ease,
        box-shadow .14s ease,
        background-color .14s ease,
        border-color .14s ease;
}


/* Primary */

.meeting-action-section .button-primary {
    border: 1px solid var(--green);

    background: var(--green);
    color: #fff;

    box-shadow:
        0 5px 14px rgba(0, 166, 81, .16);
}

.meeting-action-section .button-primary:hover {
    transform: translateY(-1px);

    box-shadow:
        0 8px 18px rgba(0, 166, 81, .22);
}


/* Secondary */

.meeting-action-section .button-secondary {
    border: 1px solid #cfe0d5;

    background: #fff;
    color: var(--green-dark);

    box-shadow:
        0 2px 5px rgba(0, 0, 0, .025);
}

.meeting-action-section .button-secondary:hover {
    transform: translateY(-1px);

    border-color: var(--green);

    background: #f6fbf8;
}


/* Danger */

.meeting-action-section .button-danger {
    border: 1px solid #efb7b2;

    background: #fff8f7;
    color: #b42318;

    box-shadow: none;
}

.meeting-action-section .button-danger:hover {
    transform: translateY(-1px);

    border-color: #dc756c;

    background: #fff1ef;
}


/* ==========================================================
   GIVE PRIMARY ACTIONS MORE VISUAL WEIGHT
========================================================== */

.meeting-action-section:first-of-type .button-primary {
    min-width: 140px;
}


/* ==========================================================
   QR CARD POLISH
========================================================== */

.meeting-admin-hero .admin-qr-card {
    align-self: stretch;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 24px;

    border: 1px solid var(--line);
    border-radius: 18px;

    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #f8fbf9 100%
        );
}

.admin-qr-heading {
    margin-bottom: 14px;

    text-align: center;
}

.admin-qr-heading strong {
    display: block;

    margin: 4px 0 5px;

    font-size: 18px;
}

.admin-qr-heading p {
    max-width: 300px;
    margin: 0 auto;

    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.meeting-admin-hero .admin-qr-card img {
    width: 210px;
    height: 210px;

    margin: 8px auto 14px;

    object-fit: contain;
}

.admin-qr-link {
    width: 100%;

    text-align: center;
}

.admin-qr-link span {
    display: block;

    margin-bottom: 5px;

    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.admin-qr-link a {
    display: block;

    max-width: 100%;

    overflow: hidden;
    text-overflow: ellipsis;

    color: var(--green-dark);
    font-size: 11px;

    white-space: nowrap;
}


/* ==========================================================
   ATTENDANCE SUMMARY CARDS
========================================================== */

.attendance-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;

    margin: 18px 0;
}

.attendance-summary-card {
    display: grid;
    gap: 5px;

    padding: 18px 20px;

    border: 1px solid var(--line);
    border-radius: 15px;

    background: #fff;
}

.attendance-summary-card span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.attendance-summary-card strong {
    color: var(--ink);

    font-size: 28px;
    line-height: 1;
}

.attendance-summary-card small {
    color: var(--muted);
    font-size: 11px;
}


/* ==========================================================
   EMPTY STATE BUTTONS
========================================================== */

.meeting-empty-attendance .action-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;

    margin-top: 18px;
}

.meeting-empty-attendance .button {
    min-width: 140px;
}


/* ==========================================================
   RESPONSIVE
========================================================== */

@media (max-width: 1050px) {

    .meeting-admin-hero {
        grid-template-columns: 1fr;
    }

    .meeting-admin-hero .admin-qr-card {
        width: 100%;
    }

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

}


@media (max-width: 680px) {

    .meeting-admin-hero {
        padding: 22px;
    }

    .meeting-admin-hero .detail-chips {
        grid-template-columns: 1fr;
    }

    .meeting-action-section .action-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .meeting-action-section .action-row form {
        display: block;
        width: 100%;
    }

    .meeting-action-section .button,
    .meeting-action-section form .button {
        width: 100%;
    }

    .attendance-summary-grid {
        grid-template-columns: 1fr 1fr;
    }

}


@media (max-width: 460px) {

    .attendance-summary-grid {
        grid-template-columns: 1fr;
    }

}

/* ==========================================================
   PUBLIC BRANDING + ATTENDANCE — CONSOLIDATED FINAL
========================================================== */


/* ==========================================================
   BRANDING — COMMON
========================================================== */

.branding-header {
    box-sizing: border-box;

    width: 100%;

    margin-bottom: 24px;

    padding: 22px 30px 20px;

    background: #fff;

    border-bottom: 4px solid var(--green);
}


.branding-header .branding-title {
    text-align: center;
}


.branding-header .branding-title h1 {
    max-width: 620px;

    margin: 0 auto;

    font-size: clamp(28px, 3vw, 42px);
    font-weight: 800;
    line-height: 1.12;
}


/*
 * Logos retain their natural aspect ratio.
 */

.branding-header .branding-logo {
    display: block;

    width: auto;
    height: auto;

    object-fit: contain;

    image-rendering: auto;
}


/* ==========================================================
   SINGLE LOGO — DESKTOP
========================================================== */

.branding-header.branding-header--single {
    display: grid;

    grid-template-columns: 1fr;

    gap: 8px;

    text-align: center;
}


.branding-header--single .branding-slot-single {
    display: flex;

    align-items: center;
    justify-content: center;

    min-height: 70px;
}


.branding-header--single .branding-logo-single {
    max-width: 170px;
    max-height: 72px;

    margin: 0 auto;

    transform:
        scale(var(--logo-scale, 1));

    transform-origin: center;
}


/* ==========================================================
   DUAL LOGO — DESKTOP
========================================================== */

.branding-header.branding-header--dual {
    display: grid;

    grid-template-columns: 1fr;

    gap: 8px;
}


/*
 * On desktop the logo row and title share
 * the same vertical area:
 *
 * logo       title       logo
 */

.branding-header--dual .branding-dual-logo-row {
    display: grid;

    grid-template-columns:
        minmax(150px, 220px)
        minmax(0, 1fr)
        minmax(150px, 220px);

    align-items: center;

    grid-row: 1;
    grid-column: 1;

    width: 100%;
}


.branding-header--dual .branding-title {
    grid-row: 1;
    grid-column: 1;

    align-self: center;
    justify-self: center;

    z-index: 1;

    width: calc(100% - 440px);
}


.branding-header--dual .branding-slot {
    display: flex;

    align-items: center;

    min-height: 80px;
}


.branding-header--dual .branding-slot-left {
    grid-column: 1;

    justify-content: flex-start;
}


.branding-header--dual .branding-slot-right {
    grid-column: 3;

    justify-content: flex-end;
}


.branding-header--dual .branding-logo-left,
.branding-header--dual .branding-logo-right {
    max-width: 170px;
    max-height: 78px;
}


.branding-header--dual .branding-logo-left {
    transform:
        scale(var(--logo-scale, 1));

    transform-origin: left center;
}


.branding-header--dual .branding-logo-right {
    transform:
        scale(var(--logo-scale, 1));

    transform-origin: right center;
}


/* ==========================================================
   NO LOGO
========================================================== */

.branding-header.branding-header--no-logo {
    display: grid;

    grid-template-columns: 1fr;

    text-align: center;
}


/* ==========================================================
   DISPLAY MODE
========================================================== */

.branding-header--display {
    padding: 28px 42px;
}


.branding-header--display .branding-title h1 {
    font-size: clamp(34px, 4vw, 54px);
}


/* ==========================================================
   COMPACT MODE
========================================================== */

.branding-header--compact {
    padding: 15px 22px;

    margin-bottom: 18px;
}


.branding-header--compact .branding-title h1 {
    font-size: 26px;
}


/* ==========================================================
   TABLET + PHONE
========================================================== */

@media (max-width: 768px) {

    /*
     * Important:
     *
     * Mobile deliberately DOES NOT apply the
     * template transform scale to dual logos.
     *
     * This keeps logos balanced and prevents
     * CSS transforms from visually escaping
     * their layout boxes.
     */

    .branding-header {
        padding: 15px 16px 13px;

        margin-bottom: 16px;
    }


    /* ------------------------------------------------------
       DUAL LOGO MOBILE
    ------------------------------------------------------ */

    .branding-header.branding-header--dual {
        display: block;
    }


    .branding-header--dual .branding-dual-logo-row {
        display: grid;

        grid-template-columns:
            minmax(0, 1fr)
            minmax(0, 1fr);

        gap: 20px;

        width: 100%;

        margin: 0 0 9px;
    }


    .branding-header--dual .branding-slot {
        display: flex;

        width: 100%;

        min-width: 0;
        min-height: 58px;

        align-items: center;
    }


    .branding-header--dual .branding-slot-left {
        grid-column: 1;

        justify-content: center;
    }


    .branding-header--dual .branding-slot-right {
        grid-column: 2;

        justify-content: center;
    }


    .branding-header--dual .branding-logo-left,
    .branding-header--dual .branding-logo-right {
        width: auto;
        height: auto;

        max-width: 118px;
        max-height: 58px;

        margin: 0 auto;

        transform: none;

        object-fit: contain;
    }


    .branding-header--dual .branding-title {
        display: block;

        width: 100%;

        margin: 0;

        text-align: center;
    }


    .branding-header--dual .branding-title h1 {
        max-width: 330px;

        margin: 0 auto;

        font-size: 25px;
        line-height: 1.12;
    }


    /* ------------------------------------------------------
       SINGLE LOGO MOBILE
    ------------------------------------------------------ */

    .branding-header.branding-header--single {
        display: grid;

        grid-template-columns: 1fr;

        gap: 5px;
    }


    .branding-header--single .branding-slot-single {
        min-height: 58px;
    }


    .branding-header--single .branding-logo-single {
        width: auto;
        height: auto;

        max-width: 135px;
        max-height: 58px;

        margin: 0 auto;

        transform: none;

        object-fit: contain;
    }


    .branding-header--single .branding-title h1 {
        max-width: 330px;

        font-size: 25px;
    }

}


/* ==========================================================
   SMALL PHONE — ATTENDANCE PAGE POLISH
========================================================== */

@media (max-width: 576px) {

    body {
        font-size: 14px;
    }


    .attendee-shell,
    .confirmation-shell {
        width: calc(100% - 16px);
    }


    .attendee-shell {
        margin-top: 16px;
        margin-bottom: 30px;
    }


    .attendee-card {
        padding: 18px 16px 24px;
    }


    /* Branding */

    .branding-header--dual
    .branding-dual-logo-row {
        gap: 16px;
    }


    .branding-header--dual
    .branding-logo-left,
    .branding-header--dual
    .branding-logo-right {
        max-width: 112px;
        max-height: 56px;
    }


    .branding-header--dual
    .branding-title h1,
    .branding-header--single
    .branding-title h1 {
        font-size: 23px;
    }


    /* Programme */

    .programme-heading {
        padding: 4px 0;

        margin-bottom: 20px;
    }


    .programme-heading h1 {
        max-width: 100%;

        margin: 8px auto 5px;

        font-size: 20px;
        line-height: 1.16;
    }


    .programme-heading p {
        margin: 0;

        font-size: 12px;
        line-height: 1.35;
    }


    /* Meeting / Venue / Date */

    .meeting-summary {
        display: grid;

        grid-template-columns:
            minmax(0, 1fr)
            minmax(0, 1fr);

        gap: 0;

        margin-top: 16px;
        margin-bottom: 26px;

        border-radius: 14px;

        overflow: hidden;
    }


    .meeting-summary > div {
        min-width: 0;

        padding: 13px 14px;
    }


    .meeting-summary > div:nth-child(1) {
        border-right: 1px solid var(--line);
    }


    .meeting-summary > div:nth-child(2) {
        border-right: none;
    }


    .meeting-summary > div:nth-child(3) {
        grid-column: 1 / -1;

        border-top: 1px solid var(--line);
        border-right: none;
    }


    .meeting-summary span {
        margin-bottom: 4px;

        font-size: 10px;
    }


    .meeting-summary strong {
        font-size: 14px;
        line-height: 1.3;

        overflow-wrap: anywhere;
    }


    /* Confirmation */

    .confirmation-shell {
        margin: 20px auto 36px;
    }


    .confirmation-card {
        padding: 22px 18px 30px;
    }


    .confirmation-card .branding-header {
        margin-bottom: 14px;
    }


    .confirmation-card .success-icon,
    .confirmation-card .error-icon {
        width: 58px;
        height: 58px;

        margin: 4px auto 14px;

        font-size: 29px;
    }


    .confirmation-card h1 {
        margin: 6px 0 8px;

        font-size: 28px;
        line-height: 1.15;
    }


    .confirmation-card > p {
        margin-bottom: 20px;

        line-height: 1.5;
    }


    .confirmation-card .compact-summary {
        margin: 20px auto;
    }

}

/* ==========================================================
   ATTENDANCE FORM — FINAL PHONE COMPACT LAYOUT
   Mobile only. Desktop/tablet remain unchanged.
========================================================== */

@media (max-width: 576px) {

    /* ======================================================
       OUTER CARD
    ====================================================== */

    .attendee-shell {
        width: calc(100% - 12px) !important;

        margin-top: 12px !important;
        margin-bottom: 28px !important;
    }

    .attendee-card {
        padding:
            14px 14px 24px !important;

        border-radius:
            20px !important;
    }


    /* ======================================================
       BRAND HEADER
    ====================================================== */

    .branding-header {
        padding:
            10px 10px 11px !important;

        margin-bottom:
            13px !important;

        border-bottom-width:
            3px !important;
    }


    /* Dual logos */

    .branding-header--dual
    .branding-dual-logo-row {
        display: grid !important;

        grid-template-columns:
            1fr 1fr !important;

        align-items:
            center !important;

        gap:
            22px !important;

        margin:
            0 0 5px !important;
    }


    .branding-header--dual
    .branding-slot {
        min-height:
            43px !important;

        padding:
            0 !important;
    }


    .branding-header--dual
    .branding-slot-left,
    .branding-header--dual
    .branding-slot-right {
        justify-content:
            center !important;
    }


    .branding-header--dual
    .branding-logo-left,
    .branding-header--dual
    .branding-logo-right {
        width:
            auto !important;

        height:
            auto !important;

        max-width:
            88px !important;

        max-height:
            44px !important;

        margin:
            0 auto !important;

        transform:
            none !important;

        object-fit:
            contain !important;
    }


    /* Single logo */

    .branding-header--single
    .branding-slot-single {
        min-height:
            44px !important;
    }


    .branding-header--single
    .branding-logo-single {
        max-width:
            105px !important;

        max-height:
            46px !important;

        transform:
            none !important;
    }


    /* Attendance register heading */

    .branding-header
    .branding-title h1 {
        max-width:
            280px !important;

        margin:
            0 auto !important;

        font-size:
            20px !important;

        line-height:
            1.08 !important;

        letter-spacing:
            -0.02em;
    }


    /* ======================================================
       PROGRAMME IDENTITY
    ====================================================== */

    .programme-heading {
        max-width:
            100% !important;

        margin:
            8px auto 16px !important;

        padding:
            0 4px !important;
    }


    .programme-heading h1 {
        margin:
            0 auto 5px !important;

        font-size:
            17px !important;

        line-height:
            1.16 !important;

        letter-spacing:
            -0.01em;
    }


    .programme-heading p {
        margin:
            0 !important;

        font-size:
            10.5px !important;

        line-height:
            1.3 !important;

        letter-spacing:
            .045em !important;
    }


    /* ======================================================
       MEETING SUMMARY
    ====================================================== */

    .meeting-summary {
        margin:
            0 0 22px !important;

        border-radius:
            12px !important;
    }


    .meeting-summary > div {
        padding:
            10px 12px !important;
    }


    .meeting-summary span {
        margin-bottom:
            2px !important;

        font-size:
            8px !important;

        letter-spacing:
            .09em !important;
    }


    .meeting-summary strong {
        font-size:
            12px !important;

        line-height:
            1.25 !important;
    }


    /* ======================================================
       FORM INTRO
    ====================================================== */

    .form-intro h2 {
        margin:
            0 !important;

        font-size:
            23px !important;

        line-height:
            1.12 !important;

        letter-spacing:
            -0.025em;
    }


    .form-intro p {
        margin:
            5px 0 18px !important;

        font-size:
            13px !important;

        line-height:
            1.45 !important;
    }


    /* ======================================================
       PARTICIPANT TYPE
    ====================================================== */

    .participant-type-fieldset {
        margin:
            18px 0 20px !important;
    }


    .participant-type-fieldset legend {
        font-size:
            16px !important;

        line-height:
            1.25 !important;
    }


    .participant-type-fieldset
    > p {
        margin:
            3px 0 12px !important;

        font-size:
            12px !important;

        line-height:
            1.4 !important;
    }


    .participant-type-options {
        gap:
            8px !important;

        margin-top:
            10px !important;
    }


    .participant-type-card,
    .radio-card {
        padding:
            11px 12px !important;
    }


    .participant-type-card strong,
    .radio-card strong {
        font-size:
            14px !important;
    }


    .participant-type-card small,
    .radio-card small {
        font-size:
            11px !important;

        line-height:
            1.35 !important;
    }


    /* ======================================================
       GENERAL FORM FIELDS
    ====================================================== */

    .attendee-grid,
    .form-grid {
        gap:
            13px !important;
    }


    label {
        gap:
            6px;
    }


    input,
    select,
    textarea {
        padding:
            11px 12px;

        border-radius:
            10px;
    }

}

/* ==========================================================
   FINAL MOBILE BRANDING OVERRIDE
   This intentionally overrides earlier !important rules.
========================================================== */

@media (max-width: 576px) {

    .branding-header.branding-header--dual {
        display: block !important;

        padding: 10px 12px 11px !important;

        margin-bottom: 14px !important;
    }


    .branding-header--dual
    .branding-dual-logo-row {
        display: grid !important;

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

        align-items: center !important;

        width: 100% !important;

        gap: 20px !important;

        margin: 0 0 7px !important;
    }


    .branding-header--dual
    .branding-dual-logo-row
    .branding-slot {
        display: flex !important;

        align-items: center !important;
        justify-content: center !important;

        width: 100% !important;

        min-width: 0 !important;
        min-height: 46px !important;

        padding: 0 !important;
        margin: 0 !important;

        position: static !important;

        transform: none !important;
    }


    .branding-header--dual
    .branding-dual-logo-row
    .branding-slot-left {
        grid-column: 1 !important;
    }


    .branding-header--dual
    .branding-dual-logo-row
    .branding-slot-right {
        grid-column: 2 !important;
    }


    .branding-header--dual
    .branding-dual-logo-row
    .branding-logo-left,

    .branding-header--dual
    .branding-dual-logo-row
    .branding-logo-right {
        display: block !important;

        width: auto !important;
        height: auto !important;

        max-width: 88px !important;
        max-height: 44px !important;

        margin: 0 auto !important;

        object-fit: contain !important;

        transform: none !important;

        transform-origin: center center !important;
    }


    .branding-header--dual
    .branding-title {
        display: block !important;

        width: 100% !important;

        margin: 0 !important;

        text-align: center !important;
    }


    .branding-header--dual
    .branding-title h1 {
        max-width: 290px !important;

        margin: 0 auto !important;

        font-size: 20px !important;

        line-height: 1.08 !important;
    }


    /* SINGLE LOGO */

    .branding-header.branding-header--single {
        padding: 10px 12px 11px !important;

        margin-bottom: 14px !important;
    }


    .branding-header--single
    .branding-slot-single {
        min-height: 46px !important;

        justify-content: center !important;
    }


    .branding-header--single
    .branding-logo-single {
        display: block !important;

        width: auto !important;
        height: auto !important;

        max-width: 105px !important;
        max-height: 46px !important;

        margin: 0 auto !important;

        object-fit: contain !important;

        transform: none !important;
    }


    .branding-header--single
    .branding-title h1 {
        max-width: 290px !important;

        margin: 0 auto !important;

        font-size: 20px !important;

        line-height: 1.08 !important;
    }

}

/* ==========================================================
   ATTENDANCE — DUPLICATE WARNINGS
========================================================== */

.dashboard-duplicate-warning {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  width: fit-content;
  max-width: 100%;
  margin-top: 8px;
  padding: 6px 10px;
  border: 1px solid #f1d49a;
  border-radius: 7px;
  background: #fff7e6;
  color: #925c0b;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

/* ==========================================================
   MEETING — DUPLICATE REVIEW
========================================================== */

.meeting-duplicate-warning {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px;
  margin-bottom: 24px;
  background: #fff8eb;
  border: 1px solid #efd39b;
  border-left: 4px solid #d99a27;
  border-radius: 12px;
}

.duplicate-warning-content {
  display: flex;
  align-items: flex-start;
  flex: 1;
  gap: 14px;
}

.duplicate-warning-icon {
  font-size: 26px;
  color: #a66b12;
}

.meeting-duplicate-warning h3 {
  margin: 0 0 6px;
  color: #854f0b;
  font-size: 17px;
  font-weight: 700;
}

.meeting-duplicate-warning p {
  margin: 0;
  color: #795e36;
  font-size: 14px;
  line-height: 1.6;
}

.duplicate-warning-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.duplicate-review-button {
  background: #95600e;
  border: 1px solid #95600e;
  color: #ffffff;
  text-decoration: none;
}

.duplicate-review-button:hover {
  background: #794b08;
  color: #ffffff;
}

.duplicate-filter-notice {
  padding: 12px 15px;
  margin-bottom: 16px;
  background: #fff8eb;
  border: 1px solid #efd39b;
  border-radius: 8px;
  color: #854f0b;
  font-size: 13px;
  font-weight: 600;
}

#attendance-register {
  scroll-margin-top: 24px;
}

@media (max-width: 640px) {
  .meeting-duplicate-warning {
    padding: 15px;
  }

  .duplicate-warning-content {
    flex-basis: 100%;
  }

  .duplicate-warning-actions {
    width: 100%;
  }
}