
:root {
    --green: #0d6b43;
    --green-dark: #075536;
    --green-deep: #063f29;
    --green-soft: #eaf6ee;
    --green-pale: #f4faf6;
    --border: #d9e9df;
    --text: #17382b;
    --muted: #6b8175;
    --white: #ffffff;
    --page: #f5faf7;
    --danger: #be3a31;
    --danger-soft: #fde9e7;
    --warning: #9a6700;
    --warning-soft: #fff6da;
    --shadow: 0 10px 28px rgba(13, 84, 50, .07);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body.admin-v55,
body.login-body {
    margin: 0;
    min-height: 100vh;
    background:
        linear-gradient(rgba(247, 251, 248, .94), rgba(247, 251, 248, .94)),
        url('/assets/images/background.png') center/cover fixed;
    color: var(--text);
    font-family:
        "Noto Sans Bengali",
        "Nirmala UI",
        Arial,
        sans-serif;
}

a {
    color: var(--green);
}

button,
input,
select,
textarea {
    font: inherit;
}

.admin-v55-shell {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    min-height: 100vh;
}

.admin-v55-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 18px 14px;
    border-right: 1px solid rgba(13, 107, 67, .09);
    background:
        linear-gradient(rgba(248, 253, 250, .95), rgba(239, 249, 243, .96)),
        url('/assets/images/background.png') center/cover;
    overflow-y: auto;
}

.admin-v55-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 6px 20px;
}

.admin-v55-logo {
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
    border-radius: 50%;
    border: 2px solid #dceee3;
    background:
        #fff
        url('/assets/images/logo.png')
        center/contain no-repeat;
    box-shadow: 0 7px 18px rgba(13, 90, 52, .10);
}

.admin-v55-brand-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.admin-v55-brand-copy strong {
    color: var(--green-dark);
    font-size: 18px;
    line-height: 1.25;
}

.admin-v55-brand-copy span {
    color: #486b59;
    font-size: 12px;
    margin-top: 3px;
}

.admin-v55-brand-copy small {
    color: #789184;
    font-size: 11px;
    margin-top: 6px;
}

.admin-v55-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-v55-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 10px 14px;
    border: 1px solid rgba(13, 107, 67, .08);
    border-radius: 13px;
    background: rgba(255, 255, 255, .80);
    color: #184630;
    text-decoration: none;
    font-weight: 700;
    transition:
        transform .15s ease,
        background .15s ease,
        color .15s ease,
        box-shadow .15s ease;
}

.admin-v55-nav-item:hover {
    transform: translateX(2px);
    background: #eff8f2;
    box-shadow: 0 6px 16px rgba(13, 84, 50, .05);
}

.admin-v55-nav-item.active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(180deg, #0e7349, #08603c);
    box-shadow: 0 8px 18px rgba(10, 99, 61, .20);
}

.admin-v55-nav-icon {
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    font-size: 18px;
}

.admin-v55-sidebar-quote {
    margin-top: auto;
    padding: 24px 14px;
    text-align: center;
    border: 1px solid #d8ecdf;
    border-radius: 18px;
    background:
        linear-gradient(rgba(232, 247, 237, .92), rgba(240, 251, 244, .94)),
        url('/assets/images/background.png') center/cover;
    color: #12603d;
}

.admin-v55-sidebar-plant {
    font-size: 42px;
    margin-bottom: 10px;
}

.admin-v55-sidebar-quote strong {
    font-size: 17px;
    line-height: 1.6;
}

.admin-v55-sidebar-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 6px 0;
    color: #779082;
    font-size: 11px;
}

.admin-v55-workspace {
    min-width: 0;
}

.admin-v55-topbar {
    position: sticky;
    top: 0;
    z-index: 25;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 280px;
    gap: 14px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(13, 107, 67, .10);
    background: rgba(249, 253, 250, .91);
    backdrop-filter: blur(14px);
}

.admin-v55-banner {
    min-height: 110px;
    border: 1px solid #d9ebe0;
    border-radius: 20px;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(246, 252, 248, .12), rgba(246, 252, 248, .02)),
        url('/assets/images/admin_banner.png') center/cover no-repeat;
    box-shadow: var(--shadow);
}

.admin-v55-banner-overlay {
    min-height: 110px;
    display: flex;
    align-items: center;
    padding: 20px 30px;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, .18),
        rgba(255, 255, 255, .02)
    );
}

.admin-v55-banner-overlay strong {
    display: block;
    color: #0b5d3a;
    font-size: 22px;
    line-height: 1.22;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .85);
}

.admin-v55-banner-overlay small {
    display: block;
    color: #315f49;
    margin-top: 6px;
}

.admin-v55-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 1px solid #dfeee4;
    border-radius: 20px;
    background: rgba(255, 255, 255, .96);
    box-shadow: var(--shadow);
}

.admin-v55-profile-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--green);
    color: #fff;
    flex: 0 0 auto;
}

.admin-v55-profile-copy {
    min-width: 0;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
}

.admin-v55-profile-copy strong {
    font-size: 14px;
    color: var(--green-dark);
}

