:root {
  --sky: #dbf6ff;
  --aqua: #00bcd4;
  --pool: #0097b2;
  --wave: #007a92;
  --sun: #ffbe0b;
  --coral: #ff5a5f;
  --foam: #f5fdff;
  --ink: #11364a;
  --card: rgba(255, 255, 255, 0.86);
  --shadow: 0 14px 30px rgba(0, 86, 111, 0.22);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Barlow Condensed", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 16% 20%, #faffff 0, #d6f8ff 34%, #93e9ff 64%, #4acde7 100%);
  overflow-x: hidden;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 46, 61, 0.52);
  backdrop-filter: blur(4px);
}

.auth-card {
  width: min(480px, 95vw);
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(165deg, #f9fffa, #dff8ff);
  box-shadow: 0 18px 36px rgba(0, 52, 69, 0.32);
}

.auth-logo {
  width: min(260px, 70%);
  display: block;
  margin: 2px auto 8px;
}

.auth-card h2 {
  text-align: center;
  color: #124c61;
}

.auth-card p {
  margin: 4px 0 12px;
  text-align: center;
  color: #2a6174;
  font-size: 1rem;
}

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

.auth-form label {
  display: grid;
  gap: 4px;
  font-weight: 700;
  color: #144f65;
}

.show-password-row {
  display: inline-flex !important;
  align-items: center;
  gap: 8px !important;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1f576b;
}

.show-password-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.auth-form input,
.create-user-form input,
.create-user-form select {
  border: 1px solid rgba(0, 121, 151, 0.25);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  font-size: 1rem;
}

.auth-form button,
.create-user-form button {
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  color: #082c3b;
  background: linear-gradient(180deg, #ffcb2f, #ffb300);
}

.auth-error {
  min-height: 16px;
  color: #b0322f;
  font-size: 0.88rem;
}

.bg-wave {
  position: fixed;
  left: -8vw;
  right: -8vw;
  height: 220px;
  border-radius: 48% 52% 0 0;
  filter: blur(1px);
  z-index: -2;
}

.bg-wave-a {
  bottom: -80px;
  background: linear-gradient(90deg, #00aac6, #0093b3 50%, #00758f);
  animation: sway 10s ease-in-out infinite;
}

.bg-wave-b {
  bottom: -110px;
  background: linear-gradient(90deg, rgba(1, 155, 186, 0.85), rgba(0, 125, 155, 0.9));
  animation: sway 14s ease-in-out infinite reverse;
}

.bg-bubbles span {
  position: fixed;
  bottom: -50px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  animation: rise 13s linear infinite;
  z-index: -1;
}

.bg-bubbles span:nth-child(1) {
  left: 8%;
  animation-delay: -1s;
}

.bg-bubbles span:nth-child(2) {
  left: 27%;
  width: 20px;
  height: 20px;
  animation-delay: -7s;
}

.bg-bubbles span:nth-child(3) {
  left: 48%;
  animation-delay: -4s;
}

.bg-bubbles span:nth-child(4) {
  left: 69%;
  width: 18px;
  height: 18px;
  animation-delay: -10s;
}

.bg-bubbles span:nth-child(5) {
  left: 86%;
  animation-delay: -5s;
}

.dashboard {
  width: min(1180px, calc(100vw - 16px));
  margin: 8px auto 16px;
  display: grid;
  gap: 12px;
}

.hero {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  align-items: end;
  padding: 16px 18px;
  border-radius: 20px;
  background: linear-gradient(130deg, rgba(255, 250, 201, 0.95), rgba(255, 255, 255, 0.8));
  box-shadow: var(--shadow);
  animation: slideIn 0.55s ease both;
}

.eyebrow {
  margin: 0;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  color: #127089;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Baloo 2", cursive;
  line-height: 1;
}

h1 {
  margin-top: 4px;
  font-size: clamp(1.8rem, 3.3vw, 2.7rem);
}

.subtitle {
  margin: 6px 0 0;
  font-size: 1.1rem;
}

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

.current-user {
  margin: 0;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(0, 142, 176, 0.16);
  color: #0f5d75;
  font-weight: 700;
}

.actions button,
.controls button {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  color: #082c3b;
  cursor: pointer;
  background: linear-gradient(180deg, #ffcb2f, #ffb300);
  box-shadow: 0 8px 16px rgba(255, 157, 0, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.actions button:hover,
.controls button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 20px rgba(255, 157, 0, 0.42);
}

.secondary-btn {
  color: #0f5d75 !important;
  background: rgba(255, 255, 255, 0.85) !important;
  border: 1px solid rgba(0, 123, 154, 0.28) !important;
  box-shadow: none !important;
}

.secondary-btn:hover {
  box-shadow: 0 4px 10px rgba(0, 110, 138, 0.18) !important;
}

.card {
  padding: 16px;
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(4px);
  animation: slideIn 0.65s ease both;
}

.controls {
  display: grid;
  gap: 10px;
}

.controls label {
  font-weight: 700;
  letter-spacing: 0.02em;
}

input[type="url"] {
  width: 100%;
  border: 2px solid rgba(0, 131, 161, 0.22);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  font-size: 1rem;
}

.control-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

#statusText {
  font-size: 0.95rem;
  font-weight: 600;
  color: #0d6177;
}

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

.kpi-card {
  min-width: 0;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.92), rgba(222, 250, 255, 0.78));
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 160, 192, 0.18);
  animation: popIn 0.55s ease both;
}

.kpi-card h2 {
  font-size: 1.18rem;
  color: #0e647d;
}

.kpi-title-row {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  align-items: start;
}

.revenue-filter {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: end;
  gap: 5px;
  font-size: 0.8rem;
  color: #174c5f;
}

.date-icon-btn,
.revenue-reset-btn {
  border: 1px solid rgba(0, 120, 150, 0.28);
  background: rgba(255, 255, 255, 0.84);
  border-radius: 999px;
  font: inherit;
  color: #0f4a5e;
  font-weight: 700;
  padding: 3px 8px;
  cursor: pointer;
}

.date-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 6px;
}

