:root {
  --white: #ffffff;
  --black: #000000;

  --text: #172033;
  --title: #111827;
  --muted: #64748b;
  --muted-2: #7c879c;

  --primary: #5aa0ff;
  --primary-2: #9c8dff;
  --primary-3: #73dcff;
  --violet: #a98cff;
  --pink: #ff9fcd;
  --green: #22c55e;
  --green-2: #16a34a;
  --red: #ff3b3b;
  --red-2: #dc2626;
  --orange: #ffc46b;

  --bg-1: #f6fbff;
  --bg-2: #edf5ff;
  --bg-3: #f5efff;
  --bg-4: #fff5fb;

  --card: rgba(255, 255, 255, 0.78);
  --card-strong: rgba(255, 255, 255, 0.86);
  --border: rgba(255, 255, 255, 0.58);
  --border-soft: rgba(148, 163, 184, 0.14);

  --shadow-sm: 0 8px 20px rgba(31, 41, 55, 0.06);
  --shadow-md: 0 16px 36px rgba(31, 41, 55, 0.08);
  --shadow-lg: 0 24px 48px rgba(31, 41, 55, 0.10);

  --radius-sm: 14px;
  --radius-md: 18px;
  --radius-lg: 22px;
  --radius-xl: 24px;

  --transition-fast: 0.18s ease;
  --transition-med: 0.25s ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text);
  letter-spacing: -0.01em;
  position: relative;
  background:
    radial-gradient(circle at 12% 18%, rgba(79, 149, 255, 0.28), transparent 22%),
    radial-gradient(circle at 88% 14%, rgba(169, 140, 255, 0.24), transparent 20%),
    radial-gradient(circle at 82% 84%, rgba(255, 159, 205, 0.20), transparent 22%),
    radial-gradient(circle at 18% 88%, rgba(115, 220, 255, 0.22), transparent 20%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2), var(--bg-3), var(--bg-4));
  background-size: 200% 200%;
  animation: bodyGradientMove 24s ease infinite;
}

body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 999px;
  pointer-events: none;
  z-index: 0;
  filter: blur(80px);
  opacity: 0.45;
}

body::before {
  width: 260px;
  height: 260px;
  top: 70px;
  left: -40px;
  background: radial-gradient(circle, rgba(115, 220, 255, 0.75) 0%, rgba(115, 220, 255, 0) 70%);
  animation: blobOne 18s ease-in-out infinite;
}

body::after {
  width: 300px;
  height: 300px;
  right: -60px;
  bottom: 60px;
  background: radial-gradient(circle, rgba(255, 159, 205, 0.62) 0%, rgba(255, 159, 205, 0) 72%);
  animation: blobTwo 20s ease-in-out infinite;
}

.page,
.container,
.login-page {
  position: relative;
  z-index: 1;
}

@keyframes bodyGradientMove {
  0% { background-position: 0% 50%; }
  25% { background-position: 50% 100%; }
  50% { background-position: 100% 50%; }
  75% { background-position: 50% 0%; }
  100% { background-position: 0% 50%; }
}

@keyframes blobOne {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(36px, 26px) scale(1.12); }
}

@keyframes blobTwo {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-28px, -22px) scale(1.08); }
}

a {
  color: inherit;
  text-decoration: none;
}

img,
table,
input,
select,
textarea,
button {
  max-width: 100%;
}

a,
button,
input,
select,
textarea,
.slot-btn,
.btn-link,
.hero-action,
.quick-action-btn,
.modern-nav a,
.nav a {
  touch-action: manipulation;
}

body,
.card,
.topbar,
.room-card,
.stat-card,
.booking-mobile-card,
button,
.primary-btn,
.success-btn,
.warning-btn,
.delete-btn,
.mobile-delete-btn,
.btn-link,
.hero-action,
.quick-action-btn,
.modern-nav a,
.nav a,
.slot-btn,
input,
select,
textarea,
table tr td {
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-med),
    border-color var(--transition-med),
    background var(--transition-med),
    color var(--transition-med),
    opacity var(--transition-med),
    filter var(--transition-fast);
}

.page {
  min-height: 100vh;
  padding: 28px 16px 40px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.container.small {
  max-width: 520px;
}

.container.modern {
  max-width: 1240px;
}

.glass,
.card,
.topbar,
.room-card,
.booking-mobile-card,
.login-card,
.slots-dropdown,
.selected-box {
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow:
    0 10px 30px rgba(31, 41, 55, 0.06),
    0 2px 8px rgba(31, 41, 55, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
}

.card:hover,
.room-card:hover,
.booking-mobile-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 18px 38px rgba(31, 41, 55, 0.08),
    0 4px 12px rgba(31, 41, 55, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.70);
}

.topbar {
  border-radius: var(--radius-xl);
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.82) 0%, rgba(255,255,255,0.68) 100%);
}

.topbar h1,
.section-head h2,
.card h2,
.card h3,
.room-card h3,
.booking-mobile-top h3,
.hero-card h2 {
  color: var(--title);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.topbar h1 {
  margin: 0 0 4px;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.05;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.subtitle,
.muted-text,
.blocked-text,
.muted-small,
.booking-mobile-label,
.room-card p,
.login-card-top p {
  color: var(--muted);
}

.subtitle {
  margin: 0;
  font-size: 14px;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(255,255,255,0.74));
  border: 1px solid rgba(255,255,255,0.75);
  box-shadow:
    0 8px 18px rgba(31, 41, 55, 0.05),
    inset 0 1px 0 rgba(255,255,255,0.80);
  font-weight: 700;
}

.card {
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 22px;
}

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

.section-head h2,
.card h2,
.card h3 {
  margin: 0;
}

.muted-text {
  line-height: 1.65;
}

.blocked-text,
.muted-small {
  font-weight: 700;
}

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

.admin-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 18px;
  margin-bottom: 22px;
}

.stack-form label,
label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

input,
select,
textarea,
button {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.78);
  padding: 13px 14px;
  font-size: 15px;
  background: rgba(255,255,255,0.88);
  color: var(--text);
  box-shadow:
    0 4px 12px rgba(31, 41, 55, 0.03),
    inset 0 1px 0 rgba(255,255,255,0.72);
}

input:hover,
select:hover,
textarea:hover {
  border-color: rgba(79, 149, 255, 0.22);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(79, 149, 255, 0.55);
  box-shadow:
    0 0 0 4px rgba(79, 149, 255, 0.16),
    0 8px 18px rgba(79, 149, 255, 0.10),
    inset 0 1px 0 rgba(255,255,255,0.72);
}

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

button,
.primary-btn,
.success-btn,
.warning-btn,
.delete-btn,
.mobile-delete-btn,
.login-submit-btn {
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.28);
  color: var(--white);
  font-weight: 800;
  cursor: pointer;
  letter-spacing: -0.01em;
  box-shadow:
    0 10px 22px rgba(31, 41, 55, 0.08),
    inset 0 1px 0 rgba(255,255,255,0.22);
}

button,
.primary-btn,
.login-submit-btn {
  background: linear-gradient(135deg, #5aa0ff, #9c8dff, #73dcff);
}

.success-btn {
  background: linear-gradient(135deg, #7fe0a8, #63cf93, #6fe7d3);
}

.warning-btn {
  background: linear-gradient(135deg, #ffd37d, #ffc46b, #ffb38f);
  color: #7c4a00;
}

.delete-btn,
.mobile-delete-btn {
  background: linear-gradient(135deg, #ff3b3b, #dc2626);
  color: #ffffff;
  box-shadow:
    0 10px 20px rgba(239, 68, 68, 0.35),
    inset 0 1px 0 rgba(255,255,255,0.25);
}

button:hover,
.primary-btn:hover,
.success-btn:hover,
.warning-btn:hover,
.delete-btn:hover,
.mobile-delete-btn:hover,
.login-submit-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.02) saturate(1.02);
}

button:active,
.primary-btn:active,
.success-btn:active,
.warning-btn:active,
.delete-btn:active,
.mobile-delete-btn:active,
.login-submit-btn:active {
  transform: scale(0.985);
}

.btn-link,
.hero-action,
.modern-nav a,
.nav a,
.quick-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 16px;
  font-weight: 700;
  font-size: 14px;
}

.btn-link,
.hero-action,
.quick-action-btn,
.modern-nav a,
.nav a {
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(246,249,255,0.76));
  border: 1px solid rgba(255,255,255,0.78);
  color: #356fda;
  box-shadow:
    0 6px 14px rgba(31, 41, 55, 0.04),
    inset 0 1px 0 rgba(255,255,255,0.82);
}