.admin-v55-profile-copy small {
    color: var(--muted);
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-v55-profile-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.admin-v55-profile-actions a {
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.admin-shell {
    width: min(1500px, calc(100% - 36px));
    margin: 18px auto 40px;
}

.admin-v55-page-heading {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 16px;
    margin-bottom: 16px;
}

.admin-v55-page-heading > div:first-child {
    flex: 1 1 auto;
    padding: 12px 2px;
}

.admin-v55-page-heading h1 {
    margin: 0;
    color: var(--green-dark);
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.12;
}

.admin-v55-page-heading p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 15px;
}

.admin-v55-date-card {
    min-width: 250px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    border: 1px solid #dcebe1;
    border-radius: 16px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 7px 20px rgba(13, 84, 50, .05);
}

.admin-v55-date-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
    background: var(--green-soft);
    color: var(--green);
    font-size: 20px;
}

.admin-v55-date-card div {
    display: flex;
    flex-direction: column;
}

.admin-v55-date-card small {
    color: var(--muted);
}

.admin-v55-date-card strong {
    color: var(--green-dark);
    margin-top: 2px;
}

.admin-grid {
    display: grid;
    gap: 14px;
}

.stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card,
.admin-panel,
.report-card {
    border: 1px solid #dcebe1;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .95);
    box-shadow: var(--shadow);
}

.stat-card {
    min-height: 118px;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 17px;
    overflow: hidden;
    position: relative;
}

.stat-card::after {
    content: "♧";
    position: absolute;
    right: 10px;
    bottom: -18px;
    color: rgba(13, 107, 67, .08);
    font-size: 78px;
    line-height: 1;
}

.stat-card > div {
    position: relative;
    z-index: 1;
}

.stat-card-icon {
    position: relative;
    z-index: 1;
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 14px;
    background: var(--green-soft);
    color: var(--green);
    font-size: 23px;
    font-weight: 800;
    flex: 0 0 auto;
}

.stat-card-icon.danger {
    background: var(--danger-soft);
    color: var(--danger);
}

.stat-card span:not(.stat-card-icon) {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.stat-card strong {
    display: block;
    margin-top: 3px;
    color: var(--green-dark);
    font-size: 28px;
    line-height: 1.05;
}

.stat-card small {
    display: block;
    margin-top: 5px;
    color: #82988d;
    font-size: 11px;
}

.admin-panel {
    margin-top: 16px;
    padding: 18px;
}

.panel-heading h2 {
    margin: 0;
    color: var(--green-dark);
    font-size: 22px;
}

.panel-heading p {
    margin: 5px 0 0;
    color: var(--muted);
    line-height: 1.5;
}

.panel-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.panel-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.panel-actions form {
    margin: 0;
}

.module-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.module-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    gap: 4px 12px;
    align-items: center;
    min-height: 112px;
    padding: 16px;
    border: 1px solid #dbeadf;
    border-radius: 16px;
    background: #fbfefc;
    color: var(--text);
    text-decoration: none;
    transition:
        transform .15s ease,
        border-color .15s ease,
        box-shadow .15s ease;
}

.module-card:hover {
    transform: translateY(-2px);
    border-color: #afd4bd;
    box-shadow: 0 10px 24px rgba(13, 84, 50, .08);
}

.module-card-icon {
    grid-row: 1 / span 2;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 12px;
    background: var(--green-soft);
    color: var(--green);
    font-size: 21px;
    font-weight: 800;
}

.module-card strong {
    color: var(--green-dark);
    font-size: 17px;
}

.module-card small {
    color: var(--muted);
    line-height: 1.4;
    font-size: 12px;
}

.module-card-arrow {
    grid-column: 3;
    grid-row: 1 / span 2;
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    background: var(--green-soft);
    color: var(--green);
    font-weight: 800;
}

.admin-v55-dashboard-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 16px;
}

.admin-v55-dashboard-main,
.admin-v55-dashboard-side {
    min-width: 0;
}

.admin-v55-side-card {
    margin-top: 16px;
}

