:root {
    --app-primary: #1565c0;
    --app-primary-dark: #0d3f7a;
    --app-accent: #0f9d7a;
    --app-bg: #f4f7fb;
    --app-panel: #ffffff;
    --app-border: #dbe4ef;
    --app-text: #182230;
    --app-muted: #667085;
    --app-shadow: 0 12px 28px rgba(15, 23, 42, .08);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--app-text);
    background: var(--app-bg);
    font-family: Tahoma, Arial, sans-serif;
    letter-spacing: 0;
}

body.public-layout {
    background:
        radial-gradient(circle at 18% 18%, rgba(86, 142, 245, .14) 0 16%, transparent 17%),
        radial-gradient(circle at 86% 10%, rgba(86, 142, 245, .12) 0 18%, transparent 19%),
        radial-gradient(circle at 15% 88%, rgba(86, 142, 245, .16) 0 22%, transparent 23%),
        linear-gradient(180deg, #f8fbff 0%, #dfeaff 58%, #bcd2ff 100%);
}

body.dashboard-layout {
    background:
        radial-gradient(circle at 15% 12%, rgba(86, 142, 245, .10) 0 15%, transparent 16%),
        radial-gradient(circle at 92% 2%, rgba(86, 142, 245, .08) 0 17%, transparent 18%),
        linear-gradient(180deg, #f8fbff 0%, #eef5ff 48%, #dfeaff 100%);
}

a {
    text-decoration: none;
}

.app-shell,
.public-main {
    min-height: 100vh;
}

.public-main {
    padding: 18px 12px;
}

.public-home,
.auth-screen {
    min-height: calc(100vh - 64px);
    align-content: center;
    justify-items: center;
}

.public-home {
    display: grid;
    gap: 22px;
    width: min(100%, 1040px);
    text-align: center;
}

.auth-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-inline: 12px;
    direction: ltr;
}

.auth-card-shell {
    flex: 0 1 auto;
    min-width: 0;
    width: min(560px, calc(100vw - 72px)) !important;
    max-width: 560px;
}

.app-sidebar {
    position: fixed;
    inset-block: 0;
    right: 0;
    width: 260px;
    padding: 16px 12px;
    overflow-y: auto;
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 255, 255, .92) 0 18%, transparent 19%),
        linear-gradient(180deg, rgba(248, 251, 255, .98) 0%, rgba(221, 234, 255, .96) 58%, rgba(188, 210, 255, .94) 100%);
    border-left: 1px solid rgba(219, 228, 239, .9);
    box-shadow: -14px 0 32px rgba(80, 126, 219, .14);
    z-index: 1030;
    transition: transform .22s ease, opacity .18s ease;
}

.app-main {
    min-height: 100vh;
    padding: 84px 290px 32px 28px;
    transition: padding .22s ease;
}

.topbar {
    position: fixed;
    top: 0;
    right: 260px;
    left: 0;
    min-height: 64px;
    z-index: 1020;
    background: rgba(255, 255, 255, .74);
    border-bottom: 1px solid rgba(219, 228, 239, .9);
    box-shadow: 0 12px 28px rgba(80, 126, 219, .10);
    backdrop-filter: blur(8px);
    transition: right .22s ease;
}

.dashboard-quick-controls {
    position: static;
    display: grid;
    justify-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, .62);
    border-radius: 18px;
    background: rgba(255, 255, 255, .48);
    box-shadow: 0 10px 20px rgba(80, 126, 219, .08);
}

.quick-control-btn {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 999px;
    background: linear-gradient(135deg, #ffffff, #eaf3ff);
    color: #1d4ed8;
    box-shadow: 0 12px 24px rgba(80, 126, 219, .18);
    cursor: pointer;
}

.quick-control-btn:hover {
    color: #ffffff;
    filter: brightness(.95);
}

.quick-control-btn--zoom {
    color: #0f766e;
}

.quick-control-btn--reset {
    color: #6d3df5;
    font-size: 12px;
    font-weight: 900;
}

#sidebarToggleBtn {
    border-color: #111827;
    background: #111827;
    color: #ffffff;
}