.btn-link:hover,
.modern-nav a:hover,
.hero-action:hover,
.nav a:hover,
.quick-action-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

.danger-link {
  background: linear-gradient(180deg, #fff1f2 0%, #ffe4e6 100%);
  color: #b91c1c;
}

.modern-nav,
.nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(255,255,255,0.62);
  border-radius: 18px;
  box-shadow:
    0 8px 20px rgba(31, 41, 55, 0.04),
    inset 0 1px 0 rgba(255,255,255,0.70);
}

.modern-nav a.active,
.nav a.active {
  background: linear-gradient(135deg, #74b2ff, #a98cff, #73dcff);
  color: #ffffff;
  border-color: transparent;
  box-shadow:
    0 14px 28px rgba(79, 149, 255, 0.22),
    inset 0 1px 0 rgba(255,255,255,0.25);
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.quick-action-btn {
  min-width: 170px;
}

.stats-grid,
.grid3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.stat-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 22px;
  color: var(--white);
  min-height: 148px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow:
    0 18px 36px rgba(31, 41, 55, 0.10),
    inset 0 1px 0 rgba(255,255,255,0.16);
  animation: softFloatCard 6s ease-in-out infinite;
}

.stat-card::after {
  content: "";
  position: absolute;
  right: -25px;
  top: -25px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

.gradient-blue {
  background: linear-gradient(135deg, #6cabff, #4f95ff);
}

.gradient-violet {
  background: linear-gradient(135deg, #c2a8ff, #a98cff);
}

.gradient-pink {
  background: linear-gradient(135deg, #ffb0d3, #ff96c6);
}

.stat-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  font-size: 24px;
  background: rgba(255, 255, 255, 0.18);
}

.stat-card span {
  display: block;
  opacity: 0.95;
  font-weight: 600;
}

.stat-card h3 {
  font-size: 40px;
  line-height: 1;
  margin-top: 14px;
  letter-spacing: -0.04em;
}

@keyframes softFloatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1px); }
}

.highlight-card,
.info-card {
  display: none;
}

.mini-stats {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.mini-stat {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(37, 99, 235, 0.08);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mini-stat strong {
  font-size: 20px;
}

.mini-stat-label {
  color: var(--muted);
  font-weight: 700;
}

.hero-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  color: var(--white);
  background: linear-gradient(135deg, #5aa0ff, #a98cff, #73dcff);
  border: 1px solid rgba(255,255,255,0.28);
  box-shadow:
    0 24px 42px rgba(79, 149, 255, 0.20),
    inset 0 1px 0 rgba(255,255,255,0.20);
  animation: softFloatCard 6s ease-in-out infinite;
}

.hero-card h2,
.hero-card p {
  color: #fff;
}

.hero-card p {
  margin: 8px 0 0;
  opacity: 0.95;
}

.hero-action {
  min-width: 220px;
  color: #1d4ed8;
  font-weight: 800;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 22px 0 14px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.58);
  border: 1px solid rgba(255,255,255,0.65);
  box-shadow:
    0 4px 10px rgba(31, 41, 55, 0.03),
    inset 0 1px 0 rgba(255,255,255,0.72);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot.free {
  background: #6fd39a;
}

.dot.busy {
  background: #ff8c8c;
}

.dot.selected {
  background: #74b2ff;
}

.slots-dropdown {
  overflow: hidden;
  margin: 18px 0;
  background: rgba(255,255,255,0.66);
}

.slots-dropdown summary {
  cursor: pointer;
  padding: 16px;
  font-weight: 800;
  color: #1f2937;
  background: linear-gradient(135deg, rgba(124,184,255,0.10), rgba(183,156,255,0.10), rgba(143,220,255,0.10));
  border-bottom: 1px solid rgba(37, 99, 235, 0.08);
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 12px;
  padding: 16px;
}

.slot-btn {
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 14px;
  min-height: 56px;
  padding: 14px 10px;
  font-size: 15px;
  font-weight: 800;
  color: var(--white);
  cursor: pointer;
  box-shadow:
    0 8px 18px rgba(31, 41, 55, 0.08),
    inset 0 1px 0 rgba(255,255,255,0.20);
}

.slot-btn.free {
  background: linear-gradient(135deg, #7fe0a8, #63cf93, #6fe7d3);
}

.slot-btn.busy {
  background: linear-gradient(135deg, #ffb1b1, #ff8c8c, #ffabc3);
  cursor: not-allowed;
  opacity: 0.92;
}

.slot-btn.selected {
  background: linear-gradient(135deg, #74b2ff, #a98cff, #73dcff) !important;
  box-shadow:
    0 14px 28px rgba(79, 149, 255, 0.20),
    inset 0 1px 0 rgba(255,255,255,0.25);
}

.selected-box {
  border-radius: 18px;
  padding: 14px 16px;
  margin-bottom: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.86), rgba(248,251,255,0.76));
}

.alert {
  padding: 14px 16px;
  border-radius: 16px;
  margin-bottom: 16px;
  font-weight: 800;
  border: 1px solid rgba(255,255,255,0.55);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.05);
}

.alert.error {
  background: rgba(254, 226, 226, 0.95);
  color: #991b1b;
}

.alert.success {
  background: rgba(220, 252, 231, 0.95);
  color: #166534;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  border-radius: 18px;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: 18px;
  box-shadow:
    0 10px 24px rgba(31, 41, 55, 0.04),
    inset 0 1px 0 rgba(255,255,255,0.6);
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: middle;
}

th {
  white-space: nowrap;
  background: linear-gradient(180deg, rgba(251,253,255,0.96), rgba(239,245,255,0.88));
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid rgba(148, 163, 184, 0.10);
}

td {
  white-space: normal;
  word-break: break-word;
  background: rgba(255,255,255,0.80);
}

tr:nth-child(even) td {
  background: rgba(248,251,255,0.82);
}

tr:hover td {
  background: rgba(240,247,255,0.92);
}

.admin-layout .card,
.table-wrap,
table {
  max-width: 100%;
}

td form {
  margin: 0;
}

td .delete-btn,
td .warning-btn,
td .success-btn {
  min-width: 110px;
}

.badge,
.hours-chip,
.role-pill,
.status-pill,
.mini-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow:
    0 4px 10px rgba(31, 41, 55, 0.04),
    inset 0 1px 0 rgba(255,255,255,0.68);
}

.badge {
  background: rgba(239, 244, 255, 0.88);
  color: #52607a;
}

.badge-blue,
.role-user {
  background: rgba(79, 149, 255, 0.18);
  color: #236fe0;
}

.badge-violet,
.role-admin {
  background: rgba(169, 140, 255, 0.18);
  color: #6a4fe0;
}

.hours-chip {
  background: rgba(79, 149, 255, 0.18);
  color: #236fe0;
}

.status-on {
  background: rgba(111, 211, 154, 0.22);
  color: #218a53;
}

.status-off {
  background: rgba(255, 140, 140, 0.20);
  color: #d25555;
}

.mini-badge {
  background: rgba(15, 23, 42, 0.06);
  color: #475569;
}

.room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.room-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.84), rgba(248,251,255,0.78));
  border-radius: 22px;
  padding: 18px;
}

.room-card h3 {
  margin: 0 0 8px;
}

