/* =========================================================
   CHIARA FRAGLIASSO — MAKEUP ARTIST
   Design system — mobile-first webapp
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700;800&display=swap');

:root{
  /* --- brand palette (drawn from the logo) --- */
  --ink:        #123039;   /* deep petrol teal — primary */
  --ink-2:      #1c4a56;   /* lighter teal for gradients/hover */
  --ink-tint:   #e8eef0;   /* pale wash of ink for chips/bg */
  --coral:      #e15263;   /* the little heart in the logo */
  --coral-dark: #c53c4c;
  --gold:       #c69a5c;   /* warm accent for money / success highlights */
  --cream:      #f7f2ea;   /* app background */
  --paper:      #ffffff;   /* card surfaces */
  --line:       #e8e0d2;   /* hairlines on cream */
  --ink-soft:   #5b6b6e;   /* secondary text */
  --danger:     #c0392b;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 3px rgba(18,48,57,0.06), 0 1px 2px rgba(18,48,57,0.08);
  --shadow-md: 0 8px 24px rgba(18,48,57,0.10);
  --shell-w: 520px;
}

*{ box-sizing: border-box; }

html, body{
  background: #ded6c6;
}

body{
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6{
  font-family: 'Fraunces', 'Georgia', serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* =========================================================
   APP SHELL — frames the whole experience like a phone app
   even when opened on a wider screen
   ========================================================= */
.app-shell{
  max-width: var(--shell-w);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--cream);
  position: relative;
  box-shadow: 0 0 60px rgba(0,0,0,0.18);
  padding-bottom: 96px; /* room for bottom nav */
}

/* Top brand bar */
.brand-header{
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 100%);
  padding: 22px 20px 34px;
  border-radius: 0 0 28px 28px;
  position: relative;
  overflow: hidden;
  margin-bottom: -18px;
}
.brand-header::after{
  content: "";
  position: absolute;
  right: -40px; top: -60px;
  width: 180px; height: 180px;
  border: 18px solid rgba(255,255,255,0.06);
  border-radius: 50%;
}
.brand-header .brand-row{
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}
.brand-header .logo-chip{
  background: transparent;
  border-radius: 14px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  flex-shrink: 0;
}
.brand-header img.brand-logo{
  height: 50px;
  width: auto;
  display: block;
  border-radius: 8px;
}
.brand-header .brand-text{
  color: #fff;
}
.brand-header .brand-text .eyebrow{
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  display: block;
  margin-bottom: 2px;
}
.brand-header .brand-text .page-title{
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.15;
}

/* Main scroll area */
.app-main{
  padding: 20px 18px 24px;
  position: relative;
  z-index: 1;
}

/* =========================================================
   BOTTOM NAVIGATION
   ========================================================= */
.bottom-nav{
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: var(--shell-w);
  background: var(--paper);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  z-index: 50;
  box-shadow: 0 -4px 20px rgba(18,48,57,0.08);
}
.nav-item{
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 2px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: color .15s ease;
}
.nav-item svg{ width: 22px; height: 22px; stroke: currentColor; }
.nav-item.active{ color: var(--ink); }
.nav-item.active svg{ stroke: var(--coral); }
.nav-item span{ line-height: 1; }