#zoomInBtn {
    border-color: #2563eb;
    background: #2563eb;
    color: #ffffff;
}

#zoomOutBtn {
    border-color: #dc2626;
    background: #dc2626;
    color: #ffffff;
}

#zoomResetBtn {
    border-color: #7c3aed;
    background: #ffffff;
    color: #7c3aed;
}

body.sidebar-collapsed .app-sidebar {
    width: 72px;
    padding: 16px 10px;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    overflow: hidden;
}

body.sidebar-collapsed .app-sidebar > :not(.dashboard-quick-controls) {
    display: none !important;
}

body.sidebar-collapsed .app-main {
    padding-right: 96px;
}

body.sidebar-collapsed .topbar {
    right: 72px;
}

body.sidebar-collapsed .dashboard-quick-controls {
    margin-top: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.brand-mark {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, .88);
    box-shadow: 0 10px 20px rgba(80, 126, 219, .16);
}

.app-sidebar > .d-flex {
    padding: 8px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .56);
    box-shadow: 0 10px 20px rgba(80, 126, 219, .08);
}

.sidebar-user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, .64);
    border-radius: 18px;
    background: rgba(255, 255, 255, .66);
    color: #203a63;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(80, 126, 219, .08);
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.sidebar-user-card:hover {
    color: #0d3f7a;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 14px 26px rgba(80, 126, 219, .16);
    transform: translateY(-1px);
}

.sidebar-user-card__image {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 999px;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, .94);
    box-shadow: 0 10px 18px rgba(80, 126, 219, .16);
}

.sidebar-user-card__label {
    display: block;
    color: var(--app-muted);
    font-size: 11px;
    font-weight: 800;
}

.sidebar-user-card__name {
    display: block;
    color: var(--app-primary-dark);
    font-size: 14px;
    font-weight: 900;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-nav-link,
.link-button,
.dropbtn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 38px;
    margin: 3px 0;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, .58);
    border-radius: 999px;
    background: rgba(255, 255, 255, .62);
    color: #203a63;
    text-align: right;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(80, 126, 219, .08);
}

.app-nav-link:hover,
.link-button:hover,
.dropbtn:hover {
    background: #3769f5;
    color: #ffffff;
    box-shadow: 0 12px 22px rgba(55, 105, 245, .20);
}

.app-nav-link i {
    width: 18px;
    text-align: center;
    color: #3769f5;
}

.app-nav-link:hover i,
.link-button:hover i,
.dropbtn:hover i {
    color: #ffffff;
}

.sidebar-filter-box {
    margin: 4px 0 8px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 18px;
    background: rgba(255, 255, 255, .64);
    box-shadow: 0 10px 20px rgba(80, 126, 219, .09);
}

.sidebar-filter-box .form-select {
    min-height: 36px;
    border-color: rgba(199, 219, 245, .9);
    border-radius: 999px;
    color: #203a63;
    font-size: 13px;
    font-weight: 800;
    box-shadow: none;
}

.dropdown-content {
    display: grid;
    gap: 4px;
    padding: 4px 12px 8px 0;
}

.dropdown-content button {
    border: 1px solid rgba(255, 255, 255, .58);
    border-radius: 999px;
    background: rgba(255, 255, 255, .76);
    color: #203a63;
    padding: 7px 10px;
    text-align: right;
    font-weight: 800;
}

#logout-form .btn {
    min-height: 42px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .68);
    font-weight: 900;
    box-shadow: 0 10px 20px rgba(80, 126, 219, .08);
}

.main-content,
.centers-container,
.search-horizontal,
.registration-form {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto 24px;
}

.main-content.flutter-page {
    max-width: none;
    margin-inline: 0;
}

.grid-container,
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 14px;
}

.missing-card,
.center-card,
.card,
.registration-form form,
.content-panel {
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: var(--app-panel);
    box-shadow: var(--app-shadow);
}

.card,
.btn,
.form-control,
.form-select,
.alert,
.modal-content {
    border-radius: 8px;
}