.room-card p {
  margin: 0;
}

.room-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.room-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.room-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

/* TABLE COMPACT */
.compact-table {
  width: 100%;
  min-width: 0;
}

.compact-table th,
.compact-table td {
  padding: 10px 8px;
}

.users-table th:nth-child(1),
.users-table td:nth-child(1) {
  width: 38%;
}

.users-table th:nth-child(2),
.users-table td:nth-child(2),
.users-table th:nth-child(3),
.users-table td:nth-child(3),
.users-table th:nth-child(4),
.users-table td:nth-child(4) {
  width: 20%;
}

.bookings-table th,
.bookings-table td,
.reports-table th,
.reports-table td {
  white-space: nowrap;
}

.bookings-table th:nth-child(1),
.bookings-table td:nth-child(1) {
  width: 20%;
}

.bookings-table th:nth-child(2),
.bookings-table td:nth-child(2) {
  width: 18%;
}

.bookings-table th:nth-child(3),
.bookings-table td:nth-child(3) {
  width: 16%;
}

.bookings-table th:nth-child(4),
.bookings-table td:nth-child(4),
.bookings-table th:nth-child(5),
.bookings-table td:nth-child(5) {
  width: 10%;
}

.bookings-table th:nth-child(6),
.bookings-table td:nth-child(6) {
  width: 10%;
}

.bookings-table th:nth-child(7),
.bookings-table td:nth-child(7) {
  width: 8%;
  text-align: center;
}

.reports-table th:nth-child(1),
.reports-table td:nth-child(1) {
  width: 45%;
}

.reports-table th:nth-child(2),
.reports-table td:nth-child(2),
.reports-table th:nth-child(3),
.reports-table td:nth-child(3) {
  width: 20%;
}

.compact-action-btn {
  min-width: 58px !important;
  padding: 10px 12px !important;
}

.icon-action-btn {
  min-width: 42px !important;
  width: 42px;
  height: 42px;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 16px;
  line-height: 1;
}

/* REPORT FILTERS */
.report-filters-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.report-filters-grid > div,
.report-filter-action {
  min-width: 0;
}

.report-filters-grid label {
  display: block;
  margin-bottom: 8px;
}

.report-filters-grid input,
.report-filters-grid select,
.report-filter-action .primary-btn {
  width: 100%;
  min-width: 0;
}

.report-filter-action {
  display: flex;
  align-items: end;
}

/* LOGIN */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
  position: relative;
  background:
    radial-gradient(circle at top left, rgba(79, 149, 255, 0.30), transparent 22%),
    radial-gradient(circle at bottom right, rgba(255, 159, 205, 0.22), transparent 20%),
    linear-gradient(135deg, #b8dcff 0%, #d7cfff 52%, #c9f3ff 100%);
}

.login-page::before,
.login-page::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(70px);
  opacity: 0.45;
  pointer-events: none;
}

.login-page::before {
  width: 280px;
  height: 280px;
  top: 40px;
  left: 40px;
  background: rgba(255, 255, 255, 0.10);
}

.login-page::after {
  width: 260px;
  height: 260px;
  right: 30px;
  bottom: 30px;
  background: rgba(255, 255, 255, 0.08);
}

.login-card {
  border-radius: 28px;
  padding: 32px 28px;
  width: 100%;
  max-width: 420px;
  background: rgba(255,255,255,0.82);
  box-shadow:
    0 24px 50px rgba(31, 41, 55, 0.10),
    inset 0 1px 0 rgba(255,255,255,0.68);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.login-card-top {
  margin-bottom: 18px;
}

.login-mini-badge {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.10);
  color: #356fda;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.login-card-top h2 {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.login-card-top p {
  margin: 0;
  line-height: 1.55;
}

.login-form-modern {
  display: grid;
  gap: 16px;
  margin-top: 8px;
}

.login-input-group {
  display: grid;
  gap: 8px;
}

.login-input-group label {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
}

.login-input-group input {
  height: 54px;
  border-radius: 16px;
  padding: 0 15px;
}

.login-submit-btn {
  margin-top: 8px;
  min-height: 54px;
  font-size: 15px;
}

.login-card-footer {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

/* USER MY BOOKINGS MOBILE CARDS */
.bookings-mobile-list {
  display: none;
}

.booking-mobile-card {
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.82), rgba(248,251,255,0.76));
}

.booking-mobile-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.booking-mobile-top h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
}

.booking-mobile-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.booking-mobile-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
}

.booking-mobile-label {
  opacity: 0.72;
  font-size: 0.85rem;
}

.booking-mobile-actions {
  margin-top: 16px;
}

.mobile-delete-btn {
  width: 100%;
  min-height: 46px;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 12px 14px;
}

.mobile-blocked-text {
  display: inline-flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  border-radius: 12px;
  background: rgba(255,255,255,0.56);
  font-weight: 600;
}

