:root {
  --accent-a: #9a47ff;
  --accent-b: #8ef96b;
  --secondary-green: #62d163;
  --secondary-green-dark: #47a850;
  --glass-bg: rgba(24, 9, 44, 0.78);
  --glass-bg-soft: rgba(35, 18, 60, 0.66);
  --field-bg: rgba(238, 225, 255, 0.95);
  --field-text: #2a1446;
  --text-main: #ededed;
  --text-label: #d9cdf2;
  --line-soft: rgba(255, 255, 255, 0.2);
  --line-bright: rgba(196, 143, 255, 0.7);
  --shadow-outer: 0 26px 55px rgba(8, 2, 21, 0.48);
  --shadow-inner: inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text-main);
  font-family: "Sora", sans-serif;
  background:
    radial-gradient(900px 520px at 88% 10%, rgba(161, 64, 255, 0.35), transparent 62%),
    radial-gradient(820px 490px at 6% 88%, rgba(63, 188, 95, 0.34), transparent 60%),
    linear-gradient(135deg, #2a0a4b 0%, #170625 48%, #0b2218 100%);
  overflow-x: hidden;
}

.bg-orb {
  position: fixed;
  z-index: -3;
  border-radius: 999px;
  filter: blur(70px);
  pointer-events: none;
}

.orb-a {
  width: min(44vw, 620px);
  height: min(44vw, 620px);
  top: -230px;
  left: -220px;
  background: radial-gradient(circle, rgba(148, 66, 255, 0.52) 0%, rgba(148, 66, 255, 0.06) 75%);
}

.orb-b {
  width: min(48vw, 700px);
  height: min(48vw, 700px);
  right: -220px;
  bottom: -260px;
  background: radial-gradient(circle, rgba(88, 224, 101, 0.45) 0%, rgba(88, 224, 101, 0.04) 72%);
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -4;
  pointer-events: none;
  opacity: 0.38;
  background-image:
    linear-gradient(rgba(222, 214, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(222, 214, 255, 0.08) 1px, transparent 1px);
  background-size: 34px 34px;
}

.container {
  width: min(1320px, calc(100% - 2rem));
  margin-inline: auto;
}

.page-dashboard .container {
  width: min(1020px, calc(100% - 2rem));
}

.page-admin-logs .container {
  width: min(1080px, calc(100% - 2rem));
}

.page-admin-users .container,
.page-profile .container,
.page-register .container,
.page-forgot-password .container {
  width: min(1080px, calc(100% - 2rem));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  background: linear-gradient(90deg, rgba(48, 16, 86, 0.88) 0%, rgba(119, 42, 187, 0.82) 52%, rgba(49, 23, 94, 0.88) 100%);
  box-shadow: 0 12px 30px rgba(10, 3, 24, 0.35);
}

.nav-wrap {
  min-height: 104px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.52rem 0 0.7rem;
}

.nav-left {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-width: 0;
  width: 100%;
}

.menu-toggle {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.5rem;
  line-height: 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: #fff;
}

.brand-mark {
  position: relative;
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-logo {
  width: 70px;
  height: 70px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 8px 18px rgba(8, 2, 21, 0.42);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.02;
}

.brand-main {
  font-size: 2.48rem;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: #fff;
}

.brand-kicker {
  margin-top: 0.24rem;
  font-size: 0.96rem;
  font-weight: 700;
  color: #9af870;
}

.nav-user-stack {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.38rem;
}

.nav-links a {
  color: rgba(245, 241, 255, 0.95);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.08rem;
  padding: 0.45rem 0.75rem;
  border-radius: 11px;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.14);
}

.session-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(36, 13, 67, 0.92);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  padding: 0.44rem 0.85rem;
}

.session-icon {
  width: 18px;
  height: 18px;
  position: relative;
  display: inline-block;
  flex: 0 0 18px;
}

.session-avatar {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 10px rgba(8, 2, 21, 0.4);
  flex: 0 0 24px;
}

.session-icon::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 4px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #87f564;
}

.session-icon::after {
  content: "";
  position: absolute;
  left: 1px;
  bottom: 0;
  width: 16px;
  height: 9px;
  border-radius: 10px 10px 8px 8px;
  background: #87f564;
}

.session-user {
  max-width: 290px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #f2edff;
  font-size: 1.06rem;
  font-weight: 600;
}

.logout-form {
  margin: 0;
}

.page-content {
  padding: 1rem 0 2rem;
}

