/* =========================================================
   Jnanakshi School Communication Portal
   Theme: warm paper, ink, sage — a calm correspondence desk,
   not a generic SaaS dashboard.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,400;8..60,600;8..60,700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    /* Palette */
    --paper: #FAF8F4;
    --paper-raised: #FFFFFF;
    --ink: #1F2A24;
    --ink-soft: #5B6B61;
    --hairline: #E5DFD3;
    --sage: #3D6B52;
    --sage-deep: #2E5240;
    --sage-wash: #EAF1EC;
    --clay: #C2724B;
    --clay-wash: #FBEEE6;
    --gold: #B8923F;

    /* Type */
    --font-display: 'Source Serif 4', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;

    --radius: 10px;
    --radius-sm: 7px;
    --shadow-sm: 0 1px 2px rgba(31, 42, 36, 0.05);
    --shadow-md: 0 8px 24px rgba(31, 42, 36, 0.08);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--paper);
    color: var(--ink);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--sage); text-decoration: none; }
a:hover { text-decoration: underline; }

::selection { background: var(--sage-wash); }

/* ---------- Login Page ---------- */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% 20%, rgba(61, 107, 82, 0.05), transparent 40%),
        radial-gradient(circle at 85% 85%, rgba(194, 114, 75, 0.05), transparent 40%),
        var(--paper);
}
.login-card {
    background: var(--paper-raised);
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 44px 40px;
    width: 100%;
    max-width: 380px;
    text-align: center;
}
.login-logo img { max-height: 64px; margin-bottom: 18px; }
.login-title {
    font-family: var(--font-display);
    font-size: 23px;
    font-weight: 600;
    margin: 0 0 4px;
    color: var(--ink);
}
.login-subtitle {
    color: var(--ink-soft);
    margin: 0 0 28px;
    font-size: 12.5px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.form-group { text-align: left; margin-bottom: 16px; }
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 12.5px;
    color: var(--ink-soft);
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--hairline);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font-body);
    background: var(--paper-raised);
    color: var(--ink);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--sage);
    box-shadow: 0 0 0 3px var(--sage-wash);
}
.form-group small { display: block; margin-top: 5px; font-size: 11.5px; color: var(--ink-soft); }

.btn {
    display: inline-block;
    padding: 11px 20px;
    border-radius: var(--radius-sm);
    border: none;
    font-size: 13.5px;
    font-family: var(--font-body);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.05s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--sage); color: #fff; }
