/* ============================================
   DISPO BUDDY — MESSAGES STYLES
   ============================================ */

:root{
  --navy:#0D1F3C;--navy2:#0a1828;
  --orange:#F7941D;--orange-dark:#d97c0e;
  --blue:#29ABE2;--blue-dark:#1a8bbf;--blue-light:#EBF8FF;
  --green:#22c55e;--red:#ef4444;
  --white:#fff;--bg:#F4F6F9;--bg-section:#EEF2F6;
  --text:#0D1F3C;--text-mid:#4A6070;--text-light:#718096;
  --border:#E2E8F0;--border-light:#EEF2F6;
  --r:14px;--r-sm:8px;
  --font:'Poppins',sans-serif;
  --shadow-sm:0 1px 3px rgba(13,31,60,.06);
}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
body{font-family:var(--font);color:var(--text);background:var(--bg);line-height:1.6;-webkit-font-smoothing:antialiased;min-height:100vh}
a{text-decoration:none;color:inherit}
img{max-width:100%;display:block}
button{font-family:var(--font);cursor:pointer}

.nav{position:fixed;top:0;left:0;right:0;height:72px;background:rgba(255,255,255,.92);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border-bottom:1px solid var(--border);z-index:1000;transition:box-shadow .3s}
.nav.scrolled{box-shadow:0 2px 20px rgba(13,31,60,.08)}
.nav-inner{display:flex;align-items:center;justify-content:space-between;height:100%;max-width:1100px;margin:0 auto;padding:0 24px}
.nav-logo img{height:60px;width:auto}
.nav-links{display:flex;gap:28px}
.nav-links a{font-size:13px;font-weight:500;color:var(--text-mid);transition:color .15s}
.nav-links a:hover,.nav-links a.active{color:var(--blue)}
.nav-right{display:flex;align-items:center;gap:10px}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:10px 22px;border-radius:var(--r-sm);font-family:var(--font);font-weight:600;font-size:13px;cursor:pointer;border:2px solid transparent;transition:all .2s;white-space:nowrap}
.btn-o{background:var(--orange);color:var(--white);border-color:var(--orange)}
.btn-o:hover{background:var(--orange-dark);border-color:var(--orange-dark)}
.btn-ghost{background:transparent;color:var(--blue);border-color:rgba(41,171,226,.3)}
.btn-ghost:hover{background:var(--blue);color:var(--white)}
.btn-sm{padding:8px 18px;font-size:12px}
.hamburger{display:none;flex-direction:column;gap:5px;cursor:pointer;padding:4px;background:none;border:none}
.hamburger span{display:block;width:22px;height:2px;background:var(--navy);border-radius:2px;transition:all .3s}
.hamburger.on span:nth-child(1){transform:rotate(45deg) translate(5px,5px)}
.hamburger.on span:nth-child(2){opacity:0}
.hamburger.on span:nth-child(3){transform:rotate(-45deg) translate(5px,-5px)}
.mob-menu{display:none;position:fixed;top:72px;left:0;right:0;bottom:0;background:var(--white);padding:24px;z-index:999;flex-direction:column;gap:4px}
.mob-menu.on{display:flex}
.mob-menu a{padding:14px 0;font-size:15px;font-weight:500;color:var(--text);border-bottom:1px solid var(--border)}
.mob-menu .mob-btns{display:flex;flex-direction:column;gap:10px;margin-top:20px}
.mob-menu .mob-btns .btn{width:100%;text-align:center}

.page{padding:88px 24px 20px;max-width:680px;margin:0 auto;display:flex;flex-direction:column;min-height:100vh}

.page-header{margin-bottom:16px}
.page-header h1{font-size:clamp(22px,4vw,28px);font-weight:800;color:var(--navy);line-height:1.2}
.page-header .sub{font-size:13px;color:var(--text-mid);margin-top:4px}

