* { box-sizing: border-box; }
body { font-family: system-ui, Arial, sans-serif; background: #eceff1; margin: 0; color: #222; }
.container { max-width: 700px; margin: 30px auto; background: #fff; padding: 24px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.container.wide { max-width: 1100px; }
nav { margin-bottom: 16px; }
nav a { color: #075e54; text-decoration: none; font-weight: 600; }
nav a.active { text-decoration: underline; }
h1 { color: #075e54; margin-top: 0; }
label { display: block; margin-bottom: 12px; font-weight: 600; }
input[type=text], textarea { width: 100%; padding: 10px; margin-top: 4px; border: 1px solid #ccc; border-radius: 4px; font: inherit; }
button { background: #25d366; color: #fff; border: 0; padding: 10px 20px; border-radius: 4px; font-size: 15px; cursor: pointer; }
button:hover { background: #1ebe5a; }
.alert { padding: 12px; border-radius: 4px; margin-bottom: 16px; }
.alert.ok { background: #e8f5e9; color: #256029; }
.alert.err { background: #fdecea; color: #b71c1c; }
.note { font-size: 13px; color: #666; }
.layout { display: flex; gap: 20px; }
aside { width: 260px; flex-shrink: 0; }
main { flex: 1; min-width: 0; }
.contacts { list-style: none; padding: 0; margin: 0; }
.contacts a { display: block; padding: 8px; border-radius: 4px; color: inherit; text-decoration: none; }
.contacts a:hover, .contacts a.sel { background: #e0f2f1; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { border-bottom: 1px solid #e0e0e0; padding: 8px; text-align: left; vertical-align: top; }
th { background: #f5f5f5; }
.chat { background: #e5ddd5; padding: 16px; border-radius: 6px; max-height: 500px; overflow-y: auto; }
.bubble { max-width: 70%; padding: 8px 12px; border-radius: 8px; margin-bottom: 8px; background: #fff; }
.bubble.out { background: #dcf8c6; margin-left: auto; }
.bubble .meta { font-size: 11px; color: #777; text-align: right; margin-top: 4px; }
.reply { display: flex; gap: 8px; margin-top: 12px; }
.reply input { flex: 1; margin: 0; }
.st-failed { color: #b71c1c; font-weight: 600; }
.st-read { color: #1565c0; }
.st-delivered, .st-sent { color: #256029; }
