* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f5f6fa;
    color: #2d3436;
    line-height: 1.6;
}
header.site-header {
    background: #1e2a3a;
    color: #fff;
    padding: 16px 40px;
}
header.site-header h1 { font-size: 24px; }
header.site-header img { display: block; }
nav.site-nav { background: #24344a; padding: 12px 40px; }
nav.site-nav a { color: #cfd8e3; text-decoration: none; margin-right: 20px; font-size: 14px; }
nav.site-nav a:hover { color: #fff; }
.container { max-width: 900px; margin: 40px auto; padding: 0 20px; }
.card {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 24px;
}
h2 { margin-bottom: 16px; color: #1e2a3a; }
h3 { margin-bottom: 12px; color: #1e2a3a; }
p { margin-bottom: 12px; }
img.content-image { max-width: 100%; border-radius: 6px; margin-bottom: 16px; }

form label { display: block; font-weight: 600; margin-bottom: 6px; margin-top: 14px; font-size: 14px; }
form input[type="text"],
form input[type="password"],
form textarea,
form input[type="file"],
form select {
    width: 100%;
    padding: 10px;
    border: 1px solid #dcdfe4;
    border-radius: 6px;
    font-size: 14px;
}
form textarea { min-height: 140px; resize: vertical; }
button, .btn {
    display: inline-block;
    background: #2f6fed;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    margin-top: 16px;
}
button:hover, .btn:hover { background: #1f56c4; }
.btn-danger { background: #e74c3c; }
.btn-danger:hover { background: #c0392b; }
.btn-secondary { background: #7f8c9a; }
.btn-secondary:hover { background: #626f7a; }

.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.alert-error { background: #fde8e8; color: #c0392b; border: 1px solid #f5c2c2; }
.alert-success { background: #e6f7ec; color: #1e7d43; border: 1px solid #b8e6c9; }

table { width: 100%; border-collapse: collapse; margin-top: 10px; }
table th, table td { text-align: left; padding: 10px; border-bottom: 1px solid #eaeaea; font-size: 14px; }
table th { background: #f0f2f5; }

.comment-item { border-bottom: 1px solid #eee; padding: 12px 0; }
.comment-item strong { color: #1e2a3a; }
.comment-meta { font-size: 12px; color: #999; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.badge-pending { background: #fff3cd; color: #856404; }
.badge-approved { background: #d4edda; color: #155724; }

/* Chat widget (visitor) */
#chat-widget-toggle {
    position: fixed; bottom: 20px; right: 20px;
    background: #2f6fed; color: #fff; border-radius: 50%;
    width: 56px; height: 56px; display: flex; align-items: center; justify-content: center;
    font-size: 24px; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,0.2); z-index: 999;
}
#chat-widget-box {
    position: fixed; bottom: 90px; right: 20px; width: 320px; height: 420px;
    background: #fff; border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    display: none; flex-direction: column; overflow: hidden; z-index: 999;
}
#chat-widget-box.open { display: flex; }
#chat-widget-header { background: #1e2a3a; color: #fff; padding: 12px 16px; font-size: 14px; }
#chat-widget-messages { flex: 1; overflow-y: auto; padding: 12px; font-size: 13px; background: #f9fafb; }
#chat-widget-messages .msg { margin-bottom: 8px; max-width: 80%; padding: 8px 10px; border-radius: 8px; }
#chat-widget-messages .msg.visitor { background: #2f6fed; color: #fff; margin-left: auto; }
#chat-widget-messages .msg.admin { background: #e5e7eb; color: #1e2a3a; margin-right: auto; }
#chat-widget-form { display: flex; border-top: 1px solid #eee; }
#chat-widget-form input { flex: 1; border: none; padding: 10px; font-size: 13px; }
#chat-widget-form button { border: none; background: #2f6fed; color: #fff; padding: 0 16px; cursor: pointer; }

/* Admin chat */
.chat-layout { display: flex; gap: 16px; }
.chat-sessions { width: 220px; border-right: 1px solid #eee; padding-right: 12px; }
.chat-sessions a { display: block; padding: 8px; border-radius: 6px; text-decoration: none; color: #333; font-size: 13px; margin-bottom: 4px; }
.chat-sessions a.active, .chat-sessions a:hover { background: #eef2ff; }
.chat-window { flex: 1; }
#chat-messages { height: 350px; overflow-y: auto; background: #f9fafb; padding: 12px; border-radius: 6px; margin-bottom: 12px; }