/* Boost colori prenotazioni utente */
.booking-mobile-card .status-on,
.booking-mobile-card .dot.free,
.booking-mobile-card .badge-blue,
.booking-mobile-card .hours-chip {
  background: linear-gradient(135deg, #22c55e, #16a34a) !important;
  color: #ffffff !important;
  box-shadow:
    0 8px 16px rgba(34, 197, 94, 0.35),
    inset 0 1px 0 rgba(255,255,255,0.25) !important;
}

.booking-mobile-card .status-off,
.booking-mobile-card .dot.busy {
  background: linear-gradient(135deg, #ff4d4d, #dc2626) !important;
  color: #ffffff !important;
  box-shadow:
    0 8px 16px rgba(239, 68, 68, 0.35),
    inset 0 1px 0 rgba(255,255,255,0.25) !important;
}

.delete-btn svg,
.mobile-delete-btn svg {
  stroke: white !important;
  fill: white !important;
}

@media (max-width: 980px) {
  .admin-layout,
  .form-grid,
  .stats-grid,
  .grid3,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .report-filters-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .login-card {
    max-width: 460px;
  }
}

@media (min-width: 769px) {
  .bookings-desktop {
    display: block;
  }

  .bookings-mobile-list {
    display: none;
  }
}

@media (max-width: 768px) {
  html,
  body {
    height: 100dvh;
  }

  body:has(.login-page) {
    height: 100dvh;
    overflow: hidden;
  }

  body::before {
    width: 180px;
    height: 180px;
    left: -50px;
    top: 110px;
  }

  body::after {
    width: 200px;
    height: 200px;
    right: -60px;
    bottom: 120px;
  }

  .page {
    padding: 14px 10px 24px;
  }

  .container,
  .container.modern,
  .container.small {
    width: 100%;
    max-width: 100%;
  }

  .container.modern {
    padding: 0;
  }

  .topbar,
  .hero-card,
  .room-card-top,
  .room-card-footer,
  .section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar {
    padding: 18px 16px;
    border-radius: 20px;
    gap: 12px;
    margin-bottom: 16px;
  }

  .topbar h1 {
    font-size: 26px;
    line-height: 1.08;
    word-break: break-word;
  }

  .subtitle {
    font-size: 14px;
    line-height: 1.4;
  }

  .topbar-actions,
  .quick-actions,
  .modern-nav,
  .nav {
    width: 100%;
    gap: 8px;
  }

  .modern-nav a,
  .nav a,
  .btn-link,
  .hero-action,
  .quick-action-btn,
  .user-chip {
    width: 100%;
    justify-content: center;
  }

  .card,
  .glass {
    padding: 15px 14px;
    border-radius: 18px;
    margin-bottom: 16px;
  }

  .form-grid,
  .admin-layout,
  .stats-grid,
  .grid3,
  .dashboard-grid,
  .room-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  label {
    font-size: 15px;
    margin-bottom: 8px;
  }

  input,
  select,
  textarea,
  button,
  .primary-btn,
  .success-btn,
  .warning-btn,
  .delete-btn {
    min-height: 50px;
    font-size: 15px;
    padding: 12px 14px;
    border-radius: 14px;
  }

  input[type="date"] {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 48px;
    margin: 0;
    text-align: center;
    text-align-last: center;
    font-size: 13px;
    line-height: 1.2;
    padding: 10px 34px 10px 10px;
    box-sizing: border-box;
    overflow: hidden;
    appearance: none;
    -webkit-appearance: none;
  }

  input[type="date"]::-webkit-date-and-time-value {
    text-align: center;
  }

  input[type="date"]::-webkit-calendar-picker-indicator {
    margin: 0;
    padding: 0;
    position: absolute;
    right: 10px;
  }

  .table-wrap {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
  }

  table,
  .compact-table,
  .users-table,
  .bookings-table,
  .reports-table,
  .admin-latest-table {
    width: 100%;
    min-width: 0 !important;
    table-layout: fixed;
  }

  .user-latest-table th,
  .user-latest-table td {
    padding: 5px 3px;
    font-size: 9px;
    white-space: nowrap;
  }

  .user-latest-table th:nth-child(1),
  .user-latest-table td:nth-child(1) { width: 28%; }

  .user-latest-table th:nth-child(2),
  .user-latest-table td:nth-child(2) { width: 24%; }

  .user-latest-table th:nth-child(3),
  .user-latest-table td:nth-child(3) { width: 18%; }

  .user-latest-table th:nth-child(4),
  .user-latest-table td:nth-child(4) { width: 15%; }

  .user-latest-table th:nth-child(5),
  .user-latest-table td:nth-child(5) { width: 15%; }

  .user-latest-table .hours-chip {
    padding: 2px 4px;
    font-size: 7px;
  }

  .admin-latest-table th,
  .admin-latest-table td {
    padding: 5px 3px;
    font-size: 9px;
    white-space: nowrap;
  }

  .admin-latest-table th:nth-child(1),
  .admin-latest-table td:nth-child(1) { width: 20%; }

  .admin-latest-table th:nth-child(2),
  .admin-latest-table td:nth-child(2) { width: 18%; }

  .admin-latest-table th:nth-child(3),
  .admin-latest-table td:nth-child(3) { width: 18%; }

  .admin-latest-table th:nth-child(4),
  .admin-latest-table td:nth-child(4),
  .admin-latest-table th:nth-child(5),
  .admin-latest-table td:nth-child(5) { width: 11%; }

  .admin-latest-table th:nth-child(6),
  .admin-latest-table td:nth-child(6) { width: 10%; }

  .admin-latest-table .hours-chip {
    padding: 3px 5px;
    font-size: 8px;
  }

  .users-table th,
  .users-table td {
    padding: 6px 4px;
    font-size: 10px;
  }

  .users-table th:nth-child(1),
  .users-table td:nth-child(1) { width: 34%; }

  .users-table th:nth-child(2),
  .users-table td:nth-child(2) { width: 18%; }

  .users-table th:nth-child(3),
  .users-table td:nth-child(3) { width: 24%; }

  .users-table th:nth-child(4),
  .users-table td:nth-child(4) {
    width: 14%;
    text-align: center;
  }

  .users-table .role-pill,
  .users-table .status-pill {
    padding: 3px 5px;
    font-size: 8px;
  }

  .users-table .compact-action-btn {
    min-width: 34px !important;
    height: 30px;
    padding: 0 !important;
    font-size: 9px;
  }

  .bookings-table th,
  .bookings-table td {
    padding: 6px 4px;
    font-size: 10px;
  }

  .bookings-table th:nth-child(1),
  .bookings-table td:nth-child(1) { width: 17%; }

  .bookings-table th:nth-child(2),
  .bookings-table td:nth-child(2) { width: 17%; }

  .bookings-table th:nth-child(3),
  .bookings-table td:nth-child(3) { width: 18%; }

  .bookings-table th:nth-child(4),
  .bookings-table td:nth-child(4),
  .bookings-table th:nth-child(5),
  .bookings-table td:nth-child(5) { width: 10%; }

  .bookings-table th:nth-child(6),
  .bookings-table td:nth-child(6) { width: 10%; }

  .bookings-table th:nth-child(7),
  .bookings-table td:nth-child(7) {
    width: 8%;
    text-align: center;
  }

  .bookings-table .hours-chip {
    padding: 3px 5px;
    font-size: 8px;
  }

  .bookings-table .icon-action-btn {
    min-width: 28px !important;
    width: 28px;
    height: 28px;
    font-size: 11px;
  }

  .reports-table th,
  .reports-table td {
    padding: 6px 4px;
    font-size: 10px;
  }

  .reports-table th:nth-child(1),
  .reports-table td:nth-child(1) { width: 42%; }

  .reports-table th:nth-child(2),
  .reports-table td:nth-child(2),
  .reports-table th:nth-child(3),
  .reports-table td:nth-child(3) { width: 18%; }

  .reports-table .hours-chip {
    padding: 3px 5px;
    font-size: 8px;
  }

  .report-filters-grid {
    grid-template-columns: 1fr !important;
    gap: 8px;
    width: 100%;
  }

  .report-filters-grid > div,
  .report-filter-action {
    width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .report-filters-grid label {
    margin-bottom: 4px;
    font-size: 12px;
  }

  .report-filters-grid input,
  .report-filters-grid select,
  .report-filter-action .primary-btn {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 42px;
    font-size: 13px;
    padding-left: 10px;
    padding-right: 10px;
    box-sizing: border-box;
  }

  .report-filters-grid input[type="month"],
  .report-filters-grid input[type="date"] {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    text-align: center;
    text-align-last: center;
    appearance: none;
    -webkit-appearance: none;
    padding-left: 8px;
    padding-right: 30px;
    font-size: 12px;
    box-sizing: border-box;
  }

  .report-filters-grid input[type="month"]::-webkit-date-and-time-value,
  .report-filters-grid input[type="date"]::-webkit-date-and-time-value {
    text-align: center;
  }

  .report-filters-grid input[type="month"]::-webkit-calendar-picker-indicator,
  .report-filters-grid input[type="date"]::-webkit-calendar-picker-indicator {
    margin: 0;
    padding: 0;
  }

  .legend {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    gap: 8px;
    margin: 8px 0 12px;
    font-size: 12px;
  }

  .legend-item {
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    padding: 5px 8px;
  }

  .slots-dropdown {
    border-radius: 16px;
    margin: 10px 0 14px;
  }

  .slots-dropdown summary {
    padding: 16px 14px;
    font-size: 16px;
    font-weight: 800;
  }

  .slots-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 12px;
  }

  .slot-btn {
    min-height: 62px;
    padding: 14px 8px;
    font-size: 16px;
    border-radius: 14px;
  }

  .selected-box {
    padding: 16px 14px;
    border-radius: 16px;
    font-size: 15px;
    line-height: 1.5;
  }

  .primary-btn {
    width: 100%;
    margin-top: 12px;
    min-height: 52px;
    font-size: 15px;
  }

  .stat-card {
    min-height: auto;
    padding: 18px;
    border-radius: 20px;
  }

  .stat-card h3 {
    font-size: 30px;
    margin-top: 10px;
  }

  .stat-icon {
    width: 48px;
    height: 48px;
    font-size: 22px;
  }

  .hero-card {
    padding: 16px;
  }

  .hero-action {
    min-width: 0;
  }

  .room-card {
    padding: 14px;
    border-radius: 18px;
  }

  .room-meta {
    gap: 6px;
  }

  .login-page {
    min-height: 100dvh;
    height: 100dvh;
    padding: 10px;
    overflow: hidden;
    align-items: center;
    justify-content: center;
  }

  .login-card {
    width: 100%;
    max-width: 400px;
    max-height: calc(100dvh - 20px);
    overflow: hidden;
    padding: 18px 14px;
    border-radius: 22px;
    justify-content: center;
  }

  .login-card-top {
    margin-bottom: 12px;
  }

  .login-card-top h2 {
    font-size: 22px;
    margin-bottom: 6px;
  }

  .login-card-top p {
    font-size: 13px;
    line-height: 1.4;
  }

  .login-input-group {
    gap: 6px;
  }

  .login-input-group label {
    font-size: 13px;
  }

  .login-input-group input {
    height: 46px;
    font-size: 15px;
  }

  .login-submit-btn {
    min-height: 46px;
    margin-top: 4px;
    border-radius: 16px;
  }

  .login-card-footer {
    margin-top: 12px;
    padding-top: 12px;
    font-size: 12px;
  }

  .bookings-desktop {
    display: none;
  }

  .bookings-mobile-list {
    display: block;
  }

  .booking-mobile-card {
    padding: 13px 12px;
    border-radius: 14px;
    margin-bottom: 10px;
  }

  .booking-mobile-top {
    margin-bottom: 10px;
    gap: 10px;
  }

  .booking-mobile-top h3 {
    font-size: 0.96rem;
  }

  .booking-mobile-info {
    gap: 8px;
  }

  .booking-mobile-row {
    font-size: 0.88rem;
  }

  .booking-mobile-label {
    font-size: 0.80rem;
  }

  .mobile-delete-btn,
  .mobile-blocked-text {
    min-height: 42px;
    font-size: 14px;
    border-radius: 12px;
  }

  .booking-mobile-actions {
    margin-top: 12px;
  }
}

@media (max-width: 480px) {
  .page {
    padding: 8px 6px 18px;
  }

  .topbar {
    padding: 12px;
  }

  .topbar h1 {
    font-size: 24px;
  }

  .card,
  .glass {
    padding: 12px;
  }

  .subtitle,
  .muted-text,
  .blocked-text,
  .muted-small {
    font-size: 13px;
  }

  label {
    font-size: 14px;
  }

  input,
  select,
  textarea,
  button,
  .primary-btn {
    font-size: 15px;
  }

  input[type="date"] {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    font-size: 12px;
    text-align: center;
    text-align-last: center;
    line-height: 1.1;
    padding: 8px 30px 8px 8px;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
  }

  input[type="date"]::-webkit-date-and-time-value {
    text-align: center;
  }

  input[type="date"]::-webkit-calendar-picker-indicator {
    right: 8px;
  }

  .report-filters-grid input,
  .report-filters-grid select,
  .report-filter-action .primary-btn {
    font-size: 12px;
    height: 40px;
  }

  .report-filters-grid input[type="month"],
  .report-filters-grid input[type="date"] {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    font-size: 11px;
    padding-left: 6px;
    padding-right: 26px;
    text-align: center;
    text-align-last: center;
    box-sizing: border-box;
  }

  .report-filters-grid > div,
  .report-filter-action {
    min-width: 0;
    overflow: hidden;
  }

  table,
  .compact-table,
  .users-table,
  .bookings-table,
  .reports-table,
  .admin-latest-table {
    min-width: 0 !important;
    width: 100%;
    table-layout: fixed;
  }

  .admin-latest-table th,
  .admin-latest-table td,
  .users-table th,
  .users-table td,
  .bookings-table th,
  .bookings-table td,
  .reports-table th,
  .reports-table td {
    padding: 5px 3px;
    font-size: 9px;
  }

  .admin-latest-table .hours-chip,
  .users-table .role-pill,
  .users-table .status-pill,
  .bookings-table .hours-chip,
  .reports-table .hours-chip {
    padding: 2px 4px;
    font-size: 7px;
  }

  .users-table .compact-action-btn {
    min-width: 28px !important;
    height: 26px;
    font-size: 8px;
  }

  .bookings-table .icon-action-btn {
    min-width: 24px !important;
    width: 24px;
    height: 24px;
    font-size: 10px;
  }

  .badge,
  .hours-chip,
  .role-pill,
  .status-pill,
  .mini-badge {
    font-size: 9px;
    padding: 4px 6px;
  }

  .slots-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 10px;
  }

  .slot-btn {
    min-height: 58px;
    padding: 12px 8px;
    font-size: 15px;
    border-radius: 14px;
  }

  .selected-box {
    font-size: 14px;
  }

  .stat-card {
    padding: 14px;
  }

  .stat-card h3 {
    font-size: 26px;
  }

  .login-page::before,
  .login-page::after {
    display: none;
  }

  .login-card {
    padding: 16px 14px;
  }

  .login-card-top h2 {
    font-size: 22px;
  }

  .booking-mobile-card {
    padding: 12px 10px;
    border-radius: 13px;
    margin-bottom: 8px;
  }

  .booking-mobile-top h3 {
    font-size: 0.92rem;
  }

  .booking-mobile-row {
    font-size: 0.84rem;
  }

  .booking-mobile-label {
    font-size: 0.76rem;
  }

  .mobile-delete-btn,
  .mobile-blocked-text {
    min-height: 40px;
    font-size: 13px;
  }
}


/* =========================
   CLEAN APPENDIX
   blocchi utili mantenuti senza duplicazioni pesanti
========================= */

.room-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
}

