.ejc-chat-app{border:1px solid #d7e1ec;border-radius:18px;background:#fff;overflow:hidden;box-shadow:0 8px 30px rgba(8,32,58,.06);color:#123a63}
.ejc-chat-app,.ejc-chat-app *,.ejc-auth-card *{box-sizing:border-box}
.ejc-chat-header{display:flex;justify-content:space-between;align-items:flex-start;padding:18px;border-bottom:1px solid #e6edf5;gap:10px;background:#f8fbff}
.ejc-chat-header h3{margin:0 0 4px;font-size:20px;color:#123a63}.ejc-subtitle{margin:0;color:#35597d}
.ejc-header-actions{display:flex;gap:10px;align-items:center}
.ejc-chat-body{display:grid;grid-template-columns:280px 1fr;min-height:560px}
.ejc-chat-sidebar{border-right:1px solid #e6edf5;padding:16px;background:#f9fbfd;color:#123a63}.ejc-chat-sidebar h4{margin-top:0;color:#123a63}
.ejc-chat-main{display:flex;flex-direction:column;padding:16px;gap:12px;color:#123a63}.ejc-toolbar{display:flex;gap:12px;align-items:center;color:#123a63}
.ejc-toolbar label,.ejc-toolbar select{color:#123a63}
.ejc-messages{flex:1;overflow:auto;min-height:300px;max-height:420px;padding:8px;background:#fcfdff;border:1px solid #eef3f8;border-radius:14px;color:#123a63}
.ejc-message{max-width:82%;margin-bottom:12px;padding:12px 14px;border-radius:16px;color:#123a63;line-height:1.5}.ejc-message-user{margin-left:auto;background:#e8f0fe}.ejc-message-assistant{background:#f2f7fb}
.ejc-chat-form{display:grid;grid-template-columns:1fr auto;gap:10px}.ejc-chat-form textarea{width:100%;min-height:72px;resize:vertical;border:1px solid #cdd9e5;border-radius:12px;padding:12px;color:#123a63;background:#fff}.ejc-chat-form textarea::placeholder{color:#5b7c9c}
.ejc-chat-form button,.ejc-secondary-btn,.ejc-auth-primary{border:0;border-radius:12px;padding:0 18px;background:#123a63;color:#fff;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center}
.ejc-secondary-btn{padding:10px 14px;background:#35597d}.ejc-chat-form button{min-width:110px}.ejc-auth-primary{height:46px}
.ejc-logout-link{color:#123a63;text-decoration:none;font-weight:600}
.ejc-conversation-item{display:block;width:100%;padding:10px 12px;margin-bottom:8px;text-align:left;border:1px solid #d8e2ec;background:#fff;border-radius:12px;cursor:pointer;color:#123a63}
.ejc-chat-locked{padding:16px;border:1px solid #d8e2ec;border-radius:12px;background:#fff8f8;color:#123a63}
.ejc-auth-card{max-width:520px;margin:32px auto;padding:28px;border:1px solid #d7e1ec;border-radius:18px;background:#fff;box-shadow:0 8px 30px rgba(8,32,58,.06);color:#123a63}
.ejc-auth-header h3{margin:0 0 8px;color:#123a63}.ejc-auth-header p{margin:0 0 18px;color:#35597d}
.ejc-auth-error{margin:0 0 14px;padding:12px 14px;border-radius:12px;background:#fff4f4;border:1px solid #f0c8c8;color:#8a1f1f}
.ejc-auth-notice{margin:0 0 14px;padding:12px 14px;border-radius:12px;background:#f2f8f2;border:1px solid #c8e1c8;color:#1d5d2a}
.ejc-auth-form{display:grid;gap:10px}.ejc-auth-form label{font-weight:600;color:#123a63}.ejc-auth-form input[type=text],.ejc-auth-form input[type=email],.ejc-auth-form input[type=password]{width:100%;height:46px;padding:0 14px;border:1px solid #cdd9e5;border-radius:12px;color:#123a63;background:#fff}
.ejc-auth-remember{display:flex;gap:8px;align-items:center;font-weight:400 !important;color:#35597d}
.ejc-auth-divider{position:relative;text-align:center;margin:18px 0}.ejc-auth-divider span{position:relative;z-index:1;background:#fff;padding:0 12px;color:#6884a0;font-size:13px}.ejc-auth-divider:before{content:"";position:absolute;left:0;right:0;top:50%;height:1px;background:#e1e9f2}
.ejc-auth-socials{display:grid;grid-template-columns:1fr 1fr;gap:10px}.ejc-auth-social{height:46px;border-radius:12px;text-decoration:none;display:flex;align-items:center;justify-content:center;font-weight:700}.ejc-auth-google{background:#f2f7fb;color:#123a63;border:1px solid #d7e1ec}.ejc-auth-facebook{background:#eaf1ff;color:#123a63;border:1px solid #c7d7ff}
@media (max-width:900px){.ejc-chat-body{grid-template-columns:1fr}.ejc-chat-sidebar{border-right:0;border-bottom:1px solid #e6edf5}.ejc-auth-socials{grid-template-columns:1fr}.ejc-header-actions{flex-direction:column;align-items:flex-end}}

.ejc-auth-links{display:flex;justify-content:space-between;align-items:center;margin-top:4px;font-size:14px}
.ejc-auth-links a{color:#123a63;text-decoration:none;font-weight:600}
.ejc-auth-links-stack{display:grid;gap:10px}


/* Premium auth refresh */
.ejc-auth-shell{padding:32px 16px;background:linear-gradient(180deg,#f5f9ff 0%,#edf4fb 100%);border-radius:22px}
.ejc-auth-card{position:relative;overflow:hidden;max-width:560px;padding:32px;border:1px solid #d7e6f5;border-radius:24px;background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%);box-shadow:0 20px 50px rgba(18,58,99,.10)}
.ejc-auth-card:before{content:"";position:absolute;top:-80px;right:-80px;width:180px;height:180px;border-radius:50%;background:rgba(18,58,99,.05)}
.ejc-auth-header{position:relative;z-index:1;margin-bottom:8px}
.ejc-auth-header h3{font-size:28px;line-height:1.1;margin-bottom:10px}
.ejc-auth-header p{font-size:15px;line-height:1.5}
.ejc-auth-form{position:relative;z-index:1;gap:12px}
.ejc-auth-form label{font-size:13px;letter-spacing:.02em;text-transform:uppercase;color:#4c6b89}
.ejc-auth-form input[type=text],.ejc-auth-form input[type=email],.ejc-auth-form input[type=password]{height:50px;border:1px solid #c9d8e8;border-radius:14px;box-shadow:inset 0 1px 2px rgba(18,58,99,.03)}
.ejc-auth-form input:focus{outline:none;border-color:#123a63;box-shadow:0 0 0 4px rgba(18,58,99,.10)}
.ejc-auth-primary,.ejc-auth-social{height:50px;border-radius:14px;font-weight:700;transition:transform .15s ease, box-shadow .15s ease, opacity .15s ease}
.ejc-auth-primary:hover,.ejc-auth-social:hover{transform:translateY(-1px);box-shadow:0 10px 18px rgba(18,58,99,.12)}
.ejc-auth-primary{background:linear-gradient(135deg,#123a63 0%,#1d5a97 100%)}
.ejc-auth-google{background:#fff;border:1px solid #d7e1ec}
.ejc-auth-facebook{background:linear-gradient(135deg,#edf4ff 0%,#dfeaff 100%)}
.ejc-auth-links{padding-top:4px}
.ejc-auth-links a:hover{text-decoration:underline}
.ejc-auth-notice,.ejc-auth-error{font-size:14px;line-height:1.45}


/* Mobile friendliness improvements */
@media (max-width: 768px){
  .ejc-chat-app{border-radius:14px}
  .ejc-chat-header{padding:14px;align-items:stretch;flex-direction:column}
  .ejc-chat-header h3{font-size:18px}
  .ejc-subtitle{font-size:14px;line-height:1.45}
  .ejc-header-actions{width:100%;flex-direction:row;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}
  .ejc-header-actions .ejc-secondary-btn,.ejc-header-actions .ejc-logout-link{width:100%;justify-content:center;text-align:center}
  .ejc-chat-body{grid-template-columns:1fr;min-height:auto}
  .ejc-chat-sidebar{padding:12px;border-right:0;border-bottom:1px solid #e6edf5}
  .ejc-chat-main{padding:12px;gap:10px}
  .ejc-toolbar{flex-direction:column;align-items:stretch;gap:8px}
  .ejc-toolbar select,.ejc-toolbar label{width:100%}
  .ejc-messages{min-height:45vh;max-height:none;padding:6px}
  .ejc-message{max-width:100%;padding:11px 12px;border-radius:14px;font-size:15px}
  .ejc-chat-form{grid-template-columns:1fr}
  .ejc-chat-form textarea{min-height:96px;font-size:16px}
  .ejc-chat-form button,.ejc-secondary-btn,.ejc-auth-primary{width:100%;min-height:46px}
  .ejc-conversation-item{padding:12px;font-size:14px}
  .ejc-auth-shell{padding:16px 10px;border-radius:16px}
  .ejc-auth-card{margin:10px auto;padding:20px;border-radius:18px}
  .ejc-auth-header h3{font-size:24px}
  .ejc-auth-links{flex-direction:column;align-items:flex-start;gap:8px}
}

@media (max-width: 480px){
  .ejc-chat-header{padding:12px}
  .ejc-chat-main,.ejc-chat-sidebar{padding:10px}
  .ejc-messages{min-height:40vh;border-radius:12px}
  .ejc-message{font-size:14px;line-height:1.45}
  .ejc-chat-form textarea{padding:10px}
  .ejc-auth-card{padding:16px}
  .ejc-auth-header h3{font-size:21px}
}

.ejc-message-actions{margin-top:10px;display:flex;gap:8px;justify-content:flex-start}
.ejc-listen-btn{border:1px solid #cdd9e5;background:#fff;color:#123a63;border-radius:999px;padding:7px 12px;font-size:13px;font-weight:600;cursor:pointer}
.ejc-listen-btn.is-speaking{background:#123a63;color:#fff;border-color:#123a63}
.ejc-listen-btn:hover{opacity:.95}
@media (max-width:768px){.ejc-listen-btn{width:100%;justify-content:center;padding:10px 12px;font-size:14px}}
