* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif; background: #efeae2; color: #1a1a2e; height: 100vh; overflow: hidden; }

/* Auth */
#auth-screen { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #f0f2f5; }
.auth-box { background: #fff; padding: 40px; border-radius: 12px; box-shadow: 0 2px 16px rgba(0,0,0,0.08); width: 380px; max-width: 90%; text-align: center; }
.auth-box h1 { color: #00897b; margin-bottom: 4px; }
.subtitle { font-size: 13px; color: #888; margin-bottom: 24px; }
#auth-form input { width: 100%; padding: 12px 14px; margin: 6px 0; border: 1px solid #ddd; border-radius: 8px; font-size: 15px; outline: none; }
#auth-form input:focus { border-color: #00897b; }
.error { color: #e53935; font-size: 13px; margin: 4px 0; min-height: 20px; }
.btn-primary { background: #00897b; color: #fff; padding: 12px 24px; width: 100%; margin: 6px 0; font-weight: 600; border: none; border-radius: 8px; cursor: pointer; font-size: 14px; }
.btn-primary:hover { background: #00695c; }
.btn-secondary { background: #e0f2f1; color: #00897b; padding: 10px 20px; width: 100%; margin: 4px 0; border: none; border-radius: 8px; cursor: pointer; font-size: 14px; }
.btn-secondary:hover { background: #b2dfdb; }
.btn-danger { background: #e53935; color: #fff; padding: 8px 16px; border: none; border-radius: 8px; cursor: pointer; font-size: 14px; }
.btn-danger:hover { background: #c62828; }

/* App Layout - WhatsApp style */
.app-layout { display: flex; height: 100vh; }

/* Sidebar */
.sidebar { width: 360px; background: #fff; border-right: 1px solid #e0e0e0; display: flex; flex-direction: column; flex-shrink: 0; }
.sidebar-header-bar { background: #00897b; color: #fff; padding: 14px 16px; }
.sidebar-header-bar h2 { font-size: 17px; font-weight: 600; }
.sidebar-tabs { display: flex; border-bottom: 1px solid #e0e0e0; }
.tab { flex: 1; padding: 12px; border: none; background: transparent; cursor: pointer; font-size: 13px; font-weight: 600; color: #666; text-transform: uppercase; letter-spacing: 0.3px; }
.tab.active { color: #00897b; border-bottom: 2px solid #00897b; }
.tab:hover { background: #f5f5f5; }
.sidebar-panel { flex: 1; overflow-y: auto; }
.sidebar-footer { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-top: 1px solid #e0e0e0; background: #f0f2f5; }
.user-badge { font-size: 13px; color: #333; font-weight: 500; }
.btn-logout { background: none; border: none; color: #e53935; cursor: pointer; font-size: 13px; font-weight: 500; }
.btn-logout:hover { text-decoration: underline; }

/* Notebook list */
#notebook-list { list-style: none; }
.notebook-item { padding: 14px 16px; cursor: pointer; font-size: 14px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #f0f0f0; }
.notebook-item:hover { background: #f5f5f5; }
.notebook-item.active { background: #e0f2f1; }
.notebook-icon { font-size: 18px; }
.notebook-title-text { font-weight: 500; color: #333; }

/* User list */
#user-list { list-style: none; }
.user-item { display: flex; align-items: center; gap: 8px; padding: 12px 14px; cursor: pointer; border-bottom: 1px solid #f0f0f0; }
.user-item:hover { background: #f5f5f5; }
.user-dot { width: 8px; height: 8px; border-radius: 50%; background: #4caf50; display: inline-block; flex-shrink: 0; }
.user-name { flex: 1; font-size: 14px; font-weight: 500; color: #333; }
.btn-voice-user, .btn-video-user {
  background: none; border: none; cursor: pointer; padding: 6px; border-radius: 50%; display: flex; align-items: center; justify-content: center; opacity: 0.6; transition: opacity 0.15s;
}
.btn-voice-user:hover, .btn-video-user:hover { opacity: 1; }
.btn-voice-user { color: #4caf50; }
.btn-video-user { color: #00897b; }

/* Content area */
.content { flex: 1; display: flex; flex-direction: column; background: #efeae2; position: relative; }
.empty-state { display: flex; align-items: center; justify-content: center; height: 100%; color: #888; font-size: 15px; padding: 20px; text-align: center; }

/* Conversation header - WhatsApp style */
.conv-header { background: #f0f2f5; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e0e0e0; }
.conv-header-left { display: flex; align-items: center; gap: 12px; }
.conv-avatar { width: 40px; height: 40px; border-radius: 50%; background: #00897b; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 600; }
.conv-name { font-size: 16px; font-weight: 600; color: #1a1a2e; }
.conv-status { font-size: 12px; color: #888; }
.conv-header-actions { display: flex; gap: 4px; }
.conv-action-btn {
  background: none; border: none; cursor: pointer; padding: 8px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #54656f; transition: background 0.15s;
}
.conv-action-btn:hover { background: #d9dbde; }
.conv-action-btn svg { display: block; }

/* Conversation content */
.conv-content { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; }
.conv-welcome { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; text-align: center; gap: 8px; }
.conv-welcome-avatar { width: 80px; height: 80px; border-radius: 50%; background: #00897b; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 36px; font-weight: 600; margin-bottom: 8px; }
.conv-welcome-name { font-size: 20px; font-weight: 600; color: #333; }
.conv-welcome-msg { font-size: 14px; color: #888; max-width: 300px; }

/* Notebook editor */
#notebook-editor { flex: 1; display: flex; flex-direction: column; padding: 20px; background: #fff; margin: 12px; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.notebook-title { width: 100%; padding: 8px 0; font-size: 20px; font-weight: 600; border: none; outline: none; background: transparent; margin-bottom: 12px; }
#notebook-content { flex: 1; width: 100%; padding: 12px; font-size: 15px; line-height: 1.6; border: 1px solid #ddd; border-radius: 8px; outline: none; resize: none; font-family: inherit; }
#notebook-content:focus { border-color: #00897b; }
.editor-actions { display: flex; gap: 8px; margin-top: 12px; }
.editor-actions .btn-primary { width: auto; padding: 10px 24px; }
.editor-actions .btn-danger { width: auto; padding: 10px 24px; }

/* Call bar */
.call-bar { background: #1a1a2e; padding: 12px; display: flex; flex-direction: column; gap: 10px; position: fixed; bottom: 0; left: 0; right: 0; z-index: 100; }
.video-container { display: flex; gap: 10px; max-width: 800px; margin: 0 auto; width: 100%; }
.video-box { background: #2d2d44; border-radius: 8px; position: relative; min-height: 200px; flex: 1; overflow: hidden; }
.video-box video { width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0; }
.video-box.small { flex: 0 0 180px; min-height: 140px; }
.video-label { position: absolute; bottom: 8px; left: 10px; color: #fff; font-size: 12px; background: rgba(0,0,0,0.5); padding: 2px 8px; border-radius: 4px; z-index: 1; }
.call-controls { display: flex; justify-content: center; gap: 12px; }
.btn-call { border: none; background: #3d3d5c; color: #fff; padding: 10px 20px; border-radius: 24px; font-weight: 600; cursor: pointer; font-size: 14px; }
.btn-call:hover { background: #5555aa; }
.btn-call-danger { background: #e53935; }
.btn-call-danger:hover { background: #c62828; }

/* Call notification */
.call-notification { position: fixed; top: 20px; right: 20px; background: #fff; padding: 20px; border-radius: 12px; box-shadow: 0 4px 24px rgba(0,0,0,0.15); z-index: 999; text-align: center; min-width: 280px; }
.call-notification p { margin-bottom: 12px; font-size: 16px; }
.call-notification button { width: auto; margin: 0 6px; display: inline-block; }

.hidden { display: none !important; }