.flash-stack {
  position: fixed;
  top: 118px;
  right: 1rem;
  z-index: 80;
  display: grid;
  gap: 0.5rem;
  width: min(330px, calc(100vw - 1.2rem));
  margin: 0;
  pointer-events: none;
}

.flash {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  padding: 0.55rem 0.78rem;
  background: rgba(42, 18, 73, 0.5);
  font-size: 0.9rem;
  box-shadow: 0 10px 24px rgba(10, 3, 24, 0.34);
  backdrop-filter: blur(8px);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.flash.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.flash.is-hiding {
  opacity: 0;
  transform: translateY(-10px);
}

.flash-success {
  color: #ebffef;
  background: linear-gradient(90deg, rgba(82, 214, 102, 0.42) 0%, rgba(150, 109, 231, 0.26) 100%);
  border-color: rgba(121, 248, 120, 0.5);
  border-bottom: 2px solid rgba(135, 255, 118, 0.76);
  box-shadow: 0 8px 24px rgba(34, 170, 73, 0.24);
}

.flash-error {
  color: #ffd9dd;
  background: rgba(110, 25, 54, 0.62);
  border-color: rgba(246, 123, 154, 0.5);
}

.flash-info {
  color: #eadfff;
}

.quote-stage {
  position: relative;
  isolation: isolate;
  border-radius: 26px;
  padding: 1rem;
  background: linear-gradient(140deg, rgba(228, 255, 226, 0.18) 0%, rgba(195, 138, 255, 0.18) 46%, rgba(242, 242, 255, 0.08) 100%);
  box-shadow: var(--shadow-outer), var(--shadow-inner);
  overflow: hidden;
}

.quote-stage::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  border-radius: 26px;
  border: 1.2px solid transparent;
  background: linear-gradient(110deg, rgba(195, 255, 181, 0.5), rgba(170, 102, 255, 0.58), rgba(168, 255, 132, 0.45)) border-box;
  mask:
    linear-gradient(#fff 0 0) padding-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.quote-stage::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: 640px;
  height: 320px;
  right: -130px;
  bottom: -120px;
  background: radial-gradient(circle at center, rgba(154, 255, 124, 0.34), rgba(154, 255, 124, 0));
  filter: blur(8px);
  pointer-events: none;
}

.page-head {
  position: relative;
  margin-bottom: 0.9rem;
  padding: 1rem 1rem 0.5rem;
  background: transparent;
  border: 0;
}

.page-head::after {
  content: none;
}

.kicker {
  margin: 0;
  color: #7eff86;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.center-page {
  width: min(940px, 100%);
  margin-inline: auto;
  display: grid;
  gap: 0.85rem;
}

.center-page > * {
  width: 100%;
  margin-inline: auto;
}

.center-head {
  text-align: center;
  padding: 0.6rem 0.65rem 0.45rem;
}

.center-head::after {
  right: auto;
  left: 50%;
  transform: translateX(-50%);
}

.center-head h1 {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
}

.center-stack {
  width: 100%;
  margin-inline: auto;
}

.center-stack > .card {
  width: 100%;
}

.center-stack .card,
.center-stack h2 {
  text-align: center;
}

.center-page > .card .actions-row,
.center-stack .actions-row {
  justify-content: center;
}

.center-stack th,
.center-stack td {
  text-align: center;
}

.center-auth-layout {
  grid-template-columns: 1fr;
  max-width: 760px;
  margin-inline: auto;
}

.center-auth-panel {
  width: 100%;
  margin-inline: auto;
  display: grid;
  gap: 0.75rem;
  text-align: center;
}

.center-auth-panel .kicker {
  justify-self: center;
}

.center-auth-panel .form-grid.card {
  width: 100%;
  margin-inline: auto;
}

.center-auth-panel .actions-row {
  justify-content: center;
}

.center-auth-panel .form-grid,
.center-stack .form-grid {
  justify-items: stretch;
}

.center-auth-panel .form-grid label,
.center-stack .form-grid label {
  text-align: left;
  justify-items: start;
  font-size: 0.86rem;
}

.center-stack .user-create-form {
  justify-items: center;
  gap: 0.45rem;
}

.center-stack .user-create-form label {
  width: min(540px, 100%);
  justify-self: center;
  text-align: left;
}

.center-stack .user-create-form input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  min-height: 40px;
  border-radius: 14px;
}

