/* Daily Care Support App Suite — shared styles (brand palette v2) */
:root{
  --teal-900:#190D39;
  --teal-700:#373CB6;
  --teal-600:#4A50C9;
  --teal-100:#EAEFFB;
  --teal-50:#F0F6F8;
  --ivory:#F6F8FC;
  --paper:#FFFFFF;
  --ink:#1F2A28;
  --ink-soft:#52645F;
  --ink-faint:#8A9A95;
  --line:#E3E0D8;
  --coral:#0F766E;
  --coral-100:#CCFBF1;
  --amber:#C98A1E;
  --amber-100:#FBEFD9;
  --green:#3F8F5F;
  --green-100:#E3F1E7;
  --red:#C1554B;
  --red-100:#F8E3E0;
  --radius-sm:8px;
  --radius-md:12px;
  --radius-lg:18px;
  --shadow-card:0 1px 2px rgba(23,59,57,0.06), 0 4px 16px rgba(23,59,57,0.08);
}
*{box-sizing:border-box;}
body{
  margin:0;
  font-family:'Inter',system-ui,-apple-system,sans-serif;
  color:var(--ink);
  background:var(--ivory);
  -webkit-font-smoothing:antialiased;
}
/* Center fixed-width mobile mockup frames instead of leaving them pinned left */
body > div[style*="width:390px"]{
  margin:24px auto;
}
/* On real phones, fill the actual viewport width instead of staying pinned
   at 390px — a device narrower than 390px (iPhone SE, many Android phones)
   would otherwise force the visitor to pinch-zoom out just to see it. */
@media (max-width:430px){
  body > div[style*="width:390px"]{
    width:100% !important;
    max-width:390px;
    margin:0 auto;
  }
}
h1,h2,h3,h4{margin:0;font-weight:700;letter-spacing:-0.01em;color:var(--teal-900);}
p{margin:0;}
a{color:var(--teal-700);text-decoration:none;}
a:hover{color:var(--teal-900);}
button{font-family:inherit;}
input,select,textarea{font-family:inherit;}

.eyebrow{
  font-size:12px;font-weight:700;letter-spacing:0.08em;text-transform:uppercase;color:var(--teal-600);
}
.muted{color:var(--ink-soft);}
.faint{color:var(--ink-faint);}