.app-flash-message {
    transition: opacity .35s ease, transform .35s ease, max-height .35s ease, margin .35s ease, padding .35s ease;
    overflow: hidden;
}

.app-flash-message.is-hiding {
    opacity: 0;
    transform: translateY(-8px);
    max-height: 0;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-width: 0;
}

.person-image,
.product-image,
.card-image {
    max-width: 100%;
    object-fit: cover;
}

.person-image {
    width: 100%;
    height: 220px;
    border-radius: 8px;
}

.info-item {
    margin-bottom: 8px;
    line-height: 1.7;
}

.search-horizontal {
    position: static;
    background: var(--app-panel);
    border: 1px solid var(--app-border);
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
}

.search-horizontal form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: end;
}

.search-horizontal input,
.search-horizontal select {
    min-height: 38px;
}

.manager-page {
    width: 100%;
    max-width: none;
    margin: 0;
    direction: rtl;
}

.manager-shell {
    display: grid;
    gap: 16px;
    width: min(1280px, 100%);
    margin: 0 auto 28px;
}

.manager-head,
.manager-panel,
.manager-empty,
.manager-card {
    border: 1px solid rgba(125, 164, 230, .45);
    border-radius: 14px;
    background: rgba(248, 251, 255, .95);
    box-shadow: 0 16px 34px rgba(37, 99, 235, .10);
}

.manager-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #eef6ff, #f8fbff 58%, #e9fff8);
}

.manager-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: #14213d;
    font-size: 22px;
    font-weight: 900;
}

.manager-title i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #1d74d8, #15a084);
    color: #fff;
    box-shadow: 0 12px 20px rgba(29, 116, 216, .20);
}

.manager-subtitle {
    margin: 6px 52px 0 0;
    color: #667085;
    font-size: 13px;
    font-weight: 700;
}

.manager-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.manager-btn,
.manager-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    border: 1px solid transparent;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 900;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.manager-btn {
    padding: 9px 16px;
    background: linear-gradient(135deg, #1769c2, #159c8b);
    color: #fff;
    box-shadow: 0 12px 24px rgba(21, 101, 192, .18);
}

.manager-btn:hover,
.manager-icon-btn:hover {
    color: #fff;
    transform: translateY(-1px);
}

.manager-btn.danger,
.manager-icon-btn.danger:hover {
    background: #d92d20;
}

.manager-btn.secondary {
    background: #667085;
}

.manager-table-wrap {
    width: 100%;
    overflow: auto;
    border-radius: 14px;
}

.manager-table {
    width: 100%;
    min-width: 980px;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    direction: rtl;
}

.manager-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 13px 10px;
    background: #1769c2;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    text-align: center;
    white-space: nowrap;
}

.manager-table tbody td,
.manager-table tbody th {
    padding: 11px 10px;
    border-bottom: 1px solid rgba(125, 164, 230, .28);
    color: #1f2937;
    font-size: 13px;
    font-weight: 750;
    text-align: center;
    vertical-align: middle;
}

.manager-table tbody tr:hover {
    background: #eef6ff;
}

.manager-table .text-wrap {
    min-width: 160px;
    max-width: 260px;
    overflow-wrap: anywhere;
    white-space: normal;
}

.manager-icon-btn {
    min-width: 38px;
    min-height: 36px;
    padding: 7px 10px;
    background: #fff;
    color: #1769c2;
    border-color: rgba(21, 101, 192, .20);
}

.manager-icon-btn.warning {
    color: #b76a00;
    border-color: rgba(183, 106, 0, .22);
    background: #fff7e8;
}

.manager-icon-btn.warning:hover {
    background: #f59e0b;
}

.manager-icon-btn.danger {
    color: #d92d20;
    border-color: rgba(217, 45, 32, .22);
    background: #fff1f3;
}

.manager-thumb {
    width: 58px;
    height: 58px;
    object-fit: cover;
    border: 1px solid rgba(31, 41, 55, .28);
    border-radius: 12px;
    background: #e5e7eb;
    box-shadow: 0 8px 16px rgba(15, 23, 42, .10);
}

