/* =============================================================================
   CNDM Adrar — Premium Design System
   RTL-first, Almarai font, Professional Medical UI
============================================================================= */

/* ── Google Fonts already loaded in base.html ── */

/* ═══════════════════════════ CSS Variables ═══════════════════════════ */
:root {
    --color-primary:    #1e3a5f;
    --color-primary-l:  #2a5298;
    --color-accent:     #2ecc71;
    --color-accent-d:   #27ae60;
    --color-danger:     #e74c3c;
    --color-danger-d:   #c0392b;
    --color-warning:    #f39c12;
    --color-info:       #3498db;
    --color-success:    #2ecc71;
    --color-text:       #1a202c;
    --color-text-muted: #718096;
    --color-border:     #e2e8f0;
    --color-bg:         #f7f9fc;
    --color-white:      #ffffff;
    --color-card:       rgba(255,255,255,0.92);

    --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
    --shadow-md:  0 4px 16px rgba(0,0,0,.10);
    --shadow-lg:  0 8px 32px rgba(30,58,95,.15);
    --shadow-xl:  0 20px 60px rgba(30,58,95,.20);

    --radius-sm:  8px;
    --radius-md:  14px;
    --radius-lg:  20px;
    --radius-xl:  28px;

    --transition: 0.22s cubic-bezier(0.4,0,0.2,1);

    --font-ar: 'Almarai', sans-serif;
    --font-fr: 'Outfit', sans-serif;
    --font-size-base: 15px;
}

/* ═══════════════════════════ Reset & Base ═══════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: var(--font-size-base); scroll-behavior: smooth; }

body {
    font-family: var(--font-ar);
    background: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
    direction: rtl;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

.ltr { direction: ltr; text-align: left; font-family: var(--font-fr); }
.ar  { font-family: var(--font-ar); }

a { color: var(--color-primary-l); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary); }

/* ═══════════════════════════ Flash Messages ═══════════════════════════ */
.flash-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 320px;
    max-width: 520px;
}

.flash {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    color: white;
    font-size: 0.92rem;
    box-shadow: var(--shadow-lg);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.flash--success { background: var(--color-accent); }
.flash--danger  { background: var(--color-danger); }
.flash--warning { background: var(--color-warning); }
.flash--info    { background: var(--color-info); }

.flash__close {
    margin-right: auto;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    opacity: .7;
    font-size: 1rem;
    padding: 2px 6px;
    border-radius: 4px;
    transition: opacity var(--transition);
}
.flash__close:hover { opacity: 1; }

/* ═══════════════════════════ Buttons ═══════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-ar);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
    white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn--primary { background: var(--color-primary);   color: white; }
.btn--primary:hover { background: var(--color-primary-l); box-shadow: var(--shadow-md); color: white; }

.btn--success { background: var(--color-accent);    color: white; }
.btn--success:hover { background: var(--color-accent-d); box-shadow: var(--shadow-md); color: white; }

.btn--danger  { background: var(--color-danger);    color: white; }
.btn--danger:hover  { background: var(--color-danger-d);  color: white; }

.btn--info    { background: var(--color-info);      color: white; }
.btn--info:hover    { opacity: .85; color: white; }

.btn--outline {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}
.btn--outline:hover { background: var(--color-primary); color: white; }

.btn--lg  { padding: 14px 32px; font-size: 1rem; border-radius: var(--radius-md); }
.btn--sm  { padding: 7px 14px; font-size: 0.82rem; }
.btn--xs  { padding: 4px 8px;  font-size: 0.75rem; }
.btn--full { width: 100%; justify-content: center; }

/* ═══════════════════════════ Fields ═══════════════════════════ */
.field { display: flex; flex-direction: column; gap: 6px; }

.field__label {
    font-size: 0.87rem;
    font-weight: 700;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 6px;
}

.field__input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-ar);
    font-size: 0.93rem;
    background: var(--color-white);
    color: var(--color-text);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}