.revenue-filter input[type="date"] {
  border: 1px solid rgba(0, 120, 150, 0.26);
  border-radius: 8px;
  padding: 2px 5px;
  font: inherit;
  font-size: 0.8rem;
  color: #123e4f;
  max-width: 130px;
  background: rgba(255, 255, 255, 0.86);
}

.kpi-card p {
  margin: 8px 0 2px;
  font-family: "Baloo 2", cursive;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.kpi-card small {
  color: #326679;
  font-size: 0.95rem;
}

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

.chart-card {
  min-height: 170px;
}

.chart-card.full {
  grid-column: span 2;
  min-height: 190px;
}

.chart-card canvas {
  height: 170px !important;
}

.chart-card.full canvas {
  height: 190px !important;
}

.table-wrap h3 {
  font-size: 1.5rem;
}

.mode-switch {
  padding: 10px 12px;
}

.ui-mode-toggle {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ui-mode-btn {
  border: 1px solid rgba(0, 123, 154, 0.28);
  background: rgba(255, 255, 255, 0.8);
  color: #0f5d75;
  border-radius: 999px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ui-mode-btn.active {
  color: #092f40;
  border-color: transparent;
  background: linear-gradient(180deg, #ffcf3d, #ffb400);
  box-shadow: 0 7px 14px rgba(255, 157, 0, 0.3);
}

.view-toggle {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.toggle-btn {
  border: 1px solid rgba(0, 123, 154, 0.28);
  background: rgba(255, 255, 255, 0.8);
  color: #0f5d75;
  border-radius: 999px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.toggle-btn.active {
  color: #092f40;
  border-color: transparent;
  background: linear-gradient(180deg, #ffcf3d, #ffb400);
  box-shadow: 0 7px 14px rgba(255, 157, 0, 0.3);
}

.table-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.table-head p {
  margin: 0;
  color: #266176;
}

.table-scroller {
  overflow: auto;
  max-height: 280px;
  border-radius: 12px;
}

.board-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  margin-bottom: 10px;
}

.board-search input {
  border: 1px solid rgba(0, 123, 154, 0.28);
  border-radius: 999px;
  padding: 8px 12px;
  font: inherit;
  font-size: 0.95rem;
  color: #12495e;
  background: rgba(255, 255, 255, 0.88);
}

.board-search button {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  color: #082c3b;
  background: linear-gradient(180deg, #ffcb2f, #ffb300);
}

.lane-toggle-bar {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 3px;
  margin-bottom: 10px;
}

.lane-toggle-btn {
  flex: 0 0 auto;
  border: 1px solid rgba(0, 123, 154, 0.28);
  background: rgba(255, 255, 255, 0.8);
  color: #0f5d75;
  border-radius: 999px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.lane-toggle-btn span {
  margin-left: 5px;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 0.82rem;
  color: #0c5065;
  background: rgba(0, 138, 172, 0.14);
}

.lane-toggle-btn.active {
  color: #092f40;
  border-color: transparent;
  background: linear-gradient(180deg, #ffcf3d, #ffb400);
  box-shadow: 0 7px 14px rgba(255, 157, 0, 0.3);
}

.lane-single {
  min-width: 0;
  border-radius: 14px;
  border: 1px solid rgba(0, 118, 148, 0.22);
  background: rgba(255, 255, 255, 0.58);
  padding: 10px;
  overflow: visible;
}

.lane-single h4 {
  margin: 0;
  font-family: "Baloo 2", cursive;
  color: #0e6177;
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.lane-cards {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-height: 380px;
  overflow: auto;
  padding-right: 2px;
}

.pass-card {
  border: 1px solid rgba(0, 133, 165, 0.18);
  border-radius: 12px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.84);
}

.pass-card h5 {
  margin: 0;
  font-family: "Baloo 2", cursive;
  font-size: 1rem;
}

.card-meta {
  margin-top: 5px;
  display: grid;
  gap: 2px;
  font-size: 0.9rem;
  color: #2b6275;
}

.card-alert {
  margin-top: 6px;
  border-radius: 8px;
  padding: 4px 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #8a3b25;
  background: rgba(255, 130, 94, 0.16);
}

.card-note-block {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.note-preview {
  border-radius: 8px;
  padding: 6px 8px;
  background: rgba(250, 193, 86, 0.2);
  color: #5f4306;
  font-size: 0.84rem;
}

.note-preview span {
  color: #6e5d30;
  margin-left: 4px;
}

.note-toggle-btn {
  justify-self: start;
  border: 0;
  border-radius: 999px;
  padding: 4px 11px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  color: #0d5a71;
  background: rgba(0, 145, 177, 0.17);
}

.note-toggle-btn.issue {
  color: #7a361f;
  background: rgba(255, 118, 76, 0.18);
}

.note-history summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  color: #0e5f76;
}

.note-list {
  margin-top: 5px;
  display: grid;
  gap: 6px;
}

.note-item {
  border-radius: 8px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 134, 165, 0.16);
}

.note-item p {
  margin: 0 0 3px;
  font-size: 0.84rem;
  color: #215b6f;
}

.note-item small {
  color: #4f7180;
  font-size: 0.78rem;
}

.note-item-actions {
  margin-top: 5px;
  display: flex;
  gap: 6px;
}

.note-item-actions button {
  border: 0;
  border-radius: 999px;
  padding: 3px 8px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.edit-note-btn {
  background: rgba(0, 144, 177, 0.16);
  color: #0e6177;
}

.delete-note-btn {
  background: rgba(255, 95, 77, 0.2);
  color: #97382a;
}

.note-editor {
  display: grid;
  gap: 6px;
  border-radius: 10px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(0, 124, 154, 0.19);
}

.note-editor input,
.note-editor textarea {
  width: 100%;
  border: 1px solid rgba(0, 124, 154, 0.24);
  border-radius: 8px;
  padding: 5px 7px;
  font: inherit;
  font-size: 0.84rem;
  color: #17485b;
  background: #ffffff;
}

.note-editor button {
  justify-self: start;
  border: 0;
  border-radius: 999px;
  padding: 4px 10px;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(180deg, #ffcf3d, #ffb400);
  color: #0d2f3f;
}

.hidden {
  display: none !important;
}

.user-modal {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 46, 61, 0.5);
  backdrop-filter: blur(4px);
}

.user-modal-card {
  width: min(980px, 96vw);
  min-width: 720px;
  max-width: 96vw;
  min-height: 520px;
  max-height: 92vh;
  border-radius: 16px;
  padding: 14px;
  background: linear-gradient(170deg, #f8feff, #dcf5fc);
  box-shadow: 0 18px 36px rgba(0, 52, 69, 0.32);
  overflow: auto;
  resize: both;
}

.note-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(5, 29, 38, 0.58);
  backdrop-filter: blur(5px);
}

.note-modal-card {
  width: min(560px, 96vw);
  border-radius: 18px;
  padding: 14px;
  background:
    radial-gradient(circle at 15% 8%, rgba(255, 219, 122, 0.25), transparent 40%),
    linear-gradient(165deg, #f8feff, #d8f5ff 70%);
  box-shadow: 0 20px 40px rgba(0, 40, 53, 0.38);
  border: 1px solid rgba(0, 137, 170, 0.28);
}

.note-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.note-close-btn {
  border: 0;
  border-radius: 999px;
  width: 34px;
  height: 34px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(145deg, #1d2228, #000000);
  color: #ffffff;
}

.note-modal-context {
  margin: 0 0 10px;
  color: #24586a;
  font-size: 0.95rem;
}

#noteModalText {
  width: 100%;
  border: 1px solid rgba(0, 124, 154, 0.24);
  border-radius: 12px;
  padding: 10px;
  font: inherit;
  font-size: 0.95rem;
  color: #17485b;
  background: rgba(255, 255, 255, 0.92);
}

.note-modal-actions {
  margin-top: 9px;
  display: flex;
  justify-content: end;
}

.note-modal-actions button {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  color: #082c3b;
  background: linear-gradient(180deg, #ffcb2f, #ffb300);
}

.create-user-form {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

.create-user-form label {
  display: grid;
  gap: 4px;
  font-weight: 700;
  color: #144f65;
}

#createUserMessage {
  min-height: 16px;
  font-size: 0.9rem;
  color: #0e6177;
}

.user-list-wrap {
  margin-top: 10px;
  border-top: 1px solid rgba(0, 130, 160, 0.2);
  padding-top: 10px;
}

.user-list-wrap h4 {
  margin: 0 0 8px;
  font-family: "Baloo 2", cursive;
  color: #144f65;
  font-size: 1.1rem;
}

.user-list-scroller {
  overflow: auto;
  max-height: 50vh;
  border: 1px solid rgba(0, 121, 151, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.62);
}

.user-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.user-table th,
.user-table td {
  text-align: left;
  padding: 7px 8px;
  border-bottom: 1px solid rgba(0, 121, 151, 0.14);
  vertical-align: top;
}

.user-table input,
.user-table select {
  width: 100%;
  border: 1px solid rgba(0, 121, 151, 0.25);
  border-radius: 8px;
  padding: 5px 7px;
  font: inherit;
  font-size: 0.92rem;
}

.user-row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.user-row-actions button {
  border: 0;
  border-radius: 999px;
  padding: 4px 8px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.user-row-actions .save-user-btn {
  background: rgba(26, 179, 103, 0.2);
  color: #1f7a4f;
}

.user-row-actions .delete-user-btn {
  background: rgba(255, 98, 79, 0.2);
  color: #97382a;
}

#userTableMessage {
  display: block;
  min-height: 16px;
  margin-top: 6px;
  color: #0e6177;
}

.card-contact-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  color: #0b5469;
  background: rgba(0, 162, 196, 0.14);
  border: 1px solid rgba(0, 139, 170, 0.2);
}

.contact-btn.disabled {
  color: #6d8591;
  background: rgba(118, 144, 155, 0.12);
  border-color: rgba(118, 144, 155, 0.2);
}

.photo-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 120px;
  border: 0;
  border-radius: 999px;
  padding: 4px 11px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  color: #ffffff;
  background: linear-gradient(145deg, #1c2229, #000000);
  box-shadow: 0 7px 14px rgba(0, 0, 0, 0.28);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.photo-download-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 16px rgba(0, 0, 0, 0.34);
}

.photo-download-btn.disabled {
  color: #6f7f87;
  background: rgba(118, 144, 155, 0.12);
  box-shadow: none;
  border: 1px solid rgba(118, 144, 155, 0.2);
  cursor: not-allowed;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.card-actions button {
  border: 0;
  border-radius: 999px;
  padding: 4px 10px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  background: rgba(0, 141, 174, 0.14);
  color: #0b556c;
}

.card-actions button[data-action="toDone"] {
  background: rgba(36, 186, 105, 0.18);
  color: #1b7547;
}

.card-actions button[data-action="toIssue"] {
  background: rgba(255, 112, 72, 0.17);
  color: #93462b;
}

.board-empty {
  font-size: 0.9rem;
  color: #3d6878;
  opacity: 0.85;
}

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

th,
td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(0, 111, 139, 0.16);
}

th {
  color: #0d6077;
  font-weight: 700;
}

tbody tr:hover {
  background: rgba(0, 180, 215, 0.08);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  border-radius: 999px;
  padding: 3px 10px;
  font-weight: 700;
  font-size: 0.9rem;
}

.badge.adult {
  background: rgba(255, 99, 71, 0.16);
  color: #a53c2b;
}

.badge.child {
  background: rgba(10, 156, 90, 0.15);
  color: #1f7a4f;
}

.badge.unknown {
  background: rgba(69, 93, 106, 0.15);
  color: #38535f;
}

body.ui-mobile-mode #chartsSection,
body.ui-mobile-mode #salesSection {
  display: none;
}

body.ui-mobile-mode .kpi-card[data-kpi="adult"],
body.ui-mobile-mode .kpi-card[data-kpi="child"],
body.ui-mobile-mode .kpi-card[data-kpi="trend"] {
  display: none;
}

body.ui-mobile-mode .kpi-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.ui-mobile-mode .lane-cards {
  grid-template-columns: 1fr;
  max-height: none;
  overflow: visible;
}

@media (max-width: 880px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .chart-card.full {
    grid-column: span 1;
  }

  .chart-card canvas,
  .chart-card.full canvas {
    height: 165px !important;
  }

  .hero {
    flex-direction: column;
    align-items: start;
  }

  .lane-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .dashboard {
    width: calc(100vw - 10px);
    margin: 5px auto 10px;
    gap: 8px;
  }

  .hero,
  .card,
  .kpi-card {
    border-radius: 14px;
    padding: 10px;
  }

  h1 {
    font-size: 2rem;
  }

  .subtitle {
    font-size: 0.95rem;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .kpi-card h2 {
    font-size: 1.35rem;
  }

  .kpi-title-row {
    flex-direction: column;
    align-items: start;
  }

  .revenue-filter {
    justify-content: start;
    width: 100%;
  }

  .revenue-filter input[type="date"] {
    max-width: 150px;
  }

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

  .ui-mode-toggle {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ui-mode-btn {
    width: 100%;
    text-align: center;
  }

  .user-modal-card {
    min-width: 0;
    width: 96vw;
    min-height: 0;
    max-height: 90vh;
    resize: none;
  }

  .kpi-card p {
    font-size: 2rem;
  }

  .actions button {
    width: 100%;
    text-align: center;
  }

  .chart-card,
  .chart-card.full {
    min-height: 150px;
  }

  .chart-card canvas,
  .chart-card.full canvas {
    height: 150px !important;
  }

  .table-scroller {
    max-height: 220px;
  }

  .lane-cards {
    grid-template-columns: 1fr;
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 1200px) and (min-width: 881px) {
  .lane-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  body.ui-mobile-mode .kpi-grid {
    grid-template-columns: 1fr;
  }
}

@keyframes sway {
  0%,
  100% {
    transform: translateX(0) translateY(0);
  }
  50% {
    transform: translateX(2.2%) translateY(-7px);
  }
}

@keyframes rise {
  0% {
    transform: translateY(0) scale(0.8);
    opacity: 0.75;
  }
  100% {
    transform: translateY(-115vh) scale(1.15);
    opacity: 0;
  }
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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