.manager-empty {
    padding: 34px 16px;
    color: #667085;
    text-align: center;
    font-weight: 850;
}

.manager-empty i {
    display: block;
    margin-bottom: 10px;
    color: #1769c2;
    font-size: 34px;
}

.manager-form-page {
    width: 100%;
    max-width: none;
    margin: 0;
    direction: rtl;
}

.manager-form-shell {
    width: min(980px, 100%);
    margin: 0 auto 28px;
    overflow: hidden;
    border: 1px solid rgba(125, 164, 230, .45);
    border-radius: 16px;
    background: rgba(248, 251, 255, .96);
    box-shadow: 0 18px 38px rgba(37, 99, 235, .12);
}

.manager-form-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px;
    border-bottom: 1px solid rgba(125, 164, 230, .34);
    background: linear-gradient(135deg, #eef6ff, #f8fbff 58%, #e9fff8);
}

.manager-form-body {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.manager-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.manager-form-field label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 7px;
    color: #344054;
    font-weight: 900;
}

.manager-form-field input,
.manager-form-field select,
.manager-form-field textarea,
.dashboard-layout .app-main .form-control,
.dashboard-layout .app-main .form-select {
    min-height: 44px;
    border: 1px solid rgba(125, 164, 230, .65);
    border-radius: 12px;
    background-color: #fff;
    color: #1f2937;
    font-size: 14px;
    font-weight: 750;
    box-shadow: inset 0 1px 0 rgba(15, 23, 42, .04);
}

.manager-form-field input:focus,
.manager-form-field select:focus,
.manager-form-field textarea:focus,
.dashboard-layout .app-main .form-control:focus,
.dashboard-layout .app-main .form-select:focus {
    border-color: #1769c2;
    box-shadow: 0 0 0 4px rgba(23, 105, 194, .12);
}

.manager-form-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 6px;
}

.manager-form-alert {
    width: min(980px, 100%);
    margin: 0 auto 12px;
    border-radius: 12px;
    font-weight: 800;
}

.manager-form-field.is-wide {
    grid-column: 1 / -1;
}

.dashboard-layout .app-main .jumbotron,
.dashboard-layout .app-main .card:not(.manager-dashboard-card) {
    border: 1px solid rgba(125, 164, 230, .45);
    border-radius: 14px;
    background: rgba(248, 251, 255, .95);
    box-shadow: 0 16px 34px rgba(37, 99, 235, .10);
}

.dashboard-layout .app-main .product-card {
    overflow: hidden;
    border: 1px solid rgba(125, 164, 230, .45);
    border-radius: 14px;
    background: rgba(248, 251, 255, .95) !important;
    color: #1f2937;
    box-shadow: 0 16px 34px rgba(37, 99, 235, .10);
}

.manager-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.manager-dashboard-card {
    position: relative;
    display: grid;
    gap: 18px;
    min-height: 148px;
    padding: 18px;
    overflow: hidden;
    border: 1px solid rgba(125, 164, 230, .45);
    border-radius: 16px;
    background: rgba(248, 251, 255, .96);
    color: #14213d;
    text-decoration: none;
    box-shadow: 0 16px 34px rgba(37, 99, 235, .10);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.manager-dashboard-card:hover {
    color: #14213d;
    transform: translateY(-2px);
    border-color: rgba(23, 105, 194, .38);
    box-shadow: 0 22px 42px rgba(37, 99, 235, .16);
}

.manager-dashboard-card::after {
    content: "";
    position: absolute;
    inset-inline-start: -50px;
    bottom: -70px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(21, 156, 139, .10);
}

.manager-dashboard-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.manager-dashboard-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: linear-gradient(135deg, #1d74d8, #15a084);
    color: #fff;
    font-size: 22px;
    box-shadow: 0 12px 22px rgba(29, 116, 216, .20);
}

.manager-dashboard-card__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 38px;
    height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    background: #fff1f3;
    color: #d92d20;
    font-weight: 900;
}

.manager-dashboard-card__title {
    margin: 0;
    font-size: 19px;
    font-weight: 900;
}

