@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

:root{
  --bonjour:  #E5E1E2;
  --cloudy:   #A8A49F;
  --tory:     #144BA2;
  --klein:    #000FA8;
  --navy:     #000C6F;
  --white:    #FFFFFF;
  --black:    #222222;
  --accent:   #F27405;
  --muted:    #5B5F73;
  --ink:      var(--navy);
  --primary:   var(--tory);
  --secondary: var(--klein);
  --dark:      var(--navy);
  --light:     var(--bonjour);
  --gray:      var(--cloudy);
  --radius:      10px;
  --radius-sm:   10px;
  --radius-md:   10px;
  --radius-lg:   10px;
  --radius-xl:   10px;
  --radius-pill: 10px;
}
*{box-sizing:border-box;margin:0;padding:0;}
input,button,select,textarea{font-family:inherit;}
html{background:var(--navy);}
body{
  font-family:'Poppins',system-ui,sans-serif;
  background:var(--bonjour);
  color:var(--black);
  padding-bottom:calc(96px + env(safe-area-inset-bottom,0px));
}
a{text-decoration:none;color:inherit;}

.app{max-width:480px;margin:0 auto;background:var(--bonjour);min-height:100vh;position:relative;}


.header{
  background:linear-gradient(180deg,#00061F 0%,var(--tory) 55%,rgba(20,75,162,0) 100%);
  padding:28px 20px 80px;
  margin-top:-18px;
  color:var(--white);
  position:relative;
  border-radius:0 0 10px 10px;
  overflow:hidden;
}
.header-top{display:flex;justify-content:space-between;align-items:center;}
.topbar-fixed{
  position:sticky;top:0;z-index:1000;
  background:linear-gradient(160deg,var(--navy),var(--tory));
  padding-top:calc(env(safe-area-inset-top,0px) + 14px);
  border-radius:0 0 16px 16px;
}
.topbar-fixed .header-top{padding:0 20px 14px;}
.topbar-clock{
  color:var(--white);font-size:12px;font-weight:700;
  background:rgba(255,255,255,.12);
  padding:8px 12px;border-radius:var(--radius-pill);
  min-width:46px;text-align:center;
}
.logo img{height:28px;width:auto;object-fit:contain;display:block;}
.icon-row{display:flex;gap:10px;align-items:center;}
.icon-row a{
  color:var(--white);width:34px;height:34px;border-radius:50%;
  background:rgba(255,255,255,.12);display:flex;align-items:center;justify-content:center;
}
.icon-row i{font-size:16px;}
.icon-row .bell-wrap{position:relative;}
.icon-row .dot{
  position:absolute;top:6px;right:7px;width:6px;height:6px;
  background:var(--accent);border-radius:50%;border:1.5px solid var(--tory);
}
.datetime{
  display:flex;justify-content:flex-start;align-items:center;
  margin-top:18px;background:rgba(255,255,255,.1);
  border-radius:var(--radius);padding:10px 14px;
}
.datetime .dt-item{display:flex;align-items:center;gap:4px;font-size:11px;color:var(--bonjour);font-weight:500;}
.datetime i{font-size:14px;color:var(--accent);}
.greet{margin-top:18px;}
.greet h1{font-size:19px;font-weight:700;}
.greet p{font-size:12px;color:var(--bonjour);margin-top:3px;font-weight:400;}

.card{background:var(--white);border-radius:var(--radius);padding:18px 20px;}

.member-card{
  margin:-70px 20px 0;
  box-shadow:none;
  position:relative;z-index:2;
}
.member-card .top-row{display:flex;justify-content:space-between;align-items:flex-start;}
.tier{
  display:inline-flex;align-items:center;gap:5px;
  background:var(--accent);color:var(--white);
  font-size:10px;font-weight:600;padding:4px 11px;
  border-radius:var(--radius-pill);letter-spacing:.3px;
}
.tier i{font-size:11px;}
.member-card h2{font-size:16px;font-weight:700;color:var(--navy);margin-top:9px;}
.member-card .exp{font-size:11px;color:var(--muted);margin-top:3px;font-weight:400;}
.quota{display:flex;gap:18px;margin-top:16px;border-top:1px solid var(--bonjour);padding-top:14px;}
.quota div{flex:1;}
.quota .num{font-size:18px;font-weight:700;color:var(--primary);}
.quota .lbl{font-size:10px;color:var(--muted);margin-top:2px;font-weight:400;}

.section{padding:22px 20px 0;}
.section-overlap{margin-top:-70px;position:relative;z-index:2;padding:0 20px;}
.section-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;}
.section-title h3{font-size:13px;font-weight:700;color:var(--navy);}
.section-title a{font-size:11px;color:var(--tory);font-weight:600;}