.room-actions form {
  flex: 1 1 140px;
  margin: 0;
}

.room-actions button {
  width: 100%;
}

@media (max-width: 768px) {
  .room-actions {
    flex-direction: column;
  }
}

.admin-sidebar-stack {
  display: grid;
  gap: 18px;
  align-items: start;
}

.password-card {
  align-self: start;
}

.inline-note {
  margin: 14px 0 0;
}

@media (max-width: 980px) {
  .admin-sidebar-stack {
    gap: 12px;
  }
}

.password-dropdown {
  width: 100%;
}

.password-dropdown summary {
  list-style: none;
  cursor: pointer;
}

.password-dropdown summary::-webkit-details-marker {
  display: none;
}

.password-dropdown-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.password-dropdown-head h2 {
  margin: 0 0 6px;
}

.password-dropdown-head .muted-text {
  margin: 0;
  font-size: 14px;
}

.password-dropdown-side {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.password-dropdown-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(255,255,255,0.8);
  font-size: 18px;
  font-weight: 800;
  color: #356fda;
  transition: transform 0.2s ease, background 0.2s ease;
}

.password-dropdown[open] .password-dropdown-icon {
  transform: rotate(180deg);
}

.password-dropdown-body {
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.password-dropdown-card {
  padding-bottom: 20px;
}

@media (max-width: 768px) {
  .password-dropdown-head {
    flex-direction: column;
    align-items: stretch;
  }

  .password-dropdown-side {
    justify-content: space-between;
    width: 100%;
  }
}

.admin-bookings-layout {
  display: grid;
  gap: 18px;
}

.admin-note-field {
  margin: 18px 0 14px;
}

.admin-note-col {
  min-width: 170px;
}

.admin-note-toggle {
  position: relative;
  display: block;
  width: 100%;
}

.admin-note-toggle summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 800;
  font-size: 13px;
  color: #356fda;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(244,248,255,0.94));
  border: 1px solid rgba(53, 111, 218, 0.14);
  box-shadow:
    0 8px 18px rgba(53, 111, 218, 0.08),
    inset 0 1px 0 rgba(255,255,255,0.9);
}

.admin-note-toggle summary::-webkit-details-marker {
  display: none;
}

.admin-note-toggle summary::after {
  content: "⌄";
  font-size: 14px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.admin-note-toggle[open] summary::after {
  transform: rotate(180deg);
}

.admin-note-box {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.99), rgba(247,250,255,0.96));
  border: 1px solid rgba(53, 111, 218, 0.12);
  box-shadow:
    0 14px 30px rgba(15, 23, 42, 0.10),
    inset 0 1px 0 rgba(255,255,255,0.85);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.55;
  text-align: left;
}

.bookings-table .booking-user-cell {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.2;
  vertical-align: middle;
}