.field__input:focus {
    border-color: var(--color-primary-l);
    box-shadow: 0 0 0 3px rgba(42,82,152,.12);
}
.field__input::placeholder { color: #a0aec0; }

.field__password-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.field__password-wrap .field__input { padding-left: 42px; }
.field__eye {
    position: absolute;
    left: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    font-size: 1rem;
    transition: color var(--transition);
}
.field__eye:hover { color: var(--color-primary); }

.field-grid { display: grid; gap: 18px; }
.field-grid--2 { grid-template-columns: 1fr 1fr; }
.field--full   { grid-column: 1 / -1; }

.req { color: var(--color-danger); font-size: 0.8rem; }

@media (max-width: 640px) {
    .field-grid--2 { grid-template-columns: 1fr; }
}

/* ═══════════════════════════ Auth Page ═══════════════════════════ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg, #0f2744 0%, #1e3a5f 40%, #2a5298 100%);
}

.auth-card {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    padding: 44px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-xl);
    animation: fadeUp .4s ease;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.auth-card__header { text-align: center; margin-bottom: 32px; }

.auth-logo {
    width: 70px; height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-l));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    margin-bottom: 16px;
    box-shadow: var(--shadow-md);
}

.auth-card__title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 4px;
}

.auth-card__sub {
    font-size: 0.88rem;
    color: var(--color-text-muted);
}

.auth-form { display: flex; flex-direction: column; gap: 18px; }

.auth-card__footer {
    margin-top: 24px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* ═══════════════════════════ Registration Page ═══════════════════════════ */
.reg-page {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

.reg-sidebar {
    background: linear-gradient(160deg, #0f2744 0%, #1e3a5f 60%, #1a3a5c 100%);
    color: white;
    padding: 32px 24px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.reg-sidebar__logo { text-align: center; margin-bottom: 24px; }
.reg-sidebar__logo img { width: 80px; filter: brightness(0) invert(1); }

.reg-sidebar__title {
    font-size: 1.1rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 4px;
}

.reg-sidebar__sub {
    font-size: 0.85rem;
    text-align: center;
    opacity: .75;
    margin-bottom: 12px;
}

.reg-sidebar__divider {
    border: none;
    border-top: 1px solid rgba(255,255,255,.2);
    margin: 14px 0;
}

.reg-sidebar__fr {
    font-size: 0.77rem;
    text-align: center;
    opacity: .6;
    font-family: var(--font-fr);
    margin-bottom: 28px;
}

.reg-sidebar__steps { display: flex; flex-direction: column; gap: 12px; }

.step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    opacity: .5;
    transition: all var(--transition);
    font-size: 0.88rem;
}

.step--active {
    background: rgba(255,255,255,.15);
    opacity: 1;
    font-weight: 700;
}

.step__num {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 800;
    flex-shrink: 0;
}

.step--active .step__num {
    background: white;
    color: var(--color-primary);
}

/* Main form area */
.reg-main {
    padding: 40px;
    overflow-y: auto;
    background: var(--color-bg);
}

.form-step {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow-md);
    max-width: 720px;
    animation: fadeUp .3s ease;
}

.form-step.hidden { display: none; }

.form-step__header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 2px solid var(--color-border);
    color: var(--color-primary);
}

.form-step__header h2 {
    font-size: 1.3rem;
    font-weight: 800;
}

.form-step__header i { font-size: 1.5rem; }

.form-step__note {
    background: #ebf4ff;
    color: #2c5282;
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 0.87rem;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-step__nav {
    display: flex;
    justify-content: flex-start;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

/* File Uploads */
.upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}

.upload-box { position: relative; }
.upload-box input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    cursor: pointer;
    z-index: 2;
}

.upload-box__label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px 16px;
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-md);
    background: #f8faff;
    cursor: pointer;
    text-align: center;
    transition: all var(--transition);
    min-height: 140px;
    color: var(--color-text-muted);
}