.center-stack .user-create-form .btn-primary {
  width: min(280px, 100%);
  min-height: 40px;
  margin-top: 15px;
  font-size: 0.95rem;
  padding: 0.5rem 0.95rem;
  justify-self: center;
}

.page-head h1,
.auth-panel h1,
.error-card h1 {
  margin: 0.15rem 0 0.4rem;
  color: #f2f0fb;
  font-size: clamp(2.3rem, 5.3vw, 4.1rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.page-dashboard .page-head h1 {
  font-size: clamp(1.95rem, 3.9vw, 3.15rem);
}

.page-dashboard .quote-stage .page-head {
  text-align: center;
}

.page-dashboard .quote-stage .page-head::after {
  right: auto;
  left: 50%;
  transform: translateX(-50%);
}

.page-admin-users .page-content,
.page-profile .page-content,
.page-register .page-content,
.page-forgot-password .page-content,
.page-admin-logs .page-content {
  display: grid;
  justify-items: center;
  gap: 0.8rem;
}

.page-admin-users .page-content > *,
.page-profile .page-content > *,
.page-admin-logs .page-content > * {
  width: min(880px, 100%);
  margin-inline: auto;
}

.page-admin-users .page-content > * {
  width: min(760px, 100%);
}

.page-register .page-content > .auth-layout,
.page-forgot-password .page-content > .auth-layout {
  width: min(760px, 100%);
  margin-inline: auto;
}

.page-admin-users .page-head,
.page-profile .page-head,
.page-admin-logs .page-head,
.page-admin-logs .card {
  width: min(880px, 100%);
  margin-inline: auto;
}

.page-admin-users .page-head {
  width: min(760px, 100%);
}

.page-admin-users .admin-users-stack,
.page-profile .profile-stack {
  width: min(880px, 100%);
  margin-inline: auto;
}

.page-admin-users .admin-users-stack {
  width: min(760px, 100%);
}

.page-admin-users .admin-users-stack > .card,
.page-profile .profile-stack > .card {
  width: 100%;
}

.page-admin-users .page-head,
.page-profile .page-head,
.page-admin-logs .page-head {
  text-align: center;
  padding: 0.6rem 0.65rem 0.45rem;
}

.page-admin-users .page-head::after,
.page-profile .page-head::after,
.page-admin-logs .page-head::after {
  right: auto;
  left: 50%;
  transform: translateX(-50%);
}

.page-admin-users .page-head h1,
.page-profile .page-head h1,
.page-admin-logs .page-head h1 {
  font-size: clamp(1.7rem, 3vw, 2.35rem);
}

.page-admin-users .card h2,
.page-profile .card h2,
.page-admin-logs .card h2 {
  text-align: center;
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
}

.page-admin-users .card,
.page-profile .card,
.page-admin-logs .card {
  text-align: center;
}

.page-register .auth-panel,
.page-forgot-password .forgot-panel {
  width: 100%;
  margin-inline: auto;
}

.page-admin-users th,
.page-admin-users td,
.page-admin-logs th,
.page-admin-logs td {
  text-align: center;
}

.page-admin-users .actions-row,
.page-profile .actions-row,
.page-admin-logs .actions-row {
  justify-content: center;
}

.page-profile .btn {
  margin-inline: auto;
}

.page-login .auth-panel h1 {
  font-size: clamp(1.75rem, 3.2vw, 2.45rem);
}

.muted {
  margin: 0;
  color: #d6cbee;
}

.small {
  font-size: 0.95rem;
}

.mono {
  font-family: "IBM Plex Mono", monospace;
}

.card {
  border-radius: 22px;
  border: 1px solid var(--line-soft);
  background: var(--glass-bg);
  box-shadow: var(--shadow-outer), var(--shadow-inner);
  padding: 1.1rem;
}

.quote-form-card {
  position: relative;
  z-index: 2;
  padding: 1rem;
  margin-bottom: 0.4rem;
  background: var(--glass-bg-soft);
}

.quote-form-card > h2 {
  margin: 0 0 0.7rem;
  color: #efe7ff;
  font-size: 2.05rem;
  letter-spacing: -0.02em;
}

.quote-form-card form.form-grid {
  gap: 0.9rem;
}

.quote-form-card .route-three-col,
.quote-form-card .two-col {
  gap: 0.75rem;
}

.quote-form-card .volume-items-block {
  margin-top: 0.1rem;
  padding: 0.95rem;
}

.quote-form-card .volume-head {
  margin-bottom: 0.45rem;
}

.quote-form-card .volume-list {
  gap: 0.65rem;
}

.quote-form-card .volume-row {
  gap: 0.55rem;
  padding: 0.55rem;
}

.quote-search-card {
  position: relative;
  z-index: 2;
  margin-top: 0.5rem;
  padding: 0.9rem 1rem;
}

.search-quote-form input[name="quote_code"] {
  position: relative;
  z-index: 3;
}

.quote-search-card h2 {
  margin: 0 0 0.6rem;
  font-size: 1.32rem;
}

.search-quote-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
  align-items: end;
}

.search-quote-form label {
  margin: 0;
}

.form-grid {
  display: grid;
  gap: 0.62rem;

}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.62rem;
}