.bookings-table .booking-user-cell strong {
  display: block;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.bookings-table .booking-room-cell {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.bookings-table th:nth-child(3),
.bookings-table td:nth-child(3),
.bookings-table th:nth-child(4),
.bookings-table td:nth-child(4),
.bookings-table th:nth-child(5),
.bookings-table td:nth-child(5),
.bookings-table th:nth-child(6),
.bookings-table td:nth-child(6) {
  white-space: nowrap;
}

.bookings-table th:nth-child(1),
.bookings-table td:nth-child(1) {
  width: 18%;
}

.bookings-table th:nth-child(2),
.bookings-table td:nth-child(2) {
  width: 16%;
}

.bookings-table th:nth-child(3),
.bookings-table td:nth-child(3) {
  width: 18%;
}

.bookings-table th:nth-child(4),
.bookings-table td:nth-child(4),
.bookings-table th:nth-child(5),
.bookings-table td:nth-child(5) {
  width: 10%;
}

.bookings-table th:nth-child(6),
.bookings-table td:nth-child(6) {
  width: 10%;
}

.bookings-table th:nth-child(7),
.bookings-table td:nth-child(7) {
  width: 8%;
  text-align: center;
}

.bookings-table th:nth-child(8),
.bookings-table td:nth-child(8) {
  width: 8%;
  text-align: center;
}

@media (max-width: 768px) {
  .admin-note-col {
    min-width: 140px;
  }

  .admin-note-toggle[open]::before {
    content: none;
    display: none;
  }

  .admin-note-toggle[open] .admin-note-box {
    position: fixed;
    left: 12px;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    width: auto;
    max-height: min(62dvh, 460px);
    margin-top: 0;
    padding: 18px 16px 20px;
    border-radius: 18px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 14px;
    line-height: 1.65;
    box-shadow:
      0 24px 60px rgba(15, 23, 42, 0.24),
      inset 0 1px 0 rgba(255,255,255,0.9);
  }

  .admin-note-toggle[open] summary {
    position: fixed;
    top: calc(50% - min(31dvh, 230px) - 52px);
    left: 12px;
    right: 12px;
    z-index: 1001;
    min-height: 42px;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff, #f3f8ff);
    box-shadow:
      0 12px 24px rgba(15, 23, 42, 0.18),
      inset 0 1px 0 rgba(255,255,255,0.95);
  }

  .admin-note-toggle[open] .admin-note-box::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.32);
    z-index: -1;
  }

  .bookings-table td {
    vertical-align: middle;
  }

  .bookings-table td .admin-note-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
  }

  .bookings-table td .admin-note-toggle summary {
    display: grid;
    place-items: center;
    width: 28px;
    min-width: 28px;
    max-width: 28px;
    height: 28px;
    min-height: 28px;
    padding: 0;
    margin: 0 auto;
    border-radius: 999px;
    text-align: center;
    font-size: 13px;
    line-height: 0;
    box-sizing: border-box;
    transform: translateY(-0.5px);
  }

  .bookings-table td .admin-note-toggle[open] summary {
    top: 14px;
    right: 14px;
    left: auto;
    width: 34px;
    min-width: 34px;
    max-width: 34px;
    height: 34px;
    min-height: 34px;
    margin: 0;
    font-size: 16px;
    z-index: 1002;
  }

  .bookings-table .booking-user-cell,
  .bookings-table .booking-user-cell strong,
  .bookings-table .booking-room-cell {
    font-size: 9px;
  }

  .bookings-table .booking-user-cell {
    line-height: 1.1;
  }
}

/* ===== Colori un po' più accesi ===== */
:root {
  --primary: #3f8cff;
  --primary-2: #7f66ff;
  --primary-3: #49d7ff;
  --violet: #8e6cff;
  --pink: #ff7fbe;
  --green: #18c964;
  --green-2: #0fa24f;
  --red: #ff3838;
  --red-2: #d91f1f;
  --orange: #ffb84d;
}

/* sfondo leggermente più vivo */
body {
  background:
    radial-gradient(circle at 12% 18%, rgba(63, 140, 255, 0.34), transparent 22%),
    radial-gradient(circle at 88% 14%, rgba(142, 108, 255, 0.28), transparent 20%),
    radial-gradient(circle at 82% 84%, rgba(255, 127, 190, 0.24), transparent 22%),
    radial-gradient(circle at 18% 88%, rgba(73, 215, 255, 0.24), transparent 20%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2), var(--bg-3), var(--bg-4));
}