.upload-box__label:hover {
    border-color: var(--color-primary-l);
    background: #ebf4ff;
    color: var(--color-primary);
}

.upload-box.file-selected .upload-box__label {
    border-color: var(--color-accent);
    background: #f0fff4;
    color: var(--color-accent-d);
}

.upload-box__title { font-size: 0.88rem; font-weight: 700; }
.upload-box__hint  { font-size: 0.75rem; }
.upload-box__preview img { max-width: 80px; max-height: 60px; border-radius: 4px; margin-top: 6px; }

/* Consent */
.consent-box {
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    overflow: hidden;
}

.consent-box__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #f8faff;
}

.consent-box__header input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
    flex-shrink: 0;
}

.consent-box__body {
    padding: 0 20px;
    font-size: 0.87rem;
    color: var(--color-text-muted);
    line-height: 1.7;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.consent-box__body.expanded {
    max-height: 300px;
    padding: 16px 20px;
    border-top: 1px solid var(--color-border);
}

.link-btn {
    background: none;
    border: none;
    color: var(--color-primary-l);
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    text-decoration: underline;
    padding: 0;
    font-weight: 700;
}

.submit-section {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

@media (max-width: 780px) {
    .reg-page { grid-template-columns: 1fr; }
    .reg-sidebar { height: auto; position: relative; }
    .reg-sidebar__steps { display: none; }
}

/* ═══════════════════════════ Admin Layout ═══════════════════════════ */
.admin-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}

.admin-sidebar {
    background: linear-gradient(180deg, #0f2744 0%, #1e3a5f 100%);
    color: white;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.admin-sidebar__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,.15);
    font-size: 1rem;
    font-weight: 800;
}

.admin-sidebar__brand img {
    width: 36px;
    filter: brightness(0) invert(1);
}

.admin-sidebar__nav { flex: 1; display: flex; flex-direction: column; gap: 4px; }

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,.75);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition);
}
.admin-nav-link:hover,
.admin-nav-link.active {
    background: rgba(255,255,255,.12);
    color: white;
}

.admin-sidebar__actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-top: 1px solid rgba(255,255,255,.12);
    padding-top: 14px;
}

.admin-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-family: var(--font-ar);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    background: rgba(255,255,255,.1);
    color: white;
    text-decoration: none;
    transition: all var(--transition);
}
.admin-action-btn:hover { background: rgba(255,255,255,.2); color: white; }
.admin-action-btn--danger { background: rgba(231,76,60,.3); }
.admin-action-btn--danger:hover { background: var(--color-danger); }

/* Admin main */
.admin-main {
    padding: 28px 32px;
    background: var(--color-bg);
    overflow-y: auto;
    min-height: 100vh;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 26px;
}

.stat-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    border-right: 4px solid transparent;
    transition: box-shadow var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); }

.stat-card--blue   { border-right-color: var(--color-primary-l); }
.stat-card--green  { border-right-color: var(--color-accent); }
.stat-card--orange { border-right-color: var(--color-warning); }
.stat-card--red    { border-right-color: var(--color-danger); }