.route-three-col {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.62rem;
  align-items: end;
}

.form-grid label {
  display: grid;
  gap: 0.28rem;
  color: var(--text-label);
  font-size: 0.93rem;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(194, 170, 225, 0.72);
  border-radius: 16px;
  background: var(--field-bg);
  color: var(--field-text);
  font: inherit;
  padding: 0.64rem 0.84rem;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

input::placeholder,
textarea::placeholder {
  color: rgba(52, 33, 82, 0.7);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(169, 113, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(148, 86, 241, 0.22);
}

textarea {
  min-height: 160px;
  resize: vertical;
}

.volume-items-block {
  border: 1px dashed rgba(196, 170, 234, 0.45);
  border-radius: 16px;
  background: rgba(196, 151, 245, 0.08);
  padding: 0.72rem;
}

.volume-head h3 {
  margin: 0 0 0.18rem;
  color: #f2eaff;
  font-size: 1.82rem;
  letter-spacing: -0.02em;
}

.volume-list {
  display: grid;
  gap: 0.48rem;
}

.volume-row {
  display: grid;
  grid-template-columns: 0.76fr 1fr 1fr 1fr auto;
  gap: 0.45rem;
  align-items: end;
  border-radius: 14px;
  border: 1px solid rgba(238, 225, 255, 0.22);
  background: rgba(38, 19, 66, 0.3);
  padding: 0.42rem;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.56rem 0.42rem;
  font-size: 0.9rem;
}

th {
  color: #f1eaff;
}

td {
  color: #dfd4f7;
}

td a {
  color: #b5f47d;
  font-weight: 700;
}

.history-below {
  margin-top: 0.9rem;
}

.grid-main {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1rem;
}

.admin-users-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.page-admin-users .center-stack > .card {
  padding: 1rem 0.9rem;
}

.backup-form-inline {
  margin-top: 0.7rem;
}

.user-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.user-row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  flex-wrap: wrap;
}

.inline-form {
  margin: 0;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(6, 2, 14, 0.58);
  backdrop-filter: blur(2px);
}

.modal-card {
  width: min(460px, 100%);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(27, 10, 50, 0.96);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  padding: 1rem;
  text-align: center;
}

.modal-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.2rem;
  color: #f2ecff;
}