.manager-dashboard-card__text {
    margin: 6px 0 0;
    color: #667085;
    font-size: 13px;
    font-weight: 750;
}

.image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 22px;
    padding-top: 24px;
}

.image-container img {
    width: clamp(78px, 13vw, 118px);
    height: clamp(78px, 13vw, 118px);
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, .82);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .18);
}

.text-box {
    width: min(92vw, 780px);
    margin: 22px auto;
    padding: 18px 20px;
    border: 1px solid rgba(255, 255, 255, .62);
    border-radius: 8px;
    background: rgba(255, 255, 255, .94);
    color: var(--app-primary-dark);
    text-align: center;
    font-size: clamp(24px, 4vw, 42px);
    font-weight: 700;
    line-height: 1.4;
    box-shadow: var(--app-shadow);
}

.mobile-hero {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 18px;
    width: min(100%, 980px);
    margin: 0 auto;
    padding: clamp(18px, 4vw, 36px) 12px;
    overflow: hidden;
}

.mobile-hero::before,
.mobile-hero::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    background: rgba(79, 133, 240, .08);
    pointer-events: none;
}

.mobile-hero::before {
    width: 220px;
    height: 220px;
    top: 8%;
    right: 4%;
}

.mobile-hero::after {
    width: 280px;
    height: 280px;
    bottom: -80px;
    left: 4%;
}

.mobile-hero__logos {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.mobile-hero__logos img {
    width: clamp(46px, 7vw, 76px);
    height: clamp(46px, 7vw, 76px);
    object-fit: cover;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(63, 105, 190, .16);
}

.mobile-hero__brand {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    justify-content: center;
    gap: clamp(10px, 3vw, 22px);
    width: min(100%, 760px);
    margin-top: 4px;
}

.mobile-hero__brand-logo {
    width: clamp(54px, 8vw, 82px);
    height: clamp(54px, 8vw, 82px);
    border-radius: 999px;
    background: #ffffff;
    object-fit: cover;
    box-shadow: 0 14px 28px rgba(80, 126, 219, .18);
}

.mobile-hero__brand-title {
    margin: 0;
    color: #203a63;
    font-size: clamp(26px, 4.2vw, 48px);
    font-weight: 900;
    line-height: 1.25;
    text-align: center;
    overflow-wrap: anywhere;
}

.app-brand-strip {
    display: grid;
    grid-template-columns: auto minmax(0, auto) auto;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 2vw, 18px);
    width: min(100%, 680px);
    margin-inline: auto;
}

.app-brand-strip__logo {
    width: clamp(38px, 5vw, 58px);
    height: clamp(38px, 5vw, 58px);
    border-radius: 999px;
    background: #ffffff;
    object-fit: cover;
    box-shadow: 0 10px 22px rgba(80, 126, 219, .16);
}

.app-brand-strip__title {
    margin: 0;
    color: #203a63;
    font-size: clamp(18px, 2.4vw, 28px);
    font-weight: 900;
    line-height: 1.25;
    text-align: center;
    white-space: nowrap;
}

.app-message-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #1565c0, #0f9d7a);
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(21, 101, 192, .22);
    animation: appMessagePulse 1.7s ease-in-out infinite;
}

.topbar-left-actions {
    position: absolute;
    left: 18px;
    top: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    direction: ltr;
    transform: translateY(-50%);
}

.topbar-left-actions .app-message-btn,
.topbar-left-actions .btn {
    direction: rtl;
}

.app-message-btn__count {
    display: grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding-inline: 6px;
    border-radius: 999px;
    color: #1565c0;
    background: #ffffff;
}

@keyframes appMessagePulse {
    0%, 100% {
        transform: translateY(0);
        box-shadow: 0 8px 18px rgba(21, 101, 192, .22);
    }
    50% {
        transform: translateY(-2px);
        box-shadow: 0 12px 24px rgba(15, 157, 122, .30);
    }
}

.app-message-modal {
    position: fixed;
    inset: 0;
    z-index: 2500;
    display: none;
    place-items: center;
    padding: 16px;
    background: rgba(15, 23, 42, .38);
}

.app-message-modal.is-open {
    display: grid;
}