/* Messages container */
.msg-wrap{flex:1;background:var(--white);border:1px solid var(--border);border-radius:var(--r);padding:20px;box-shadow:var(--shadow-sm);display:flex;flex-direction:column;min-height:500px;max-height:calc(100vh - 240px)}
.msg-list{flex:1;overflow-y:auto;padding-right:4px;margin-bottom:16px;display:flex;flex-direction:column;gap:12px}
.msg-list::-webkit-scrollbar{width:6px}
.msg-list::-webkit-scrollbar-thumb{background:var(--border);border-radius:3px}

.msg{max-width:80%;padding:12px 16px;border-radius:16px;font-size:14px;line-height:1.6;position:relative}
.msg.inbound{background:var(--bg-section);color:var(--navy);align-self:flex-start;border-bottom-left-radius:4px}
.msg.outbound{background:var(--blue);color:var(--white);align-self:flex-end;border-bottom-right-radius:4px}
.msg .meta{font-size:10px;opacity:.7;margin-top:4px;font-weight:500}
.msg.outbound .meta{color:rgba(255,255,255,.8)}

.msg-day{text-align:center;font-size:11px;color:var(--text-light);font-weight:600;text-transform:uppercase;letter-spacing:.5px;margin:10px 0;position:relative}
.msg-day::before,.msg-day::after{content:'';position:absolute;top:50%;width:30%;height:1px;background:var(--border)}
.msg-day::before{left:0}
.msg-day::after{right:0}

/* Compose */
.compose{display:flex;gap:8px;border-top:1px solid var(--border);padding-top:16px}
.compose textarea{flex:1;padding:12px 14px;border:1.5px solid var(--border);border-radius:10px;font-family:var(--font);font-size:14px;color:var(--navy);outline:none;resize:none;min-height:44px;max-height:120px;transition:border .2s}
.compose textarea:focus{border-color:var(--blue)}
.compose .send-btn{width:44px;height:44px;min-width:44px;border-radius:10px;border:none;background:var(--orange);color:var(--white);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .15s;align-self:flex-end}
.compose .send-btn:hover{background:var(--orange-dark)}
.compose .send-btn:disabled{opacity:.4;cursor:not-allowed}
.compose .send-btn svg{width:18px;height:18px}

/* Empty */
.empty-state{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:var(--text-light);padding:40px 20px}
.empty-state svg{width:48px;height:48px;color:var(--border);margin-bottom:16px}
.empty-state h3{font-size:15px;font-weight:700;color:var(--text-mid);margin-bottom:6px}
.empty-state p{font-size:13px;max-width:280px;line-height:1.6}

/* Loading */
.loading{text-align:center;padding:48px;color:var(--text-light);font-size:14px}
.spinner{width:32px;height:32px;border:3px solid var(--border);border-top-color:var(--blue);border-radius:50%;animation:spin .7s linear infinite;margin:0 auto 12px}
@keyframes spin{to{transform:rotate(360deg)}}

/* Toast */
.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%) translateY(100px);background:var(--navy);color:var(--white);padding:12px 22px;border-radius:50px;font-size:13px;font-weight:600;box-shadow:0 8px 24px rgba(0,0,0,.15);opacity:0;transition:all .3s;z-index:2000;pointer-events:none}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}

.footer{padding:32px 0;background:var(--navy2);margin-top:40px}
.footer-inner{max-width:1100px;margin:0 auto;padding:0 24px;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px}
.footer-inner p{font-size:12px;color:rgba(255,255,255,.3)}
.footer-inner a{font-size:12px;color:rgba(255,255,255,.4)}
.footer-links{display:flex;gap:20px}

@media(max-width:900px){
  .nav-links,.nav-right{display:none}
  .hamburger{display:flex}
}
@media(max-width:640px){
  .page{padding:80px 16px 20px}
  .msg{max-width:90%}
  .msg-wrap{padding:16px;min-height:400px}
}