.stat-card__icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.stat-card--blue  .stat-card__icon { background: #ebf4ff; color: var(--color-primary-l); }
.stat-card--green .stat-card__icon { background: #f0fff4; color: var(--color-accent-d); }
.stat-card--orange .stat-card__icon { background: #fffbeb; color: var(--color-warning); }
.stat-card--red   .stat-card__icon { background: #fff5f5; color: var(--color-danger); }

.stat-card__num   { font-size: 1.8rem; font-weight: 800; line-height: 1; color: var(--color-text); }
.stat-card__label { font-size: 0.82rem; color: var(--color-text-muted); margin-top: 4px; }

@media (max-width: 900px) { .stats-grid { grid-template-columns: repeat(2,1fr); } }

/* Toolbar */
.admin-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.admin-toolbar__title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    align-items: center;
    background: var(--color-white);
    padding: 16px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}
.filter-bar__input { min-width: 0; flex: 1 1 160px; }

/* Table */
.table-wrap {
    background: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.data-table th {
    background: #f1f5f9;
    padding: 12px 16px;
    text-align: right;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-text-muted);
    border-bottom: 2px solid var(--color-border);
    white-space: nowrap;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

.data-table tbody tr:hover { background: #f8faff; }
.data-table tbody tr:last-child td { border-bottom: none; }

.td-id    { font-weight: 800; color: var(--color-text-muted); width: 40px; }

.td-name  { display: flex; align-items: center; gap: 10px; }
.td-name__avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-border);
    flex-shrink: 0;
}
.td-name strong { display: block; font-weight: 700; }
.td-name small { color: var(--color-text-muted); font-size: 0.78rem; }

.td-empty {
    text-align: center;
    padding: 40px;
    color: var(--color-text-muted);
}
.td-empty p { margin-top: 10px; }

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.77rem;
    font-weight: 700;
    white-space: nowrap;
}
.badge--green { background: #f0fff4; color: var(--color-accent-d); border: 1px solid #9ae6b4; }
.badge--red   { background: #fff5f5; color: var(--color-danger);   border: 1px solid #feb2b2; }
.badge--gray  { background: #f7fafc; color: #718096;               border: 1px solid #e2e8f0; }

/* Action buttons */
.action-btns { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* Dropdown */
.dropdown { position: relative; display: inline-block; }
.dropdown__menu {
    display: none;
    position: absolute;          /* fallback; JS overrides to fixed */
    top: calc(100% + 4px);
    right: 0;
    min-width: 195px;
    background: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    overflow: hidden;
    border: 1px solid var(--color-border);
}
.dropdown__menu.open { display: block; animation: fadeUp .2s ease; }
.dropdown__menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    color: var(--color-text);
    font-size: 0.86rem;
    transition: background var(--transition);
}
.dropdown__menu a:hover { background: #f1f5f9; }

/* ═══════════════════════════ Modals ═══════════════════════════ */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9000;
    align-items: center;
    justify-content: center;
}
.modal.open { display: flex; }

.modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(3px);
}

.modal__box {
    position: relative;
    z-index: 1;
    background: var(--color-white);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: fadeUp .3s ease;
}

.modal__box--sm { max-width: 420px; }

.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
}

.modal__header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 800;
    color: var(--color-primary);
}

.modal__close {
    background: #f1f5f9;
    border: none;
    width: 32px; height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    transition: all var(--transition);
}
.modal__close:hover { background: var(--color-danger); color: white; }

.modal__form, .modal__body { padding: 20px 24px; }

.modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--color-border);
    background: #f8faff;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* History */
.history-section { margin-top: 20px; }
.history-section__title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.history-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f7fafc;
    border-radius: var(--radius-sm);
    font-size: 0.84rem;
}
.history-item--empty { color: var(--color-text-muted); justify-content: center; font-style: italic; }

.history-item__badge {
    display: inline-flex;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}
.history-item__badge--green { background: #f0fff4; color: var(--color-accent-d); }
.history-item__badge--red   { background: #fff5f5; color: var(--color-danger); }
.history-item__date  { font-weight: 700; color: var(--color-text); font-family: var(--font-fr); }
.history-item__notes { color: var(--color-text-muted); font-size: 0.8rem; }
.history-item .btn   { margin-right: auto; }

/* Sectors */
.sector-list { list-style: none; max-height: 200px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
.sector-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    background: #f7fafc;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
}
.sector-item--empty { color: var(--color-text-muted); font-style: italic; justify-content: center; }
.add-sector-form { display: flex; gap: 8px; }
.add-sector-form .field__input { flex: 1; }

/* ═══════════════════════════ Receipt Page ═══════════════════════════ */
.receipt-page { min-height: 100vh; background: var(--color-bg); padding: 0; }

.receipt-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 32px;
    background: var(--color-primary);
    color: white;
}

.receipt-bar__title {
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.receipt-card {
    max-width: 860px;
    margin: 32px auto;
    background: var(--color-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.receipt-card__header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 32px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-l));
    color: white;
}

.receipt-card__logo img { width: 60px; filter: brightness(0) invert(1); }
.receipt-card__titles h1 { font-size: 1.05rem; font-weight: 800; }
.receipt-card__titles p  { font-size: 0.8rem; opacity: .8; font-family: var(--font-fr); }

.receipt-card__badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 32px;
    background: #fffbeb;
    color: #92400e;
    font-size: 0.88rem;
    font-weight: 700;
    border-bottom: 1px solid #fde68a;
}