.nav-fab-wrap{
  flex: 1;
  display: flex;
  justify-content: center;
  position: relative;
}
.nav-fab{
  position: relative;
  top: -22px;
  width: 54px; height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--coral) 0%, var(--coral-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(225,82,99,0.45);
  text-decoration: none;
  border: 4px solid var(--cream);
}
.nav-fab svg{ width: 24px; height: 24px; stroke: #fff; }

/* =========================================================
   BUTTONS
   ========================================================= */
.btn{
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 13px 18px;
  border: none;
  font-size: 15px;
  transition: transform .1s ease, box-shadow .15s ease, opacity .15s ease;
}
.btn:active{ transform: scale(0.98); }

.btn-primary, .btn.btn-primary{
  background: var(--ink);
  color: #fff !important;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover, .btn.btn-primary:hover{ background: var(--ink-2); color:#fff; }

.btn-coral{
  background: var(--coral);
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(225,82,99,0.30);
}
.btn-coral:hover{ background: var(--coral-dark); color: #fff; }

.btn-dark, .btn.btn-dark{
  background: var(--ink) !important;
  color: #fff !important;
  border: none;
}

.btn-danger, .btn.btn-danger{
  background: #fff !important;
  color: var(--danger) !important;
  border: 1.5px solid #f1d4d0 !important;
  box-shadow: none;
}
.btn-danger:hover{ background: #fdf2f1 !important; }

.btn-outline-danger{
  background: #fff;
  color: var(--danger);
  border: 1.5px solid #f1d4d0;
}
.btn-outline-secondary{
  background: #fff;
  color: var(--ink-soft);
  border: 1.5px solid var(--line);
}
.btn-warning{
  background: #fbe9cf !important;
  color: #8a5a12 !important;
  border: none;
}
.btn-success{
  background: var(--gold) !important;
  color: #fff !important;
  border: none;
}
.btn-secondary{
  background: var(--ink-tint) !important;
  color: var(--ink) !important;
  border: none;
}
.btn-xs{ padding: 5px 10px !important; font-size: 11.5px !important; border-radius: 8px !important; }

/* =========================================================
   CARDS
   ========================================================= */
.card{
  border: none !important;
  border-radius: var(--radius-md) !important;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.stat-card{
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 100%);
  color: #fff;
  text-align: center;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.stat-card::before{
  content: "";
  position: absolute;
  left: -30px; bottom: -50px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}
.stat-card h5{ color: rgba(255,255,255,0.75); font-family:'Inter'; font-size:13px; font-weight:600; text-transform:uppercase; letter-spacing:.08em; margin-bottom: 10px;}
.stat-card h2{ color: var(--gold); font-size: 34px; margin-bottom: 6px; }
.stat-card p{ color: rgba(255,255,255,0.8); font-size: 14px; }

/* =========================================================
   FORMS
   ========================================================= */
.form-label{
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 6px;
}
.form-control, .form-select{
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 15px;
  background: #fff;
  color: var(--ink);
}
.form-control:focus, .form-select:focus{
  border-color: var(--ink-2);
  box-shadow: 0 0 0 3px rgba(28,74,86,0.12);
}
textarea.form-control{ min-height: 90px; }
.form-control:disabled{
  background: #fff;
  color: var(--ink);
  opacity: 1;
  border: 1.5px solid var(--line);
  font-weight: 600;
  font-size: 16px;
}

.input-group-text{
  background: var(--ink-tint);
  border: 1.5px solid var(--line);
  border-right: none;
  color: var(--ink);
  font-weight: 700;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}
.input-group .form-control{ border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* =========================================================
   ALERTS
   ========================================================= */
.alert{ border: none; border-radius: var(--radius-sm); padding: 13px 16px; font-size: 14px; font-weight: 500; }
.alert-success{ background: #e8f3ea; color: #2b6b3b; }
.alert-danger{ background: #fbe8e6; color: #a3352a; }

/* =========================================================
   APPOINTMENT LIST
   ========================================================= */
.search-card{
  border-radius: var(--radius-lg) !important;
  padding: 18px 18px 14px;
  margin-bottom: 20px;
  background: var(--paper) !important;
}
.section-title{
  font-family: 'Fraunces', serif;
  font-size: 18px;
  font-weight: 600;
  margin: 4px 0 14px;
  color: var(--ink);
}

.list-group{ display: flex; flex-direction: column; gap: 10px; }
.list-group-item{
  border: none !important;
  border-radius: var(--radius-md) !important;
  padding: 14px 16px !important;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  transition: transform .12s ease;
}
.list-group-item:active{ transform: scale(0.985); }
.list-group-item h5{ font-size: 16px; font-weight: 600; margin-bottom: 0; }
.list-group-item small.text-muted{ color: var(--ink-soft) !important; font-weight: 600; font-size: 12px; }
.list-group-item p.text-danger{ color: var(--coral) !important; font-size: 13.5px; margin: 6px 0 2px; }
.list-group-item small.d-block{ color: var(--ink-soft); font-size: 13px; }
.list-group-item .badge{ border-radius: 20px; font-weight: 600; font-size: 11px; padding: 5px 10px; }
.list-group-item .badge.bg-warning{ background: #fbe9cf !important; color: #8a5a12 !important; }
.list-group-item .badge.bg-success{ background: var(--ink-tint) !important; color: var(--ink-2) !important; font-size: 12.5px; }

/* =========================================================
   PHOTO GRID
   ========================================================= */
.photo-card{ border-radius: var(--radius-md) !important; overflow: hidden; }
.photo-card img{ border-radius: var(--radius-md) var(--radius-md) 0 0 !important; }

/* =========================================================
   BADGES / CHIPS
   ========================================================= */
.badge{ font-weight: 600; }

/* =========================================================
   LOGIN
   ========================================================= */
.login-shell{
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--ink) 0%, var(--ink-2) 55%, #244f5a 100%);
  padding: 24px;
}
.login-card{
  max-width: 380px;
  width: 100%;
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: 40px 30px 34px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
  text-align: center;
}
.login-card img{ height: 150px; width: auto; margin-bottom: 6px; }
.login-card .eyebrow{
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 700;
  margin-bottom: 22px;
}
.login-card h5{ font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 20px; }
.login-card .form-label{ text-align: left; display:block; }
.login-card hr{ border-color: var(--line); margin: 18px 0; }

/* misc helpers */
.text-muted{ color: var(--ink-soft) !important; }
.shadow-sm{ box-shadow: var(--shadow-sm) !important; }
.fw-bold{ font-weight: 700 !important; }
.rounded{ border-radius: var(--radius-sm) !important; }

.empty-state{
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-soft);
}
.empty-state .glyph{ font-size: 34px; margin-bottom: 10px; display:block; }

/* =========================================================
   MODALE DI MODIFICA (appuntamento)
   ========================================================= */
.edit-modal-overlay{
  position: fixed;
  inset: 0;
  background: rgba(18,48,57,0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease;
  z-index: 100;
  padding: 0;
}
.edit-modal-overlay.active{ opacity: 1; visibility: visible; }
.edit-modal-card{
  background: var(--paper);
  width: 100%;
  max-width: var(--shell-w);
  max-height: 85vh;
  max-height: 85dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 24px 24px 0 0;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 40px rgba(0,0,0,0.25);
  transform: translateY(12px);
  transition: transform .2s ease;
}
.edit-modal-overlay.active .edit-modal-card{ transform: translateY(0); }
.edit-modal-header{
  display:flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-shrink: 0;
}
.edit-modal-header h5{ font-family:'Fraunces', serif; font-size: 18px; }
.edit-modal-close{
  width: 34px; height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--ink-tint);
  color: var(--ink);
  font-size: 15px;
  cursor: pointer;
}
.edit-modal-close:hover{ background: var(--line); }
.edit-modal-form{
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}
.edit-modal-scroll{
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding-bottom: 4px;
}
.edit-modal-save{
  flex-shrink: 0;
  margin-top: 14px;
}

@media (min-width: 620px){
  .edit-modal-overlay{ align-items: center; }
  .edit-modal-card{ border-radius: 24px; max-height: 80vh; }
}

/* =========================================================
   PORTFOLIO PUBBLICO — responsive: mobile + desktop
   ========================================================= */
.portfolio-page{
  min-height: 100vh;
  background: var(--cream);
}
.portfolio-container{
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 18px 70px;
}

.portfolio-hero{
  background: linear-gradient(160deg, var(--ink) 0%, var(--ink-2) 60%, #24575f 100%);
  padding: 34px 24px 36px;
  text-align: center;
  border-radius: 28px;
  position: relative;
  overflow: hidden;
}
.portfolio-hero::before{
  content:"";
  position:absolute; left:-60px; top:-60px;
  width:220px; height:220px;
  border:20px solid rgba(255,255,255,0.05);
  border-radius:50%;
}
.portfolio-hero::after{
  content:"";
  position:absolute; right:-50px; bottom:-70px;
  width:180px; height:180px;
  border-radius:50%;
  background: rgba(225,82,99,0.12);
}
.portfolio-hero .logo-chip{
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:10px;
  position:relative;
  z-index:1;
}
.portfolio-hero .logo-chip img{ height:150px; width:auto; display:block; }
@media (min-width: 620px){
  .portfolio-hero .logo-chip img{ height:190px; }
}
.portfolio-hero .eyebrow{
  color: rgba(255,255,255,0.65);
  font-size:11px; letter-spacing:.18em; text-transform:uppercase; font-weight:700;
  position:relative; z-index:1;
}
.portfolio-hero h1{
  color:#fff; font-size:28px; margin: 8px 0 4px; position:relative; z-index:1;
}
.portfolio-hero .hero-rule{
  width: 46px; height: 2px; background: var(--gold);
  margin: 12px auto 16px; position:relative; z-index:1; border-radius: 2px;
}
.portfolio-hero p.tagline{
  color: rgba(255,255,255,0.75);
  font-size:14.5px; max-width: 380px; margin: 0 auto 24px;
  position:relative; z-index:1;
}

.whatsapp-btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  background:#25D366;
  color:#fff !important;
  font-weight:700;
  font-size:14.5px;
  padding:13px 22px;
  border-radius: 999px;
  text-decoration:none;
  box-shadow: 0 10px 24px rgba(37,211,102,0.35);
  position:relative; z-index:1;
  transition: transform .15s ease;
}
.whatsapp-btn:hover{ transform: translateY(-2px); }
.whatsapp-btn svg{ width:19px; height:19px; fill:#fff; }

.whatsapp-fab{
  position:fixed;
  right: 20px;
  bottom: 20px;
  width:56px; height:56px;
  background:#25D366;
  border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 8px 20px rgba(37,211,102,0.45);
  z-index:60;
  transition: transform .15s ease;
}
.whatsapp-fab:hover{ transform: scale(1.06); }
.whatsapp-fab svg{ width:27px; height:27px; fill:#fff; }

.portfolio-section-title{
  font-family:'Fraunces', serif;
  font-size:20px;
  font-weight:600;
  margin: 34px 0 4px;
  color: var(--ink);
  text-align:center;
}
.portfolio-section-sub{
  text-align:center;
  color: var(--ink-soft);
  font-size: 13px;
  margin-bottom: 22px;
}

.portfolio-grid{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 620px){
  .portfolio-grid{ grid-template-columns: repeat(3, 1fr); gap: 16px; }
}
@media (min-width: 900px){
  .portfolio-grid{ grid-template-columns: repeat(4, 1fr); gap: 18px; }
}

.portfolio-card{
  position:relative;
  border-radius: var(--radius-md);
  overflow:hidden;
  box-shadow: var(--shadow-sm);
  aspect-ratio: 3/4;
  background: var(--ink-tint);
}
.portfolio-card img{
  width:100%; height:100%; object-fit:cover; display:block;
  transition: transform .5s ease;
}
.portfolio-card:hover img{ transform: scale(1.06); }
.portfolio-card .caption{
  position:absolute; left: 10px; bottom: 10px;
  padding: 5px 12px;
  background: rgba(255,255,255,0.94);
  color: var(--ink);
  border-radius: 999px;
  font-size:11.5px;
  font-weight:700;
  letter-spacing: .02em;
  box-shadow: 0 4px 10px rgba(0,0,0,0.18);
}

.portfolio-footer{
  text-align:center;
  padding: 30px 20px 20px;
  color: var(--ink-soft);
  font-size:12.5px;
}

/* Fascia "fiducia" sotto l'hero */
.trust-row{
  display:flex;
  justify-content:center;
  gap: 10px;
  margin: 18px 0 6px;
  flex-wrap: wrap;
}
.trust-item{
  display:flex;
  align-items:center;
  gap:6px;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.trust-icon{ font-size: 14px; }

/* Hint di zoom sulla card, visibile all'hover su desktop */
.portfolio-card{ cursor: pointer; }
.portfolio-card .zoom-hint{
  position:absolute;
  top: 10px; right: 10px;
  width: 30px; height: 30px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  display:flex; align-items:center; justify-content:center;
  font-size: 13px;
  opacity: 0;
  transition: opacity .2s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.portfolio-card:hover .zoom-hint,
.portfolio-card:focus .zoom-hint{ opacity: 1; }
.portfolio-card:focus{ outline: 2px solid var(--gold); outline-offset: 2px; }

/* Lightbox: ingrandimento foto a schermo intero */
.lightbox{
  position: fixed;
  inset: 0;
  background: rgba(10,22,26,0.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease;
  z-index: 100;
}
.lightbox.active{ opacity: 1; visibility: visible; }
.lightbox img{
  max-width: 100%;
  max-height: 80vh;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox-name{
  color:#fff;
  font-family:'Fraunces', serif;
  font-size: 17px;
  margin-top: 16px;
  letter-spacing: .02em;
}
.lightbox-close{
  position: absolute;
  top: 18px; right: 18px;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}
.lightbox-close:hover{ background: rgba(255,255,255,0.22); }