:root {
    --brand: #4f46e5;
    --brand-dark: #3730a3;
    --brand-light: #eef2ff;
    --surface: #ffffff;
    --surface-muted: #f8f9fa;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(79,70,229,.06);
}

html { font-size: 16px; }

body {
    background: linear-gradient(135deg, #f8f7ff 0%, #f1f5ff 100%);
    min-height: 100vh;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Navbar */
.app-navbar {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%) !important;
    box-shadow: 0 2px 8px rgba(79,70,229,.3);
    padding: 0.75rem 0;
}

.app-navbar .navbar-brand {
    font-size: 1.15rem;
    letter-spacing: -0.01em;
}

.app-navbar .nav-link {
    color: rgba(255,255,255,.85) !important;
    transition: color .15s;
    font-size: .95rem;
}

.app-navbar .nav-link:hover,
.app-navbar .nav-link.active {
    color: #fff !important;
}

/* Footer */
.app-footer {
    margin-top: 3rem;
    padding: 1rem 0;
    color: var(--text-muted);
    font-size: .85rem;
    border-top: 1px solid var(--border);
}

/* Page header */
.page-header {
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: .25rem;
    letter-spacing: -.02em;
}

.page-subtitle {
    color: var(--text-muted);
    margin-bottom: 0;
}

/* Cards */
.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: var(--surface);
}

.main-card {
    border: 1px solid var(--border);
}

.info-card {
    background: var(--brand-light);
    border-color: #c7d2fe;
}

.info-icon {
    width: 40px;
    height: 40px;
    background: var(--brand);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Textarea */
.message-textarea {
    border-radius: 8px;
    border-color: var(--border);
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    transition: border-color .2s, box-shadow .2s;
}

.message-textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}

/* Buttons */
.btn-primary {
    background: var(--brand);
    border-color: var(--brand);
    font-weight: 500;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
}

.btn-send {
    padding: .5rem 1.5rem;
}

.btn-outline-primary {
    color: var(--brand);
    border-color: var(--brand);
}

.btn-outline-primary:hover {
    background: var(--brand);
    border-color: var(--brand);
}

/* Message cards */
.message-card {
    transition: transform .1s, box-shadow .1s;
    border-left: 3px solid var(--brand);
}

.message-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(79,70,229,.12);
}

.message-meta {
    display: flex;
    align-items: center;
}

.message-text {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text);
    white-space: pre-wrap;
    word-break: break-word;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-icon {
    color: #c7d2fe;
    margin-bottom: 1rem;
}

/* Focus */
.btn:focus-visible,
.form-control:focus {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

/* Responsive */
@media (max-width: 576px) {
    .page-title { font-size: 1.4rem; }
    .card-body { padding: 1rem !important; }
}