.receipt-card__body {
    padding: 28px 32px;
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 28px;
}

.receipt-card__media {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.receipt-card__photo {
    width: 150px;
    height: 180px;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 3px solid var(--color-border);
}

.receipt-card__qr { text-align: center; }
.receipt-card__qr img { width: 100px; }
.receipt-card__qr small { display: block; font-size: 0.75rem; color: var(--color-text-muted); margin-top: 4px; }

.info-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 14px; }
.info-item { display: flex; flex-direction: column; gap: 4px; }
.info-item--full { grid-column: 1/-1; }
.info-item__label { font-size: 0.78rem; font-weight: 700; color: var(--color-text-muted); }
.info-item__value { font-size: 0.95rem; font-weight: 700; color: var(--color-text); }
.token { font-size: 0.75rem; word-break: break-all; font-family: monospace; color: var(--color-text-muted); }

.receipt-card__footer {
    padding: 14px 32px;
    background: #f7fafc;
    border-top: 1px solid var(--color-border);
    font-size: 0.84rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 620px) {
    .receipt-card__body { grid-template-columns: 1fr; }
}

/* ═══════════════════════════ Verify Page ═══════════════════════════ */
.verify-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.verify-page--green { background: linear-gradient(135deg, #0f5132 0%, #27ae60 100%); }
.verify-page--red   { background: linear-gradient(135deg, #7b1e1e 0%, #e74c3c 100%); }
.verify-page--gray  { background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%); }

.verify-card {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    padding: 36px 32px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    box-shadow: var(--shadow-xl);
    animation: fadeUp .4s ease;
}

.verify-card__photo {
    width: 120px; height: 140px;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 3px solid var(--color-border);
    margin-bottom: 16px;
}

.verify-card__name {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 4px;
}

.verify-card__name-fr {
    font-size: 0.88rem;
    color: var(--color-text-muted);
    font-family: var(--font-fr);
    margin-bottom: 16px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.92rem;
    font-weight: 700;
    margin-bottom: 20px;
}
.status-badge--green { background: #f0fff4; color: var(--color-accent-d); border: 1.5px solid #9ae6b4; }
.status-badge--red   { background: #fff5f5; color: var(--color-danger);   border: 1.5px solid #feb2b2; }
.status-badge--gray  { background: #f7fafc; color: #718096;               border: 1.5px solid #e2e8f0; }

.verify-card__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    text-align: right;
    margin-bottom: 20px;
}

.verify-card__item { }
.verify-card__item label { font-size: 0.75rem; color: var(--color-text-muted); font-weight: 700; display: block; }
.verify-card__item p { font-size: 0.88rem; font-weight: 700; color: var(--color-text); }

.verify-card__qr { margin: 16px 0; }
.verify-card__qr img { width: 90px; }

.verify-card__powered {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
}

.verify-card__icon { color: var(--color-text-muted); margin-bottom: 16px; }

/* ═══════════════════════════ Utilities ═══════════════════════════ */
.hidden { display: none !important; }

.progress-bar {
    height: 4px;
    background: var(--color-border);
    border-radius: 2px;
    margin-top: 4px;
}
.progress-bar__fill {
    height: 100%;
    background: var(--color-primary-l);
    border-radius: 2px;
    width: 0%;
    transition: width .3s ease;
}