.menu-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;}
.menu-item{
  background:var(--white);border-radius:var(--radius);padding:14px 4px;
  text-align:center;display:block;box-shadow:none;
  transition:transform .15s ease;
}
.menu-item:active{transform:scale(.96);}
.menu-item .ic{
  width:40px;height:40px;border-radius:50%;background:var(--light);
  display:flex;align-items:center;justify-content:center;margin:0 auto 4px;color:var(--primary);
}
.menu-item .ic i{font-size:18px;stroke-width:1.75;}
.menu-item span{font-size:10px;color:var(--muted);font-weight:600;}

.stat-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
.stat-card{
  background:var(--white);border-radius:var(--radius);padding:16px;position:relative;overflow:hidden;
  box-shadow:none;
}
.stat-card .num{font-size:17px;font-weight:700;color:var(--navy);}
.stat-card .lbl{font-size:11px;color:var(--black);font-weight:600;margin-top:4px;}
.stat-card .sub{font-size:10px;color:var(--muted);margin-top:1px;font-weight:400;}
.stat-card i{position:absolute;right:12px;top:14px;font-size:20px;color:var(--light);}

.promo-banner{
  background:linear-gradient(135deg,var(--accent),#ff9640);
  border-radius:var(--radius);padding:15px 16px;color:var(--white);
  display:flex;justify-content:space-between;align-items:center;margin-top:14px;
  box-shadow:none;
}
.promo-banner .p-left{display:flex;align-items:center;gap:12px;}
.promo-banner .p-left>i.ticket{
  width:36px;height:36px;border-radius:50%;background:rgba(255,255,255,.2);
  display:flex;align-items:center;justify-content:center;font-size:18px;flex-shrink:0;
}
.promo-banner div p:first-child{font-size:12px;font-weight:700;}
.promo-banner div p:last-child{font-size:10px;opacity:.9;margin-top:2px;font-weight:400;}
.promo-banner button{background:var(--white);color:var(--accent);border:none;font-size:10px;font-weight:700;padding:7px 14px;border-radius:var(--radius-pill);cursor:pointer;}

.booking-card{
  background:var(--white);border-radius:var(--radius);padding:14px 16px;margin-top:12px;
  display:flex;justify-content:space-between;align-items:center;border-left:0px solid var(--primary);
  box-shadow:none;
}
.booking-card .b-left{display:flex;align-items:center;gap:12px;}
.booking-card .b-icon{width:36px;height:36px;border-radius:50%;background:var(--light);display:flex;align-items:center;justify-content:center;color:var(--primary);flex-shrink:0;}
.booking-card .b-icon i{font-size:16px;}
.booking-card .b-text p:first-child{font-size:13px;font-weight:700;color:var(--navy);}
.booking-card .b-text p:last-child{font-size:11px;color:var(--muted);margin-top:2px;font-weight:400;}
.booking-card .b-status{font-size:9px;font-weight:700;color:var(--tory);background:var(--light);padding:5px 9px;border-radius:var(--radius-pill);display:flex;align-items:center;gap:3px;}
.booking-card .b-status i{font-size:11px;}
.booking-card .b-status.pending{color:var(--accent);}
.booking-card .b-status.cancelled{color:#a32d2d;}

.nav-bottom-spacer{height:96px;}
.nav-bottom-spacer.lg{height:130px;}
@media (min-width:768px){
  .nav-bottom-spacer{height:0;}
}

.bottom-nav{
  position:fixed;left:50%;transform:translateX(-50%);bottom:calc(16px + env(safe-area-inset-bottom,0px));
  width:calc(100% - 32px);max-width:448px;
  display:flex;justify-content:center;align-items:stretch;gap:6px;
  background:var(--white);padding:6px;border-radius:var(--radius);
  box-shadow:none;
  z-index:50;
}
.nav-item{
  flex:1 1 0;min-width:0;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;
  font-size:10.5px;color:var(--muted);font-weight:600;
  padding:8px 4px;border-radius:10px;background:var(--light);
  transition:background .15s ease;
  white-space:nowrap;
}
.nav-item.active{color:var(--white);background:var(--accent);}
.nav-dot{width:26px;height:26px;border-radius:50%;display:flex;align-items:center;justify-content:center;}
.nav-dot i{font-size:18px;color:var(--muted);}
.nav-item.active .nav-dot i{color:var(--white);}

.auth-wrap{max-width:420px;margin:0 auto;padding:40px 24px;min-height:100vh;display:flex;flex-direction:column;justify-content:center;}
.auth-logo{text-align:center;margin-bottom:24px;}
.auth-logo img{height:40px;}
.auth-title{font-size:20px;font-weight:700;color:var(--navy);text-align:center;}
.auth-sub{font-size:13px;color:var(--muted);text-align:center;margin-top:4px;margin-bottom:24px;}
.form-group{margin-bottom:14px;}
.form-group label{display:block;font-size:12px;font-weight:600;color:var(--navy);margin-bottom:6px;}
.form-group input,.form-group select{
  width:100%;padding:12px 14px;border:1px solid var(--cloudy);border-radius:var(--radius);
  font-size:14px;background:var(--white);
}
.form-group input:focus,.form-group select:focus{outline:2px solid var(--tory);border-color:transparent;}
.btn{
  display:block;width:100%;padding:13px;border:none;border-radius:var(--radius);
  background:var(--tory);color:var(--white);font-size:14px;font-weight:700;cursor:pointer;text-align:center;
}
.btn:hover{background:var(--navy);}
.btn-accent{background:var(--accent);}
.auth-footer{text-align:center;font-size:12px;color:var(--muted);margin-top:16px;}
.auth-footer a{color:var(--tory);font-weight:600;}
.alert{padding:10px 14px;border-radius:var(--radius);font-size:12px;font-weight:600;margin-bottom:14px;}
.alert-error{background:#FCEBEB;color:#791F1F;}
.alert-success{background:#EAF3DE;color:#27500A;}

.calendar-card{background:var(--white);border-radius:var(--radius);padding:16px;margin:16px 20px 0;}
.cal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;font-weight:700;color:var(--navy);font-size:14px;}
.cal-head button{background:none;border:none;color:var(--tory);font-size:16px;cursor:pointer;}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;text-align:center;}
.cal-grid span{font-size:10px;color:var(--muted);font-weight:600;padding:4px 0;}
.cal-day{font-size:12px;padding:8px 0;border-radius:8px;cursor:pointer;}
.cal-day.active{background:var(--tory);color:var(--white);font-weight:700;}
.cal-day.disabled{color:var(--cloudy);cursor:default;}
.slot-groups{margin-top:16px;}
.slot-label{font-size:11px;color:var(--muted);font-weight:600;margin-bottom:6px;}
.slot-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:14px;}
.slot{padding:10px 4px;text-align:center;border:1px solid var(--cloudy);border-radius:var(--radius);font-size:12px;font-weight:600;cursor:pointer;background:var(--white);}
.slot.selected{background:var(--tory);color:var(--white);border-color:var(--tory);}
.slot.booked{background:var(--bonjour);color:var(--cloudy);cursor:not-allowed;text-decoration:line-through;}

.auth2-bg{
  min-height:100vh;
  display:flex;align-items:center;justify-content:center;
  padding:32px 20px;
  background: linear-gradient(160deg, var(--accent) 0%, #ff9640 100%);
}
.auth2-card{
  width:100%;max-width:380px;background:var(--white);
  border-radius:var(--radius-xl);
  padding:36px 28px 30px;
  box-shadow:none;
  position:relative;
}
.auth2-logo{display:flex;justify-content:center;margin-bottom:22px;}
.auth2-logo img{height:42px;width:auto;object-fit:contain;}
.auth2-head{margin-bottom:24px;}
.auth2-head h1{font-size:21px;font-weight:800;color:var(--ink);line-height:1.3;}
.auth2-head h1 span{color:var(--primary);text-decoration:underline;text-decoration-color:var(--accent);text-decoration-thickness:2px;text-underline-offset:3px;}
.auth2-head p{font-size:13px;color:var(--gray);margin-top:4px;}

.auth2-field{margin-bottom:14px;}
.auth2-field label{display:block;font-size:11px;font-weight:700;color:var(--ink);margin-bottom:6px;letter-spacing:.2px;}
.auth2-input{
  display:flex;align-items:center;gap:10px;
  border:1px solid var(--light);background:var(--light);
  border-radius:var(--radius-md);
  padding:12px 14px;
}
.auth2-input:focus-within{border-color:var(--primary);background:var(--white);box-shadow:none;}
.auth2-input i{font-size:16px;color:var(--gray);flex-shrink:0;}
.auth2-input input{
  border:none;background:transparent;outline:none;
  width:100%;font-size:14px;color:var(--black);
}
.auth2-input i.toggle-eye{cursor:pointer;}

.auth2-row{display:flex;justify-content:space-between;align-items:center;margin:4px 0 22px;}
.auth2-remember{display:flex;align-items:center;gap:7px;font-size:12px;color:var(--muted);}
.auth2-remember input{accent-color:var(--primary);width:14px;height:14px;}
.auth2-row a{font-size:12px;font-weight:600;color:var(--primary);}

.auth2-btn{
  display:block;width:100%;padding:14px;border:none;
  border-radius:var(--radius-pill);
  background:linear-gradient(135deg,var(--primary),var(--secondary));
  color:var(--white);font-size:14px;font-weight:700;cursor:pointer;text-align:center;
  box-shadow:none;
}
.auth2-btn:hover{filter:brightness(1.05);}

.auth2-divider{display:flex;align-items:center;gap:10px;margin:22px 0 16px;}
.auth2-divider span{flex:1;height:1px;background:var(--light);}
.auth2-divider small{font-size:11px;color:var(--gray);font-weight:600;}

.auth2-alt{
  display:block;width:100%;padding:13px;text-align:center;
  border:1px solid var(--primary);border-radius:var(--radius-pill);
  color:var(--primary);font-size:13px;font-weight:700;background:var(--white);
}
.auth2-alt:hover{background:var(--light);}

.auth2-footer{text-align:center;font-size:12px;color:var(--muted);margin-top:18px;}
.auth2-footer a{color:var(--primary);font-weight:700;}

.auth2-alert{padding:10px 14px;border-radius:var(--radius);font-size:12px;font-weight:600;margin-bottom:16px;}
.auth2-alert.error{background:#FCEBEB;color:#791F1F;}

@media (max-width:480px){
  .app{border-radius:0;}
}

@media (min-width:481px) and (max-width:767px){
  body{
    display:flex;
    justify-content:center;
    align-items:flex-start;
    padding:40px 16px;
    background:linear-gradient(160deg,#eef0f8 0%,var(--bonjour) 100%);
  }
  .app{
    width:420px;
    max-width:420px;
    min-height:auto;
    border-radius:28px;
    overflow:hidden;
    box-shadow:none;
    position:relative;
    padding-bottom:88px;
  }
  .bottom-nav{position:absolute;bottom:calc(16px + env(safe-area-inset-bottom,0px));}
  .auth2-card{box-shadow:none;}
}

/* dedicated desktop sidebar — hidden on mobile, mobile .bottom-nav is untouched */
.dsidebar{display:none;}

@media (min-width:768px){
  :root{
    --sidebar-w: 240px;
    --sidebar-w-collapsed: 80px;
    --sidebar-margin: 10px;
  }

  body{background:var(--bonjour);padding-bottom:0;}

  /* mobile floating pill nav is fully replaced by the sidebar on desktop */
  .bottom-nav{display:none;}

  /* content area fills the full viewport width to the right of the sidebar */
  .app{
    max-width:none;
    width:auto;
    margin:0;
    margin-left:calc(var(--sidebar-w) + (var(--sidebar-margin) * 2));
    min-height:100vh;
    padding-left:0;
    padding-bottom:40px;
    box-shadow:none;
    border-radius:0;
    transition:margin-left .2s ease;
  }
  body.sidebar-collapsed .app{margin-left:calc(var(--sidebar-w-collapsed) + (var(--sidebar-margin) * 2));}

  .header{padding:28px 40px 64px;border-radius:0;}
  .topbar-fixed{border-radius:0 0 10px 10px;}
  .topbar-fixed .logo{display:none;}
  .topbar-fixed .header-top{justify-content:flex-end;}

  .topbar-fixed .header-top,.datetime,.greet{max-width:none;margin-left:0;margin-right:0;}
  .section{max-width:none;margin-left:0;margin-right:0;padding:22px 40px 0;}
  .member-card{max-width:none;margin:-46px 40px 0;}
  .calendar-card{max-width:none;margin:16px 40px 0;}

  .menu-grid{grid-template-columns:repeat(5,1fr);}
  .stat-grid{grid-template-columns:repeat(4,1fr);}

  /* ===== desktop sidebar — floats with a margin on every side ===== */
  .dsidebar{
    display:flex;
    flex-direction:column;
    position:fixed;
    left:var(--sidebar-margin);
    top:var(--sidebar-margin);
    bottom:var(--sidebar-margin);
    width:var(--sidebar-w);
    height:auto;
    border-radius:10px;
    background:linear-gradient(180deg,var(--navy),#00082e);
    z-index:100;
    overflow-x:hidden;
    overflow-y:auto;
    transition:width .2s ease;
  }
  body.sidebar-collapsed .dsidebar{width:var(--sidebar-w-collapsed);}

  .dsidebar-top{
    display:flex;align-items:center;justify-content:space-between;
    gap:8px;padding:18px 14px;flex-shrink:0;
  }
  .dsidebar-logo{display:flex;align-items:center;min-width:0;}
  .dsidebar-logo img{
    height:28px;width:auto;object-fit:contain;
    filter:brightness(0) invert(1);
  }
  body.sidebar-collapsed .dsidebar-logo{display:none;}

  .dsidebar-toggle{
    flex-shrink:0;width:30px;height:30px;border-radius:50%;
    border:none;background:rgba(255,255,255,.1);color:var(--white);
    display:flex;align-items:center;justify-content:center;
    cursor:pointer;font-size:14px;transition:background .15s ease,transform .2s ease;
  }
  .dsidebar-toggle:hover{background:rgba(255,255,255,.2);}
  body.sidebar-collapsed .dsidebar-toggle{transform:rotate(180deg);margin:0 auto;}
  body.sidebar-collapsed .dsidebar-top{justify-content:center;padding:18px 8px;}

  .dsidebar-nav{display:flex;flex-direction:column;gap:4px;padding:8px 12px 20px;}

  .dnav-item{
    display:flex;align-items:center;gap:12px;
    padding:11px 12px;border-radius:10px;
    color:rgba(255,255,255,.72);font-size:13px;font-weight:600;
    white-space:nowrap;overflow:hidden;
  }
  .dnav-item:hover{background:rgba(255,255,255,.08);color:var(--white);}
  .dnav-item.active{background:var(--accent);color:var(--white);}
  .dnav-ic{
    flex-shrink:0;width:34px;height:34px;border-radius:9px;
    background:rgba(255,255,255,.08);
    display:flex;align-items:center;justify-content:center;
  }
  .dnav-item.active .dnav-ic{background:rgba(255,255,255,.2);}
  .dnav-ic i{font-size:16px;}
  .dnav-label{overflow:hidden;text-overflow:ellipsis;}

  body.sidebar-collapsed .dnav-label{display:none;}
  body.sidebar-collapsed .dnav-item{justify-content:center;padding:11px;}
  body.sidebar-collapsed .dsidebar-nav{padding:8px 8px 20px;}

  .auth2-card{box-shadow:none;}
  .auth2-bg{padding:60px 20px;}

}

/* on very wide monitors, cap the content so lines/cards don't stretch edge to edge forever */
@media (min-width:1600px){
  .topbar-fixed .header-top,.datetime,.greet,.section{
    max-width:1760px;margin-left:auto;margin-right:auto;
  }
  .member-card{max-width:1760px;margin-left:auto;margin-right:auto;}
  .calendar-card{max-width:1760px;margin-left:auto;margin-right:auto;}
}