/* Buttons */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:12px 20px;border-radius:var(--radius-md);font-size:15px;font-weight:600;
  border:1px solid transparent;cursor:pointer;line-height:1.2;
}
.btn-primary{background:var(--teal-700);color:#fff;}
.btn-primary:hover{background:var(--teal-900);}
.btn-secondary{background:var(--paper);color:var(--teal-700);border-color:var(--teal-700);}
.btn-secondary:hover{background:var(--teal-50);}
.btn-ghost{background:transparent;color:var(--teal-700);padding:10px 12px;}
.btn-coral{background:var(--coral);color:#fff;}
.btn-block{width:100%;}
.btn-sm{padding:8px 14px;font-size:13px;border-radius:var(--radius-sm);}

/* Cards */
.card{
  background:var(--paper);border:1px solid var(--line);border-radius:var(--radius-lg);
  padding:20px;box-shadow:var(--shadow-card);
}
.card-flat{
  background:var(--paper);border:1px solid var(--line);border-radius:var(--radius-md);padding:16px;
}

/* Tags / badges */
.tag{
  display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;
  font-size:12px;font-weight:600;white-space:nowrap;
}
.tag-success{background:var(--green-100);color:var(--green);}
.tag-warning{background:var(--amber-100);color:var(--amber);}
.tag-danger{background:var(--red-100);color:var(--red);}
.tag-neutral{background:var(--teal-100);color:var(--teal-700);}
.tag-coral{background:var(--coral-100);color:var(--coral);}

/* Forms */
.field{display:flex;flex-direction:column;gap:6px;}
.field label{font-size:13px;font-weight:600;color:var(--ink-soft);}
.field input,.field select{
  padding:12px 14px;border-radius:var(--radius-sm);border:1px solid var(--line);
  font-size:15px;background:var(--paper);color:var(--ink);
}
.field input:focus,.field select:focus{outline:2px solid var(--teal-600);outline-offset:1px;}
.checkbox-row{display:flex;align-items:flex-start;gap:12px;}
.checkbox-row input[type="checkbox"]{width:20px;height:20px;margin-top:2px;accent-color:var(--teal-700);}

/* Layout helpers */
.stack{display:flex;flex-direction:column;}
.row{display:flex;flex-direction:row;}
.wrap{flex-wrap:wrap;}
.gap-4{gap:4px;}
.gap-6{gap:6px;}
.gap-8{gap:8px;}
.gap-12{gap:12px;}
.gap-16{gap:16px;}
.gap-20{gap:20px;}
.gap-24{gap:24px;}
.between{justify-content:space-between;}
.center{align-items:center;}

/* Phone shell */
.phone-screen{
  width:100%;height:100%;display:flex;flex-direction:column;background:var(--ivory);
  overflow:hidden;
}
.phone-header{
  padding:20px 20px 16px;background:var(--paper);border-bottom:1px solid var(--line);
  display:flex;align-items:center;justify-content:space-between;flex-shrink:0;
}
.phone-body{flex:1;overflow-y:auto;padding:16px 20px 20px;display:flex;flex-direction:column;gap:14px;}
.tabbar{
  flex-shrink:0;display:flex;border-top:1px solid var(--line);background:var(--paper);padding:8px 4px 10px;
}
.tab-item{
  flex:1;display:flex;flex-direction:column;align-items:center;gap:4px;padding:4px 2px;
  font-size:11px;font-weight:600;color:var(--ink-faint);
}
.tab-item.active{color:var(--teal-700);}
.tab-item svg{width:22px;height:22px;}

/* Avatar */
.avatar{
  width:40px;height:40px;border-radius:50%;background:var(--teal-100);color:var(--teal-700);
  display:flex;align-items:center;justify-content:center;font-weight:700;font-size:15px;flex-shrink:0;
}
.avatar-sm{width:32px;height:32px;font-size:13px;}

/* List rows */
.list-row{
  display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--line);
}
.list-row:last-child{border-bottom:none;}

/* Progress */
.progress-track{height:8px;border-radius:999px;background:var(--teal-100);overflow:hidden;}
.progress-fill{height:100%;background:var(--teal-700);border-radius:999px;}

/* Web app shell */
.app-shell{display:flex;min-height:100%;width:100%;}
.sidebar{
  width:240px;flex-shrink:0;background:var(--teal-900);color:#fff;display:flex;flex-direction:column;
  padding:24px 16px;gap:4px;
}
.sidebar-brand{display:flex;align-items:center;gap:10px;padding:0 8px 24px;}
.sidebar-brand-mark{
  width:34px;height:34px;border-radius:9px;background:var(--teal-700);display:flex;align-items:center;
  justify-content:center;font-weight:800;color:#fff;font-size:15px;flex-shrink:0;
}
.sidebar-brand-text{font-size:14px;font-weight:700;color:#fff;line-height:1.2;}
.sidebar-link{
  display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:var(--radius-sm);
  color:rgba(255,255,255,0.72);font-size:14px;font-weight:600;
}
.sidebar-link svg{width:18px;height:18px;flex-shrink:0;}
.sidebar-link.active{background:rgba(255,255,255,0.12);color:#fff;}
.sidebar-link:hover{color:#fff;}
.sidebar-section{flex:1;display:flex;flex-direction:column;gap:2px;}
.sidebar-foot{display:flex;align-items:center;gap:10px;padding:10px 8px;border-top:1px solid rgba(255,255,255,0.14);margin-top:8px;}

.main-area{flex:1 1 560px;min-width:0;display:flex;flex-direction:column;background:var(--ivory);}
.topbar{
  display:flex;align-items:center;justify-content:space-between;padding:18px 32px;
  border-bottom:1px solid var(--line);background:var(--paper);flex-wrap:wrap;gap:12px;
}
.content-area{padding:28px 32px 48px;display:flex;flex-direction:column;gap:24px;flex:1;}

/* Tables */
.table{width:100%;border-collapse:collapse;font-size:14px;}
.table th{
  text-align:left;padding:10px 14px;font-size:12px;font-weight:700;color:var(--ink-soft);
  text-transform:uppercase;letter-spacing:0.04em;border-bottom:1px solid var(--line);
}
.table td{padding:12px 14px;border-bottom:1px solid var(--line);vertical-align:middle;}
.table-wrap{overflow-x:auto;border-radius:var(--radius-md);border:1px solid var(--line);background:var(--paper);}
.table-wrap .table{border:none;}

/* Stat tiles */
.stat-tile{
  background:var(--paper);border:1px solid var(--line);border-radius:var(--radius-lg);
  padding:18px 20px;display:flex;flex-direction:column;gap:6px;flex:1 1 180px;min-width:160px;
}
.stat-value{font-size:28px;font-weight:800;color:var(--teal-900);}

/* Chat */
.msg-row{display:flex;gap:10px;align-items:flex-start;}
.msg-bubble{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius-md);padding:10px 14px;font-size:14px;}

/* Grid */
.grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;}
.grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;}
.grid-4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;}
@media (max-width:900px){
  .grid-3,.grid-4{grid-template-columns:repeat(2,minmax(0,1fr));}
  .sidebar{width:72px;}
  .sidebar-link span.label-text{display:none;}
  .sidebar-brand-text{display:none;}
}