.admin-v55-mini-stats {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.admin-v55-mini-stats > div {
    padding: 12px;
    border: 1px solid #e0ede5;
    border-radius: 12px;
    background: #f8fcf9;
}

.admin-v55-mini-stats span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.admin-v55-mini-stats strong {
    display: block;
    color: var(--green-dark);
    margin-top: 3px;
    font-size: 20px;
}

.admin-v55-activity-list {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.admin-v55-activity-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.admin-v55-activity-dot {
    width: 10px;
    height: 10px;
    margin-top: 5px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--green);
}

.admin-v55-activity-item div {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.admin-v55-activity-item strong {
    color: var(--text);
    font-size: 12px;
    word-break: break-word;
}

.admin-v55-activity-item small {
    color: var(--muted);
    margin-top: 2px;
}

.admin-button,
.mini-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid var(--green);
    border-radius: 11px;
    background: var(--green);
    color: #fff;
    text-decoration: none;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.admin-button.secondary,
.mini-button {
    background: #fff;
    color: var(--green);
}

.admin-button:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.filters {
    display: grid;
    grid-template-columns:
        minmax(230px, 2fr)
        repeat(4, minmax(120px, 1fr))
        auto
        auto;
    gap: 9px;
    margin-top: 15px;
}

.filters input,
.filters select,
.report-card input,
.report-card select,
.edit-link-form select,
.edit-link-result input,
.country-search {
    width: 100%;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid #d8e8de;
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    font: inherit;
}

.filters input:focus,
.filters select:focus,
.report-card input:focus,
.report-card select:focus,
.edit-link-form select:focus,
.country-search:focus {
    border-color: #8ec5a4;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(13, 107, 67, .08);
}

.clear-filter {
    align-self: center;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-decoration: none;
    font-weight: 700;
}

.inline-action-form,
.audit-pagination form {
    margin: 0;
}

.table-wrap,
.country-table-wrap {
    margin-top: 15px;
    overflow-x: auto;
    border: 1px solid #dfece3;
    border-radius: 14px;
    background: #fff;
}

.admin-table,
.country-access-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.admin-table {
    min-width: 1100px;
}

.admin-table-v4 {
    min-width: 1500px;
}

.dashboard-table {
    min-width: 850px;
}

.admin-table th,
.admin-table td,
.country-access-table th,
.country-access-table td {
    padding: 10px 11px;
    border-bottom: 1px solid #edf3ef;
    text-align: left;
    vertical-align: top;
    font-size: 12px;
}

.admin-table th,
.country-access-table th {
    background: #eff6f2;
    color: var(--green-dark);
    font-weight: 800;
    white-space: nowrap;
}

.admin-table tbody tr:hover,
.country-access-table tbody tr:hover {
    background: #f9fcfa;
}

.country-access-table tbody tr.is-bangladesh {
    background: #edf8f1;
}

.location-cell {
    min-width: 240px;
}

.status,
.country-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 62px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.status-synced,
.country-status-pill.is-on {
    color: #166534;
    background: #dcfce7;
}

.status-pending {
    color: #92400e;
    background: #fef3c7;
}

.status-failed,
.country-status-pill.is-off {
    color: #991b1b;
    background: #fee2e2;
}

.empty-cell {
    padding: 26px !important;
    text-align: center !important;
    color: var(--muted);
}

.empty-module,
.info-note,
.module-help {
    padding: 12px 14px;
    border: 1px solid #dfece3;
    border-radius: 11px;
    background: #f9fcfa;
    color: var(--muted);
}

.table-note {
    margin-top: 8px;
    color: var(--muted);
    font-size: 11px;
}

.admin-alert {
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
}

.admin-alert-success {
    color: #166534;
    border-color: #bbdfc5;
    background: #ecfdf3;
}

.admin-alert-warning {
    color: #92400e;
    border-color: #f4df94;
    background: #fffbeb;
}

.admin-alert-error {
    color: #991b1b;
    border-color: #f2c7c4;
    background: #fef2f2;
}

.edit-link-result {
    display: flex;
    gap: 8px;
    margin: 10px 0 5px;
}

.edit-link-result input {
    flex: 1;
    min-width: 0;
}

.edit-link-form {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 175px;
}

.edit-link-form select {
    min-width: 78px;
    font-size: 11px;
}

.report-generator-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.report-card {
    display: flex;
    flex-direction: column;
    gap: 11px;
    min-height: 360px;
    padding: 20px;
}

.report-card-icon {
    display: grid;
    width: 56px;
    height: 56px;
    place-items: center;
    border-radius: 15px;
    background: var(--green-soft);
    color: var(--green);
    font-size: 28px;
    font-weight: 800;
}

.report-card h2 {
    margin: 0;
    color: var(--green-dark);
    font-size: 22px;
}

.report-card p {
    margin: 0;
    min-height: 48px;
    color: var(--muted);
    line-height: 1.5;
}

.report-card label {
    display: grid;
    gap: 6px;
    font-weight: 700;
}

.report-card-spacer {
    flex: 1 1 auto;
}

.admin-v55-report-help ol {
    margin: 12px 0 0;
    padding-left: 22px;
    color: var(--muted);
    line-height: 1.8;
}

.simple-progress,
.progress-track {
    height: 11px;
    margin-top: 14px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5efe8;
}

.simple-progress-bar,
.progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #0d6b43, #1f8c5d);
}

.simple-progress-meta,
.progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 7px;
    color: var(--muted);
    font-size: 11px;
}

