/* Shared responsive rules for all Razor views. */
html { -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; }
.sidebar { flex: 0 0 255px; }
.workspace, .content, .header-left, .header-left > div, .page-heading > div, .form-grid > label, .operations-hero > div { min-width: 0; }
.topbar { height: auto; min-height: 104px; gap: 20px; }
.topbar h1, .page-heading, .identity-card, .notice, .validation, .identity-success, .operations-hero-note { overflow-wrap: anywhere; }
.account { flex-shrink: 0; max-width: 40%; }
.account details { min-width: 0; max-width: 100%; }
.account summary { overflow-wrap: anywhere; }
.account details[open] { max-width: min(320px, 100%); }
.page-heading { gap: 16px; flex-wrap: wrap; }
.actions { flex-wrap: wrap; align-items: center; max-width: 100%; }
.actions form { max-width: 100%; }
.button { display: inline-flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; min-height: 44px; max-width: 100%; white-space: normal; }
.link-button { min-height: 44px; }
.table-card { max-width: 100%; overscroll-behavior-x: contain; }
.table-card:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #0077ad; outline-offset: 3px; }
.table-card input[type="checkbox"] { width: 22px; height: 22px; vertical-align: middle; }
.form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.user-form { min-width: 0; }
.user-form input, .user-form select, .form-grid input, .form-grid select { min-width: 0; max-width: 100%; min-height: 44px; }
.user-form input[type="checkbox"] { min-height: 22px; min-width: 22px; }
.role-options { min-width: 0; }
.role-options label, .user-form .check-option { min-height: 44px; }
.profile-details { grid-template-columns: minmax(100px, 140px) minmax(0, 1fr); }
dialog { width: min(540px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow: auto; }
.navigation-toggle { display: none; }
@media (max-width: 1200px) {
    .sidebar { flex-basis: 210px; width: 210px; }
    .topbar, .content { padding-inline: 24px; }
    .header-left { gap: 14px; }
    .header-logo { padding-right: 14px; }
    .header-logo img { width: 125px; }
    .operations-hero { grid-template-columns: 1fr; min-height: 0; }
    .operations-network { display: none; }
    .operations-card-grid, .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
    .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .header-left { flex-wrap: wrap; gap: 8px; }
    .header-logo { border: 0; padding-right: 0; }
}
@media (max-width: 760px) {
    .app-shell { flex-direction: column; }
    .sidebar { flex: none; width: 100%; padding: 8px 16px; }
    .sidebar nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin: 0; }
    .sidebar .nav-link { font-size: 14px; margin: 0; min-height: 44px; align-items: center; overflow-wrap: anywhere; }
    .nav-link span { flex-shrink: 0; }
    .sidebar-help { display: none; }
    .navigation-enhanced .navigation-toggle { display: flex; align-items: center; gap: 10px; padding: 10px 12px; min-height: 44px; background: transparent; border: 1px solid #ffffff60; border-radius: 8px; color: white; cursor: pointer; }
    .navigation-enhanced:not(.navigation-open) nav { display: none; }
    .navigation-enhanced.navigation-open nav { margin-top: 8px; }
    .topbar, .public-shell .topbar { min-height: 88px; height: auto; padding: 16px 20px; gap: 12px; }
    .header-left { flex: 1; }
    .topbar h1, .public-shell .header-left h1 { font-size: 18px; }
    .header-logo img { width: 115px; }
    .account { max-width: 42%; gap: 6px; font-size: 13px; }
    .avatar { display: none; }
    .content { padding: 24px 20px; }
    .identity-card { margin: 0 auto; padding: 24px; }
    .operations-hero { padding: 32px 24px; }
    .operations-hero h2 { font-size: clamp(28px, 5vw, 36px); }
    .operations-section-heading > p, .operations-footer-band a { white-space: normal; }
    .form-grid input, .form-grid select, .identity-card input, .identity-card select { font-size: 16px; }
}
@media (max-width: 560px) {
    .topbar, .public-shell .topbar { padding-inline: 16px; }
    .content { padding: 20px 16px; }
    .header-left { display: grid; gap: 6px; }
    .header-left .eyebrow { display: none; }
    .public-shell .header-left > div { display: block; }
    .public-shell .header-logo img { width: 115px; }
    .topbar h1, .public-shell .header-left h1 { font-size: 16px; }
    .form-grid, .quick-grid, .operations-card-grid { grid-template-columns: minmax(0, 1fr); }
    .page-heading { align-items: stretch; }
    .page-heading > div, .page-heading > .button, .page-heading > .actions { width: 100%; }
    .actions { width: 100%; align-items: stretch; gap: 8px; }
    .actions > .button, .actions > form { flex: 1 1 100%; }
    .actions > form > .button { width: 100%; }
    .schedule-form, .identity-card { padding: 20px 16px; }
    .profile-details { grid-template-columns: minmax(0, 1fr); gap: 4px; }
    .profile-details dt { font-weight: 650; }
    .profile-details dd { margin-bottom: 12px; }
    .welcome-card { padding: 24px; }
    .welcome-card h2 { font-size: 25px; }
}
@media (max-width: 360px) {
    .sidebar nav { grid-template-columns: minmax(0, 1fr); }
    .topbar, .public-shell .topbar { flex-wrap: wrap; }
    .account { max-width: 100%; margin-left: auto; }
}