.app-message-dialog {
    width: min(520px, 100%);
    max-height: min(620px, 86vh);
    overflow: hidden;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 22px 55px rgba(15, 23, 42, .22);
}

.app-message-dialog__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #e7eef8;
    background: linear-gradient(135deg, #f8fbff, #e8f2ff);
}

.app-message-dialog__head h5 {
    margin: 0;
    color: #203a63;
    font-size: 17px;
    font-weight: 900;
}

.app-message-close {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 999px;
    color: #203a63;
    background: #ffffff;
}

.app-message-list {
    display: grid;
    gap: 10px;
    max-height: calc(min(620px, 86vh) - 65px);
    overflow: auto;
    padding: 14px;
}

.app-message-item {
    padding: 12px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #f8fbff;
}

.app-message-item strong {
    display: block;
    margin-bottom: 6px;
    color: #1565c0;
}

.app-message-item p {
    margin: 0;
    color: #182230;
    line-height: 1.8;
}

.app-brand-strip--public {
    margin-bottom: 18px;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .52);
}

.mobile-hero__mark {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: clamp(116px, 15vw, 164px);
    height: clamp(116px, 15vw, 164px);
    margin-top: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 24px 50px rgba(80, 126, 219, .24), inset 0 0 0 10px rgba(255, 255, 255, .7);
}

.mobile-hero__mark i {
    display: grid;
    place-items: center;
    width: 70px;
    height: 70px;
    border-radius: 999px;
    background: #3769f5;
    color: #ffffff;
    font-size: 34px;
    box-shadow: 0 12px 22px rgba(55, 105, 245, .24);
}

.mobile-hero__title {
    position: relative;
    z-index: 1;
    margin: 8px 0 0;
    color: #203a63;
    font-size: clamp(34px, 4.4vw, 54px);
    font-weight: 800;
    line-height: 1.25;
}

.mobile-hero__rule {
    position: relative;
    z-index: 1;
    width: min(190px, 38vw);
    height: 5px;
    border-radius: 999px;
    background: linear-gradient(90deg, #3769f5, #8ab5ff);
}

.mobile-hero__subtitle {
    position: relative;
    z-index: 1;
    margin: 0;
    color: rgba(32, 58, 99, .58);
    font-size: clamp(17px, 2vw, 24px);
}

.mobile-hero__badge {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 12px 34px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .86);
    color: #203a63;
    font-size: clamp(18px, 2.1vw, 24px);
    font-weight: 800;
    box-shadow: 0 18px 34px rgba(80, 126, 219, .16);
}

.mobile-actions {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: min(100%, 760px);
    margin-top: 6px;
}

.mobile-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 58px;
    padding: 12px 18px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .88);
    color: #203a63;
    font-weight: 800;
    box-shadow: 0 14px 28px rgba(80, 126, 219, .14);
}

.mobile-action.primary {
    background: #3769f5;
    color: #ffffff;
    box-shadow: 0 18px 32px rgba(55, 105, 245, .28);
}

.mobile-action.wide {
    grid-column: 1 / -1;
}

.public-tool {
    display: grid;
    gap: 18px;
    width: min(100%, 1040px);
    margin: 0 auto;
}

.public-tool__head {
    display: grid;
    justify-items: center;
    gap: 12px;
    text-align: center;
}

.public-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: clamp(16px, 3vw, 26px);
    border-radius: 18px;
    background: rgba(255, 255, 255, .54);
    box-shadow: 0 18px 40px rgba(80, 126, 219, .15);
    backdrop-filter: blur(10px);
}

.public-field {
    position: relative;
}

.public-field--wide {
    grid-column: span 2;
}

.public-field i {
    position: absolute;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    color: #3769f5;
    font-size: 18px;
}

.public-field input,
.public-select {
    width: 100%;
    min-height: 54px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    color: #203a63;
    box-shadow: 0 12px 26px rgba(80, 126, 219, .12);
}

.public-field input {
    padding: 10px 52px 10px 18px;
}

.public-select {
    padding: 10px 18px;
}

