:root {
    --primary: #e60228;
    --secondary: #0e1e32;
    --heading: #0E1E32;
    --text: #5B5F64;
    --light: #959FA8;
    --border: #E2E6E8;
    --bg: #F3F4F7;
    --surface: #ffffff;
    --success: #18a058;
    --warning: #f0a202;

    --r-sm: 12px;
    --r-md: 20px;
    --r-lg: 32px;

    --shadow-soft: 0 12px 30px rgba(14,30,50,.08);
    --shadow-strong: 0 24px 70px rgba(14,30,50,.14);

    --font-head: "Fira Sans", Arial, sans-serif;
    --font-body: "Roboto", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 80% 0%, rgba(230,2,40,.08), transparent 32%),
        var(--bg);
    color: var(--text);
    font-family: var(--font-body);
}

h1, h2, h3, strong {
    margin: 0;
    color: var(--heading);
    font-family: var(--font-head);
}

p {
    margin: 0;
    line-height: 1.55;
}

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

button {
    font: inherit;
}

.sgh-app {
    min-height: 100vh;
}

.sgh-main {
    width: min(100%, 1120px);
    margin: 0 auto;
    padding: 24px 18px 112px;
}

.sgh-topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.sgh-kicker,
.panel-label {
    display: inline-flex;
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: .08em;
    font-size: 12px;
    margin-bottom: 8px;
}

.sgh-topbar h1 {
    font-size: clamp(36px, 9vw, 58px);
    letter-spacing: -.05em;
    line-height: .95;
}

.sgh-topbar p {
    margin-top: 10px;
    font-weight: 700;
    color: var(--light);
}

.top-actions {
    display: flex;
    gap: 10px;
}

.icon-btn,
.user-pill {
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    font-weight: 900;
}

.user-pill {
    background: var(--secondary);
    color: white;
}

.today-panel {
    min-height: 235px;
    border-radius: 38px;
    padding: 28px;
    background:
        linear-gradient(135deg, rgba(14,30,50,.96), rgba(14,30,50,.86)),
        var(--secondary);
    box-shadow: var(--shadow-strong);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 28px;
    position: relative;
    overflow: hidden;
    margin-bottom: 18px;
}

.today-panel::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    right: -80px;
    top: -70px;
    background: rgba(230,2,40,.38);
}

.today-panel h2 {
    color: white;
    font-size: clamp(32px, 8vw, 54px);
    line-height: .98;
    letter-spacing: -.04em;
}

.today-panel p {
    margin-top: 12px;
    max-width: 520px;
    color: rgba(255,255,255,.72);
    font-weight: 600;
}

.primary-action {
    align-self: flex-start;
    min-height: 58px;
    padding: 0 22px;
    border: 0;
    border-radius: 20px;
    background: var(--primary);
    color: white;
    font-weight: 900;
    box-shadow: 0 18px 38px rgba(230,2,40,.32);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.primary-action span {
    font-size: 24px;
    line-height: 1;
}

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

.app-card,
.timeline-card {
    border: 1px solid rgba(226,230,232,.88);
    background: rgba(255,255,255,.86);
    backdrop-filter: blur(18px);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-soft);
}

.app-card {
    min-height: 155px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform .18s ease, box-shadow .18s ease;
}

.app-card:active {
    transform: scale(.985);
}

.app-card-large {
    grid-column: 1 / -1;
    min-height: 175px;
    background:
        linear-gradient(135deg, #fff, #fff5f7);
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: var(--primary);
    color: white;
    font-size: 28px;
    font-weight: 900;
}

.card-icon.muted {
    background: #f0f2f5;
    color: var(--secondary);
}

.app-card h3 {
    font-size: 21px;
    letter-spacing: -.03em;
}

.app-card p {
    margin-top: 6px;
    color: var(--light);
    font-weight: 700;
}

.timeline-card {
    padding: 22px;
}

.section-title {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 22px;
}

.section-title h2 {
    font-size: 25px;
    letter-spacing: -.03em;
}

.section-title a {
    color: var(--primary);
    font-weight: 900;
}

.timeline {
    display: grid;
    gap: 14px;
    position: relative;
}

.timeline-item {
    display: grid;
    grid-template-columns: 58px 22px 1fr;
    gap: 12px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: white;
}

.timeline-item time {
    color: var(--heading);
    font-weight: 900;
}

.timeline-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 6px rgba(24,160,88,.12);
}

.timeline-item.pending .timeline-dot {
    background: var(--warning);
    box-shadow: 0 0 0 6px rgba(240,162,2,.16);
}

.timeline-content strong,
.timeline-content span {
    display: block;
}

.timeline-content span {
    margin-top: 5px;
    color: var(--light);
    font-weight: 700;
    font-size: 14px;
}

.timeline-item em {
    grid-column: 1 / -1;
    justify-self: start;
    font-style: normal;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    background: rgba(24,160,88,.12);
    color: var(--success);
}

.timeline-item.pending em {
    background: rgba(240,162,2,.16);
    color: #9a6600;
}

.fab {
    position: fixed;
    left: 50%;
    bottom: 54px;
    transform: translateX(-50%);
    width: 68px;
    height: 68px;
    border: 7px solid var(--bg);
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 38px;
    font-weight: 900;
    box-shadow: 0 18px 42px rgba(230,2,40,.32);
    z-index: 20;
}

.sgh-bottom-nav {
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: 14px;
    height: 74px;
    border-radius: 28px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-strong);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    z-index: 10;
}

.sgh-bottom-nav a {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 4px;
    color: var(--light);
    font-size: 11px;
    font-weight: 900;
}

.sgh-bottom-nav a span {
    font-size: 22px;
}

.sgh-bottom-nav a.active {
    color: var(--primary);
}

.sgh-rail {
    display: none;
}

.login-screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(100%, 430px);
    background: white;
    border-radius: 36px;
    padding: 30px;
    box-shadow: var(--shadow-strong);
}