.modal-actions {
  margin-top: 0.8rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-compact {
  min-height: 34px;
  padding: 0.36rem 0.82rem;
  font-size: 0.82rem;
}

.page-admin-users .users-list-wrap {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 0.25rem 0.45rem;
  background: rgba(18, 8, 36, 0.28);
}

.page-admin-users .users-list-table {
  min-width: 0;
  table-layout: fixed;
}

.page-admin-users .users-list-table th,
.page-admin-users .users-list-table td {
  padding: 0.5rem 0.35rem;
  font-size: 0.88rem;
  word-break: break-word;
}

.page-admin-users .users-list-table th:nth-child(1),
.page-admin-users .users-list-table td:nth-child(1) {
  width: 21%;
}

.page-admin-users .users-list-table th:nth-child(2),
.page-admin-users .users-list-table td:nth-child(2) {
  width: 23%;
}

.page-admin-users .users-list-table th:nth-child(3),
.page-admin-users .users-list-table td:nth-child(3) {
  width: 14%;
}

.page-admin-users .users-list-table th:nth-child(4),
.page-admin-users .users-list-table td:nth-child(4) {
  width: 22%;
}

.page-admin-users .users-list-table th:nth-child(5),
.page-admin-users .users-list-table td:nth-child(5) {
  width: 20%;
}

.backup-actions {
  gap: 0.45rem;
}

.backup-actions form {
  margin: 0;
}

.quote-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.btn {
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  font: inherit;
  font-weight: 700;
  padding: 0.64rem 1.08rem;
}

.btn-small {
  min-height: 42px;
  padding: 0.5rem 1rem;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, #8c39ea 0%, #7430c8 100%);
  border-color: rgba(186, 134, 255, 0.6);
  box-shadow: 0 8px 18px rgba(78, 29, 139, 0.5);
}

.btn-primary:hover {
  filter: brightness(1.06);
}

.btn-ghost {
  color: #122417;
  background: linear-gradient(180deg, #85f46a 0%, #58bd5c 100%);
  border-color: rgba(18, 66, 32, 0.35);
  box-shadow: 0 8px 18px rgba(39, 145, 56, 0.35);
}

.btn-ghost:hover {
  filter: brightness(1.03);
}

.btn-exit {
  color: #000000;
  background: linear-gradient(180deg, #77dd69 0%, #4db359 100%);
  border-color: rgba(74, 161, 77, 0.52);
  box-shadow: 0 10px 20px rgba(19, 80, 31, 0.35);
}

.btn-remove-volume {
  color: #000000;
  background: linear-gradient(180deg, #75dc69 0%, #49aa50 100%);
  border-color: rgba(24, 95, 39, 0.52);
  min-width: 126px;
  min-height: 46px;
}

.btn-add-volume {
  margin-top: 0.4rem;
}

.btn-submit-quote {
  width: min(430px, 100%);
  justify-self: center;
  margin-top: 1.2rem;
  min-height: 46px;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  background: linear-gradient(180deg, #8c39ea 0%, #7430c8 100%);
  border-color: rgba(186, 134, 255, 0.6);
  box-shadow: 0 8px 18px rgba(78, 29, 139, 0.5);
}

.form-help-link {
  justify-self: center;
  margin-top: 0.1rem;
  color: #d9c4ff;
  font-size: 0.9rem;
  text-decoration: none;
}

.form-help-link:hover {
  color: #f0e6ff;
  text-decoration: underline;
}

.actions-row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

.quote-message-actions {
  margin-top: 0.9rem;
}

.btn-copy-message {
  color: #fff;
  background: linear-gradient(180deg, #8c39ea 0%, #7430c8 100%);
  border-color: rgba(186, 134, 255, 0.6);
  box-shadow: 0 8px 18px rgba(78, 29, 139, 0.5);
  min-height: 46px;
  min-width: 260px;
  font-size: 1.3rem;
}

.btn-copy-message:hover {
  filter: brightness(1.06);
}

.hidden {
  display: none !important;
}

.auth-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 1rem;
}

.page-login .auth-layout {
  grid-template-columns: 1fr;
  max-width: 600px;
  margin-inline: auto;
}

.page-register .auth-layout {
  grid-template-columns: 1fr;
  max-width: 860px;
  margin-inline: auto;
}

.forgot-layout {
  grid-template-columns: 1fr;
  max-width: 760px;
  margin-inline: auto;
}

.page-login .auth-panel {
  display: grid;
  gap: 0.75rem;
  text-align: center;
}

.page-login .auth-panel .kicker {
  justify-self: center;
}

.page-register .auth-panel {
  display: grid;
  gap: 0.75rem;
  text-align: center;
}

.page-register .auth-panel .kicker {
  justify-self: center;
}

.page-register .auth-panel .form-grid.card {
  width: min(760px, 100%);
  margin-inline: auto;
}

.page-register .auth-panel .actions-row {
  justify-content: center;
}

.forgot-panel {
  display: grid;
  gap: 0.7rem;
  text-align: center;
}

.forgot-panel .kicker {
  justify-self: center;
}

.forgot-title {
  font-size: clamp(1.7rem, 3vw, 2.35rem) !important;
}

.forgot-card {
  width: min(740px, 100%);
  margin-inline: auto;
  text-align: center;
}

.forgot-card .first-access-meta {
  margin-inline: auto;
}

.forgot-card .btn {
  width: min(420px, 100%);
  justify-self: center;
}

.page-login .auth-panel > .first-access-card {
  margin-top: 0.15rem;
  width: min(560px, 100%);
  margin-inline: auto;
}

.page-register .register-title {
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
}

.users-title {
  font-size: clamp(1.9rem, 3.2vw, 2.6rem) !important;
}

.profile-stack {
  grid-template-columns: 1fr;
  max-width: 860px;
}

.first-access-card {
  display: grid;
  gap: 0.7rem;
  align-content: start;
  background: rgba(26, 10, 47, 0.86);
}

.first-access-card .muted {
  line-height: 1.5;
  text-align: center;
}

.first-access-card h2 {
  text-align: center;
}

.first-access-btn {
  width: min(250px, 100%);
  justify-self: center;
}

.first-access-meta {
  margin: 0;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.32rem 0.6rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(148, 93, 227, 0.2);
}

.auth-panel .form-grid.card {
  margin-top: 0.75rem;
}

.page-login .login-access-form {
  justify-items: center;
  gap: 20px;
  width: min(560px, 100%);
  margin-inline: auto;
}

.page-login .login-access-form label {
  width: min(430px, 100%);
  justify-self: center;
  text-align: left;
  justify-items: start;
  font-size: 0.86rem;
}

.page-login .login-access-form input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  min-height: 40px;
  border-radius: 14px;
}

.page-login .login-access-form .btn-primary {
  width: min(250px, 100%);
  min-height: 40px;
  font-size: 0.95rem;
  padding: 0.5rem 0.95rem;
  justify-self: center;
}

.auth-aside h2,
.card h2 {
  margin-top: 0;
  margin-bottom: 0.55rem;
  color: #f2ebff;
}

.login-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 0.7rem;
}

.login-logo {
  width: 165px;
  max-width: 78%;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(36, 14, 66, 0.68);
  padding: 0.4rem;
}

.warning-note {
  margin-top: 0.7rem;
  color: #ffe39c;
}

.error-card {
  max-width: 720px;
  margin: 1.5rem auto 0;
  text-align: center;
}

.page-login .nav-wrap {
  justify-content: center;
}

.page-login .nav-links,
.page-login .nav-user-stack,
.page-login .menu-toggle {
  display: none;
}

@media (max-width: 1260px) {
  .brand-main {
    font-size: 2.12rem;
  }

  .brand-kicker {
    font-size: 0.88rem;
  }

  .session-user {
    max-width: 220px;
    font-size: 0.95rem;
  }
}

@media (max-width: 1040px) {
  .container {
    width: min(1320px, calc(100% - 1.2rem));
  }

  .route-three-col,
  .auth-layout,
  .grid-main,
  .quote-grid {
    grid-template-columns: 1fr;
  }

  .btn-submit-quote {
    font-size: 1.3rem;
  }
}

@media (max-width: 860px) {
  .site-header {
    position: static;
  }

  .flash-stack {
    top: 0.65rem;
    right: 0.6rem;
    left: 0.6rem;
    width: auto;
  }

  .nav-wrap {
    flex-wrap: wrap;
    justify-content: center;
    padding: 0.55rem 0 0.6rem;
    min-height: auto;
    gap: 0.72rem;
  }

  .nav-left {
    width: 100%;
    justify-content: center;
  }

  .menu-toggle {
    display: none;
  }

  .nav-user-stack,
  .nav-links {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .session-pill {
    order: 2;
  }

  .logout-form {
    order: 3;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

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

  .volume-row .btn-remove-volume {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .flash {
    font-size: 0.85rem;
    padding: 0.52rem 0.7rem;
  }

  .brand-mark {
    width: 64px;
    height: 64px;
  }

  .brand-logo {
    width: 60px;
    height: 60px;
  }

  .brand-main {
    font-size: 1.7rem;
  }

  .brand-kicker {
    margin-top: 0.2rem;
    font-size: 0.78rem;
  }

  .card,
  .quote-form-card,
  .quote-stage {
    border-radius: 18px;
  }

  .quote-stage {
    padding: 0.72rem;
  }

  .page-head {
    padding: 0.8rem 0.65rem 0.35rem;
  }

  .page-head h1 {
    font-size: 2.35rem;
  }

  .page-dashboard .page-head h1 {
    font-size: 2.05rem;
  }

  .quote-form-card > h2 {
    font-size: 1.6rem;
  }

  .volume-head h3 {
    font-size: 1.45rem;
  }

  .btn-submit-quote {
    width: 100%;
    font-size: 1.2rem;
  }

  .btn-copy-message {
    width: 100%;
    min-width: 0;
    font-size: 1.15rem;
  }

  .search-quote-form {
    grid-template-columns: 1fr;
  }

  .search-quote-form .btn {
    width: 100%;
  }

  table {
    min-width: 520px;
  }
}