.progress-0 { width: 0%; }
.progress-1 { width: 1%; }
.progress-2 { width: 2%; }
.progress-3 { width: 3%; }
.progress-4 { width: 4%; }
.progress-5 { width: 5%; }
.progress-6 { width: 6%; }
.progress-7 { width: 7%; }
.progress-8 { width: 8%; }
.progress-9 { width: 9%; }
.progress-10 { width: 10%; }
.progress-11 { width: 11%; }
.progress-12 { width: 12%; }
.progress-13 { width: 13%; }
.progress-14 { width: 14%; }
.progress-15 { width: 15%; }
.progress-16 { width: 16%; }
.progress-17 { width: 17%; }
.progress-18 { width: 18%; }
.progress-19 { width: 19%; }
.progress-20 { width: 20%; }
.progress-21 { width: 21%; }
.progress-22 { width: 22%; }
.progress-23 { width: 23%; }
.progress-24 { width: 24%; }
.progress-25 { width: 25%; }
.progress-26 { width: 26%; }
.progress-27 { width: 27%; }
.progress-28 { width: 28%; }
.progress-29 { width: 29%; }
.progress-30 { width: 30%; }
.progress-31 { width: 31%; }
.progress-32 { width: 32%; }
.progress-33 { width: 33%; }
.progress-34 { width: 34%; }
.progress-35 { width: 35%; }
.progress-36 { width: 36%; }
.progress-37 { width: 37%; }
.progress-38 { width: 38%; }
.progress-39 { width: 39%; }
.progress-40 { width: 40%; }
.progress-41 { width: 41%; }
.progress-42 { width: 42%; }
.progress-43 { width: 43%; }
.progress-44 { width: 44%; }
.progress-45 { width: 45%; }
.progress-46 { width: 46%; }
.progress-47 { width: 47%; }
.progress-48 { width: 48%; }
.progress-49 { width: 49%; }
.progress-50 { width: 50%; }
.progress-51 { width: 51%; }
.progress-52 { width: 52%; }
.progress-53 { width: 53%; }
.progress-54 { width: 54%; }
.progress-55 { width: 55%; }
.progress-56 { width: 56%; }
.progress-57 { width: 57%; }
.progress-58 { width: 58%; }
.progress-59 { width: 59%; }
.progress-60 { width: 60%; }
.progress-61 { width: 61%; }
.progress-62 { width: 62%; }
.progress-63 { width: 63%; }
.progress-64 { width: 64%; }
.progress-65 { width: 65%; }
.progress-66 { width: 66%; }
.progress-67 { width: 67%; }
.progress-68 { width: 68%; }
.progress-69 { width: 69%; }
.progress-70 { width: 70%; }
.progress-71 { width: 71%; }
.progress-72 { width: 72%; }
.progress-73 { width: 73%; }
.progress-74 { width: 74%; }
.progress-75 { width: 75%; }
.progress-76 { width: 76%; }
.progress-77 { width: 77%; }
.progress-78 { width: 78%; }
.progress-79 { width: 79%; }
.progress-80 { width: 80%; }
.progress-81 { width: 81%; }
.progress-82 { width: 82%; }
.progress-83 { width: 83%; }
.progress-84 { width: 84%; }
.progress-85 { width: 85%; }
.progress-86 { width: 86%; }
.progress-87 { width: 87%; }
.progress-88 { width: 88%; }
.progress-89 { width: 89%; }
.progress-90 { width: 90%; }
.progress-91 { width: 91%; }
.progress-92 { width: 92%; }
.progress-93 { width: 93%; }
.progress-94 { width: 94%; }
.progress-95 { width: 95%; }
.progress-96 { width: 96%; }
.progress-97 { width: 97%; }
.progress-98 { width: 98%; }
.progress-99 { width: 99%; }
.progress-100 { width: 100%; }

.sync-job-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.sync-job-grid > div {
    padding: 12px;
    border: 1px solid #dfece3;
    border-radius: 12px;
    background: #f9fcfa;
}

.sync-job-grid span {
    display: block;
    color: var(--muted);
    font-size: 11px;
}

.sync-job-grid strong {
    display: block;
    margin-top: 3px;
    color: var(--green-dark);
    font-size: 18px;
}

.code-line {
    margin-top: 10px;
    padding: 10px;
    overflow-x: auto;
    border-radius: 8px;
    background: #082d1d;
    color: #fff;
    font-family: Consolas, monospace;
    font-size: 11px;
}

.worker-state {
    font-size: 20px !important;
}

.admin-v55-access-summary {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.admin-v55-access-summary > div {
    display: flex;
    align-items: center;
    gap: 14px;
    width: min(100%, 440px);
    padding: 12px 14px;
    border: 1px solid #cce5d4;
    border-radius: 15px;
    background: #eef8f1;
}

.admin-v55-access-summary-icon {
    display: grid;
    width: 50px;
    height: 50px;
    place-items: center;
    border-radius: 50%;
    background: #ddf0e3;
    color: var(--green);
    font-size: 24px;
}

.admin-v55-access-summary small {
    display: block;
    color: var(--muted);
}

.admin-v55-access-summary strong {
    display: block;
    margin-top: 2px;
    color: var(--green-dark);
    font-size: 18px;
}

.admin-v55-access-summary p {
    margin: 3px 0 0;
    color: #789082;
    font-size: 11px;
}

.admin-v55-country-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.country-search {
    min-width: 290px;
}

.country-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.country-toggle input {
    width: 17px;
    height: 17px;
    accent-color: var(--green);
}

.country-toggle span {
    color: #345846;
}

.country-iso {
    color: var(--green-dark);
    font-family: Consolas, monospace;
    font-weight: 700;
}

.country-priority-label {
    display: block;
    margin-top: 2px;
    color: var(--muted);
}

.country-save-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
}

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
}

.login-card {
    width: min(100%, 430px);
    padding: 34px 28px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255,255,255,.97);
    box-shadow: var(--shadow);
}