/* pulsanti principali */
button,
.primary-btn,
.login-submit-btn {
  background: linear-gradient(135deg, #3f8cff, #7f66ff, #49d7ff);
}

.success-btn {
  background: linear-gradient(135deg, #20d46b, #12b75a, #3ee0c0);
}

.warning-btn {
  background: linear-gradient(135deg, #ffd166, #ffb84d, #ff9f68);
  color: #7a4300;
}

.delete-btn,
.mobile-delete-btn {
  background: linear-gradient(135deg, #ff3838, #d91f1f);
  box-shadow:
    0 10px 22px rgba(255, 56, 56, 0.38),
    inset 0 1px 0 rgba(255,255,255,0.25);
}

/* slot prenotazioni */
.slot-btn.free {
  background: linear-gradient(135deg, #20d46b, #12b75a, #3ee0c0);
}

.slot-btn.busy {
  background: linear-gradient(135deg, #ff7d7d, #ff5252, #ff8fb1);
}

.slot-btn.selected {
  background: linear-gradient(135deg, #3f8cff, #8e6cff, #49d7ff) !important;
  box-shadow:
    0 14px 28px rgba(63, 140, 255, 0.24),
    inset 0 1px 0 rgba(255,255,255,0.25);
}

/* badge e stati */
.badge-blue,
.role-user,
.hours-chip {
  background: rgba(63, 140, 255, 0.20);
  color: #125fd4;
}

.badge-violet,
.role-admin {
  background: rgba(142, 108, 255, 0.20);
  color: #5b35dc;
}

.status-on {
  background: rgba(24, 201, 100, 0.20);
  color: #0d8e45;
}

.status-off {
  background: rgba(255, 56, 56, 0.18);
  color: #c61f1f;
}

/* versione più accesa sulle card prenotazioni mobile */
.booking-mobile-card .status-on,
.booking-mobile-card .dot.free,
.booking-mobile-card .badge-blue,
.booking-mobile-card .hours-chip {
  background: linear-gradient(135deg, #18c964, #0fa24f) !important;
  color: #ffffff !important;
  box-shadow:
    0 8px 16px rgba(24, 201, 100, 0.36),
    inset 0 1px 0 rgba(255,255,255,0.25) !important;
}

.booking-mobile-card .status-off,
.booking-mobile-card .dot.busy {
  background: linear-gradient(135deg, #ff3838, #d91f1f) !important;
  color: #ffffff !important;
  box-shadow:
    0 8px 16px rgba(255, 56, 56, 0.34),
    inset 0 1px 0 rgba(255,255,255,0.25) !important;
}


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

.report-pdf-btn {
  background: linear-gradient(135deg, #ff3b3b, #dc2626);
  color: #ffffff;
  font-weight: 800;
}

@media (max-width: 700px) {
  .report-head-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .report-pdf-btn {
    width: 100%;
  }
}


/* =========================================================
   APP-LIKE UI UPGRADE
   Da aggiungere in fondo a style.css
========================================================= */

/* Effetto più da app sulle card */
.card,
.topbar,
.room-card,
.booking-mobile-card,
.login-card {
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow:
    0 18px 45px rgba(15, 23, 42, 0.08),
    0 2px 8px rgba(15, 23, 42, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

/* Card più viva al passaggio */
.card:hover,
.room-card:hover,
.booking-mobile-card:hover {
  transform: translateY(-3px) scale(1.002);
}

/* Topbar più premium */
.topbar {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.92), rgba(245,249,255,0.78)),
    radial-gradient(circle at top right, rgba(63, 140, 255, 0.18), transparent 36%);
  border: 1px solid rgba(255,255,255,0.78);
}

/* Titoli più puliti */
.topbar h1,
.card h2,
.section-head h2 {
  letter-spacing: -0.045em;
}

/* Navbar più da app */
.modern-nav,
.nav {
  position: sticky;
  top: 8px;
  z-index: 20;
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  background: rgba(255, 255, 255, 0.68);
}

.modern-nav a,
.nav a {
  min-height: 44px;
  border-radius: 14px;
  font-weight: 800;
}

.modern-nav a.active,
.nav a.active {
  transform: translateY(-1px);
}

/* Pulsanti più app-like */
button,
.primary-btn,
.success-btn,
.warning-btn,
.delete-btn,
.mobile-delete-btn,
.btn-link,
.hero-action,
.quick-action-btn {
  position: relative;
  overflow: hidden;
}

button::after,
.primary-btn::after,
.success-btn::after,
.warning-btn::after,
.delete-btn::after,
.mobile-delete-btn::after,
.btn-link::after,
.hero-action::after,
.quick-action-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255,255,255,0.28),
    transparent
  );
  transform: translateX(-120%);
  transition: transform 0.45s ease;
  pointer-events: none;
}

button:hover::after,
.primary-btn:hover::after,
.success-btn:hover::after,
.warning-btn:hover::after,
.delete-btn:hover::after,
.mobile-delete-btn:hover::after,
.btn-link:hover::after,
.hero-action:hover::after,
.quick-action-btn:hover::after {
  transform: translateX(120%);
}

/* Feedback più reattivo al click/tap */
button:active,
.primary-btn:active,
.success-btn:active,
.warning-btn:active,
.delete-btn:active,
.mobile-delete-btn:active,
.btn-link:active,
.hero-action:active,
.quick-action-btn:active,
.modern-nav a:active,
.nav a:active,
.slot-btn:active {
  transform: scale(0.97);
}

/* Campi input più moderni */
input,
select,
textarea {
  background: rgba(255,255,255,0.94);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(63, 140, 255, 0.72);
  box-shadow:
    0 0 0 4px rgba(63, 140, 255, 0.16),
    0 14px 28px rgba(63, 140, 255, 0.10);
}

/* Report più bello */
.report-filters-grid {
  background: rgba(255,255,255,0.42);
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.58);
}

.report-filter-action .primary-btn {
  min-height: 50px;
}

.report-head-actions {
  padding: 8px;
  border-radius: 18px;
  background: rgba(255,255,255,0.42);
  border: 1px solid rgba(255,255,255,0.58);
}

.report-pdf-btn {
  min-height: 42px;
  background: linear-gradient(135deg, #ff3b3b, #d91f1f, #ff6b6b);
  box-shadow:
    0 12px 24px rgba(220, 38, 38, 0.24),
    inset 0 1px 0 rgba(255,255,255,0.25);
}

/* Tabelle più eleganti */
.table-wrap {
  border-radius: 22px;
  background: rgba(255,255,255,0.42);
  padding: 6px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.70),
    0 10px 28px rgba(15, 23, 42, 0.04);
}

table {
  border-radius: 18px;
}

th {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(236,244,255,0.90));
  color: #475569;
}

td {
  background: rgba(255,255,255,0.86);
}

tr:hover td {
  background: rgba(230, 241, 255, 0.95);
}

/* Ore più visibili */
.hours-chip {
  background: linear-gradient(135deg, #3f8cff, #7f66ff) !important;
  color: #ffffff !important;
  box-shadow:
    0 8px 16px rgba(63, 140, 255, 0.25),
    inset 0 1px 0 rgba(255,255,255,0.22);
}

/* Statistiche più belle */
.stat-card {
  border-radius: 28px;
  min-height: 138px;
}

.stat-card h3 {
  text-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
}

/* Slot più da app */
.slot-btn {
  border-radius: 18px;
  min-height: 60px;
  font-size: 16px;
}

.slot-btn:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.015);
}

/* Mobile: più app e meno sito */
@media (max-width: 768px) {
  body {
    background-attachment: fixed;
  }

  .page {
    padding: 10px 8px 24px;
  }

  .topbar {
    border-radius: 24px;
    padding: 16px;
  }

  .topbar h1 {
    font-size: 25px;
  }

  .card,
  .glass {
    border-radius: 24px;
    padding: 14px;
  }

  .modern-nav,
  .nav {
    position: sticky;
    top: 6px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
    border-radius: 22px;
  }

  .modern-nav a,
  .nav a {
    width: 100%;
    min-height: 42px;
    font-size: 13px;
    padding: 9px 8px;
  }

  .report-filters-grid {
    padding: 12px;
    border-radius: 20px;
  }

  .report-head-actions {
    justify-content: stretch;
    padding: 8px;
  }

  .report-head-actions .badge,
  .report-pdf-btn {
    width: 100%;
    justify-content: center;
  }

  .report-pdf-btn {
    min-height: 46px;
    font-size: 14px;
  }

  .table-wrap {
    padding: 4px;
    border-radius: 20px;
  }

  .reports-table th,
  .reports-table td,
  .admin-latest-table th,
  .admin-latest-table td,
  .bookings-table th,
  .bookings-table td,
  .users-table th,
  .users-table td {
    font-size: 9.5px;
  }

  .slot-btn {
    min-height: 58px;
    font-size: 15px;
  }
}

/* iPhone piccoli */
@media (max-width: 430px) {
  .modern-nav,
  .nav {
    grid-template-columns: 1fr 1fr;
  }

  .topbar h1 {
    font-size: 23px;
  }

  .subtitle {
    font-size: 12.5px;
  }

  .card h2,
  .section-head h2 {
    font-size: 20px;
  }

  .report-filters-grid input,
  .report-filters-grid select,
  .report-filter-action .primary-btn {
    height: 44px;
    font-size: 12.5px;
  }
}

/* =========================================================
   EXTRA APP STYLE - SOLO CSS
   Aggiungi in fondo a style.css
========================================================= */

/* Layout più morbido e da app */
.page {
  padding-top: 22px;
}

.container.modern {
  max-width: 1180px;
}

/* Card più premium */
.card,
.topbar,
.room-card,
.booking-mobile-card,
.login-card {
  border-radius: 30px !important;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.90), rgba(255,255,255,0.68));
  box-shadow:
    0 24px 60px rgba(15, 23, 42, 0.09),
    0 8px 20px rgba(15, 23, 42, 0.045),
    inset 0 1px 0 rgba(255,255,255,0.85);
}

/* Effetto profondità leggero */
.card:hover,
.room-card:hover,
.booking-mobile-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 30px 70px rgba(15, 23, 42, 0.11),
    0 10px 22px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255,255,255,0.9);
}

/* Topbar più da app */
.topbar {
  position: relative;
  overflow: hidden;
  padding: 22px 24px;
}

.topbar::after {
  content: "";
  position: absolute;
  right: -50px;
  top: -70px;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(63,140,255,0.28), transparent 68%);
  pointer-events: none;
}

.topbar h1 {
  font-size: clamp(27px, 3.4vw, 38px);
}

.subtitle {
  font-weight: 600;
  color: #64748b;
}

/* Navbar tipo tab app */
.modern-nav,
.nav {
  border-radius: 24px;
  padding: 7px;
  background: rgba(255,255,255,0.66);
  border: 1px solid rgba(255,255,255,0.75);
  box-shadow:
    0 12px 30px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255,255,255,0.9);
}

.modern-nav a,
.nav a {
  border-radius: 18px;
  min-height: 46px;
  font-size: 14px;
  font-weight: 850;
}