.public-form__actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.public-results {
    display: grid;
    gap: 12px;
}

.public-result-grid,
.directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.public-result-card,
.directory-card {
    padding: 16px;
    border: 1px solid rgba(219, 228, 239, .8);
    border-radius: 14px;
    background: rgba(255, 255, 255, .76);
    box-shadow: 0 14px 30px rgba(80, 126, 219, .11);
}

.public-result-card__top,
.directory-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    color: #3769f5;
    font-weight: 800;
}

.public-result-card h3,
.directory-card h3 {
    margin: 0 0 12px;
    color: #203a63;
    font-size: 20px;
    font-weight: 800;
}

.public-result-card dl,
.directory-card dl {
    display: grid;
    gap: 7px;
    margin: 0;
}

.public-result-card dl div,
.directory-card dl div {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 8px;
    padding-top: 7px;
    border-top: 1px solid rgba(102, 112, 133, .16);
}

.public-result-card dt,
.directory-card dt {
    color: #5b21b6;
    font-weight: 800;
}

.public-result-card dd,
.directory-card dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    color: #203a63;
    font-weight: 700;
}

.public-note {
    padding: 14px 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .72);
    color: #203a63;
    text-align: center;
    box-shadow: 0 12px 26px rgba(80, 126, 219, .12);
}

.auth-card {
    overflow: hidden;
    border: 0;
    background: transparent;
    box-shadow: none !important;
    direction: rtl;
}

.auth-card .card-header {
    border: 0;
    background: transparent;
    color: #203a63;
}

.auth-card .form-control {
    min-height: 58px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 12px 28px rgba(80, 126, 219, .13);
}

.auth-card .btn {
    min-height: 58px;
    border-radius: 999px;
    font-weight: 700;
}

.auth-card .btn-primary {
    border: 0;
    background: #3769f5;
    box-shadow: 0 18px 32px rgba(55, 105, 245, .28);
}

.auth-field {
    position: relative;
}

.auth-field i {
    position: absolute;
    top: 50%;
    right: 20px;
    z-index: 2;
    transform: translateY(-50%);
    color: #3769f5;
    font-size: 20px;
}

.auth-field .form-control {
    padding-right: 58px;
}

.button-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    width: min(92vw, 980px);
    margin: 12px auto;
}

.button-container .btn,
.top-left-btn {
    min-height: 44px;
    padding: 10px 18px;
    border: 0;
    color: #ffffff;
    background: var(--app-primary);
    box-shadow: 0 9px 18px rgba(21, 101, 192, .18);
}

.button-container .btn:hover,
.top-left-btn:hover {
    color: #ffffff;
    background: var(--app-primary-dark);
}

.top-left-btn {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1025;
}

.popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    padding: 24px;
    background: rgba(15, 23, 42, .58);
    overflow-y: auto;
}

.popup-content {
    position: relative;
    width: min(94vw, 720px);
    max-height: calc(100vh - 48px);
    margin: 24px auto;
    overflow: auto;
    background: #ffffff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 24px 55px rgba(15, 23, 42, .2);
}

.popup-content .table {
    min-width: 680px;
}

.close-btn {
    position: absolute;
    top: 8px;
    left: 14px;
    color: #344054;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.red-circle {
    display: grid;
    place-items: center;
    width: 118px;
    height: 118px;
    margin: 18px auto;
    border-radius: 50%;
    color: #ffffff;
    background: #d92d20;
    font-size: 42px;
    font-weight: 700;
}

.grid-margin {
    margin-bottom: 1.25rem;
}

.stretch-card {
    display: flex;
    align-items: stretch;
}

.stretch-card > .card {
    width: 100%;
    min-width: 100%;
}

.flot-bar-wrapper {
    min-height: 70px;
    gap: 12px;
}

.chart-container {
    width: min(92vw, 800px);
    margin: 0 auto 24px;
    padding: 22px;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: #ffffff;
    text-align: center;
    box-shadow: var(--app-shadow);
}

.chart-title {
    margin-bottom: 24px;
    color: var(--app-text);
    font-size: 24px;
    font-weight: 700;
}