.login-brand-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background:
        #fff
        url('/assets/images/logo.png')
        center/contain no-repeat;
}

.login-card h1 {
    margin: 8px 0 5px;
    color: var(--green-dark);
}

.login-card p {
    margin: 0 0 20px;
    color: var(--muted);
}

.google-login-button {
    display: block;
    padding: 12px 16px;
    border-radius: 11px;
    background: var(--green);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
}

.login-note {
    margin-top: 14px;
    color: var(--muted);
    font-size: 12px;
}

.back-link {
    display: inline-block;
    margin-top: 22px;
    text-decoration: none;
    font-weight: 700;
}

@media (max-width: 1250px) {
    .admin-v55-shell {
        grid-template-columns: 210px minmax(0, 1fr);
    }

    .admin-v55-topbar {
        grid-template-columns: minmax(0, 1fr);
    }

    .admin-v55-profile {
        max-width: 500px;
        justify-self: end;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .module-card-grid {
        grid-template-columns: 1fr 1fr;
    }

    .admin-v55-dashboard-columns {
        grid-template-columns: 1fr;
    }

    .admin-v55-dashboard-side {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    .sync-job-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .filters {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

@media (max-width: 900px) {
    .admin-v55-shell {
        grid-template-columns: 1fr;
    }

    .admin-v55-sidebar {
        position: relative;
        height: auto;
        overflow: visible;
    }

    .admin-v55-nav {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .admin-v55-sidebar-quote,
    .admin-v55-sidebar-footer {
        display: none;
    }

    .admin-v55-workspace {
        min-width: 0;
    }

    .admin-v55-page-heading {
        flex-direction: column;
    }

    .admin-v55-date-card {
        min-width: 0;
    }

    .panel-heading-row {
        flex-direction: column;
    }

    .report-generator-grid {
        grid-template-columns: 1fr;
    }

    .admin-v55-country-toolbar {
        width: 100%;
        justify-content: flex-start;
    }

    .country-search {
        min-width: 0;
        flex: 1 1 100%;
    }
}

@media (max-width: 650px) {
    .admin-shell {
        width: min(100% - 20px, 1500px);
    }

    .admin-v55-nav {
        grid-template-columns: 1fr;
    }

    .admin-v55-topbar {
        padding: 10px;
    }

    .admin-v55-banner {
        min-height: 92px;
    }

    .admin-v55-banner-overlay {
        min-height: 92px;
        padding: 14px 18px;
    }

    .admin-v55-banner-overlay strong {
        font-size: 18px;
    }

    .admin-v55-profile {
        width: 100%;
    }

    .stats-grid,
    .module-card-grid,
    .admin-v55-dashboard-side,
    .sync-job-grid,
    .filters {
        grid-template-columns: 1fr;
    }

    .module-card {
        grid-template-columns: auto 1fr auto;
    }

    .country-save-bar,
    .edit-link-result {
        flex-direction: column;
        align-items: stretch;
    }

    .country-save-bar .admin-button {
        width: 100%;
    }
}


/* ==============================================================
   v5.5.2 — small-laptop/tablet responsive correction
   ============================================================== */

/*
 * The user-provided banner already contains its own artwork/text.
 * Do not overlay a second title on top of it.
 */
.admin-v55-banner {
    min-height: 104px;
    background-position: center;
    background-size: cover;
}

.admin-v55-banner-overlay {
    display: none !important;
}

/* Small laptops: reclaim horizontal space without losing the sidebar. */
@media (max-width: 1366px) and (min-width: 1081px) {
    .admin-v55-shell {
        grid-template-columns: 190px minmax(0, 1fr);
    }

    .admin-v55-sidebar {
        padding: 12px 10px;
    }

    .admin-v55-brand {
        gap: 8px;
        padding: 4px 2px 14px;
    }

    .admin-v55-logo {
        width: 46px;
        height: 46px;
    }

    .admin-v55-brand-copy strong {
        font-size: 15px;
    }

    .admin-v55-brand-copy span {
        font-size: 10px;
    }

    .admin-v55-brand-copy small {
        font-size: 9px;
    }

    .admin-v55-nav {
        gap: 6px;
    }

    .admin-v55-nav-item {
        min-height: 43px;
        padding: 8px 9px;
        gap: 8px;
        border-radius: 11px;
        font-size: 13px;
    }

    .admin-v55-nav-icon {
        width: 22px;
        height: 22px;
        font-size: 15px;
    }

    .admin-v55-sidebar-quote {
        padding: 14px 8px;
    }

    .admin-v55-sidebar-plant {
        font-size: 30px;
        margin-bottom: 6px;
    }

    .admin-v55-sidebar-quote strong {
        font-size: 13px;
    }

    .admin-v55-topbar {
        grid-template-columns: minmax(0, 1fr) 240px;
        gap: 10px;
        padding: 10px 12px;
    }

    .admin-v55-banner {
        min-height: 82px;
        border-radius: 15px;
    }

    .admin-v55-profile {
        min-width: 0;
        gap: 8px;
        padding: 10px 11px;
        border-radius: 15px;
    }

    .admin-v55-profile-avatar {
        width: 36px;
        height: 36px;
    }

    .admin-v55-profile-copy strong {
        font-size: 12px;
    }

    .admin-v55-profile-copy small,
    .admin-v55-profile-actions a {
        font-size: 9px;
    }

    .admin-shell {
        width: min(1500px, calc(100% - 22px));
        margin-top: 12px;
    }

    .admin-v55-page-heading {
        gap: 10px;
        margin-bottom: 11px;
    }

    .admin-v55-page-heading h1 {
        font-size: 31px;
    }

    .admin-v55-page-heading p {
        font-size: 12px;
    }

    .admin-v55-date-card {
        min-width: 205px;
        padding: 9px 11px;
    }

    .admin-v55-date-icon {
        width: 35px;
        height: 35px;
    }

    .stats-grid {
        gap: 9px;
    }

    .stat-card {
        min-height: 94px;
        padding: 11px;
        gap: 9px;
        border-radius: 14px;
    }

    .stat-card-icon {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }

    .stat-card strong {
        font-size: 23px;
    }

    .stat-card small {
        font-size: 9px;
    }

    .admin-panel {
        margin-top: 11px;
        padding: 13px;
        border-radius: 15px;
    }

    .panel-heading h2 {
        font-size: 18px;
    }

    .panel-heading p {
        font-size: 11px;
    }

    .module-card-grid {
        gap: 8px;
        margin-top: 10px;
    }

    .module-card {
        min-height: 96px;
        padding: 11px;
        gap: 3px 8px;
    }

    .module-card-icon {
        width: 37px;
        height: 37px;
        font-size: 17px;
    }

    .module-card strong {
        font-size: 14px;
    }

    .module-card small {
        font-size: 9px;
    }

    .admin-v55-dashboard-columns {
        grid-template-columns: minmax(0, 1fr) 245px;
        gap: 10px;
    }

    .filters {
        grid-template-columns:
            minmax(190px, 1.6fr)
            repeat(4, minmax(95px, 1fr))
            auto
            auto;
        gap: 6px;
    }

    .filters input,
    .filters select {
        min-height: 37px;
        font-size: 11px;
    }

    .admin-button {
        min-height: 37px;
        padding: 7px 10px;
        font-size: 11px;
    }

    .report-generator-grid {
        gap: 9px;
    }

    .report-card {
        min-height: 320px;
        padding: 14px;
    }

    .report-card h2 {
        font-size: 18px;
    }

    .report-card p,
    .report-card label {
        font-size: 11px;
    }

    .country-search {
        min-width: 220px;
    }
}

/*
 * Tablet / very small laptop:
 * move the navigation above the workspace instead of keeping a narrow
 * full-height sidebar. This avoids squeezing the content area.
 */
@media (max-width: 1080px) {
    .admin-v55-shell {
        display: block;
    }

    .admin-v55-sidebar {
        position: static;
        height: auto;
        display: block;
        padding: 9px 10px 8px;
        border-right: 0;
        border-bottom: 1px solid rgba(13, 107, 67, .10);
        overflow: visible;
    }

    .admin-v55-brand {
        padding: 2px 4px 8px;
    }

    .admin-v55-logo {
        width: 43px;
        height: 43px;
    }

    .admin-v55-brand-copy strong {
        font-size: 15px;
    }

    .admin-v55-brand-copy span {
        font-size: 10px;
    }

    .admin-v55-brand-copy small {
        font-size: 9px;
        margin-top: 2px;
    }

    .admin-v55-nav {
        display: flex;
        flex-direction: row;
        gap: 6px;
        overflow-x: auto;
        padding: 2px 0 4px;
        scrollbar-width: thin;
    }

    .admin-v55-nav-item {
        flex: 0 0 auto;
        min-height: 39px;
        padding: 7px 11px;
        border-radius: 10px;
        font-size: 12px;
    }

    .admin-v55-nav-icon {
        width: 20px;
        height: 20px;
        font-size: 14px;
    }

    .admin-v55-sidebar-quote,
    .admin-v55-sidebar-footer {
        display: none;
    }

    .admin-v55-topbar {
        position: static;
        grid-template-columns: minmax(0, 1fr) 225px;
        gap: 8px;
        padding: 8px 10px;
    }

    .admin-v55-banner {
        min-height: 74px;
        border-radius: 13px;
        background-size: cover;
    }

    .admin-v55-profile {
        gap: 7px;
        padding: 8px 9px;
        border-radius: 13px;
    }

    .admin-v55-profile-avatar {
        width: 34px;
        height: 34px;
    }

    .admin-v55-profile-copy strong {
        font-size: 11px;
    }

    .admin-v55-profile-copy small {
        max-width: 105px;
        font-size: 8px;
    }

    .admin-v55-profile-actions {
        gap: 3px;
    }

    .admin-v55-profile-actions a {
        font-size: 8px;
    }

    .admin-shell {
        width: min(100% - 18px, 1500px);
        margin-top: 9px;
    }

    .admin-v55-page-heading {
        margin-bottom: 9px;
    }

    .admin-v55-page-heading h1 {
        font-size: 28px;
    }

    .admin-v55-date-card {
        min-width: 185px;
    }

    .admin-v55-dashboard-columns {
        grid-template-columns: 1fr;
    }

    .admin-v55-dashboard-side {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 9px;
    }

    .module-card-grid {
        grid-template-columns: 1fr 1fr;
    }

    .report-generator-grid {
        grid-template-columns: 1fr 1fr;
    }

    .report-card:last-child {
        grid-column: 1 / -1;
    }

    .filters {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .country-table-wrap,
    .table-wrap {
        max-width: 100%;
        overflow-x: auto;
    }
}

@media (max-width: 700px) {
    .admin-v55-topbar {
        grid-template-columns: 1fr;
    }

    .admin-v55-banner {
        min-height: 64px;
    }

    .admin-v55-profile {
        width: 100%;
    }

    .admin-v55-page-heading {
        flex-direction: column;
    }

    .admin-v55-date-card {
        width: 100%;
        min-width: 0;
    }

    .stats-grid,
    .module-card-grid,
    .admin-v55-dashboard-side,
    .report-generator-grid,
    .filters,
    .sync-job-grid {
        grid-template-columns: 1fr;
    }

    .report-card:last-child {
        grid-column: auto;
    }

    .panel-heading-row {
        flex-direction: column;
    }
}

/* v5.5.7 — Google Admin Login access management */
.admin-v557-google-admin-panel {
    scroll-margin-top: 18px;
}

.admin-v557-admin-count {
    min-width: 120px;
    padding: 10px 14px;
    text-align: center;
    border: 1px solid #cce5d4;
    border-radius: 13px;
    background: #eef8f1;
}

.admin-v557-admin-count small {
    display: block;
    color: var(--muted);
    font-size: 11px;
}

.admin-v557-admin-count strong {
    display: block;
    margin-top: 2px;
    color: var(--green-dark);
    font-size: 24px;
}

.admin-v557-add-admin-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(180px, .7fr) auto;
    gap: 10px;
    align-items: end;
    margin-top: 16px;
    padding: 14px;
    border: 1px solid #dfece3;
    border-radius: 14px;
    background: #f8fcf9;
}

.admin-v557-add-admin-form label {
    display: grid;
    gap: 6px;
    color: #345846;
    font-size: 12px;
    font-weight: 700;
}

.admin-v557-add-admin-form input {
    width: 100%;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid #d8e8de;
    border-radius: 10px;
    background: #fff;
    color: var(--text);
}

.admin-v557-add-admin-form input:focus {
    border-color: #8ec5a4;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(13, 107, 67, .08);
}

.admin-v557-admin-table {
    min-width: 880px;
}

.admin-v557-account-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}

.admin-v557-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
}

.admin-v557-badge.protected {
    color: #76520a;
    background: #fff4cc;
}

.admin-v557-badge.current {
    color: #166534;
    background: #dcfce7;
}

.admin-v557-account-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.admin-v557-account-actions form {
    margin: 0;
}

.admin-v557-danger-button {
    color: #991b1b;
    border-color: #efc2bd;
    background: #fff7f6;
}

.admin-v557-danger-button:hover {
    background: #fee2e2;
}

.admin-v557-locked-action {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.admin-v557-admin-note {
    margin-top: 13px;
    line-height: 1.65;
}

@media (max-width: 1080px) {
    .admin-v557-add-admin-form {
        grid-template-columns: 1fr 1fr;
    }

    .admin-v557-add-admin-form .admin-button {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

@media (max-width: 700px) {
    .admin-v557-add-admin-form {
        grid-template-columns: 1fr;
    }

    .admin-v557-add-admin-form .admin-button {
        grid-column: auto;
        width: 100%;
    }

    .admin-v557-admin-count {
        width: 100%;
    }
}

/* v5.5.8 — role-based Google admin access + audit log */
.admin-role-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 22px;
    margin-top: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .02em;
    white-space: nowrap;
}

.admin-role-pill.role-super_admin {
    color: #7c2d12;
    background: #ffedd5;
}

.admin-role-pill.role-admin {
    color: #14532d;
    background: #dcfce7;
}

.admin-role-pill.role-auditor {
    color: #1e3a8a;
    background: #dbeafe;
}

.admin-role-summary-panel {
    margin-bottom: 16px;
}

.admin-role-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.admin-role-card {
    display: grid;
    gap: 5px;
    padding: 15px;
    border: 1px solid #dce9e0;
    border-radius: 14px;
    background: #fbfefc;
}

.admin-role-card strong {
    color: var(--text);
    font-size: 14px;
}

.admin-role-card span {
    color: var(--green-dark);
    font-size: 11px;
    font-weight: 800;
}

.admin-role-card p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.admin-v558-add-account-form {
    grid-template-columns: minmax(220px, 1fr) minmax(170px, .7fr) minmax(150px, .55fr) auto;
}

.admin-v557-add-admin-form select,
.admin-role-change-form select {
    width: 100%;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid #d8e8de;
    border-radius: 10px;
    background: #fff;
    color: var(--text);
}

.admin-v558-account-table {
    min-width: 1120px;
}

.admin-role-change-form {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 245px;
}

.admin-role-change-form select {
    min-height: 34px;
    padding: 5px 8px;
    font-size: 11px;
}

.admin-readonly-notice {
    margin-bottom: 16px;
}

.audit-stats-grid {
    margin-bottom: 16px;
}

.audit-result-count {
    padding: 8px 11px;
    border-radius: 999px;
    background: #eef8f1;
    color: var(--green-dark);
    font-size: 12px;
    font-weight: 900;
}

.audit-filters {
    grid-template-columns: minmax(220px, 1.3fr) minmax(140px, .7fr) minmax(180px, 1fr) minmax(140px, .7fr) minmax(140px, .7fr) auto auto;
}

.audit-table {
    min-width: 1260px;
}

.audit-time-cell {
    white-space: nowrap;
}

.audit-details-cell {
    min-width: 260px;
    max-width: 420px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.audit-user-agent-cell {
    min-width: 280px;
    max-width: 420px;
    color: var(--muted);
    font-size: 11px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.audit-action-pill {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    color: #234d38;
    background: #eef8f1;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.muted-text {
    color: var(--muted);
}

.audit-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}

.audit-pagination span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

@media (max-width: 1180px) {
    .admin-v558-add-account-form {
        grid-template-columns: 1fr 1fr;
    }

    .admin-v558-add-account-form .admin-button {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .audit-filters {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

@media (max-width: 800px) {
    .admin-role-card-grid,
    .audit-filters {
        grid-template-columns: 1fr;
    }

    .admin-v558-add-account-form {
        grid-template-columns: 1fr;
    }

    .admin-v558-add-account-form .admin-button {
        grid-column: auto;
        width: 100%;
    }

    .audit-pagination {
        flex-wrap: wrap;
    }
}

/* v5.5.9 — প্রধান ফর্ম সময় ও প্রবেশ নিয়ন্ত্রণ */
.form-access-control-panel {
    display: grid;
    gap: 18px;
}

.form-access-current-state {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border: 1px solid #cfe4d7;
    border-radius: 14px;
    background: #f7fbf8;
}

.form-access-current-state strong {
    color: #0f6842;
}

.form-access-current-state span,
.form-access-current-state small {
    line-height: 1.6;
    color: #557063;
}

.form-access-settings-form {
    display: grid;
    gap: 20px;
}

.form-access-toggle-grid,
.form-access-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.form-access-toggle-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    border: 1px solid #d9e8df;
    border-radius: 14px;
    background: #fbfdfc;
}

.form-access-toggle-card input {
    margin-top: 3px;
}

.form-access-toggle-card span {
    display: grid;
    gap: 4px;
}

.form-access-toggle-card small {
    line-height: 1.55;
    color: #64786e;
}

.form-access-field-grid .field,
.form-access-message-field {
    display: grid;
    gap: 7px;
}

.form-access-field-grid select,
.form-access-field-grid input,
.form-access-message-field textarea,
.form-access-day-row input[type="time"] {
    width: 100%;
    min-height: 42px;
    border: 1px solid #cbded3;
    border-radius: 10px;
    padding: 9px 11px;
    background: #fff;
    color: #143d2c;
    font: inherit;
}

.form-access-message-field textarea {
    min-height: 100px;
    resize: vertical;
}

.form-access-date-toggle {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f4f8f5;
}

.form-access-weekly-wrap {
    display: grid;
    gap: 12px;
}

.form-access-weekly-wrap h3,
.form-access-weekly-wrap p {
    margin: 0;
}

.form-access-weekly-wrap p {
    color: #65786e;
    line-height: 1.55;
}

.form-access-weekly-grid {
    display: grid;
    gap: 9px;
}

.form-access-day-row {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(130px, .7fr) minmax(130px, .7fr);
    gap: 12px;
    align-items: end;
    padding: 11px 12px;
    border: 1px solid #e0ebe4;
    border-radius: 12px;
    background: #fff;
}

.form-access-day-row label {
    display: grid;
    gap: 5px;
}

.form-access-day-enabled {
    display: flex !important;
    align-items: center;
    gap: 9px !important;
    min-height: 42px;
}

.is-schedule-disabled {
    opacity: .55;
}

@media (max-width: 820px) {
    .form-access-toggle-grid,
    .form-access-field-grid,
    .form-access-day-row {
        grid-template-columns: 1fr;
    }
}

/* v5.6.1 Bengali / English selector */
.admin-language-switcher {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    padding: 6px;
    border: 1px solid rgba(0,95,54,.14);
    border-radius: 12px;
    background: rgba(255,255,255,.88);
}
.admin-language-switcher .tp-language-form { margin: 0; }
.admin-language-switcher .tp-language-button {
    border: 0;
    background: transparent;
    font-family: inherit;
    cursor: pointer;
}
.admin-language-switcher .tp-language-button {
    padding: 5px 7px;
    border-radius: 8px;
    color: #075c3a;
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
}
.admin-language-switcher .tp-language-button.active { background:#0a6b44; color:#fff; }
@media (max-width: 900px) {
    .admin-language-switcher { justify-content:center; }
}