.btn-primary:hover { background: var(--sage-deep); }
.btn-secondary { background: var(--sage-wash); color: var(--sage-deep); }
.btn-secondary:hover { background: #DCE9E0; }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 13px; font-size: 12px; }

.alert {
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 13px;
    text-align: left;
    border: 1px solid transparent;
}
.alert-error { background: var(--clay-wash); color: #9A4B2C; border-color: #EBC8B5; }
.alert-info { background: var(--sage-wash); color: var(--sage-deep); border-color: #CFE2D7; }
.alert-success { background: var(--sage-wash); color: var(--sage-deep); border-color: #CFE2D7; }

/* ---------- App Shell ---------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 256px;
    background: var(--paper-raised);
    border-right: 1px solid var(--hairline);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 22px 22px;
    border-bottom: 1px solid var(--hairline);
}
.sidebar-logo img { height: 52px; width: auto; max-width: 100%; }
.sidebar-logo span {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 15px;
    color: var(--ink);
}

.sidebar-nav { flex: 1; padding: 18px 12px; }
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--ink);
    font-weight: 500;
    font-size: 13.5px;
    margin-bottom: 3px;
    position: relative;
}
.sidebar-nav a:hover { background: var(--sage-wash); text-decoration: none; }
.sidebar-nav a.active {
    background: var(--sage-wash);
    color: var(--sage-deep);
    font-weight: 600;
}
.sidebar-nav a.active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    background: var(--sage);
    border-radius: 0 3px 3px 0;
}
.sidebar-nav .nav-badge {
    margin-left: auto;
    background: var(--clay);
    color: #fff;
    font-size: 10.5px;
    font-family: var(--font-mono);
    padding: 1px 7px;
    border-radius: 9px;
    min-width: 18px;
    text-align: center;
}

.sidebar-user {
    padding: 16px 22px;
    border-top: 1px solid var(--hairline);
    font-size: 13px;
}
.sidebar-user .user-name { font-weight: 600; }
.sidebar-user .role-tag {
    display: inline-block;
    margin-top: 5px;
    font-size: 10.5px;
    padding: 2px 9px;
    border-radius: 9px;
    background: var(--sage-wash);
    color: var(--sage-deep);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.sidebar-user .logout-link { color: var(--ink-soft); font-size: 12px; }

.main-content { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
    background: var(--paper-raised);
    border-bottom: 1px solid var(--hairline);
    padding: 18px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.topbar h1 {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 600;
    margin: 0;
    color: var(--ink);
}

.topbar-user { display: flex; align-items: center; gap: 14px; }
.topbar-notif { display: flex; gap: 6px; }
.topbar-notif-pill {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    background: var(--clay-wash);
    color: #9A4B2C;
}
.topbar-notif-pill.chat { background: var(--sage-wash); color: var(--sage-deep); }
.topbar-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--sage);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}
.topbar-user-name { font-weight: 600; font-size: 13.5px; color: var(--ink); }
.topbar-user-role { font-size: 11px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.03em; }

.content-area { padding: 28px; flex: 1; overflow-y: auto; }

/* ---------- Cards / Lists ---------- */
.card {
    background: var(--paper-raised);
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--hairline);
    font-weight: 600;
    font-size: 13.5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--ink);
}

.email-list { list-style: none; margin: 0; padding: 0; }
.email-list li {
    padding: 15px 20px;
    border-bottom: 1px solid var(--hairline);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.email-list li:hover { background: var(--sage-wash); }
.email-list li.unread { background: #FDFCFA; }
.email-list li.unread .email-subject { font-weight: 700; }
.email-list li.unread::marker, .email-list li.unread .email-from::before {
    content: '';
}
.email-list li.unread .email-from::after {
    content: '';
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--clay);
    margin-left: 6px;
    vertical-align: middle;
}
.email-list li.active { background: var(--sage-wash); border-left: 3px solid var(--sage); padding-left: 17px; }
.email-from { font-size: 13px; font-weight: 600; }
.email-subject { font-size: 13px; color: var(--ink); font-family: var(--font-body); }
.email-snippet { font-size: 12px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.email-meta { font-size: 11px; color: var(--ink-soft); font-family: var(--font-mono); }

.email-view-header { padding: 22px; border-bottom: 1px solid var(--hairline); }
.email-view-header h2 { font-family: var(--font-display); margin: 0 0 8px; font-size: 19px; font-weight: 600; }
.email-view-body { padding: 22px; line-height: 1.65; }

/* ---------- Chat ---------- */
.chat-layout { display: flex; height: calc(100vh - 134px); }
.chat-contacts { width: 264px; border-right: 1px solid var(--hairline); overflow-y: auto; }
.chat-contact {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 18px;
    cursor: pointer;
    border-bottom: 1px solid var(--hairline);
}
.chat-contact:hover { background: var(--sage-wash); }
.chat-contact.active { background: var(--sage-wash); }
.online-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--hairline);
    flex-shrink: 0;
    box-shadow: 0 0 0 2px transparent;
}
.online-dot.online { background: var(--sage); box-shadow: 0 0 0 2px var(--sage-wash); }
.chat-contact-name { font-size: 13px; font-weight: 600; }
.chat-contact-status { font-size: 11px; color: var(--ink-soft); }

.chat-window { flex: 1; display: flex; flex-direction: column; }
.chat-messages { flex: 1; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 11px; }
.chat-bubble { max-width: 58%; padding: 10px 15px; border-radius: 14px; font-size: 13.5px; line-height: 1.45; }
.chat-bubble.mine { align-self: flex-end; background: var(--sage); color: #fff; border-bottom-right-radius: 4px; }
.chat-bubble.theirs { align-self: flex-start; background: var(--sage-wash); color: var(--ink); border-bottom-left-radius: 4px; }
.chat-bubble-time {
    font-size: 10px;
    font-family: var(--font-mono);
    opacity: 0.7;
    margin-top: 4px;
    display: block;
}
.chat-input-bar { display: flex; gap: 10px; padding: 15px 20px; border-top: 1px solid var(--hairline); }
.chat-input-bar input { flex: 1; }
.typing-indicator { font-size: 11px; color: var(--ink-soft); padding: 0 20px; height: 18px; font-style: italic; }

/* ---------- Badges / Misc ---------- */
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 9px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.badge-incoming { background: var(--sage-wash); color: var(--sage-deep); }
.badge-outgoing { background: var(--clay-wash); color: #9A4B2C; }

.empty-state {
    text-align: center;
    color: var(--ink-soft);
    padding: 70px 20px;
    font-size: 13.5px;
}

table.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data-table th {
    text-align: left;
    padding: 11px 16px;
    background: var(--sage-wash);
    border-bottom: 1px solid var(--hairline);
    font-weight: 600;
    color: var(--sage-deep);
    font-size: 12px;
    letter-spacing: 0.02em;
}
table.data-table td { padding: 11px 16px; border-bottom: 1px solid var(--hairline); }
table.data-table tr:hover td { background: #FDFCFA; }

h3.section-label {
    font-size: 11.5px;
    color: var(--ink-soft);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    margin: 22px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--hairline);
}

/* ---------- Icons ---------- */
.icon { display: inline-block; vertical-align: middle; flex-shrink: 0; }
.sidebar-nav a .icon { margin-right: 2px; }
.btn .icon { margin-right: 5px; margin-top: -1px; }
.btn.icon-only .icon { margin-right: 0; }

/* ---------- Mobile Topbar Toggle (hidden on desktop) ---------- */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: var(--ink);
}
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(31, 42, 36, 0.35);
    z-index: 998;
}
.sidebar-overlay.visible { display: block; }

/* ---------- Responsive: tablets and phones ---------- */
@media (max-width: 900px) {
    .mobile-menu-toggle { display: inline-flex; }

    .app-shell { flex-direction: column; }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 999;
        width: 270px;
        max-width: 82vw;
        transform: translateX(-100%);
        transition: transform 0.22s ease;
        box-shadow: var(--shadow-md);
    }
    .sidebar.drawer-open { transform: translateX(0); }

    .topbar { padding: 12px 14px; gap: 10px; }
    .topbar h1 { font-size: 16px; }
    .topbar-user-info { display: none; }
    .topbar-notif-pill { font-size: 11px; padding: 3px 8px; }

    .content-area { padding: 14px; }

    .card[style*="display:flex"], .card[style*="display: flex"] {
        flex-direction: column !important;
    }
    .card[style*="width: 360px"], .card[style*="width:360px"] {
        width: 100% !important;
        max-height: 280px !important;
        border-right: none !important;
        border-bottom: 1px solid var(--hairline);
    }

    .chat-layout { flex-direction: column; height: auto; }
    .chat-contacts { width: 100% !important; max-height: 200px; border-right: none; border-bottom: 1px solid var(--hairline); }
    .chat-messages { padding: 14px; }
    .chat-bubble { max-width: 80%; }

    form[style*="grid-template-columns: 1fr 1fr"],
    div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    table.data-table { display: block; overflow-x: auto; white-space: nowrap; }

    .login-card { padding: 32px 24px; }
}

@media (max-width: 480px) {
    .btn { padding: 10px 14px; font-size: 13px; }
    .sidebar-logo img { height: 40px; }
    h3.section-label { margin: 16px 0 10px; }
}

/* ---------- Profile Photos ---------- */
.topbar-avatar img, .profile-avatar-img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.profile-photo-large {
    width: 110px; height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--paper-raised);
    box-shadow: var(--shadow-sm);
    background: var(--sage-wash);
}
.crop-modal {
    position: fixed; inset: 0;
    background: rgba(31, 42, 36, 0.55);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.crop-modal.visible { display: flex; }
.crop-modal-card {
    background: var(--paper-raised);
    border-radius: var(--radius);
    padding: 22px;
    max-width: 420px;
    width: 100%;
}
.crop-canvas-wrap {
    width: 280px; height: 280px;
    margin: 0 auto 16px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--hairline);
    position: relative;
    background: #f1f1f1;
    cursor: grab;
}
.crop-canvas-wrap:active { cursor: grabbing; }
.crop-canvas-wrap img { position: absolute; max-width: none; }