.circle-row {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.circle {
    width: 100px;
    height: 100px;
    flex: 0 0 100px;
    border-radius: 50%;
    background: conic-gradient(var(--app-primary) 0% 100%, #e0e0e0 100% 100%);
    transition: transform .5s ease;
    animation: grow 1.4s ease-out forwards;
}

.percentage {
    color: var(--app-text);
    font-size: 20px;
    font-weight: 700;
}

#missing {
    background: conic-gradient(#d92d20 0% 0%, #eef2f6 0% 100%);
}

#found {
    background: conic-gradient(#1565c0 0% 0%, #eef2f6 0% 100%);
}

#received {
    background: conic-gradient(#0f9d7a 0% 0%, #eef2f6 0% 100%);
}

footer {
    margin-top: 24px;
    color: var(--app-muted);
    text-align: center;
    font-size: 18px;
}

@keyframes grow {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

@media (max-width: 992px) {
    .app-sidebar {
        position: sticky;
        top: 0;
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        height: auto;
        padding: 8px 10px;
        border-left: 0;
        border-bottom: 1px solid var(--app-border);
        overflow-x: auto;
    }

    .app-sidebar > .d-flex {
        flex: 0 0 auto;
        margin-bottom: 0 !important;
        padding-inline-end: 8px;
        border-inline-end: 1px solid var(--app-border);
    }

    .app-sidebar nav.d-grid {
        display: flex !important;
        flex: 1 0 auto;
        align-items: center;
        gap: 8px !important;
        overflow-x: auto;
        padding: 2px 0;
    }

    .app-nav-link,
    .link-button,
    .dropbtn {
        flex: 0 0 auto;
        width: auto;
        min-height: 34px;
        margin: 0;
        white-space: nowrap;
    }

    .sidebar-filter-box {
        flex: 0 0 220px;
        margin: 0;
        padding: 4px;
    }

    #logout-form {
        flex: 0 0 170px;
        margin-top: 0 !important;
    }

    .topbar {
        position: static;
        right: 0;
    }

    .topbar-left-actions {
        position: static;
        transform: none;
        margin-inline-start: auto;
        flex-wrap: wrap;
    }

    .app-main {
        padding: 18px 12px 28px;
    }

    .manager-head,
    .manager-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .manager-btn {
        width: 100%;
    }

    .manager-title {
        font-size: 18px;
    }

    .manager-subtitle {
        margin-right: 0;
    }

    .manager-form-head,
    .manager-form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .manager-form-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-quick-controls {
        flex: 0 0 auto;
        margin: 0;
        padding: 4px;
        display: flex;
    }

    body.sidebar-collapsed .app-sidebar {
        width: 72px;
        min-width: 72px;
        max-height: none;
        padding: 8px;
        border-bottom: 1px solid var(--app-border);
        transform: none;
    }

    .public-main {
        padding: 18px 10px;
    }
}

@media (max-width: 576px) {
    .auth-card-shell {
        width: min(320px, calc(100vw - 70px)) !important;
        max-width: 320px;
        transform: translateX(-34px);
    }

    .auth-screen {
        padding-inline: 0;
    }

    .mobile-actions {
        grid-template-columns: 1fr;
    }

    .public-form,
    .public-form__actions {
        grid-template-columns: 1fr;
    }

    .container.public-tool {
        width: 100%;
        max-width: calc(100vw - 20px);
        padding-inline: 0;
    }

    .public-tool__head {
        overflow: hidden;
    }

    .mobile-hero__title {
        max-width: 100%;
        font-size: clamp(28px, 8vw, 34px);
        overflow-wrap: anywhere;
    }

    .mobile-hero__subtitle {
        max-width: 100%;
        font-size: 16px;
        overflow-wrap: anywhere;
    }

    .public-field--wide {
        grid-column: auto;
    }

    .mobile-hero {
        gap: 14px;
        padding-top: 10px;
    }

    .mobile-hero__badge {
        width: min(100%, 360px);
    }

    .button-container .btn {
        width: 100%;
    }

    .text-box {
        font-size: 24px;
    }
}
