body{font-family:system-ui,Arial; background:#f5f6f7; margin:0;}
.container{max-width:1050px; margin:24px auto; background:#fff; padding:18px; border-radius:12px; box-shadow:0 10px 30px rgba(0,0,0,.06);}
.topbar{display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;}
.btn{display:inline-block; padding:8px 12px; border-radius:10px; background:#111; color:#fff; text-decoration:none;}
h1{margin:0 0 10px;}
h2{margin-top:22px;}
form{display:block; margin:10px 0;}
.row{display:flex; gap:10px; align-items:end; flex-wrap:wrap;}
label{display:block; margin-top:10px; font-size:14px;}
input,select,textarea,button{font:inherit; padding:10px; border:1px solid #ddd; border-radius:10px;}
textarea{min-height:90px; width:100%;}
button{background:#1a73e8; color:#fff; border:none; cursor:pointer;}
table{width:100%; border-collapse:collapse; margin-top:10px;}
th,td{padding:10px; border-bottom:1px solid #eee; text-align:left; vertical-align:top;}
.alert{background:#fff3cd; border:1px solid #ffeeba; padding:10px; border-radius:10px; margin:10px 0;}
.alert.ok{background:#e7f7ee; border-color:#bfe9cf;}
.grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:12px;}
.card{display:block; padding:16px; border:1px solid #eee; border-radius:14px; text-decoration:none; color:#111;}
.mono{font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;}
.small{font-size:12px; opacity:.8}


/* Calendar grid */
.calendar {
  border-collapse: collapse;
  width: 100%;
}
.calendar th,
.calendar td {
  border: 1px solid #ddd;
  vertical-align: top;
  padding: 8px;
}
.calendar th {
  background: #f0f0f0;
  text-align: center;
}
.calendar td {
  min-height: 110px;
}
.calendar .day-num {
  font-weight: 700;
  margin-bottom: 4px;
}
.calendar .booking {
  display: block;
  margin-top: 6px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #e8f0fe;
  color: #1a73e8;
  text-decoration: none;
}
.calendar .booking:hover {
  background: #d2e3fc;
}
.calendar .today {
  background: #fffbe6;
}


/* Fixed-size calendar grid */
.calendar {
  table-layout: fixed;
}
.calendar td {
  width: 14.28%;
  height: 140px;
  overflow: hidden;
}
.calendar .booking {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* Tooltip */
.booking[data-tooltip] {
  position: relative;
}
.booking[data-tooltip]:hover::after,
.booking[data-tooltip]:focus::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 10;
  white-space: pre-line;
  background: #333;
  color: #fff;
  padding: 8px;
  border-radius: 6px;
  font-size: 13px;
  width: 220px;
}


/* Day cell affordance */
.calendar td {
  cursor: pointer;
  transition: background .12s ease, box-shadow .12s ease;
}
.calendar td:hover {
  box-shadow: inset 0 0 0 2px rgba(26,115,232,.35);
}
.calendar td:active {
  box-shadow: inset 0 0 0 2px rgba(26,115,232,.55);
}
/* Booking link should look clickable but not trigger cell navigation */
.calendar .booking { cursor: pointer; }

/* JS Tooltip (body-level, not clipped by cells) */
#mr-tooltip {
  position: fixed;
  z-index: 9999;
  display: none;
  max-width: 260px;
  white-space: pre-line;
  background: rgba(20,20,20,.95);
  color: #fff;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.3;
  box-shadow: 0 14px 40px rgba(0,0,0,.35);
  pointer-events: none;
}


/* Past days */
.calendar td.past {
  background: #f3f3f3;
  color: #999;
}
.calendar td.past:hover {
  box-shadow: none;
  cursor: not-allowed;
}


/* Weekend days */
.calendar td.weekend {
  background: #f0f0f0;
  color: #aaa;
}
.calendar td.weekend:hover {
  box-shadow: none;
  cursor: not-allowed;
}

.app-footer {
  text-align: center;
  margin-top: 40px;
  font-size: 13px;
  color: #666;
}
.app-footer .powered {
  margin-top: 4px;
  font-weight: 500;
}

.menu-link {
  margin-left: 15px;
  font-weight: 600;
}


/* Logo applicazione */
.app-logo {
  max-width: 250px;
  max-height: 100px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
