* {
    box-sizing: border-box;
}

body.lmv-standalone {
    background: #eef2f6;
    margin: 0;
}

body.lmv-standalone,
.lmv-portal,
.lmv-login {
    color: #1f2937;
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
}

.lmv-login {
    align-items: center;
    background: radial-gradient(circle at top left, rgba(0, 166, 81, 0.16), transparent 34%), #eef2f6;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

.lmv-login-card {
    background: #fff;
    border: 1px solid #d9e1ea;
    border-radius: 6px;
    box-shadow: 0 18px 55px rgba(15, 23, 42, 0.14);
    max-width: 410px;
    padding: 34px;
    width: 100%;
}

.lmv-login-logo {
    display: block;
    height: auto;
    margin-bottom: 22px;
    max-width: 164px;
}

.lmv-login-kicker {
    color: #07973b;
    font-size: 12px;
    font-weight: 800;
    margin: 0 0 4px;
    text-transform: uppercase;
}

.lmv-login h1 {
    color: #111827;
    font-size: 26px;
    margin: 0 0 18px;
}

.lmv-login label {
    color: #374151;
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin: 14px 0;
}

.lmv-login input {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    display: block;
    margin-top: 6px;
    min-height: 44px;
    padding: 9px 11px;
    width: 100%;
}

.lmv-button,
.lmv-view .button,
.lmv-view .button-primary,
.lmv-view input[type="submit"],
.lmv-view button {
    align-items: center;
    background: #07973b;
    border: 0;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-size: 14px;
    font-weight: 800;
    justify-content: center;
    line-height: 1.2;
    min-height: 38px;
    max-width: 100%;
    padding: 9px 16px;
    text-decoration: none;
    transition: background .16s ease, transform .16s ease;
    white-space: nowrap;
}

.lmv-button:hover,
.lmv-view .button:hover,
.lmv-view .button-primary:hover,
.lmv-view input[type="submit"]:hover,
.lmv-view button:hover {
    background: #047c31;
    color: #fff;
    transform: translateY(-1px);
}

.lmv-sr-only {
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.lmv-view .lmv-icon-button,
.lmv-view button.lmv-icon-button,
.lmv-view .button.lmv-icon-button {
    flex: 0 0 auto;
    height: 38px;
    min-height: 38px;
    min-width: 38px;
    padding: 0;
    position: relative;
    width: 38px;
}

.lmv-view .lmv-icon-button .dashicons {
    font-size: 18px;
    height: 18px;
    line-height: 18px;
    width: 18px;
}

.lmv-view button:disabled,
.lmv-view .button:disabled,
.lmv-view input[type="submit"]:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

.lmv-alert {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: 4px;
    color: #9f1239;
    margin: 12px 0;
    padding: 10px 12px;
}

.lmv-portal {
    background: #eef2f6;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: 100vh;
    transition: grid-template-columns .18s ease;
}

.lmv-portal.lmv-portal-collapsed {
    grid-template-columns: 0 minmax(0, 1fr);
}

.lmv-sidebar {
    background: #111827;
    box-shadow: 4px 0 20px rgba(15, 23, 42, 0.16);
    color: #fff;
    min-height: 100vh;
    padding: 18px 14px;
    position: sticky;
    top: 0;
    transition: opacity .16s ease, padding .16s ease, visibility .16s ease;
}

.lmv-portal-collapsed .lmv-sidebar {
    opacity: 0;
    overflow: hidden;
    padding-left: 0;
    padding-right: 0;
    visibility: hidden;
}

.lmv-brand {
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    padding: 0 4px 16px;
}

.lmv-sidebar-logo {
    background: #fff;
    border-radius: 6px;
    display: block;
    height: auto;
    padding: 5px;
    width: 76px;
}

.lmv-brand strong,
.lmv-brand span {
    display: block;
}

.lmv-brand strong {
    font-size: 18px;
}

.lmv-brand span {
    color: #9ca3af;
    font-size: 12px;
}

.lmv-sidebar nav {
    display: grid;
    gap: 4px;
}

.lmv-sidebar a {
    align-items: center;
    border-radius: 4px;
    color: #d1d5db;
    display: flex;
    gap: 10px;
    padding: 11px 12px;
    text-decoration: none;
}

.lmv-sidebar a.active,
.lmv-sidebar a:hover {
    background: #07973b;
    color: #fff;
}

.lmv-nav-icon {
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 900;
    height: 24px;
    justify-content: center;
    width: 24px;
}

.lmv-logout {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    margin-top: 18px;
}

.lmv-main {
    min-width: 0;
    padding: 22px;
}

.lmv-topbar {
    align-items: center;
    background: #fff;
    border: 1px solid #dce3ec;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
    display: flex;
    justify-content: space-between;
    margin-bottom: 18px;
    padding: 18px 22px;
}

.lmv-topbar-title {
    align-items: center;
    display: flex;
    gap: 14px;
    min-width: 0;
}

.lmv-menu-toggle {
    align-items: center;
    background: #111827 !important;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    flex-direction: column;
    height: 40px;
    justify-content: center;
    min-height: 40px !important;
    padding: 0 !important;
    width: 40px;
}

.lmv-menu-toggle span {
    background: #fff;
    border-radius: 2px;
    display: block;
    height: 2px;
    margin: 4px auto;
    width: 18px;
}

.lmv-menu-toggle:hover {
    background: #07973b !important;
}

.lmv-topbar p {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    margin: 0 0 4px;
    text-transform: uppercase;
}

.lmv-topbar h1 {
    color: #111827;
    font-size: 26px;
    margin: 0;
}

.lmv-user-chip {
    align-items: center;
    display: flex;
    gap: 10px;
}

.lmv-user-chip > span {
    align-items: center;
    background: #07973b;
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    font-weight: 900;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.lmv-user-chip strong,
.lmv-user-chip small {
    display: block;
    text-align: right;
}

.lmv-user-chip small {
    color: #64748b;
}

.lmv-content-card {
    background: #f8fafc;
    border: 1px solid #dce3ec;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
    padding: 24px;
}

.lmv-view .wrap {
    margin: 0;
}

.lmv-view h1 {
    color: #111827;
    font-size: 24px;
    margin: 0 0 18px;
}

.lmv-view h2 {
    color: #111827;
    font-size: 20px;
    margin: 24px 0 12px;
}

.lmv-view h3 {
    color: #1f2937;
    font-size: 16px;
    margin: 18px 0 10px;
}

.lmv-page-head {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    margin-bottom: 18px;
}

.lmv-page-head h1 {
    margin: 0;
}

.lmv-page-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.lmv-view .widefat .lmv-page-actions {
    justify-content: flex-start;
}

.lmv-dashboard-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    margin-bottom: 8px;
    max-width: 1080px;
}

.lmv-card {
    align-items: center;
    background: #fff;
    border: 1px solid #dce3ec;
    border-left: 5px solid #07973b;
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
    display: flex;
    justify-content: space-between;
    min-height: 112px;
    padding: 18px;
}

.lmv-card-month {
    border-left-color: #2563eb;
}

.lmv-card-users {
    border-left-color: #f59e0b;
}

.lmv-card-label {
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.lmv-card-value {
    color: #111827;
    font-size: 34px;
    font-weight: 900;
    margin-top: 6px;
}

.lmv-card-icon {
    align-items: center;
    background: #ecfdf3;
    border-radius: 50%;
    color: #07973b;
    display: inline-flex;
    font-size: 20px;
    font-weight: 900;
    height: 54px;
    justify-content: center;
    width: 54px;
}

.lmv-card-month .lmv-card-icon {
    background: #eff6ff;
    color: #2563eb;
}

.lmv-card-users .lmv-card-icon {
    background: #fffbeb;
    color: #f59e0b;
}

.lmv-view .widefat,
.lmv-view .form-table {
    background: #fff;
    border: 1px solid #dce3ec;
    border-collapse: separate;
    border-radius: 6px;
    border-spacing: 0;
    overflow: hidden;
    width: 100%;
}

.lmv-view .form-table {
    display: block;
}

.lmv-view .form-table tbody {
    display: grid;
    gap: 0;
}

.lmv-view .form-table tr {
    display: grid;
    grid-template-columns: minmax(170px, 220px) minmax(0, 1fr);
}

.lmv-table-narrow {
    max-width: 1080px;
}

.lmv-view .widefat th,
.lmv-view .widefat td,
.lmv-view .form-table th,
.lmv-view .form-table td {
    border-bottom: 1px solid #edf0f3;
    padding: 12px 14px;
    text-align: left;
    vertical-align: middle;
}

.lmv-view .widefat td {
    overflow-wrap: anywhere;
}

.lmv-view .widefat td > .button,
.lmv-view .widefat td > button,
.lmv-view .widefat td > input[type="submit"] {
    margin: 2px 6px 2px 0;
}

.lmv-view .widefat .button:hover,
.lmv-view .widefat button:hover,
.lmv-view .widefat input[type="submit"]:hover,
.lmv-inline-form .button:hover,
.lmv-inline-form button:hover {
    transform: none;
}

.lmv-view .form-table th {
    background: #f8fafc;
    color: #334155;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.lmv-view .form-table td {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.lmv-view .form-table td > label {
    align-items: center;
    color: #374151;
    display: inline-flex;
    flex-wrap: wrap;
    font-weight: 700;
    gap: 6px;
    margin-right: 8px;
}

.lmv-view .form-table .description {
    color: #64748b;
    flex-basis: 100%;
    font-size: 12px;
    line-height: 1.45;
    margin: 2px 0 0;
}

.lmv-view .widefat th {
    background: #f8fafc;
    color: #334155;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.lmv-view .widefat tr:last-child td,
.lmv-view .form-table tr:last-child td,
.lmv-view .form-table tr:last-child th {
    border-bottom: 0;
}

.lmv-view input,
.lmv-view select,
.lmv-view textarea {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    min-height: 36px;
    padding: 7px 9px;
}

.lmv-view select {
    min-width: 210px;
}

.lmv-view textarea {
    min-height: 72px;
    resize: vertical;
}

.lmv-view input:focus,
.lmv-view select:focus,
.lmv-view textarea:focus {
    border-color: #07973b;
    box-shadow: 0 0 0 3px rgba(7, 151, 59, 0.14);
    outline: 0;
}

.lmv-view input[type="checkbox"],
.lmv-view input[type="radio"] {
    height: 16px;
    margin: 0 7px 0 0;
    min-height: 0;
    padding: 0;
    vertical-align: middle;
    width: 16px;
}

.lmv-report-check {
    align-items: center;
    display: inline-flex;
    font-weight: 700;
    margin: 0 18px 10px 0;
    min-width: 190px;
}

.lmv-branch-row {
    align-items: start;
    background: #f8fafc;
    border: 1px solid #edf0f3;
    border-radius: 6px;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(180px, 240px) minmax(260px, 1fr);
    margin: 0 0 10px;
    padding: 12px;
    width: 100%;
}

.lmv-branch-row label {
    color: #334155;
    display: grid;
    font-size: 12px;
    font-weight: 900;
    gap: 6px;
    text-transform: uppercase;
}

.lmv-branch-row input,
.lmv-branch-row textarea {
    width: 100%;
}

.lmv-view .regular-text,
.lmv-view .large-text {
    max-width: 100%;
    width: min(620px, 100%);
}

.lmv-view input[type="date"],
.lmv-view input[type="email"],
.lmv-view input[type="file"],
.lmv-view input[type="number"],
.lmv-view input[type="password"],
.lmv-view input[type="search"],
.lmv-view input[type="text"],
.lmv-view select {
    width: min(320px, 100%);
}

.lmv-form {
    max-width: 820px;
}

.lmv-form-wide {
    margin: 16px 0 24px;
    max-width: 1120px;
}

.lmv-form,
.lmv-form-wide {
    background: #fff;
    border: 1px solid #dce3ec;
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
    padding: 18px;
}

.lmv-form .form-table,
.lmv-form-wide .form-table {
    border: 0;
    border-radius: 0;
}

.lmv-form .form-table tr:first-child th,
.lmv-form .form-table tr:first-child td,
.lmv-form-wide .form-table tr:first-child th,
.lmv-form-wide .form-table tr:first-child td {
    padding-top: 0;
}

.lmv-form .form-table tr:last-child th,
.lmv-form .form-table tr:last-child td,
.lmv-form-wide .form-table tr:last-child th,
.lmv-form-wide .form-table tr:last-child td {
    padding-bottom: 0;
}

.lmv-form .submit,
.lmv-form-wide .submit {
    border-top: 1px solid #edf0f3;
    margin: 16px -18px -18px;
    padding: 14px 18px;
    text-align: right;
}

.lmv-view .notice {
    background: #ecfdf3;
    border: 1px solid #bbf7d0;
    border-left: 5px solid #07973b;
    border-radius: 4px;
    margin: 12px 0;
    padding: 10px 12px;
}

.lmv-view .notice-error {
    background: #fff1f2;
    border-color: #fecdd3;
    border-left-color: #dc2626;
    color: #991b1b;
}

.lmv-inline-form {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 2px 8px 2px 0;
    max-width: 100%;
    vertical-align: middle;
}

.lmv-inline-form select {
    min-width: 150px;
    width: auto;
}

.lmv-inline-form .button,
.lmv-inline-form button,
.lmv-inline-form input[type="submit"] {
    flex: 0 0 auto;
}

.lmv-view .button-link-delete,
.lmv-view button.button-link-delete {
    background: #dc2626;
    color: #fff;
}

.lmv-view .button-link-delete:hover,
.lmv-view button.button-link-delete:hover {
    background: #b91c1c;
    color: #fff;
}

.lmv-view .search-box {
    align-items: center;
    background: #fff;
    border: 1px solid #dce3ec;
    border-radius: 6px;
    display: flex;
    gap: 8px;
    margin: 18px 0;
    padding: 12px;
}

.lmv-catalog-tools {
    align-items: stretch;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
    margin: 18px 0;
}

.lmv-catalog-tools .search-box {
    margin: 0;
}

.lmv-catalog-toolbar {
    align-items: stretch;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(280px, 1fr) minmax(360px, auto);
    margin: 18px 0 12px;
}

.lmv-catalog-toolbar .search-box {
    margin: 0;
}

.lmv-bulk-panel {
    align-items: center;
    background: #fff;
    border: 1px solid #dce3ec;
    border-radius: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    padding: 12px;
}

.lmv-bulk-field,
.lmv-bulk-scope {
    align-items: center;
    color: #334155;
    display: inline-flex;
    flex-wrap: wrap;
    font-size: 12px;
    font-weight: 900;
    gap: 8px;
    margin: 0;
    text-transform: uppercase;
}

.lmv-bulk-field > span,
.lmv-bulk-scope > span {
    color: #64748b;
}

.lmv-bulk-scope label {
    align-items: center;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    gap: 4px;
    margin: 0;
    text-transform: none;
}

.lmv-bulk-panel select {
    min-width: 140px;
    width: 140px;
}

.lmv-catalog-selection {
    align-items: center;
    color: #475569;
    display: flex;
    flex-wrap: wrap;
    font-size: 13px;
    font-weight: 800;
    gap: 12px;
    justify-content: space-between;
    margin: 0 0 12px;
}

.lmv-catalog-selection label {
    align-items: center;
    display: inline-flex;
}

.lmv-catalog-list {
    display: grid;
    gap: 10px;
}

.lmv-catalog-item {
    align-items: center;
    background: #fff;
    border: 1px solid #dce3ec;
    border-left: 5px solid #07973b;
    border-radius: 6px;
    display: grid;
    gap: 14px;
    grid-template-columns: auto minmax(0, 1fr) minmax(150px, auto) auto;
    min-height: 92px;
    padding: 14px;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.lmv-catalog-item:hover {
    border-color: #9acfb0;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.lmv-catalog-item.is-inactive {
    border-left-color: #94a3b8;
}

.lmv-catalog-check {
    align-items: center;
    display: inline-flex;
    justify-content: center;
}

.lmv-catalog-main {
    min-width: 0;
}

.lmv-catalog-title {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.lmv-catalog-title span {
    background: #eef2f6;
    border-radius: 4px;
    color: #334155;
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 900;
    padding: 4px 7px;
}

.lmv-catalog-title h2 {
    color: #111827;
    font-size: 17px;
    line-height: 1.25;
    margin: 0;
    overflow-wrap: anywhere;
}

.lmv-catalog-meta {
    color: #64748b;
    display: flex;
    flex-wrap: wrap;
    font-size: 12px;
    font-weight: 800;
    gap: 8px;
    margin-top: 8px;
}

.lmv-catalog-meta span {
    background: #f8fafc;
    border: 1px solid #edf0f3;
    border-radius: 4px;
    padding: 4px 7px;
}

.lmv-catalog-side {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lmv-status-pill {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 900;
    justify-content: center;
    line-height: 1;
    min-height: 26px;
    padding: 6px 10px;
}

.lmv-status-pill.is-on {
    background: #dcfce7;
    color: #047857;
}

.lmv-status-pill.is-off {
    background: #e2e8f0;
    color: #475569;
}

.lmv-price {
    color: #111827;
    font-size: 18px;
    font-weight: 900;
    white-space: nowrap;
}

.lmv-catalog-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.lmv-catalog-actions .lmv-page-actions {
    gap: 8px;
}

.lmv-view .lmv-view-exam {
    gap: 7px;
}

.lmv-empty-state {
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    color: #64748b;
    font-weight: 800;
    padding: 22px;
    text-align: center;
}

.lmv-detail-dialog {
    max-width: 760px;
}

.lmv-detail-code {
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
    margin: 0 0 4px;
    text-transform: uppercase;
}

.lmv-detail-body {
    padding: 18px;
}

.lmv-detail-summary {
    align-items: center;
    border-bottom: 1px solid #edf0f3;
    display: flex;
    justify-content: space-between;
    margin: 0 0 16px;
    padding-bottom: 14px;
}

.lmv-detail-summary strong {
    color: #111827;
    font-size: 22px;
    font-weight: 900;
}

.lmv-detail-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
}

.lmv-detail-grid div {
    background: #f8fafc;
    border: 1px solid #edf0f3;
    border-radius: 6px;
    padding: 12px;
}

.lmv-detail-grid dt {
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    margin: 0 0 5px;
    text-transform: uppercase;
}

.lmv-detail-grid dd {
    color: #111827;
    font-size: 14px;
    line-height: 1.45;
    margin: 0;
    overflow-wrap: anywhere;
    white-space: pre-line;
}

.lmv-detail-actions {
    border-top: 1px solid #edf0f3;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 16px;
    padding-top: 14px;
}

.lmv-area-dialog {
    max-width: 820px;
}

.lmv-area-manager {
    padding: 18px;
}

.lmv-area-create {
    align-items: end;
    background: #f8fafc;
    border: 1px solid #edf0f3;
    border-radius: 6px;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(180px, 1fr) auto;
    margin-bottom: 16px;
    padding: 14px;
}

.lmv-area-create label {
    color: #334155;
    font-size: 12px;
    font-weight: 900;
    grid-column: 1 / -1;
    text-transform: uppercase;
}

.lmv-area-create input {
    width: 100%;
}

.lmv-area-table td:last-child {
    min-width: 220px;
}

.lmv-column-panel {
    background: #fff;
    border: 1px solid #dce3ec;
    border-radius: 6px;
}

.lmv-column-panel summary {
    color: #334155;
    cursor: pointer;
    font-size: 13px;
    font-weight: 900;
    list-style: none;
    padding: 14px 16px;
    text-transform: uppercase;
}

.lmv-column-panel summary::-webkit-details-marker {
    display: none;
}

.lmv-column-options {
    border-top: 1px solid #edf0f3;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 240px;
    overflow: auto;
    padding: 12px;
}

.lmv-column-options label {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #dce3ec;
    border-radius: 4px;
    color: #334155;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    gap: 6px;
    padding: 7px 9px;
}

.lmv-column-options .button {
    min-height: 32px;
    padding: 6px 10px;
}

.lmv-view .search-box input[type="search"] {
    flex: 1;
    width: auto;
}

.lmv-table-scroll {
    overflow-x: auto;
    width: 100%;
}

.lmv-table-scroll .widefat {
    min-width: 860px;
}

.lmv-table-scroll .widefat th:last-child,
.lmv-table-scroll .widefat td:last-child {
    min-width: 180px;
}

#lmv-history-table {
    min-width: 1040px;
}

#lmv-history-table th:last-child,
#lmv-history-table td:last-child {
    min-width: 190px;
}

#lmv-catalog-table {
    min-width: 980px;
}

.lmv-pagination {
    align-items: center;
    background: #fff;
    border: 1px solid #dce3ec;
    border-radius: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 12px;
    padding: 12px;
}

.lmv-pagination label {
    align-items: center;
    color: #334155;
    display: inline-flex;
    font-size: 13px;
    font-weight: 800;
    gap: 8px;
    margin-right: auto;
}

.lmv-pagination select {
    min-width: 76px;
    width: 76px;
}

.lmv-pagination span {
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.lmv-modal-open {
    overflow: hidden;
}

.lmv-modal {
    display: none;
    inset: 0;
    position: fixed;
    z-index: 100000;
}

.lmv-modal.is-open {
    align-items: center;
    display: flex;
    justify-content: center;
    padding: 24px;
}

.lmv-modal-backdrop {
    background: rgba(15, 23, 42, 0.62);
    inset: 0;
    position: absolute;
}

.lmv-modal-dialog {
    background: #fff;
    border: 1px solid #dce3ec;
    border-radius: 6px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
    max-height: calc(100vh - 48px);
    max-width: 980px;
    overflow: auto;
    position: relative;
    width: min(980px, 100%);
}

.lmv-modal-head {
    align-items: center;
    border-bottom: 1px solid #edf0f3;
    display: flex;
    justify-content: space-between;
    padding: 16px 18px;
    position: sticky;
    top: 0;
    z-index: 1;
    background: #fff;
}

.lmv-modal-head h2 {
    margin: 0;
}

.lmv-modal-close {
    background: #111827 !important;
    border: 0;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    font-weight: 900;
    height: 34px;
    min-height: 34px !important;
    padding: 0 !important;
    width: 34px;
}

.lmv-modal-form {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    max-width: none;
    padding: 18px;
}

.lmv-modal-form .form-table {
    border: 0;
    border-radius: 0;
}

.lmv-modal-form .submit {
    background: #fff;
    bottom: 0;
    position: sticky;
}

.lmv-small-input {
    width: 80px;
}

.lmv-medium-input {
    width: 110px;
}

.lmv-exam-picker {
    background: #fff;
    border: 1px solid #dce3ec;
    border-radius: 6px;
    margin-bottom: 18px;
    padding: 16px;
}

.lmv-form-wide + .lmv-exam-picker,
.lmv-exam-picker {
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.lmv-form-wide .lmv-exam-picker {
    background: #f8fafc;
    border-color: #cbd5e1;
    box-shadow: none;
    margin-top: 8px;
}

.lmv-exam-search label {
    color: #334155;
    display: block;
    font-size: 12px;
    font-weight: 900;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.lmv-exam-search input {
    font-size: 15px;
    min-height: 44px;
    width: 100%;
}

.lmv-exam-results {
    display: grid;
    gap: 8px;
    margin-top: 12px;
    max-height: 360px;
    overflow: auto;
}

.lmv-exam-result {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #dce3ec;
    border-radius: 5px;
    color: #111827;
    display: grid;
    gap: 4px;
    grid-template-columns: minmax(0, 1fr) 140px 170px 110px;
    min-height: auto;
    padding: 11px 12px;
    text-align: left;
    white-space: normal;
    width: 100%;
}

.lmv-exam-result:hover {
    background: #ecfdf3;
    border-color: #07973b;
    color: #111827;
    transform: none;
}

.lmv-exam-result strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lmv-exam-result span {
    color: #64748b;
    font-size: 12px;
}

.lmv-exam-result .lmv-exam-delivery {
    color: #334155;
    font-weight: 800;
}

.lmv-exam-result em {
    color: #07973b;
    grid-column: -2 / -1;
    font-style: normal;
    font-weight: 900;
    text-align: right;
}

.lmv-exam-hint {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 5px;
    color: #64748b;
    padding: 14px;
}

.lmv-selected-exams {
    margin-bottom: 18px;
    min-width: 980px;
}

.lmv-selected-exams th,
.lmv-selected-exams td {
    white-space: nowrap;
}

.lmv-selected-exams td:nth-child(2),
.lmv-selected-exams th:nth-child(2) {
    min-width: 220px;
    white-space: normal;
}

.lmv-remove-exam {
    background: #ef4444 !important;
}

.lmv-remove-exam:hover {
    background: #dc2626 !important;
}

@media (max-width: 980px) {
    .lmv-portal {
        grid-template-columns: 1fr;
    }

    .lmv-portal.lmv-portal-collapsed {
        grid-template-columns: 1fr;
    }

    .lmv-sidebar {
        min-height: auto;
        position: static;
    }

    .lmv-portal-collapsed .lmv-sidebar {
        display: none;
    }

    .lmv-sidebar nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .lmv-exam-result {
        grid-template-columns: 1fr;
    }

    .lmv-branch-row {
        grid-template-columns: 1fr;
    }

    .lmv-exam-result em {
        grid-column: auto;
        text-align: left;
    }

    .lmv-view .form-table tr {
        grid-template-columns: 1fr;
    }

    .lmv-view .form-table th {
        border-bottom: 0;
        padding-bottom: 4px;
    }

    .lmv-view .form-table td {
        padding-top: 4px;
    }

    .lmv-pagination {
        justify-content: flex-start;
    }

    .lmv-pagination label {
        margin-right: 0;
        width: 100%;
    }

    .lmv-catalog-tools {
        grid-template-columns: 1fr;
    }

    .lmv-catalog-toolbar {
        grid-template-columns: 1fr;
    }

    .lmv-bulk-panel {
        justify-content: flex-start;
    }

    .lmv-catalog-item {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .lmv-catalog-side,
    .lmv-catalog-actions {
        align-items: flex-start;
        grid-column: 2;
        justify-content: flex-start;
    }

    .lmv-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .lmv-main {
        padding: 12px;
    }

    .lmv-topbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .lmv-user-chip strong,
    .lmv-user-chip small {
        text-align: left;
    }

    .lmv-page-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .lmv-page-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .lmv-form,
    .lmv-form-wide {
        padding: 14px;
    }

    .lmv-form .submit,
    .lmv-form-wide .submit {
        margin: 14px -14px -14px;
        padding: 12px 14px;
        text-align: left;
    }

    .lmv-modal.is-open {
        align-items: stretch;
        padding: 10px;
    }

    .lmv-modal-dialog {
        max-height: calc(100vh - 20px);
    }

    .lmv-modal-form {
        padding: 14px;
    }

    .lmv-catalog-item {
        align-items: flex-start;
        grid-template-columns: 1fr;
    }

    .lmv-catalog-check,
    .lmv-catalog-side,
    .lmv-catalog-actions {
        grid-column: auto;
    }

    .lmv-catalog-actions,
    .lmv-catalog-actions .lmv-page-actions,
    .lmv-detail-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .lmv-bulk-field,
    .lmv-bulk-scope,
    .lmv-bulk-panel .button {
        width: 100%;
    }

    .lmv-bulk-panel select {
        width: 100%;
    }
}

/* Catalog UX polish: kept late in the file so it wins over theme/table defaults. */
.lmv-view .lmv-catalog-toolbar {
    align-items: stretch;
    display: grid;
    grid-template-columns: minmax(360px, 1fr) minmax(520px, auto);
}

.lmv-view .lmv-catalog-toolbar.is-readonly {
    grid-template-columns: 1fr;
}

.lmv-view .lmv-catalog-toolbar.is-readonly .search-box {
    max-width: none;
}

.lmv-view .lmv-bulk-panel {
    min-height: 66px;
}

.lmv-view .lmv-bulk-field,
.lmv-view .lmv-bulk-scope {
    min-height: 40px;
}

.lmv-view .lmv-bulk-scope {
    background: #f8fafc;
    border: 1px solid #edf0f3;
    border-radius: 6px;
    padding: 8px 10px;
}

.lmv-view .lmv-catalog-selection {
    background: #fff;
    border: 1px solid #dce3ec;
    border-radius: 6px;
    min-height: 48px;
    padding: 10px 12px;
}

.lmv-view .lmv-catalog-selection strong,
.lmv-view #lmv-catalog-result-count {
    background: #eef2f6;
    border-radius: 999px;
    color: #334155;
    padding: 6px 10px;
}

.lmv-view .lmv-catalog-item {
    grid-template-columns: 34px minmax(320px, 1fr) 128px 190px;
    overflow: hidden;
}

.lmv-view .lmv-catalog-item.is-readonly {
    grid-template-columns: minmax(0, 1fr) 128px 110px;
}

.lmv-view .lmv-catalog-item .lmv-page-actions {
    flex-wrap: nowrap;
}

.lmv-view .lmv-catalog-main {
    overflow: hidden;
}

.lmv-view .lmv-catalog-title h2 {
    font-size: 18px;
    max-width: 100%;
}

.lmv-view .lmv-catalog-meta span {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lmv-view .lmv-detail-dialog {
    width: min(820px, calc(100vw - 32px));
}

.lmv-view .lmv-detail-grid div:nth-child(7),
.lmv-view .lmv-detail-grid div:nth-child(8) {
    grid-column: 1 / -1;
}

@media (max-width: 1200px) {
    .lmv-view .lmv-catalog-toolbar {
        grid-template-columns: 1fr;
    }

    .lmv-view .lmv-catalog-item {
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .lmv-view .lmv-catalog-item.is-readonly {
        grid-template-columns: minmax(0, 1fr);
    }

    .lmv-view .lmv-catalog-side,
    .lmv-view .lmv-catalog-actions {
        grid-column: 2;
    }

    .lmv-view .lmv-catalog-item.is-readonly .lmv-catalog-side,
    .lmv-view .lmv-catalog-item.is-readonly .lmv-catalog-actions {
        grid-column: auto;
    }
}

@media (max-width: 640px) {
    .lmv-view .lmv-catalog-item {
        grid-template-columns: 1fr;
    }

    .lmv-view .lmv-catalog-side,
    .lmv-view .lmv-catalog-actions {
        grid-column: auto;
    }

    .lmv-view .lmv-catalog-meta span {
        max-width: 100%;
    }
}