/* ---------- Signature ---------- */
.email-signature-preview {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--hairline);
    font-size: 12.5px;
    color: var(--ink-soft);
    white-space: pre-wrap;
}

/* ---------- Toast Notifications ---------- */
.notif-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--paper-raised);
    border: 1px solid var(--hairline);
    border-left: 4px solid var(--sage);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    padding: 13px 18px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
    z-index: 999;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.notif-toast.visible { opacity: 1; transform: translateY(0); }
.notif-toast.mail { border-left-color: var(--clay); }
.notif-toast.chat { border-left-color: var(--sage); }

/* ---------- Input with Icon ---------- */
.input-icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.input-icon-wrap .input-icon {
    position: absolute;
    left: 12px;
    color: var(--ink-soft);
    pointer-events: none;
    z-index: 1;
    display: flex;
    align-items: center;
}
.input-icon-wrap input,
.input-icon-wrap select {
    padding-left: 38px !important;
}
.input-icon-wrap .eye-toggle {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ink-soft);
    padding: 4px;
    display: flex;
    align-items: center;
    z-index: 1;
}
.input-icon-wrap .eye-toggle:hover { color: var(--ink); }

/* ---------- Away status dot ---------- */
.online-dot.away {
    background: var(--gold, #B8923F);
    box-shadow: 0 0 0 2px #FDF3DE;
}
.chat-status-text { font-size: 11px; }
.chat-status-text.online { color: var(--sage); }
.chat-status-text.away   { color: var(--gold, #B8923F); }
.chat-status-text.offline{ color: var(--ink-soft); }

/* ---------- Email body empty state ---------- */
.email-body-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--ink-soft);
    font-style: italic;
    font-size: 13.5px;
}

/* ---------- Push notification bell ---------- */
.notif-bell-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ink-soft);
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    transition: background 0.15s;
}
.notif-bell-btn:hover { background: var(--sage-wash); color: var(--sage); }
.notif-bell-btn.subscribed { color: var(--sage); }