@media (min-width: 980px) {
    .sgh-app {
        display: grid;
        grid-template-columns: 92px 1fr;
    }

    .sgh-rail {
        display: flex;
        min-height: 100vh;
        background: var(--secondary);
        padding: 24px 16px;
        flex-direction: column;
        align-items: center;
        gap: 34px;
        position: sticky;
        top: 0;
    }

    .rail-logo {
        width: 52px;
        height: 52px;
        border-radius: 20px;
        display: grid;
        place-items: center;
        background: var(--primary);
        color: white;
        font-weight: 900;
    }

    .sgh-rail nav {
        display: grid;
        gap: 14px;
    }

    .sgh-rail a {
        width: 54px;
        height: 54px;
        border-radius: 20px;
        display: grid;
        place-items: center;
        color: rgba(255,255,255,.56);
        font-size: 25px;
        font-weight: 900;
    }

    .sgh-rail a.active,
    .sgh-rail a:hover {
        background: rgba(255,255,255,.12);
        color: white;
    }

    .sgh-main {
        padding: 42px;
    }

    .today-panel {
        min-height: 280px;
        padding: 40px;
        flex-direction: row;
        align-items: flex-end;
    }

    .action-grid {
        grid-template-columns: 1.35fr 1fr 1fr 1fr;
    }

    .app-card-large {
        grid-column: auto;
    }

    .fab,
    .sgh-bottom-nav {
        display: none;
    }

    .timeline-item {
        grid-template-columns: 70px 24px 1fr auto;
    }

    .timeline-item em {
        grid-column: auto;
    }
}


/* SGH Booking Review Cards - final */
.sgh-booking-wizard .sgh-review-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
  margin-top:32px;
}

.sgh-booking-wizard .sgh-review-card{
  min-height:150px;
  padding:24px;
  border:1px solid rgba(14,30,50,.09);
  border-radius:24px;
  background:#fff;
  box-shadow:0 12px 32px rgba(14,30,50,.055);
  display:flex;
  flex-direction:column;
  gap:8px;
}

.sgh-booking-wizard .sgh-review-card__icon{
  width:44px;
  height:44px;
  border-radius:16px;
  background:rgba(14,30,50,.055);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-bottom:8px;
}

.sgh-booking-wizard .sgh-review-card__icon svg{
  width:21px;
  height:21px;
}

.sgh-booking-wizard .sgh-review-card__label{
  color:var(--sgh-color-muted);
  font-size:.76rem;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.07em;
}

.sgh-booking-wizard .sgh-review-card strong{
  color:var(--sgh-color-heading);
  font-size:1.22rem;
  line-height:1.2;
}

.sgh-booking-wizard .sgh-review-card small{
  color:var(--sgh-color-muted);
  font-weight:800;
  line-height:1.35;
}

.sgh-booking-wizard .sgh-review-note{
  grid-column:1/-1;
  padding:22px 24px;
  border-radius:24px;
  background:linear-gradient(135deg,rgba(230,2,40,.08),rgba(14,30,50,.035));
  display:flex;
  flex-direction:column;
  gap:6px;
}

.sgh-booking-wizard .sgh-review-note strong{
  color:var(--sgh-color-heading);
  font-size:1.08rem;
}

.sgh-booking-wizard .sgh-review-note span,
.sgh-booking-wizard .sgh-review-note small{
  color:var(--sgh-color-muted);
  font-weight:800;
  line-height:1.45;
}

@media(max-width:800px){
  .sgh-booking-wizard .sgh-review-grid{
    grid-template-columns:1fr;
  }
}


/* SGH Detail Actions + SweetAlert */
.sgh-booking-detail-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  flex-wrap:wrap;
}

.sgh-detail-back{
  color:var(--sgh-color-muted);
  font-weight:900;
  text-decoration:none;
}

.sgh-detail-back:hover{
  color:var(--sgh-color-heading);
}

.sgh-detail-action-group{
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
}

.sgh-detail-action-group form{
  margin:0;
}

.sgh-button--danger-soft{
  min-height:54px;
  padding:0 28px;
  border:1px solid rgba(230,2,40,.22);
  border-radius:999px;
  background:rgba(230,2,40,.055);
  color:var(--sgh-color-primary);
  font-weight:950;
  cursor:pointer;
  box-shadow:0 10px 28px rgba(14,30,50,.045);
}

.sgh-button--danger-soft:hover{
  background:rgba(230,2,40,.09);
  border-color:rgba(230,2,40,.36);
}

.sgh-swal{
  border-radius:28px !important;
  padding:28px !important;
  box-shadow:0 28px 90px rgba(14,30,50,.22) !important;
}

.sgh-swal__title{
  color:var(--sgh-color-heading) !important;
  font-weight:950 !important;
  letter-spacing:-.035em !important;
}

.sgh-swal__text{
  color:var(--sgh-color-muted) !important;
  font-weight:750 !important;
  line-height:1.45 !important;
}

.sgh-swal__confirm,
.sgh-swal__cancel{
  min-height:50px;
  padding:0 24px;
  border-radius:999px;
  border:0;
  font-weight:950;
  cursor:pointer;
}

.sgh-swal__confirm{
  background:var(--sgh-color-primary);
  color:#fff;
  box-shadow:0 14px 30px rgba(230,2,40,.22);
}

.sgh-swal__cancel{
  background:rgba(14,30,50,.06);
  color:var(--sgh-color-heading);
}

@media(max-width:700px){
  .sgh-booking-detail-actions,
  .sgh-detail-action-group{
    align-items:stretch;
    flex-direction:column;
  }

  .sgh-detail-action-group,
  .sgh-detail-action-group .sgh-button,
  .sgh-detail-action-group form,
  .sgh-detail-action-group button{
    width:100%;
  }
}


/* SGH Booking Detail Action Weighting */
.sgh-booking-detail-actions{
  align-items:center;
}

.sgh-button--back{
  min-height:54px;
  padding:0 26px;
  border:1px solid rgba(14,30,50,.09);
  border-radius:999px;
  background:#fff;
  color:var(--sgh-color-heading);
  font-weight:950;
  box-shadow:0 10px 28px rgba(14,30,50,.045);
}

.sgh-button--back:hover{
  transform:translateY(-1px);
  border-color:rgba(14,30,50,.16);
  box-shadow:0 14px 34px rgba(14,30,50,.07);
}

.sgh-button--edit-soft{
  min-height:54px;
  padding:0 30px;
  border:1px solid rgba(230,2,40,.12);
  border-radius:999px;
  background:rgba(230,2,40,.075);
  color:var(--sgh-color-primary);
  font-weight:950;
  box-shadow:0 12px 30px rgba(230,2,40,.08);
}

.sgh-button--edit-soft:hover{
  transform:translateY(-1px);
  background:rgba(230,2,40,.105);
  border-color:rgba(230,2,40,.22);
  box-shadow:0 16px 36px rgba(230,2,40,.12);
}

.sgh-button--danger-soft{
  background:var(--sgh-color-primary) !important;
  border-color:var(--sgh-color-primary) !important;
  color:#fff !important;
  box-shadow:0 16px 34px rgba(230,2,40,.24) !important;
}

.sgh-button--danger-soft:hover{
  transform:translateY(-1px);
  background:#d90025 !important;
  border-color:#d90025 !important;
  box-shadow:0 20px 42px rgba(230,2,40,.3) !important;
}