.modern-nav a.active,
.nav a.active {
  background: linear-gradient(135deg, #3f8cff, #7f66ff, #49d7ff);
  box-shadow:
    0 14px 28px rgba(63, 140, 255, 0.28),
    inset 0 1px 0 rgba(255,255,255,0.28);
}

/* Statistiche più impattanti */
.stat-card {
  min-height: 132px;
  border-radius: 30px;
  padding: 20px;
}

.stat-card h3 {
  font-size: 42px;
  margin-bottom: 0;
}

.stat-icon {
  width: 58px;
  height: 58px;
  border-radius: 20px;
  font-size: 27px;
}

/* Pulsanti più premium */
button,
.primary-btn,
.success-btn,
.warning-btn,
.delete-btn,
.mobile-delete-btn,
.btn-link,
.hero-action,
.quick-action-btn {
  border-radius: 18px !important;
  min-height: 44px;
  font-weight: 850;
  letter-spacing: -0.015em;
}

.primary-btn,
.login-submit-btn,
button {
  background: linear-gradient(135deg, #247cff, #7655ff, #30d4ff);
  box-shadow:
    0 14px 28px rgba(63, 140, 255, 0.25),
    inset 0 1px 0 rgba(255,255,255,0.28);
}

.btn-link,
.quick-action-btn,
.hero-action {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(240,247,255,0.86));
  color: #2563eb;
}

.danger-link,
.delete-btn,
.mobile-delete-btn,
.report-pdf-btn {
  background: linear-gradient(135deg, #ff3434, #d91f1f, #ff6b6b) !important;
  color: #ffffff !important;
}

/* Click più reattivo */
button:active,
.primary-btn:active,
.success-btn:active,
.warning-btn:active,
.delete-btn:active,
.mobile-delete-btn:active,
.btn-link:active,
.hero-action:active,
.quick-action-btn:active,
.modern-nav a:active,
.nav a:active,
.slot-btn:active {
  transform: scale(0.965);
}

/* Input più eleganti */
input,
select,
textarea {
  border-radius: 18px;
  min-height: 48px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(246,250,255,0.90));
  border: 1px solid rgba(148, 163, 184, 0.18);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(63, 140, 255, 0.68);
  box-shadow:
    0 0 0 4px rgba(63, 140, 255, 0.15),
    0 16px 34px rgba(63, 140, 255, 0.12);
}

/* Tabelle più pulite */
.table-wrap {
  border-radius: 26px;
  padding: 8px;
  background: rgba(255,255,255,0.44);
  border: 1px solid rgba(255,255,255,0.66);
  box-shadow:
    0 18px 42px rgba(15, 23, 42, 0.055),
    inset 0 1px 0 rgba(255,255,255,0.82);
}

table {
  border-radius: 22px;
  overflow: hidden;
}

th {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(229,240,255,0.92));
  color: #475569;
  font-size: 11px;
}

td {
  background: rgba(255,255,255,0.88);
}

tr:nth-child(even) td {
  background: rgba(246,250,255,0.90);
}

tr:hover td {
  background: rgba(226, 240, 255, 0.96);
}

/* Badge più belli */
.badge,
.hours-chip,
.role-pill,
.status-pill,
.mini-badge {
  border-radius: 999px;
  font-weight: 850;
  box-shadow:
    0 8px 16px rgba(15, 23, 42, 0.05),
    inset 0 1px 0 rgba(255,255,255,0.85);
}

.hours-chip {
  background: linear-gradient(135deg, #3f8cff, #7f66ff) !important;
  color: #ffffff !important;
}

/* Report più moderno */
.report-filters-grid {
  padding: 18px;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.68), rgba(255,255,255,0.42));
  border: 1px solid rgba(255,255,255,0.70);
}

.report-head-actions {
  border-radius: 22px;
  padding: 8px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.75);
}

/* Slot più grossi e leggibili */
.slot-btn {
  border-radius: 20px;
  min-height: 64px;
  font-size: 16px;
}

.slot-btn.free {
  background: linear-gradient(135deg, #14d66f, #0cae55, #38e5c3);
}

.slot-btn.busy {
  background: linear-gradient(135deg, #ff6b6b, #ef4444, #ff8fb1);
}

.slot-btn.selected {
  background: linear-gradient(135deg, #247cff, #7655ff, #30d4ff) !important;
}

/* Login più raffinato */
.login-card {
  max-width: 440px;
}

.login-card-top h2 {
  font-size: 34px;
}

.login-mini-badge {
  background: linear-gradient(135deg, rgba(63,140,255,0.16), rgba(127,102,255,0.16));
  color: #2563eb;
}

/* Mobile più app */
@media (max-width: 768px) {
  .page {
    padding: 10px 8px 22px;
  }

  .topbar {
    border-radius: 28px !important;
    padding: 18px;
  }

  .topbar h1 {
    font-size: 26px;
  }

  .card,
  .glass,
  .room-card,
  .booking-mobile-card {
    border-radius: 26px !important;
    padding: 15px;
  }

  .modern-nav,
  .nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    border-radius: 24px;
    padding: 8px;
  }

  .modern-nav a,
  .nav a {
    width: 100%;
    min-height: 44px;
    font-size: 13px;
    padding: 8px 6px;
  }

  .stats-grid,
  .grid3 {
    gap: 12px;
  }

  .stat-card {
    border-radius: 26px;
    min-height: 110px;
    padding: 16px;
  }

  .stat-card h3 {
    font-size: 32px;
  }

  .stat-icon {
    width: 50px;
    height: 50px;
    font-size: 23px;
  }

  .table-wrap {
    border-radius: 24px;
    padding: 5px;
  }

  th {
    font-size: 9px;
  }

  td {
    font-size: 9.5px;
  }

  .report-filters-grid {
    border-radius: 24px;
    padding: 12px;
  }

  .report-head-actions {
    width: 100%;
    justify-content: stretch;
  }

  .report-head-actions .badge,
  .report-head-actions .btn-link,
  .report-pdf-btn {
    width: 100%;
    justify-content: center;
  }

  input,
  select,
  textarea,
  button,
  .primary-btn,
  .btn-link {
    min-height: 46px;
  }

  .slot-btn {
    min-height: 60px;
    border-radius: 18px;
  }
}

/* Mobile molto piccolo */
@media (max-width: 430px) {
  .topbar h1 {
    font-size: 23px;
  }

  .subtitle {
    font-size: 12.5px;
  }

  .card h2,
  .section-head h2 {
    font-size: 19px;
  }

  .modern-nav a,
  .nav a {
    font-size: 12.5px;
  }

  .stat-card {
    min-height: 100px;
  }

  .stat-card h3 {
    font-size: 28px;
  }

  .badge,
  .hours-chip,
  .role-pill,
  .status-pill,
  .mini-badge {
    font-size: 8.5px;
  }
}

@media (max-width: 768px) {
  .table-wrap {
    background: transparent;
    box-shadow: none;
    border: 0;
    padding: 0;
  }

  table {
    border-spacing: 0 8px;
    border-collapse: separate;
    background: transparent;
    box-shadow: none;
  }

  tr {
    border-radius: 16px;
  }

  td {
    background: rgba(255, 255, 255, 0.92) !important;
    border-bottom: 0;
  }

  tr td:first-child {
    border-top-left-radius: 14px;
    border-bottom-left-radius: 14px;
  }

  tr td:last-child {
    border-top-right-radius: 14px;
    border-bottom-right-radius: 14px;
  }

  th {
    background: transparent;
    border-bottom: 0;
  }
}

@media (max-width: 768px) {
  .modern-nav,
  .nav {
    position: sticky;
    top: 6px;
    z-index: 50;
    background: rgba(255,255,255,0.78);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  .modern-nav a,
  .nav a {
    min-height: 46px;
    font-size: 13px;
    border-radius: 16px;
  }
}

.login-card {
  transform: translateY(-10px);
  box-shadow:
    0 32px 80px rgba(15, 23, 42, 0.16),
    inset 0 1px 0 rgba(255,255,255,0.86);
}

.login-card-top h2 {
  font-size: clamp(30px, 7vw, 42px);
  font-weight: 900;
}

.login-submit-btn {
  min-height: 56px;
  font-size: 16px;
}

.card + .card {
  margin-top: 26px;
}

.section-head {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}