/* ---------- CSV upload area ---------- */
.csv-drop-zone {
    border: 2px dashed var(--hairline);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    color: var(--ink-soft);
    font-size: 13.5px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.csv-drop-zone:hover, .csv-drop-zone.dragover {
    border-color: var(--sage);
    background: var(--sage-wash);
    color: var(--sage-deep);
}

/* ---------- Tooltip ---------- */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--ink);
    color: #fff;
    font-size: 11.5px;
    white-space: nowrap;
    padding: 4px 10px;
    border-radius: 6px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 99;
}
[data-tooltip]:hover::after { opacity: 1; }

/* ---------- User action icon buttons ---------- */
.icon-action-btn {
    background: none;
    border: 1px solid var(--hairline);
    border-radius: var(--radius-sm);
    padding: 5px 7px;
    cursor: pointer;
    color: var(--ink-soft);
    display: inline-flex;
    align-items: center;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.icon-action-btn:hover { background: var(--sage-wash); color: var(--sage-deep); border-color: var(--sage); }
.icon-action-btn.danger:hover { background: var(--clay-wash); color: var(--clay); border-color: var(--clay); }

/* Input error state */
.input-error, input.input-error, select.input-error {
    border-color: var(--clay) !important;
    box-shadow: 0 0 0 3px var(--clay-wash) !important;
}

/* ---------- Announcements ---------- */
.announcement-banner {
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    margin-bottom: 14px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    border: 1px solid var(--hairline);
    background: var(--paper-raised);
    box-shadow: var(--shadow-sm);
    animation: slideDown 0.2s ease;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.announcement-banner.urgent {
    border-left: 4px solid var(--clay);
    background: var(--clay-wash);
}
.announcement-banner.normal {
    border-left: 4px solid var(--sage);
}
.announcement-icon { flex-shrink: 0; margin-top: 2px; }
.announcement-title {
    font-weight: 700;
    font-size: 13.5px;
    margin-bottom: 3px;
    color: var(--ink);
}
.announcement-body {
    font-size: 13px;
    color: var(--ink-soft);
    line-height: 1.5;
}
.announcement-meta {
    font-size: 11px;
    color: var(--ink-soft);
    margin-top: 5px;
    font-family: var(--font-mono);
}
.announcement-dismiss {
    margin-left: auto;
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ink-soft);
    padding: 2px;
    border-radius: 4px;
    display: flex;
    align-items: center;
}
.announcement-dismiss:hover { color: var(--ink); background: var(--hairline); }

/* ---------- Email thread view ---------- */
.thread-message {
    border: 1px solid var(--hairline);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    overflow: hidden;
}
.thread-message-header {
    padding: 11px 16px;
    background: var(--sage-wash);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    gap: 10px;
}
.thread-message-header:hover { background: #dce9e0; }
.thread-message.latest .thread-message-header { background: var(--paper-raised); }
.thread-sender { font-weight: 600; font-size: 13px; }
.thread-snippet { font-size: 12px; color: var(--ink-soft); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-meta { font-size: 11px; color: var(--ink-soft); font-family: var(--font-mono); white-space: nowrap; }
.thread-body { padding: 16px; display: none; }
.thread-body.open { display: block; }
.read-receipt-line {
    font-size: 11px;
    color: var(--sage);
    padding: 6px 16px;
    border-top: 1px solid var(--hairline);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ---------- Bulk Email ---------- */
.recipient-preview {
    background: var(--sage-wash);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 12.5px;
    color: var(--ink-soft);
    min-height: 36px;
    margin-top: 8px;
}
.recipient-tag {
    display: inline-block;
    background: var(--paper-raised);
    border: 1px solid var(--hairline);
    border-radius: 10px;
    padding: 2px 10px;
    font-size: 11.5px;
    margin: 2px;
    color: var(--ink);
}

/* ---------- UX Improvements v5 ---------- */

/* Scrollable checkbox containers */
.checkbox-scroll {
    border: 1px solid var(--hairline);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    max-height: 200px;
    overflow-y: auto;
}
.checkbox-scroll label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    cursor: pointer;
    font-size: 13px;
    font-weight: 400;
    border-radius: 5px;
}
.checkbox-scroll label:hover { background: var(--sage-wash); padding-left: 4px; }

/* Step headings for multi-step forms */
.step-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--ink-soft);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 22px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--hairline);
}
.step-num {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--sage);
    color: #fff;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Better sidebar chat contact active + unread */
.chat-contact.has-unread { background: #fdfcfa; }
.chat-contact.has-unread .chat-contact-name { color: var(--ink); }

/* Sender name in chat bubble */
.chat-bubble.theirs .sender-name-label {
    font-size: 10.5px;
    font-weight: 600;
    opacity: 0.65;
    margin-bottom: 2px;
}

/* Tip box for personalisation */
.tip-box {
    background: var(--sage-wash);
    border: 1px solid #cfe2d7;
    border-left: 3px solid var(--sage);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 12.5px;
    color: var(--sage-deep);
    margin-bottom: 14px;
}
.tip-box code {
    background: rgba(61,107,82,0.12);
    border-radius: 4px;
    padding: 1px 5px;
    font-family: var(--font-mono);
    font-size: 11.5px;
}