/* ============================================================
   SGH Global App Navigation
   ============================================================ */

body {
  padding-left: 88px;
  padding-bottom: 0;
}

.sgh-app-rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 200;
  width: 88px;
  background: #0e1e32;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 14px;
}

.sgh-app-logo {
  width: 52px;
  height: 52px;
  border-radius: 20px;
  background: var(--sgh-color-primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 950;
  text-decoration: none;
  letter-spacing: -.04em;
  box-shadow: 0 18px 42px rgba(230, 2, 40, .25);
}

.sgh-app-rail__nav {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  align-items: center;
}

.sgh-app-rail__item {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 20px;
  color: rgba(255,255,255,.66);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition:
    color .18s ease,
    background .18s ease,
    transform .18s ease;
}

.sgh-app-rail__item svg {
  width: 23px;
  height: 23px;
}

.sgh-app-rail__item span {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(-6px);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: #0e1e32;
  color: #fff;
  display: inline-flex;
  align-items: center;
  font-size: .86rem;
  font-weight: 900;
  box-shadow: 0 16px 44px rgba(14,30,50,.22);
  transition:
    opacity .16s ease,
    transform .16s ease;
}

.sgh-app-rail__item:hover span {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.sgh-app-rail__item:hover {
  color: #fff;
  background: rgba(255,255,255,.08);
  transform: translateY(-1px);
}

.sgh-app-rail__item.is-active {
  color: #fff;
  background: rgba(255,255,255,.13);
}

.sgh-mobile-nav {
  display: none;
}

.sgh-placeholder-card {
  padding: 34px;
}

.sgh-placeholder-card h2 {
  margin: 0 0 8px;
  color: var(--sgh-color-heading);
  font-size: 2rem;
  letter-spacing: -.035em;
}

.sgh-placeholder-card p {
  margin: 0;
  color: var(--sgh-color-muted);
  font-weight: 800;
  line-height: 1.45;
}

@media (max-width: 820px) {
  body {
    padding-left: 0;
    padding-bottom: 104px;
  }

  .sgh-app-rail {
    display: none;
  }

  .sgh-mobile-nav {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 14px;
    z-index: 250;
    min-height: 72px;
    padding: 10px 12px;
    border-radius: 28px;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(22px);
    box-shadow: 0 24px 70px rgba(14,30,50,.18);
    border: 1px solid rgba(14,30,50,.08);
    display: grid;
    grid-template-columns: 1fr 1fr 76px 1fr 1fr;
    align-items: center;
    gap: 4px;
  }

  .sgh-mobile-nav__item {
    min-width: 0;
    height: 54px;
    border-radius: 18px;
    color: var(--sgh-color-muted);
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: .68rem;
    font-weight: 950;
  }

  .sgh-mobile-nav__item svg {
    width: 21px;
    height: 21px;
  }

  .sgh-mobile-nav__item.is-active {
    color: var(--sgh-color-primary);
    background: rgba(230,2,40,.055);
  }

  .sgh-mobile-nav__create {
    width: 66px;
    height: 66px;
    border-radius: 26px;
    margin: -32px auto 0;
    background: var(--sgh-color-primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 18px 44px rgba(230,2,40,.34);
    text-decoration: none;
    border: 6px solid rgba(255,255,255,.96);
  }

  .sgh-mobile-nav__create svg {
    width: 30px;
    height: 30px;
  }

  .sgh-bottom-nav,
  .sgh-rail {
    display: none !important;
  }
}


/* Hide legacy page-local navigation after global app nav rollout */
.sgh-rail,
.sgh-bottom-nav,
.sgh-mobile-fab,
.sgh-fab,
.sgh-dashboard-fab,
.sgh-floating-action {
  display: none !important;
}

/* Global mobile nav active state stronger */
.sgh-mobile-nav__item.is-active {
  color: var(--sgh-color-primary) !important;
  background: rgba(230,2,40,.075) !important;
}

.sgh-mobile-nav__item.is-active svg {
  stroke: var(--sgh-color-primary) !important;
}

/* ============================================================
   Fix global nav layout after rollout
   ============================================================ */

body {
  padding-left: 0 !important;
}

.sgh-booking-page,
.sgh-dashboard {
  margin-left: 88px !important;
  width: calc(100% - 88px) !important;
}

.sgh-dashboard {
  max-width: none !important;
}

.sgh-dashboard-shell,
.sgh-booking-shell {
  width: min(1120px, calc(100vw - 160px)) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.sgh-dashboard-hero {
  width: 100% !important;
}

.sgh-dashboard-actions {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 16px !important;
}

@media (max-width: 1100px) {
  .sgh-dashboard-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 820px) {
  body {
    padding-left: 0 !important;
    padding-bottom: 104px !important;
  }

  .sgh-booking-page,
  .sgh-dashboard {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .sgh-dashboard-shell,
  .sgh-booking-shell {
    width: min(100% - 32px, 1120px) !important;
  }

  .sgh-dashboard-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 520px) {
  .sgh-dashboard-actions {
    grid-template-columns: 1fr !important;
  }
}


/* ============================================================
   Fix global nav layout after rollout
   ============================================================ */

body {
  padding-left: 0 !important;
}

.sgh-booking-page,
.sgh-dashboard {
  margin-left: 88px !important;
  width: calc(100% - 88px) !important;
}

.sgh-dashboard {
  max-width: none !important;
}

.sgh-dashboard-shell,
.sgh-booking-shell {
  width: min(1120px, calc(100vw - 160px)) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.sgh-dashboard-hero {
  width: 100% !important;
}

.sgh-dashboard-actions {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 16px !important;
}

@media (max-width: 1100px) {
  .sgh-dashboard-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 820px) {
  body {
    padding-left: 0 !important;
    padding-bottom: 104px !important;
  }

  .sgh-booking-page,
  .sgh-dashboard {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .sgh-dashboard-shell,
  .sgh-booking-shell {
    width: min(100% - 32px, 1120px) !important;
  }

  .sgh-dashboard-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 520px) {
  .sgh-dashboard-actions {
    grid-template-columns: 1fr !important;
  }
}


/* TEMP: neutralize broken dashboard offset attempt */
.sgh-dashboard,
.sgh-booking-page {
  margin-left: 0 !important;
  width: 100% !important;
}

@media (min-width: 821px) {
  .sgh-dashboard,
  .sgh-booking-page {
    padding-left: 88px !important;
  }
}


/* ============================================================
   FINAL APP LAYOUT RESET
   One global nav only
   ============================================================ */

body {
  padding-left: 0 !important;
  padding-bottom: 0 !important;
}

.sgh-rail,
.sgh-bottom-nav,
.sgh-mobile-fab,
.sgh-fab,
.sgh-dashboard-fab,
.sgh-floating-action {
  display: none !important;
}

.sgh-app {
  min-height: 100vh;
}

.sgh-main {
  width: min(1120px, calc(100vw - 160px));
  margin: 0 auto;
  padding: 42px 0 64px;
}

@media (min-width: 821px) {
  .sgh-main,
  .sgh-booking-page {
    margin-left: 88px !important;
    width: calc(100% - 88px) !important;
  }

  .sgh-main {
    width: min(1120px, calc(100vw - 160px)) !important;
    margin-left: calc(88px + max(32px, ((100vw - 88px - 1120px) / 2))) !important;
    margin-right: auto !important;
  }

  .sgh-booking-shell {
    width: min(1120px, calc(100vw - 160px)) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

@media (max-width: 820px) {
  body {
    padding-bottom: 104px !important;
  }

  .sgh-main,
  .sgh-booking-page {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .sgh-main,
  .sgh-booking-shell {
    width: min(100% - 32px, 1120px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

.action-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 16px !important;
}

@media (max-width: 1100px) {
  .action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 520px) {
  .action-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Kill legacy FAB class */
.fab {
  display: none !important;
}

/* ============================================================
   Round floating create button
   ============================================================ */

.sgh-mobile-nav__create{
    width:64px !important;
    height:64px !important;

    border-radius:999px !important;

    margin-top:-26px !important;

    border:5px solid #fff !important;

    box-shadow:
        0 14px 34px rgba(230,2,40,.30),
        0 0 28px rgba(230,2,40,.22);

    transition:
        transform .18s ease,
        box-shadow .18s ease;
}

.sgh-mobile-nav__create:hover{
    transform:translateY(-2px) scale(1.05);
}

.sgh-mobile-nav__create:active{
    transform:scale(.97);
}


/* Active mobile nav */
.sgh-mobile-nav__item.is-active{
    color:var(--sgh-color-primary) !important;
}

.sgh-mobile-nav__item.is-active svg{
    stroke:var(--sgh-color-primary) !important;
}

.sgh-mobile-nav__item.is-active{
    transform:translateY(-8px);
    transition:.22s ease;
}

.sgh-mobile-nav__item{
    transition:.22s ease;
}


/* Mobile Nav final polish */
@media (max-width: 820px) {
  .sgh-mobile-nav__item {
    transition: transform .22s ease, color .22s ease, background .22s ease !important;
  }

  .sgh-mobile-nav__item.is-active {
    color: var(--sgh-color-primary) !important;
    background: rgba(230,2,40,.075) !important;
    transform: translateY(-8px) !important;
  }

  .sgh-mobile-nav__item.is-active svg {
    stroke: var(--sgh-color-primary) !important;
  }

  .sgh-mobile-nav__create {
    width: 64px !important;
    height: 64px !important;
    border-radius: 999px !important;
    margin: -28px auto 0 !important;
    border: 5px solid #fff !important;
    box-shadow:
      0 14px 34px rgba(230,2,40,.30),
      0 0 28px rgba(230,2,40,.22) !important;
  }
}

/* Mobile nav balance fix */
@media (max-width: 820px) {
  .sgh-mobile-nav {
    grid-template-columns: 1fr 1fr 72px 1fr 1fr !important;
    gap: 2px !important;
  }

  .sgh-mobile-nav__item {
    background: transparent !important;
    border-radius: 16px !important;
    transform: none !important;
  }

  .sgh-mobile-nav__item.is-active {
    background: transparent !important;
    transform: translateY(-5px) !important;
    color: var(--sgh-color-primary) !important;
  }

  .sgh-mobile-nav__item.is-active svg {
    stroke: var(--sgh-color-primary) !important;
  }

  .sgh-mobile-nav__create {
    margin: -24px auto 0 !important;
  }
}


/* ============================================================
   Mobile Bottom Nav hard reset / final geometry
   ============================================================ */

@media (max-width: 820px) {
  .sgh-mobile-nav {
    left: 20px !important;
    right: 20px !important;
    bottom: max(18px, env(safe-area-inset-bottom)) !important;

    min-height: 76px !important;
    padding: 10px 14px !important;

    display: grid !important;
    grid-template-columns: 1fr 1fr 76px 1fr 1fr !important;
    align-items: center !important;
    gap: 4px !important;

    border-radius: 30px !important;
    overflow: visible !important;
  }

  .sgh-mobile-nav__item {
    height: 56px !important;
    min-width: 0 !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;

    border-radius: 20px !important;
    background: transparent !important;

    color: var(--sgh-color-muted) !important;
    text-decoration: none !important;

    font-size: .68rem !important;
    font-weight: 950 !important;
    line-height: 1 !important;

    transform: none !important;
    transition: background .18s ease, color .18s ease, transform .18s ease !important;
  }

  .sgh-mobile-nav__item svg {
    width: 21px !important;
    height: 21px !important;
    stroke: currentColor !important;
  }

  .sgh-mobile-nav__item span {
    display: block !important;
    line-height: 1 !important;
  }

  .sgh-mobile-nav__item.is-active {
    background: rgba(230, 2, 40, .09) !important;
    color: var(--sgh-color-primary) !important;
    transform: none !important;
  }

  .sgh-mobile-nav__item.is-active svg {
    stroke: currentColor !important;
  }

  .sgh-mobile-nav__create {
    width: 68px !important;
    height: 68px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    margin: -28px auto 0 !important;

    border-radius: 999px !important;
    border: 5px solid #fff !important;

    background: var(--sgh-color-primary) !important;
    color: #fff !important;
    text-decoration: none !important;

    box-shadow:
      0 16px 38px rgba(230, 2, 40, .34),
      0 0 30px rgba(230, 2, 40, .22) !important;

    transform: none !important;
    transition: transform .18s ease, box-shadow .18s ease !important;
  }

  .sgh-mobile-nav__create svg {
    width: 30px !important;
    height: 30px !important;
    stroke: currentColor !important;
  }

  .sgh-mobile-nav__create:active {
    transform: scale(.96) !important;
  }
}


/* Mobile create active state */
@media (max-width: 820px) {
  .sgh-mobile-nav__create.is-active {
    transform: translateY(-2px) scale(1.04) !important;
    box-shadow:
      0 18px 44px rgba(230, 2, 40, .42),
      0 0 34px rgba(230, 2, 40, .30) !important;
  }
}

/* Force visible mobile active state for all regular nav items */
@media (max-width: 820px) {
  .sgh-mobile-nav__item.is-active,
  .sgh-mobile-nav a.is-active:not(.sgh-mobile-nav__create) {
    background: rgba(230,2,40,.10) !important;
    color: var(--sgh-color-primary) !important;
  }

  .sgh-mobile-nav__item.is-active svg,
  .sgh-mobile-nav a.is-active:not(.sgh-mobile-nav__create) svg {
    stroke: currentColor !important;
  }
}

/* Mobile nav breathing room */
@media (max-width: 820px) {
  .sgh-mobile-nav {
    left: 10px !important;
    right: 10px !important;
    padding: 10px 10px !important;
    grid-template-columns: 1fr 1fr 70px 1fr 1fr !important;
    gap: 0 !important;
    border-radius: 28px !important;
  }

  .sgh-mobile-nav__item {
    height: 58px !important;
    border-radius: 20px !important;
    font-size: .64rem !important;
  }

  .sgh-mobile-nav__item svg {
    width: 20px !important;
    height: 20px !important;
  }

  .sgh-mobile-nav__item.is-active {
    background: rgba(230,2,40,.085) !important;
  }

  .sgh-mobile-nav__create {
    width: 62px !important;
    height: 62px !important;
    margin: -24px auto 0 !important;
  }
}

/* ============================================================
   SGH Forms - Comfortable Inputs
   ============================================================ */

.sgh-input,
.sgh-textarea,
.sgh-select,
input[type="text"],
input[type="date"],
input[type="time"],
input[type="number"],
input[type="email"],
textarea,
select{

    min-height:60px;
    padding:18px 22px !important;

    font-size:1.08rem;
    font-weight:600;
    line-height:1.4;

    border-radius:18px;
    transition:all .18s ease;
}

textarea{
    min-height:140px;
    padding-top:18px !important;
}

.sgh-input:focus,
.sgh-textarea:focus,
.sgh-select:focus,
input:focus,
textarea:focus,
select:focus{

    border-color:var(--sgh-color-primary);
    box-shadow:
        0 0 0 4px rgba(230,2,40,.08);
}


/* ============================================================
   SGH Forms - Comfortable App Inputs
   ============================================================ */

.sgh-field label,
.sgh-field__label {
  font-size: .86rem;
  font-weight: 950;
  color: var(--sgh-color-heading);
  letter-spacing: -.01em;
}

.sgh-input,
.sgh-textarea,
.sgh-select,
input[type="text"],
input[type="date"],
input[type="time"],
input[type="number"],
input[type="email"],
textarea,
select {
  min-height: 62px !important;
  padding: 18px 22px !important;
  border-radius: 18px !important;
  font-size: 1.08rem !important;
  font-weight: 750 !important;
  line-height: 1.35 !important;
  color: var(--sgh-color-heading) !important;
  background: #fff !important;
  border: 1px solid rgba(14, 30, 50, .11) !important;
  transition:
    border-color .18s ease,
    box-shadow .18s ease,
    background .18s ease;
}

.sgh-input::placeholder,
.sgh-textarea::placeholder,
input::placeholder,
textarea::placeholder {
  color: rgba(14, 30, 50, .42) !important;
  font-weight: 750 !important;
}

.sgh-input:focus,
.sgh-textarea:focus,
.sgh-select:focus,
input:focus,
textarea:focus,
select:focus {
  outline: none !important;
  border-color: rgba(230, 2, 40, .34) !important;
  box-shadow: 0 0 0 5px rgba(230, 2, 40, .075) !important;
}

textarea,
.sgh-textarea {
  min-height: 140px !important;
  resize: vertical;
}

/* Reason panel specific spacing */
.sgh-reason-panel {
  gap: 20px !important;
}

.sgh-reason-panel__top {
  align-items: flex-start !important;
}

.sgh-reason-panel__top label {
  gap: 10px !important;
}

.sgh-reason-panel .sgh-input {
  width: 100% !important;
}

/* Checkbox privacy option calmer and more touch-friendly */
.sgh-reason-panel__privacy {
  min-height: 78px !important;
  padding: 18px 22px !important;
  border-radius: 20px !important;
  background: rgba(14, 30, 50, .045) !important;
  gap: 14px !important;
}

.sgh-reason-panel__privacy input[type="checkbox"] {
  width: 24px !important;
  height: 24px !important;
  min-height: 24px !important;
  padding: 0 !important;
  margin-top: 2px !important;
  accent-color: var(--sgh-color-primary);
}

.sgh-reason-panel__privacy strong {
  font-size: 1rem !important;
  color: var(--sgh-color-heading) !important;
}

.sgh-reason-panel__privacy small {
  margin-top: 4px !important;
  color: var(--sgh-color-muted) !important;
  line-height: 1.4 !important;
}


/* ============================================================
   Approvals Center
   ============================================================ */

.sgh-approvals-card {
  padding: 26px;
}

.sgh-approvals-list {
  display: grid;
  gap: 18px;
}

.sgh-approval-item {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 22px;
  padding: 22px;
  border: 1px solid rgba(14,30,50,.09);
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(14,30,50,.045);
}

.sgh-approval-item__main {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.sgh-approval-item__main strong {
  color: var(--sgh-color-heading);
  font-size: 1.35rem;
  line-height: 1.15;
}

.sgh-approval-item__main small,
.sgh-approval-item__main p {
  margin: 0;
  color: var(--sgh-color-muted);
  font-weight: 850;
  line-height: 1.35;
}

.sgh-approval-item__actions {
  display: grid;
  gap: 12px;
  align-content: start;
}

.sgh-approval-item__actions form {
  margin: 0;
}

.sgh-approval-item__actions textarea {
  width: 100%;
  min-height: 92px !important;
  margin-bottom: 12px;
}

.sgh-button--approve {
  min-height: 54px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 16px 34px rgba(22,163,74,.22);
}

.sgh-button--approve:hover {
  background: #15803d;
}

.sgh-empty-state {
  padding: 34px;
  border-radius: 26px;
  background: rgba(14,30,50,.035);
}

.sgh-empty-state h2 {
  margin: 0 0 8px;
  color: var(--sgh-color-heading);
  font-size: 2rem;
  letter-spacing: -.035em;
}

.sgh-empty-state p {
  margin: 0;
  color: var(--sgh-color-muted);
  font-weight: 850;
}

@media (max-width: 900px) {
  .sgh-approval-item {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   SGH Logo
   ============================================================ */

.sgh-app-logo{
    width:54px;
    height:54px;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
    border-radius:18px;
    background:#fff;
    box-shadow:0 12px 30px rgba(0,0,0,.15);
}

.sgh-app-logo img{
    width:100%;
    height:100%;
    object-fit:contain;
    display:block;
}


/* ============================================================
   SGH Branding / App Logo
   ============================================================ */

.sgh-app-logo {
  width: 54px !important;
  height: 54px !important;
  border-radius: 18px !important;
  background: #fff !important;
  overflow: hidden !important;
  padding: 0 !important;
  box-shadow:
    0 14px 34px rgba(230,2,40,.20),
    0 10px 26px rgba(14,30,50,.16) !important;
}

.sgh-app-logo img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  display: block !important;
}

@media (max-width: 820px) {
  .sgh-app-logo {
    display: none !important;
  }
}

/* Logo + rail tooltip spacing refinement */
.sgh-app-logo {
  width: 58px !important;
  height: 58px !important;
  border-radius: 20px !important;
  background: transparent !important;
  box-shadow: none !important;
}

.sgh-app-logo img {
  width: 52px !important;
  height: 52px !important;
  object-fit: contain !important;
}

.sgh-app-rail__item span {
  left: calc(100% + 22px) !important;
}

.sgh-app-rail__item span::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 50%;
  width: 8px;
  height: 8px;
  transform: translateY(-50%) rotate(45deg);
  background: #0e1e32;
}

/* Tooltip refinement: floating pill without arrow */
.sgh-app-rail__item span {
  left: calc(100% + 28px) !important;
  padding: 0 16px !important;
  min-height: 42px !important;
  border-radius: 999px !important;
}

.sgh-app-rail__item span::before {
  display: none !important;
}


/* Board actions on booking detail */
.sgh-board-comment-card {
  margin-top: 22px;
  padding: 22px 24px;
  border-radius: 24px;
  background: rgba(14,30,50,.04);
  border: 1px solid rgba(14,30,50,.08);
}

.sgh-board-comment-card span {
  display: block;
  color: var(--sgh-color-muted);
  font-size: .76rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 8px;
}

.sgh-board-comment-card p {
  margin: 0;
  color: var(--sgh-color-heading);
  font-weight: 850;
  line-height: 1.45;
}

.sgh-board-action-panel {
  position: relative;
}

.sgh-board-action-panel summary {
  min-height: 54px;
  padding: 0 24px;
  border-radius: 999px;
  background: rgba(14,30,50,.06);
  color: var(--sgh-color-heading);
  font-weight: 950;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.sgh-board-action-panel summary::-webkit-details-marker {
  display: none;
}

.sgh-board-action-panel[open] {
  width: min(420px, 90vw);
}

.sgh-board-action-panel[open] summary {
  margin-bottom: 12px;
}

.sgh-board-action-panel form {
  padding: 16px;
  border: 1px solid rgba(14,30,50,.08);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(14,30,50,.10);
  margin-bottom: 12px;
}

.sgh-board-action-panel textarea {
  width: 100%;
  min-height: 90px !important;
  margin-bottom: 12px;
}


/* ============================================================
   Calendar v1
   ============================================================ */

.sgh-calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.sgh-calendar-toolbar a,
.sgh-calendar-toolbar strong {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(14,30,50,.08);
  box-shadow: 0 10px 28px rgba(14,30,50,.045);
  display: inline-flex;
  align-items: center;
  color: var(--sgh-color-heading);
  text-decoration: none;
  font-weight: 950;
}

.sgh-calendar-card {
  padding: 28px;
}

.sgh-calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(14,30,50,.08);
  margin-bottom: 22px;
}

.sgh-calendar-head span {
  color: var(--sgh-color-primary);
  font-size: .78rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.sgh-calendar-head h2 {
  margin: 4px 0 0;
  color: var(--sgh-color-heading);
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: -.04em;
}

.sgh-calendar-day {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 18px;
}

.sgh-calendar-hours {
  display: grid;
  grid-template-rows: repeat(16, 72px);
  color: var(--sgh-color-muted);
  font-weight: 900;
}

.sgh-calendar-hours span {
  transform: translateY(-8px);
}

.sgh-calendar-track {
  position: relative;
  min-height: 1152px;
  border-left: 1px solid rgba(14,30,50,.08);
}

.sgh-calendar-line {
  height: 72px;
  border-top: 1px solid rgba(14,30,50,.08);
}

.sgh-calendar-event {
  position: absolute;
  left: 18px;
  right: 0;
  padding: 14px 18px;
  border-radius: 22px;
  text-decoration: none;
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(14,30,50,.10);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  transition: transform .18s ease, box-shadow .18s ease;
}

.sgh-calendar-event:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 46px rgba(14,30,50,.14);
}

.sgh-calendar-event span,
.sgh-calendar-event small {
  font-weight: 850;
}

.sgh-calendar-event strong {
  font-size: 1.12rem;
  line-height: 1.15;
}

.sgh-calendar-event em {
  position: absolute;
  right: 14px;
  top: 14px;
  font-style: normal;
  font-size: .76rem;
  font-weight: 950;
  padding: 7px 12px;
  border-radius: 999px;
}

.sgh-calendar-event.is-booked {
  background: linear-gradient(135deg, rgba(22,163,74,.16), rgba(255,255,255,1));
  border: 1px solid rgba(22,163,74,.20);
  color: var(--sgh-color-heading);
}

.sgh-calendar-event.is-booked em {
  background: rgba(22,163,74,.12);
  color: #15803d;
}

.sgh-calendar-event.is-pending {
  background: linear-gradient(135deg, rgba(245,158,11,.18), rgba(255,255,255,1));
  border: 1px solid rgba(245,158,11,.22);
  color: var(--sgh-color-heading);
}

.sgh-calendar-event.is-pending em {
  background: rgba(245,158,11,.14);
  color: #a16207;
}

.sgh-calendar-empty {
  position: absolute;
  inset: 72px 0 auto 18px;
  padding: 28px;
  border-radius: 26px;
  background: rgba(14,30,50,.035);
  color: var(--sgh-color-muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 850;
}

.sgh-calendar-empty strong {
  color: var(--sgh-color-heading);
  font-size: 1.4rem;
}

@media (max-width: 820px) {
  .sgh-calendar-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .sgh-calendar-day {
    grid-template-columns: 58px 1fr;
    gap: 10px;
  }

  .sgh-calendar-card {
    padding: 20px;
  }

  .sgh-calendar-event {
    left: 10px;
    padding: 12px 14px;
  }

  .sgh-calendar-event em {
    position: static;
    width: max-content;
    margin-top: 4px;
  }
}


/* Calendar view switch + week/month */
.sgh-calendar-switch {
  min-height: 48px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(14,30,50,.055);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.sgh-calendar-switch a {
  min-height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  color: var(--sgh-color-muted);
  text-decoration: none;
  font-weight: 950;
  display: inline-flex;
  align-items: center;
}

.sgh-calendar-switch a.is-active {
  background: #fff;
  color: var(--sgh-color-primary);
  box-shadow: 0 8px 22px rgba(14,30,50,.08);
}

.sgh-calendar-grid {
  display: grid;
  gap: 14px;
}

.sgh-calendar-grid--week {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.sgh-calendar-grid--month {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.sgh-calendar-period-card {
  min-height: 190px;
  padding: 16px;
  border: 1px solid rgba(14,30,50,.08);
  border-radius: 22px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sgh-calendar-period-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sgh-calendar-period-card header span {
  color: var(--sgh-color-muted);
  font-size: .72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.sgh-calendar-period-card header strong {
  color: var(--sgh-color-heading);
  font-weight: 950;
}

.sgh-calendar-period-card p {
  margin: 0;
  color: var(--sgh-color-muted);
  font-weight: 850;
}

.sgh-calendar-mini-event {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 16px;
  text-decoration: none;
  color: var(--sgh-color-heading);
  margin-bottom: 8px;
}

.sgh-calendar-mini-event strong {
  font-size: .88rem;
  line-height: 1.2;
}

.sgh-calendar-mini-event span {
  color: var(--sgh-color-muted);
  font-size: .76rem;
  font-weight: 850;
  line-height: 1.25;
}

.sgh-calendar-mini-event em {
  width: max-content;
  font-style: normal;
  font-size: .68rem;
  font-weight: 950;
  padding: 5px 9px;
  border-radius: 999px;
  margin-top: 3px;
}

.sgh-calendar-mini-event.is-booked {
  background: rgba(22,163,74,.08);
  border: 1px solid rgba(22,163,74,.14);
}

.sgh-calendar-mini-event.is-booked em {
  background: rgba(22,163,74,.12);
  color: #15803d;
}

.sgh-calendar-mini-event.is-pending {
  background: rgba(245,158,11,.10);
  border: 1px solid rgba(245,158,11,.16);
}

.sgh-calendar-mini-event.is-pending em {
  background: rgba(245,158,11,.14);
  color: #a16207;
}

@media (max-width: 1100px) {
  .sgh-calendar-grid--week,
  .sgh-calendar-grid--month {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .sgh-calendar-switch {
    width: 100%;
    justify-content: center;
  }

  .sgh-calendar-switch a {
    flex: 1;
    justify-content: center;
  }

  .sgh-calendar-grid--week,
  .sgh-calendar-grid--month {
    grid-template-columns: 1fr;
  }
}


/* Calendar year view */
.sgh-calendar-grid--year {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sgh-calendar-year-card {
  min-height: 150px;
  padding: 22px;
  border: 1px solid rgba(14,30,50,.08);
  border-radius: 24px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 10px 28px rgba(14,30,50,.045);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.sgh-calendar-year-card:hover {
  transform: translateY(-2px);
  border-color: rgba(230,2,40,.22);
  box-shadow: 0 16px 38px rgba(14,30,50,.075);
}

.sgh-calendar-year-card span {
  color: var(--sgh-color-heading);
  font-size: 1.2rem;
  font-weight: 950;
}

.sgh-calendar-year-card strong {
  color: var(--sgh-color-primary);
  font-size: 3rem;
  line-height: 1;
  letter-spacing: -.04em;
}

.sgh-calendar-year-card small {
  color: var(--sgh-color-muted);
  font-weight: 850;
}

@media (max-width: 1100px) {
  .sgh-calendar-grid--year {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .sgh-calendar-grid--year {
    grid-template-columns: 1fr;
  }
}


/* ============================================================
   Calendar v2
   ============================================================ */

.cal-hero {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:24px;
  margin-bottom:22px;
}

.cal-hero span,
.cal-shell__head span {
  color:var(--sgh-color-primary);
  font-size:.78rem;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.cal-hero h1 {
  margin:6px 0 4px;
  color:var(--sgh-color-heading);
  font-size:clamp(2.4rem,5vw,4.2rem);
  letter-spacing:-.055em;
  line-height:.95;
}

.cal-hero p {
  margin:0;
  color:var(--sgh-color-muted);
  font-weight:850;
}

.cal-create {
  min-height:56px;
  padding:0 28px;
  border-radius:999px;
  background:var(--sgh-color-primary);
  color:#fff;
  text-decoration:none;
  font-weight:950;
  display:inline-flex;
  align-items:center;
  box-shadow:0 18px 42px rgba(230,2,40,.24);
}

.cal-toolbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin-bottom:22px;
}

.cal-toolbar > a {
  width:52px;
  height:52px;
  border-radius:999px;
  background:#fff;
  border:1px solid rgba(14,30,50,.08);
  color:var(--sgh-color-heading);
  text-decoration:none;
  font-weight:950;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 10px 28px rgba(14,30,50,.045);
}

.cal-switch {
  padding:6px;
  border-radius:999px;
  background:rgba(14,30,50,.055);
  display:flex;
  gap:4px;
}

.cal-switch a {
  min-height:42px;
  padding:0 20px;
  border-radius:999px;
  color:var(--sgh-color-muted);
  text-decoration:none;
  font-weight:950;
  display:inline-flex;
  align-items:center;
}

.cal-switch a.is-active {
  background:#fff;
  color:var(--sgh-color-primary);
  box-shadow:0 8px 22px rgba(14,30,50,.08);
}

.cal-shell {
  padding:28px;
}

.cal-shell__head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  padding-bottom:24px;
  margin-bottom:24px;
  border-bottom:1px solid rgba(14,30,50,.08);
}

.cal-shell__head h2 {
  margin:6px 0 0;
  color:var(--sgh-color-heading);
  font-size:clamp(2.4rem,5vw,4rem);
  letter-spacing:-.05em;
  line-height:1;
}

.cal-filter {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:flex-end;
}

.cal-filter span {
  min-height:36px;
  padding:0 13px;
  border-radius:999px;
  background:rgba(14,30,50,.055);
  color:var(--sgh-color-muted);
  display:inline-flex;
  align-items:center;
  font-size:.76rem;
  font-weight:950;
}

.cal-day {
  display:grid;
  grid-template-columns:72px 1fr;
  gap:18px;
}

.cal-hours {
  display:grid;
  grid-template-rows:repeat(16,72px);
  color:var(--sgh-color-muted);
  font-weight:950;
}

.cal-hours span {
  transform:translateY(-8px);
}

.cal-day-track {
  position:relative;
  min-height:1152px;
  border-left:1px solid rgba(14,30,50,.08);
}

.cal-line {
  height:72px;
  border-top:1px solid rgba(14,30,50,.08);
}

.cal-event {
  padding:14px 16px;
  border-radius:20px;
  text-decoration:none;
  color:var(--sgh-color-heading);
  display:flex;
  flex-direction:column;
  gap:4px;
  position:relative;
  box-shadow:0 14px 36px rgba(14,30,50,.08);
}

.cal-event--absolute {
  position:absolute;
  left:18px;
  right:0;
  justify-content:center;
}

.cal-event strong {
  font-size:1.08rem;
  line-height:1.15;
}

.cal-event small,
.cal-event__time {
  color:var(--sgh-color-muted);
  font-weight:850;
  line-height:1.25;
}

.cal-event em {
  width:max-content;
  font-style:normal;
  font-size:.68rem;
  font-weight:950;
  padding:6px 10px;
  border-radius:999px;
  margin-top:4px;
}

.cal-event--absolute em {
  position:absolute;
  right:14px;
  top:14px;
  margin:0;
}

.cal-event.is-booked {
  background:linear-gradient(135deg,rgba(22,163,74,.14),#fff 70%);
  border:1px solid rgba(22,163,74,.20);
}

.cal-event.is-booked em {
  background:rgba(22,163,74,.13);
  color:#15803d;
}

.cal-event.is-pending {
  background:linear-gradient(135deg,rgba(245,158,11,.16),#fff 70%);
  border:1px solid rgba(245,158,11,.22);
}

.cal-event.is-pending em {
  background:rgba(245,158,11,.14);
  color:#a16207;
}

.cal-empty {
  position:absolute;
  inset:72px 0 auto 18px;
  padding:28px;
  border-radius:26px;
  background:rgba(14,30,50,.035);
  color:var(--sgh-color-muted);
  display:flex;
  flex-direction:column;
  gap:6px;
  font-weight:850;
}

.cal-empty strong {
  color:var(--sgh-color-heading);
  font-size:1.4rem;
}

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

.cal-period,
.cal-month-day,
.cal-year-month {
  border:1px solid rgba(14,30,50,.08);
  border-radius:22px;
  background:#fff;
}

.cal-period {
  min-height:240px;
  padding:16px;
}

.cal-period header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:14px;
}

.cal-period header span {
  color:var(--sgh-color-muted);
  font-size:.76rem;
  font-weight:950;
}

.cal-period header strong {
  color:var(--sgh-color-heading);
  font-weight:950;
}

.cal-period p {
  color:var(--sgh-color-muted);
  font-weight:850;
}

.cal-event.is-compact {
  box-shadow:none;
  padding:10px 12px;
  margin-bottom:8px;
}

.cal-event.is-compact strong {
  font-size:.9rem;
}

.cal-event.is-compact small {
  font-size:.76rem;
}

.cal-month {
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:10px;
}

.cal-month-weekday {
  text-align:center;
  color:var(--sgh-color-muted);
  font-weight:950;
  font-size:.76rem;
}

.cal-month-day {
  min-height:160px;
  padding:12px;
}

.cal-month-day header {
  color:var(--sgh-color-heading);
  font-weight:950;
  margin-bottom:8px;
}

.cal-month-day small {
  color:var(--sgh-color-muted);
  font-weight:850;
}

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

.cal-year-month {
  min-height:150px;
  padding:22px;
  color:inherit;
  text-decoration:none;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  box-shadow:0 10px 28px rgba(14,30,50,.045);
}

.cal-year-month strong {
  color:var(--sgh-color-heading);
  font-size:1.2rem;
}

.cal-year-month span {
  color:var(--sgh-color-primary);
  font-size:2.4rem;
  font-weight:950;
  letter-spacing:-.05em;
}

.cal-year-month small {
  color:var(--sgh-color-muted);
  font-weight:850;
}

@media(max-width:1100px){
  .cal-week,
  .cal-month,
  .cal-year {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .cal-month-weekday {
    display:none;
  }
}

@media(max-width:820px){
  .cal-hero,
  .cal-shell__head {
    flex-direction:column;
    align-items:stretch;
  }

  .cal-create {
    justify-content:center;
  }

  .cal-toolbar {
    flex-wrap:wrap;
  }

  .cal-switch {
    order:3;
    width:100%;
  }

  .cal-switch a {
    flex:1;
    justify-content:center;
    padding:0 10px;
  }

  .cal-day {
    grid-template-columns:56px 1fr;
    gap:10px;
  }

  .cal-shell {
    padding:20px;
  }

  .cal-event--absolute {
    left:10px;
  }

  .cal-event--absolute em {
    position:static;
    margin-top:4px;
  }

  .cal-week,
  .cal-month,
  .cal-year {
    grid-template-columns:1fr;
  }
}

/* Calendar Month polish */
.cal-month.cal-month--six {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
}

.cal-month.cal-month--six .cal-month-weekday {
    text-align: center;
    font-size: 12px;
    font-weight: 900;
    color: #98a2b3;
    padding: 12px 0 2px;
}

.cal-month.cal-month--six .cal-month-day {
    min-height: 138px;
    padding: 14px;
    border-radius: 22px;
    background: linear-gradient(180deg, #fff, #fbfcfe);
    border: 1px solid rgba(15, 23, 42, .08);
}

.cal-month.cal-month--six .cal-month-day.is-muted {
    background: #f8fafc;
    opacity: .45;
}

.cal-month.cal-month--six .cal-month-day.is-today {
    border-color: #ef002b;
    box-shadow: 0 18px 45px rgba(239, 0, 43, .16);
}

.cal-month-day__date {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #0f1f33;
    text-decoration: none;
    font-size: 17px;
    font-weight: 950;
}

.cal-month-day.is-today .cal-month-day__date {
    background: #ef002b;
    color: #fff;
}

.cal-month.cal-month--six .cal-event.is-compact {
    margin-top: 8px;
    padding: 9px 10px;
    border-radius: 14px;
    font-size: 12px;
    box-shadow: none;
}

.cal-month.cal-month--six .cal-event.is-compact strong {
    font-size: 13px;
}

.cal-month.cal-month--six .cal-event.is-compact small,
.cal-month.cal-month--six .cal-event.is-compact em {
    display: none;
}

.cal-month.cal-month--six .cal-event__time {
    font-size: 12px;
    font-weight: 900;
}

.cal-more {
    display: block;
    margin-top: 6px;
    color: #98a2b3;
    font-weight: 900;
    font-size: 12px;
}

