/* ==============================================================================
   ระบบตรวจแผนการสอนและนิเทศการสอน | Theme & Responsive Motion System
   ============================================================================== */

:root {
  --navy: #173F67;
  --cream: #FFFAF0;
  --mint: #EEFAF6;
  --coral: #F45F52;
  --green: #17806E;
  --yellow: #F9B51B;
  --ink: #1c3550;
  --muted: #64758c;
  --border: #dce6ee;
  --white: #fff;
  --shadow: 5px 6px 0 var(--navy);
  --motion-ease: cubic-bezier(.22, 1, .36, 1);
  --motion-soft: cubic-bezier(.2, .75, .3, 1);
  --motion-shadow: 0 12px 24px rgba(23, 63, 103, .13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #f6f9fb;
  color: var(--ink);
  font: 14px/1.6 'Prompt', sans-serif;
}

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

button {
  cursor: pointer;
}

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

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

.hidden {
  display: none !important;
}

.app {
  min-height: 100vh;
}

.hero-bg {
  min-height: 100vh;
  background: radial-gradient(circle at 85% 10%, #bde9db 0, transparent 35%),
              radial-gradient(circle at 0% 70%, #fff1c2 0, transparent 43%),
              var(--cream);
  padding: 30px;
}

.auth-shell {
  max-width: 1100px;
  margin: 30px auto;
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 34px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.22;
  color: var(--navy);
  margin: 24px 0;
  animation: ui-rise .55s var(--motion-ease) both;
}

.hero p {
  font-size: 17px;
  color: #55697f;
  max-width: 570px;
  animation: ui-rise .58s .07s var(--motion-ease) both;
}

.hero-art {
  margin-top: 35px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  max-width: 530px;
}

.art-card {
  background: white;
  border: 2px solid var(--navy);
  border-radius: 22px;
  padding: 19px;
  text-align: center;
  box-shadow: 4px 5px 0 var(--navy);
  animation: ui-rise .54s var(--motion-ease) both;
  transition: transform .28s var(--motion-ease), box-shadow .28s var(--motion-ease);
}

.hero-art .art-card:nth-child(2) { animation-delay: .09s; }
.hero-art .art-card:nth-child(3) { animation-delay: .18s; }
.hero-art .art-card:hover {
  transform: translateY(-5px) rotate(-1deg);
  box-shadow: 6px 9px 0 var(--navy);
}

.art-card b {
  font-size: 27px;
  display: block;
}

.auth-card {
  background: #fff;
  border: 2px solid var(--navy);
  border-radius: 28px;
  padding: 29px;
  box-shadow: 8px 10px 0 var(--navy);
  animation: ui-scale-in .52s var(--motion-ease) both;
  transition: transform .32s var(--motion-ease), box-shadow .32s var(--motion-ease);
}

.auth-card:hover {
  box-shadow: 10px 13px 0 var(--navy);
}

.logo {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  color: var(--navy);
}

.mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: var(--navy);
  color: white;
  font-size: 25px;
  flex: none;
}

.brand-logo {
  object-fit: contain;
  max-width: 48px;
  max-height: 48px;
}

.top-roles, .tabs, .toolrow, .between, .row-flex {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.top-roles {
  justify-content: space-around;
  padding: 8px;
  background: #f4f7fb;
  border-radius: 16px;
}

.role-tab {
  border: none;
  border-radius: 12px;
  padding: 9px 12px;
  background: transparent;
  font-weight: 600;
  color: #567;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition: transform .26s var(--motion-ease), box-shadow .26s var(--motion-ease), background-color .22s ease, color .22s ease;
}

.role-tab:hover:not(:disabled) {
  transform: translateY(-2px);
  background: #e0ebf2;
}

.role-tab.active {
  background: var(--navy);
  color: white;
}

.role-tab.active:hover:not(:disabled) {
  background: #244e75;
}

.role-tab:active:not(:disabled) {
  transform: scale(.96);
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  transition: transform .24s var(--motion-ease);
}

.field:focus-within {
  transform: translateY(-1px);
}

.field label {
  font-size: 12px;
  font-weight: 600;
  color: #3b5571;
  transition: color .24s ease, transform .24s var(--motion-ease);
}

.field:focus-within label {
  color: var(--navy);
  transform: translateX(2px);
}

.input, .field input, .field select, .field textarea {
  border: 1.5px solid #d5e1eb;
  background: white;
  border-radius: 12px;
  padding: 11px 12px;
  outline: 0;
  width: 100%;
  min-width: 0;
  color: #203b54;
  transition: border-color .22s ease, box-shadow .26s var(--motion-ease), background-color .22s ease, transform .26s var(--motion-ease);
}

.input:hover:not(:disabled), .field input:hover:not(:disabled), .field select:hover:not(:disabled), .field textarea:hover:not(:disabled) {
  border-color: #98b6cd;
  background: #fbfefd;
}

.input:focus, .field input:focus, .field select:focus, .field textarea:focus {
  transform: translateY(-1px);
  border-color: var(--navy);
  box-shadow: 0 0 0 4px rgba(23, 63, 103, .12), 0 5px 16px rgba(23, 63, 103, .08);
  background: #fff;
}

.field textarea {
  min-height: 75px;
  resize: vertical;
}

.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.span2 {
  grid-column: span 2;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 2px solid var(--navy);
  border-radius: 13px;
  background: #fff;
  color: var(--navy);
  padding: 10px 15px;
  font-weight: 650;
  text-decoration: none;
  line-height: 1.4;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  backface-visibility: hidden;
  box-shadow: 0 1px 0 rgba(23, 63, 103, .06);
  transition: transform .26s var(--motion-ease), box-shadow .26s var(--motion-ease), background-color .22s ease, color .22s ease, border-color .22s ease;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 18%, rgba(255, 255, 255, .3) 48%, transparent 78%);
  transform: translateX(-140%) skewX(-16deg);
  transition: transform .65s var(--motion-soft);
}

.btn:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 8px 0 -4px rgba(23, 63, 103, .3), var(--motion-shadow);
}

.btn:hover:not(:disabled)::before {
  transform: translateX(140%) skewX(-16deg);
}

.btn:active:not(:disabled) {
  transform: translateY(1px) scale(.97);
  box-shadow: 0 2px 6px rgba(23, 63, 103, .14);
  transition-duration: .11s;
}

.btn:disabled {
  transform: none !important;
  box-shadow: none !important;
}

.btn:focus-visible, .role-tab:focus-visible, .navlink:focus-visible, .inlinebtn:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

.btn.primary { background: var(--navy); color: white; }
.btn.primary:hover:not(:disabled) { background: #235380; }
.btn.coral { background: var(--coral); color: white; }
.btn.coral:hover:not(:disabled) { background: #e85146; }
.btn.mint { background: var(--mint); }
.btn.mint:hover:not(:disabled) { background: #d6f4e9; }
.btn.yellow { background: var(--yellow); }
.btn.yellow:hover:not(:disabled) { background: #ffca49; }
.btn.ghost { border-color: #dce5ec; background: #fff; box-shadow: none; }
.btn.small { font-size: 12px; padding: 6px 11px; border-radius: 10px; }
.btn.full { width: 100%; }
.btn.danger { color: #b32d32; border-color: #eeb7ba; }

.ui-ripple {
  position: absolute;
  display: block;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  background: rgba(23, 63, 103, .16);
  transform: scale(0);
  animation: ui-ripple .52s ease-out forwards;
}

.btn.primary .ui-ripple, .btn.coral .ui-ripple, .navlink .ui-ripple, .role-tab.active .ui-ripple {
  background: rgba(255, 255, 255, .36);
}

@keyframes ui-ripple {
  from { transform: scale(0); opacity: 1; }
  to { transform: scale(1); opacity: 0; }
}

.tiny { font-size: 12px; }
.text-center { text-align: center; }
.mt { margin-top: 17px; }
.mb { margin-bottom: 17px; }

.desk {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 252px;
  background: var(--navy);
  color: #eef5ff;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  transition: width .2s, transform .2s;
  box-shadow: 4px 0 14px #112f4a1c;
}

.sidebar.slim {
  width: 76px;
}

.sidebar .logo {
  padding: 21px 17px;
  color: white;
  min-height: 90px;
}

.sidebar .mark {
  background: #fff;
  color: var(--navy);
  border: 2px solid #e5f8f2;
}

.sidebar nav {
  padding: 8px 13px;
  overflow: auto;
  flex: 1;
}

.navlink {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 11px 13px;
  border: 0;
  border-radius: 13px;
  color: #edf5fc;
  background: transparent;
  margin: 3px 0;
  font-weight: 500;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition: transform .26s var(--motion-ease), box-shadow .26s var(--motion-ease), background-color .22s ease, color .22s ease;
}

.navlink:hover:not(:disabled) {
  transform: translateX(4px);
  background: #ffffff2b;
}

.navlink.active {
  background: #ffffff21;
  box-shadow: inset 3px 0 var(--yellow);
  transition: background .2s, box-shadow .2s, transform .25s var(--motion-ease);
}

.navicon {
  font-size: 19px;
  width: 23px;
  text-align: center;
  flex: none;
}

.sidebar.slim .navlabel, .sidebar.slim .brandtext, .sidebar.slim .sidebottom span {
  display: none;
}

.sidebottom {
  padding: 18px;
  border-top: 1px solid #ffffff22;
}

.work {
  margin-left: 252px;
  width: calc(100% - 252px);
  transition: .2s;
}

.work.slim {
  margin-left: 76px;
  width: calc(100% - 76px);
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  padding: 13px 24px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 15;
  min-height: 75px;
}

.topbar .top-roles {
  margin: auto;
  background: none;
}

.userpill {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #f2f7fa;
  padding: 6px 10px;
  border-radius: 30px;
  white-space: nowrap;
  transition: transform .25s var(--motion-ease), background-color .25s;
}

.userpill:hover {
  transform: translateY(-2px);
  background: #eaf5f5;
}

.avatar {
  height: 33px;
  width: 33px;
  background: #b3dece;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--navy);
  font-weight: 750;
  overflow: hidden;
  flex: none;
}

.avatar img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

.main {
  padding: 25px;
  max-width: 1650px;
  margin: auto;
}

.pagehead {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 18px;
  margin-bottom: 22px;
  flex-wrap: wrap;
  animation: ui-rise .38s var(--motion-ease) both;
}

.pagehead h1 {
  margin: 0;
  font-size: 26px;
  color: var(--navy);
}

.pagehead p {
  margin: 2px 0;
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 17px;
}

.card, .panel {
  background: white;
  border: 1px solid #dbe6ee;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 3px 8px #132d4408;
  animation: ui-rise .42s var(--motion-ease) both;
  transition: transform .28s var(--motion-ease), box-shadow .28s var(--motion-ease), border-color .25s ease;
}

.card:hover, .panel:hover {
  transform: translateY(-3px);
  border-color: #c5dce7;
  box-shadow: 0 12px 27px rgba(23, 63, 103, .1);
}

.card strong {
  font-size: 29px;
  color: var(--navy);
  line-height: 1.3;
}

.card .emoji {
  font-size: 28px;
  float: right;
}

.panel {
  margin-bottom: 18px;
}

.panel h3 {
  margin: 0 0 13px;
  color: var(--navy);
  font-size: 18px;
}

.surface {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 17px;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  display: inline-block;
  border-radius: 99px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  background: #e7edf3;
  color: #4f6275;
  transition: transform .22s var(--motion-ease), filter .22s;
}

.badge:hover {
  transform: translateY(-1px);
  filter: saturate(1.12);
}

.badge.PENDING, .badge.RESUBMITTED { background: #fff0cd; color: #8a6206; }
.badge.PASS { background: #dbf5e6; color: #176743; }
.badge.FAIL { background: #fee0e0; color: #a22c2c; }
.badge.REVISION { background: #ffeadb; color: #ae4d08; }
.badge.NOT_SUBMITTED { background: #e9eef2; color: #516575; }
.badge.OVERDUE { background: #fde1d9; color: #a22c2c; }
.badge.demo { background: var(--yellow); color: #392b04; border: 2px solid #7a5a15; }

.tablewrap {
  overflow: auto;
  border-radius: 14px;
  border: 1px solid #e2eaf1;
}

.table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  font-size: 12px;
}

.table th {
  background: #f1f6fa;
  color: #33536b;
  text-align: left;
  font-weight: 700;
  padding: 11px 12px;
  border-bottom: 1px solid #e6edf3;
}

.table td {
  padding: 11px 12px;
  border-bottom: 1px solid #e6edf3;
}

.table tbody tr {
  transition: background-color .2s ease, box-shadow .2s ease;
}

.table tbody tr:hover {
  background: #fafdfd;
  box-shadow: inset 3px 0 0 var(--green);
}

.chartbox {
  height: 255px;
  position: relative;
}

.empty {
  text-align: center;
  padding: 45px 14px;
  color: #71869b;
  animation: ui-fade-in .38s ease both;
}

.empty .symbol {
  font-size: 46px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 13px;
}

.photo {
  border: 1px solid #d9e6ec;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  background: white;
  animation: ui-rise .38s var(--motion-ease) both;
  transition: transform .3s var(--motion-ease), box-shadow .3s var(--motion-ease), border-color .25s;
}

.photo:hover {
  transform: translateY(-5px) scale(1.015);
  border-color: #9cc4c5;
  box-shadow: 0 13px 24px rgba(23, 63, 103, .13);
}

.photo .visual {
  height: 130px;
  background: linear-gradient(130deg, #eaf5f2, #dce8f2);
  display: grid;
  place-items: center;
  font-size: 46px;
}

.photo .visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--motion-ease);
}

.photo:hover .visual img {
  transform: scale(1.055);
}

.photo .caption {
  padding: 9px;
  font-size: 12px;
}

.filterbar {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

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

.demo-strip {
  padding: 7px 18px;
  background: #fff4cf;
  border-bottom: 1px solid #f1d88c;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  animation: ui-fade-in .32s ease both;
}

.overlay {
  position: fixed;
  inset: 0;
  background: #0f274280;
  z-index: 70;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 18px;
  animation: ui-backdrop-in .22s ease both;
}

.overlay.closing {
  pointer-events: none;
  animation: ui-backdrop-out .19s ease both;
}

.modal {
  background: white;
  width: min(850px, 100%);
  max-height: 91vh;
  overflow: auto;
  border: 2px solid var(--navy);
  box-shadow: 7px 8px 0 #102c4b;
  border-radius: 23px;
  padding: 23px;
  animation: ui-dialog-in .36s var(--motion-ease) both;
  transform-origin: center 35%;
}

.overlay.closing .modal {
  animation: ui-dialog-out .19s ease both;
}

.modalhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.modalhead h2 {
  font-size: 21px;
  color: var(--navy);
  margin: 0;
}

.modalwide {
  width: min(1100px, 100%);
}

.loading {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: #ffffffcf;
  display: grid;
  place-items: center;
  backdrop-filter: blur(5px);
  animation: ui-fade-in .18s ease both;
}

.spinner {
  height: 54px;
  width: 54px;
  border: 5px solid #cadbdc;
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--cream);
  display: grid;
  place-items: center;
  transition: opacity .45s;
}

.splash.fade {
  opacity: 0;
  pointer-events: none;
}

.progressbar {
  width: 220px;
  height: 7px;
  background: #e1e6e9;
  border-radius: 20px;
  overflow: hidden;
  margin-top: 19px;
}

.progressbar:before {
  content: '';
  display: block;
  height: 100%;
  width: 35%;
  background: var(--green);
  border-radius: 20px;
  animation: load 1.4s ease-in-out infinite alternate;
}

@keyframes load {
  to { transform: translateX(190px); }
}

.toast {
  position: fixed;
  bottom: 22px;
  right: 20px;
  z-index: 110;
  padding: 13px 19px;
  background: var(--navy);
  color: white;
  border-radius: 12px;
  box-shadow: 0 7px 20px #1238;
  max-width: 400px;
  animation: ui-toast-in .36s var(--motion-ease) both;
}

.toast.toast-out {
  animation: ui-toast-out .26s ease both;
}

.timeline {
  border-left: 3px solid #b5d2d9;
  margin-left: 10px;
  padding-left: 19px;
}

.timeline .event {
  position: relative;
  padding: 0 0 19px;
}

.timeline .event:before {
  content: '';
  position: absolute;
  left: -27px;
  top: 5px;
  background: var(--green);
  height: 13px;
  width: 13px;
  border-radius: 50%;
  border: 2px solid white;
}

.stickyactions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  position: sticky;
  bottom: -23px;
  background: white;
  padding: 14px 0 0;
  margin-top: 18px;
}

.help {
  background: var(--mint);
  padding: 12px 15px;
  border-left: 4px solid var(--green);
  border-radius: 8px;
  margin: 9px 0;
  animation: ui-fade-in .32s ease both;
}

.error {
  background: #fef0ef;
  color: #a32e32;
  padding: 10px;
  border-radius: 12px;
  animation: ui-fade-in .32s ease both;
}

.mobile-only {
  display: none;
}

.notifdot {
  background: var(--coral);
  border-radius: 99px;
  color: white;
  font-size: 10px;
  padding: 1px 5px;
}

.separator {
  height: 1px;
  background: #e6edf1;
  margin: 16px 0;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #dce4e8;
  border-radius: 10px;
  padding: 6px 9px;
  margin: 5px 5px 0 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  transition: transform .22s var(--motion-ease), border-color .22s, box-shadow .22s;
}

.file-chip:hover {
  transform: translateY(-2px);
  border-color: #abcad2;
  box-shadow: 0 4px 12px rgba(23, 63, 103, .1);
}

.file-chip span {
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inlinebtn {
  background: transparent;
  border: 0;
  color: var(--navy);
  text-decoration: underline;
  font-weight: 600;
  position: relative;
  isolation: isolate;
  transition: transform .26s var(--motion-ease);
}

.inlinebtn:hover {
  transform: translateY(-1px);
  text-decoration-thickness: 2px;
}

.mark-yellow {
  background: var(--yellow);
  padding: 4px 9px;
  border-radius: 9px;
}

.kpi {
  font-size: 30px;
  font-weight: 800;
  color: var(--navy);
}

.end { text-align: right; }
.hand { cursor: pointer; }
.w100 { width: 100%; }
.topActions { display: flex; gap: 8px; align-items: center; }

.notice {
  background: #fff7e3;
  color: #7b5b17;
  padding: 10px 13px;
  border-radius: 12px;
  margin: 10px 0;
  font-size: 12px;
  animation: ui-fade-in .32s ease both;
}

@keyframes ui-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes ui-scale-in {
  from { opacity: 0; transform: translateY(14px) scale(.965); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes ui-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes ui-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes ui-backdrop-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes ui-dialog-in {
  from { opacity: 0; transform: translateY(16px) scale(.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes ui-dialog-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(10px) scale(.98); }
}

@keyframes ui-toast-in {
  from { opacity: 0; transform: translateX(18px) scale(.97); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes ui-toast-out {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(22px); }
}

/* Responsive Media Queries */
@media(max-width: 1120px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .topbar .top-roles { display: none; }
  .surface { grid-template-columns: 1fr; }
  .auth-shell { grid-template-columns: 1fr 420px; }
}

@media(max-width: 800px) {
  .sidebar { transform: translateX(-105%); width: 255px !important; }
  .sidebar.mobile-open { transform: translateX(0); }
  .sidebar .navlabel, .sidebar .brandtext { display: inline !important; }
  .work, .work.slim { margin-left: 0; width: 100%; }
  .mobile-only { display: inline-flex; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-card { max-width: 570px; width: 100%; margin: auto; }
  .hero { text-align: center; }
  .hero p, .hero-art { margin-left: auto; margin-right: auto; }
  .main { padding: 17px; }
  .topbar { padding: 10px 15px; }
  .filterbar { grid-template-columns: 1fr 1fr; }
  .pagehead h1 { font-size: 22px; }
}

@media(max-width: 510px) {
  .cards, .split, .fields { grid-template-columns: 1fr; }
  .span2 { grid-column: span 1; }
  .auth-shell { margin: 0 auto; }
  .auth-card { padding: 21px; }
  .hero-bg { padding: 17px; }
  .hero-art { gap: 6px; }
  .art-card { padding: 9px; }
  .art-card b { font-size: 22px; }
  .topbar .userpill .name { display: none; }
  .filterbar { grid-template-columns: 1fr; }
  .modal { padding: 15px; }
  .card { padding: 16px; }
}

@media(prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .ui-ripple { display: none !important; }
}

@media print {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    box-shadow: none !important;
  }
}
