/* ============ Breakfast Cost Manager ============ */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+Bengali:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');
.bcm-body, .bcm-wrap, .bcm-app, .bcm-body input, .bcm-body select, .bcm-body textarea, .bcm-body button {
    font-family: 'Inter', 'Noto Serif Bengali', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
.bcm-wrap {
    --bcm-bg: #f4f6fb;
    --bcm-card: #ffffff;
    --bcm-ink: #1c2430;
    --bcm-muted: #6b7684;
    --bcm-line: #e6e9f0;
    --bcm-brand: #ff7a45;
    --bcm-brand-d: #e85d24;
    --bcm-blue: #3b6cff;
    --bcm-green: #16a34a;
    --bcm-green-bg: #dcfce7;
    --bcm-red: #dc2626;
    --bcm-red-bg: #fee2e2;
    --bcm-gray-bg: #eef1f6;
    --bcm-radius: 14px;
    --bcm-shadow: 0 2px 14px rgba(28,36,48,.06);
    max-width: 1180px;
    margin: 18px 20px 40px 2px;
    color: var(--bcm-ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans", "Noto Sans Bengali", sans-serif;
}
.bcm-wrap * { box-sizing: border-box; }

/* Top bar */
.bcm-topbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: nowrap;
    background: linear-gradient(120deg,#fff,#fff7f3);
    border: 1px solid var(--bcm-line);
    border-radius: var(--bcm-radius);
    padding: 18px 22px; box-shadow: var(--bcm-shadow);
}
.bcm-brand { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1 1 auto; }
.bcm-brand > div { min-width: 0; }
.bcm-brand h1 { overflow: hidden; text-overflow: ellipsis; }
.bcm-topright { flex: 0 0 auto; }
.bcm-logo {
    width: 48px; height: 48px; display: grid; place-items: center;
    font-size: 26px; background: var(--bcm-brand); color: #fff;
    border-radius: 12px; box-shadow: 0 4px 12px rgba(255,122,69,.35);
}
.bcm-topbar h1 { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.1; }
.bcm-sub { margin: 3px 0 0; color: var(--bcm-muted); font-size: 13px; }

.bcm-monthnav { display: flex; align-items: center; gap: 8px; }
.bcm-navbtn {
    width: 38px; height: 38px; display: grid; place-items: center;
    background: #fff; border: 1px solid var(--bcm-line); border-radius: 10px;
    color: var(--bcm-ink); text-decoration: none; font-size: 22px; line-height: 1;
    transition: .15s;
}
.bcm-navbtn:hover { background: var(--bcm-brand); color: #fff; border-color: var(--bcm-brand); }
.bcm-monthform input[type=month] {
    padding: 8px 10px; border: 1px solid var(--bcm-line); border-radius: 10px;
    font-size: 14px; background: #fff; color: var(--bcm-ink);
}

/* Stats */
.bcm-stats {
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 16px 0;
}
.bcm-stat {
    background: var(--bcm-card); border: 1px solid var(--bcm-line);
    border-radius: var(--bcm-radius); padding: 14px 16px; box-shadow: var(--bcm-shadow);
    display: flex; flex-direction: column; gap: 6px;
}
.bcm-stat-label { font-size: 12px; color: var(--bcm-muted); text-transform: uppercase; letter-spacing: .04em; }
.bcm-stat-val { font-size: 24px; font-weight: 700; }
.bcm-stat-accent { background: linear-gradient(135deg,var(--bcm-brand),var(--bcm-brand-d)); border-color: transparent; }
.bcm-stat-accent .bcm-stat-label,.bcm-stat-accent .bcm-stat-val { color: #fff; }
.bcm-stat-blue { background: linear-gradient(135deg,#3b6cff,#2a4fd6); border-color: transparent; }
.bcm-stat-blue .bcm-stat-label,.bcm-stat-blue .bcm-stat-val { color: #fff; }

/* Tabs */
.bcm-tabs {
    display: flex; gap: 4px; flex-wrap: wrap;
    background: var(--bcm-card); border: 1px solid var(--bcm-line);
    padding: 6px; border-radius: var(--bcm-radius); box-shadow: var(--bcm-shadow);
}
.bcm-tab {
    padding: 9px 16px; border-radius: 10px; text-decoration: none;
    color: var(--bcm-muted); font-weight: 600; font-size: 14px; transition: .15s;
}
.bcm-tab:hover { background: var(--bcm-gray-bg); color: var(--bcm-ink); }
.bcm-tab.is-active { background: var(--bcm-brand); color: #fff; }

/* Panel */
.bcm-panel {
    background: var(--bcm-card); border: 1px solid var(--bcm-line);
    border-radius: var(--bcm-radius); padding: 22px; margin-top: 14px; box-shadow: var(--bcm-shadow);
}
.bcm-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.bcm-panel-head h2 { margin: 0; font-size: 18px; }
.bcm-hint { color: var(--bcm-muted); font-size: 13px; }
.bcm-h3 { margin: 24px 0 10px; font-size: 15px; }

/* Table */
.bcm-tablewrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--bcm-line); }
.bcm-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.bcm-table th, .bcm-table td { padding: 11px 12px; text-align: center; border-bottom: 1px solid var(--bcm-line); white-space: nowrap; }
.bcm-table thead th { background: #f8fafc; color: var(--bcm-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; font-weight: 700; }
/* History message column: full text, fixed width, wraps to new lines */
.bcm-table td.bcm-msg-cell {
    white-space: normal; width: 320px; max-width: 320px; min-width: 220px;
    word-break: break-word; overflow-wrap: anywhere; line-height: 1.45; vertical-align: top;
}
.bcm-table tbody tr:hover { background: #fafbff; }
.bcm-table .bcm-left { text-align: left; }
.bcm-table tfoot td { background: #f8fafc; font-weight: 700; border-top: 2px solid var(--bcm-line); }
.bcm-summary td { font-variant-numeric: tabular-nums; }
.bcm-code { display: inline-block; background: var(--bcm-gray-bg); padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; color: var(--bcm-muted); }
.bcm-neg { color: var(--bcm-red); }

.bcm-pill { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.bcm-pill-red { background: var(--bcm-red-bg); color: var(--bcm-red); }
.bcm-pill-green { background: var(--bcm-green-bg); color: var(--bcm-green); }
.bcm-pill-gray { background: var(--bcm-gray-bg); color: var(--bcm-muted); }
/* Summary status: naram halka background, border chara — kintu Debit ar Surplus
   sposhto alada rong. Debit = gorom lal/golapi, Surplus = thanda teal (nilche-sobuj). */
.bcm-pill-debit { background: #ffdad5; color: #b3271e; }
.bcm-pill-surplus { background: #cdeaf2; color: #0d6b86; }

/* Buttons */
.bcm-btn {
    background: var(--bcm-brand); color: #fff; border: none; cursor: pointer;
    padding: 10px 18px; border-radius: 10px; font-weight: 700; font-size: 14px; transition: .15s;
}
.bcm-btn:hover { background: var(--bcm-brand-d); }
.bcm-btn-ghost { background: #fff; color: var(--bcm-brand); border: 1px solid var(--bcm-brand); }
.bcm-btn-ghost:hover { background: #fff3ec; }
.bcm-mini {
    background: #fff; border: 1px solid var(--bcm-line); cursor: pointer;
    padding: 5px 11px; border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--bcm-ink); transition: .15s;
}
.bcm-mini:hover { background: var(--bcm-gray-bg); }
.bcm-mini-red { color: var(--bcm-red); border-color: #f3c9c9; }
.bcm-mini-red:hover { background: var(--bcm-red-bg); }
.bcm-rowactions { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }

/* Fields */
.bcm-field { display: flex; flex-direction: column; gap: 6px; }
.bcm-field label { font-size: 13px; font-weight: 600; color: var(--bcm-muted); }
.bcm-field input, .bcm-settings input, .bcm-finance input, .bcm-addteacher input {
    padding: 10px 12px; border: 1px solid var(--bcm-line); border-radius: 10px; font-size: 14px; background: #fff; color: var(--bcm-ink);
}
.bcm-field input:focus, .bcm-finance input:focus { outline: 2px solid #ffd6c4; border-color: var(--bcm-brand); }

/* Daily entry */
.bcm-daycard { background: #fbfcfe; border: 1px solid var(--bcm-line); border-radius: 12px; padding: 18px; }
.bcm-dayrow { display: grid; grid-template-columns: 1fr 1fr auto; gap: 14px; align-items: end; }
.bcm-eatpick { margin-top: 18px; border-top: 1px dashed var(--bcm-line); padding-top: 16px; }
.bcm-eatpick-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-weight: 700; font-size: 14px; }
.bcm-eatpick-head > div { display: flex; gap: 6px; }
.bcm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bcm-chip { position: relative; cursor: pointer; }
.bcm-chip input { position: absolute; opacity: 0; pointer-events: none; }
.bcm-chip span {
    display: inline-block; padding: 8px 14px; border: 1px solid var(--bcm-line);
    border-radius: 22px; font-size: 13px; background: #fff; transition: .15s; user-select: none;
}
.bcm-chip input:checked + span { background: var(--bcm-brand); color: #fff; border-color: var(--bcm-brand); font-weight: 600; }

.bcm-eaters-names { color: var(--bcm-muted); font-size: 12px; margin-left: 8px; }
.bcm-count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; background: var(--bcm-brand); color: #fff; border-radius: 12px; font-size: 12px; font-weight: 700; padding: 0 7px; }

.bcm-addteacher { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.bcm-addteacher input[type=text] { flex: 1; min-width: 180px; }
.bcm-code-input { max-width: 130px; flex: 0 0 auto !important; }

.bcm-settings { display: flex; flex-direction: column; gap: 16px; max-width: 460px; }
.bcm-savebar { margin-top: 16px; }
.bcm-inactive { opacity: .55; }

.bcm-infobox { margin-top: 24px; background: #f8fafc; border: 1px solid var(--bcm-line); border-radius: 12px; padding: 16px 20px; }
.bcm-infobox h4 { margin: 0 0 8px; font-size: 14px; }
.bcm-infobox ul { margin: 0; padding-left: 18px; color: var(--bcm-muted); font-size: 13px; line-height: 1.8; }

.bcm-empty { padding: 30px; text-align: center; color: var(--bcm-muted); background: #f8fafc; border-radius: 12px; border: 1px dashed var(--bcm-line); }
.bcm-foot { text-align: center; color: var(--bcm-muted); font-size: 12px; margin-top: 20px; }

/* ============ Responsive ============ */
@media (max-width: 960px) {
    .bcm-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 782px) {
    .bcm-wrap { margin: 12px 8px 40px; }
    .bcm-stat-val { font-size: 20px; }
}
@media (max-width: 620px) {
    .bcm-stats { grid-template-columns: repeat(2, 1fr); }
    .bcm-dayrow { grid-template-columns: 1fr; }
    .bcm-topbar { padding: 14px 16px; flex-wrap: wrap; }
    .bcm-topright { flex-wrap: wrap; }
    .bcm-panel { padding: 16px; }
    .bcm-app { overflow-x: hidden; }
    .bcm-panel, .bcm-requests, .bcm-daycard { box-sizing: border-box; max-width: 100%; }

    /* Card-style tables on mobile */
    .bcm-tablewrap { border: none; overflow: visible; }
    .bcm-table { min-width: 0; }
    .bcm-table thead { display: none; }
    .bcm-table, .bcm-table tbody, .bcm-table tr, .bcm-table td { display: block; width: 100%; box-sizing: border-box; }
    .bcm-table tr {
        background: #fff; border: 1px solid var(--bcm-line); border-radius: 12px;
        margin-bottom: 12px; padding: 4px 8px; box-shadow: var(--bcm-shadow); box-sizing: border-box;
    }
    .bcm-table td {
        display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
        text-align: right; border-bottom: 1px solid var(--bcm-line); white-space: normal;
        padding: 9px 6px; box-sizing: border-box; overflow-wrap: anywhere; word-break: break-word;
    }
    .bcm-table td:last-child { border-bottom: none; }
    .bcm-table td::before {
        content: attr(data-label); font-weight: 700; color: var(--bcm-muted);
        font-size: 12px; text-transform: uppercase; letter-spacing: .03em; text-align: left;
        flex: 0 0 auto; white-space: nowrap;
    }
    .bcm-table td.bcm-left { text-align: right; }
    .bcm-table td.bcm-msg-cell { width: 100%; max-width: 100%; min-width: 0; }
    .bcm-table td[data-label=""]::before { display: none; }
    .bcm-table td[data-noexport]:empty { display: none; }
    .bcm-table tfoot tr { background: #f8fafc; }
    .bcm-table tfoot td { justify-content: space-between; }
    .bcm-rowactions { justify-content: flex-end; flex-wrap: wrap; }
    .bcm-eaters { flex-direction: column; align-items: flex-end; gap: 4px; }
    .bcm-eaters-names { margin-left: 0; text-align: right; }
}

/* ============ Standalone body / login ============ */
body.bcm-body {
    margin: 0; padding: 0;
    background: var(--bcm-bg, #f4f6fb);
    -webkit-font-smoothing: antialiased;
}
.bcm-body {
    --bcm-bg: #f4f6fb; --bcm-card: #fff; --bcm-ink: #1c2430; --bcm-muted: #6b7684;
    --bcm-line: #e6e9f0; --bcm-brand: #ff7a45; --bcm-brand-d: #e85d24; --bcm-blue: #3b6cff;
    --bcm-green: #16a34a; --bcm-green-bg: #dcfce7; --bcm-red: #dc2626; --bcm-red-bg: #fee2e2;
    --bcm-gray-bg: #eef1f6; --bcm-radius: 14px; --bcm-shadow: 0 2px 14px rgba(28,36,48,.06);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans", "Noto Sans Bengali", sans-serif;
    color: var(--bcm-ink);
}

/* Login */
.bcm-login-screen {
    min-height: 100vh; display: flex; flex-direction: column;
    align-items: center; justify-content: center; padding: 24px;
    background:
        radial-gradient(1200px 500px at 15% -10%, #fff2ea 0%, transparent 60%),
        radial-gradient(900px 500px at 110% 20%, #e9f0ff 0%, transparent 55%),
        var(--bcm-bg);
}
.bcm-login-card {
    width: 100%; max-width: 400px; background: #fff; border: 1px solid var(--bcm-line);
    border-radius: 20px; padding: 38px 32px; box-shadow: 0 18px 50px rgba(28,36,48,.10);
    text-align: center;
}
.bcm-login-logo {
    width: 64px; height: 64px; margin: 0 auto 18px; display: grid; place-items: center;
    font-size: 34px; background: linear-gradient(135deg,var(--bcm-brand),var(--bcm-brand-d));
    color: #fff; border-radius: 18px; box-shadow: 0 10px 24px rgba(255,122,69,.4);
}
.bcm-login-card h1 { margin: 0 0 6px; font-size: 22px; font-weight: 700; }
.bcm-login-sub { margin: 0 0 24px; color: var(--bcm-muted); font-size: 13px; }
.bcm-login-form { text-align: left; display: flex; flex-direction: column; gap: 6px; }
.bcm-login-form label { font-size: 13px; font-weight: 600; color: var(--bcm-muted); margin-top: 8px; }
.bcm-login-form input[type=text], .bcm-login-form input[type=password] {
    padding: 12px 14px; border: 1px solid var(--bcm-line); border-radius: 12px;
    font-size: 15px; background: #fbfcfe;
}
.bcm-login-form input:focus { outline: 2px solid #ffd6c4; border-color: var(--bcm-brand); background: #fff; }
.bcm-remember { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px; font-weight: 500 !important; color: var(--bcm-ink) !important; margin-top: 14px !important; font-size: 14px !important; }
.bcm-remember input { width: auto; }
.bcm-btn-block { width: 100%; margin-top: 18px; padding: 13px; font-size: 15px; }
.bcm-login-error {
    background: var(--bcm-red-bg); color: var(--bcm-red); padding: 11px 14px;
    border-radius: 10px; font-size: 13px; margin-bottom: 16px; font-weight: 600;
}
.bcm-login-foot { margin-top: 22px; color: var(--bcm-muted); font-size: 12px; }

/* App shell wrapper */
.bcm-app {
    max-width: 1180px; margin: 0 auto; padding: 20px 16px 48px;
}

/* Top-right cluster + logout */
.bcm-topright { display: flex; align-items: center; gap: 10px; }
.bcm-logout {
    width: 38px; height: 38px; display: grid; place-items: center;
    background: #fff; border: 1px solid var(--bcm-line); border-radius: 10px;
    color: var(--bcm-red); text-decoration: none; font-size: 17px; transition: .15s;
}
.bcm-logout:hover { background: var(--bcm-red-bg); border-color: #f3c9c9; }

/* Deposit form layout */
.bcm-deprow { grid-template-columns: 1.4fr 1fr 1fr 1.2fr auto; }
.bcm-depform select {
    padding: 10px 12px; border: 1px solid var(--bcm-line); border-radius: 10px;
    font-size: 14px; background: #fff; color: var(--bcm-ink); width: 100%;
}
.bcm-tag {
    display: inline-block; margin-left: 6px; font-size: 10px; font-weight: 700;
    background: #fff3ec; color: var(--bcm-brand-d); padding: 1px 6px; border-radius: 6px;
    text-transform: uppercase; letter-spacing: .04em; vertical-align: middle;
}

@media (max-width: 820px) {
    .bcm-deprow { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
    .bcm-app { padding: 12px 10px 40px; }
    .bcm-deprow { grid-template-columns: 1fr; }
    .bcm-login-card { padding: 30px 22px; }
}

/* ============ Previous inline edit + modal ============ */
.bcm-prev-cell { position: relative; white-space: nowrap; }
.bcm-prev-val { font-variant-numeric: tabular-nums; }
.bcm-prev-edit {
    background: none; border: none; cursor: pointer; color: var(--bcm-muted);
    font-size: 13px; padding: 2px 4px; margin-left: 4px; border-radius: 6px; line-height: 1;
    opacity: .55; transition: .15s;
}
.bcm-prev-edit:hover { opacity: 1; color: var(--bcm-brand); background: #fff3ec; }

.bcm-modal {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(20,26,34,.5); backdrop-filter: blur(2px);
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
.bcm-modal[hidden] { display: none; }
.bcm-modal-box {
    width: 100%; max-width: 380px; background: #fff; border-radius: 18px;
    padding: 26px 24px; box-shadow: 0 24px 60px rgba(0,0,0,.25); animation: bcmpop .15s ease;
}
@keyframes bcmpop { from { transform: scale(.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.bcm-modal-box h3 { margin: 0 0 4px; font-size: 18px; }
.bcm-modal-name { margin: 0 0 18px; color: var(--bcm-brand-d); font-weight: 600; font-size: 14px; }
.bcm-modal-box .bcm-field input {
    padding: 12px 14px; border: 1px solid var(--bcm-line); border-radius: 12px;
    font-size: 16px; width: 100%; background: #fbfcfe; box-sizing: border-box; max-width: 100%;
}
.bcm-modal-box .bcm-field input:focus { outline: 2px solid #ffd6c4; border-color: var(--bcm-brand); background: #fff; }
.bcm-modal-hint { display: block; margin-top: 8px; font-size: 12px; color: var(--bcm-muted); line-height: 1.5; }
.bcm-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* ============ Department-wise columns (daily entry) ============ */
.bcm-dept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}
.bcm-dept-col {
    background: #fbfcfe; border: 1px solid var(--bcm-line);
    border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px;
}
.bcm-dept-head {
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--bcm-line); padding-bottom: 8px; margin-bottom: 2px;
}
.bcm-dept-name {
    font-weight: 700; font-size: 13px; color: var(--bcm-brand-d);
    text-transform: uppercase; letter-spacing: .03em;
}
.bcm-dept-tools { display: flex; gap: 4px; }
.bcm-dept-toggle {
    width: 24px; height: 24px; display: grid; place-items: center;
    background: #fff; border: 1px solid var(--bcm-line); border-radius: 6px;
    cursor: pointer; font-size: 13px; color: var(--bcm-muted); line-height: 1; transition: .15s;
}
.bcm-dept-toggle:hover { background: var(--bcm-gray-bg); color: var(--bcm-ink); }
.bcm-chip-block { display: block; }
.bcm-chip-block span {
    display: block; width: 100%; text-align: left;
    box-sizing: border-box; white-space: normal;
    overflow-wrap: anywhere; word-break: break-word; line-height: 1.3;
}

@media (max-width: 620px) {
    .bcm-dept-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
}
@media (max-width: 420px) {
    .bcm-dept-grid { grid-template-columns: 1fr; }
}

/* ============ Settings sections ============ */
.bcm-set-section {
    padding: 18px 0; border-bottom: 1px solid var(--bcm-line);
}
.bcm-set-section:last-of-type { border-bottom: none; }
.bcm-set-section .bcm-h3 { margin-top: 0; }

/* Teacher department dropdown in add form */
.bcm-addteacher select {
    padding: 10px 12px; border: 1px solid var(--bcm-line); border-radius: 10px;
    font-size: 14px; background: #fff; color: var(--bcm-ink); min-width: 170px;
}
.bcm-addteacher select:disabled { background: #f2f4f8; color: var(--bcm-muted); }

/* Modal dropdown */
.bcm-modal-box select {
    padding: 12px 14px; border: 1px solid var(--bcm-line); border-radius: 12px;
    font-size: 15px; width: 100%; background: #fbfcfe; color: var(--bcm-ink);
    box-sizing: border-box; max-width: 100%;
}
.bcm-modal-box .bcm-field { max-width: 100%; }

/* Department editor rows */
.bcm-dept-editor { display: flex; flex-direction: column; gap: 8px; max-width: 460px; margin-bottom: 14px; }
.bcm-dept-row { display: flex; gap: 8px; align-items: center; }
.bcm-dept-row input {
    flex: 1; padding: 10px 12px; border: 1px solid var(--bcm-line); border-radius: 10px;
    font-size: 14px; background: #fff;
}
.bcm-dept-row .bcm-mini { flex: 0 0 auto; }

/* Department reorder arrows */
.bcm-dept-move { display: inline-flex; flex-direction: column; gap: 2px; flex: 0 0 auto; }
.bcm-dept-move button {
    width: 22px; height: 15px; display: grid; place-items: center;
    background: #fff; border: 1px solid var(--bcm-line); border-radius: 5px;
    cursor: pointer; font-size: 8px; color: var(--bcm-muted); line-height: 1; padding: 0; transition: .15s;
}
.bcm-dept-move button:hover { background: var(--bcm-brand); color: #fff; border-color: var(--bcm-brand); }

/* College Fund deposit row (single row) */
.bcm-fundform { margin-top: 14px; }
.bcm-fundrow { grid-template-columns: 1fr auto; align-items: end; }
@media (max-width: 620px) {
    .bcm-fundrow { grid-template-columns: 1fr; }
}

/* ============ v3: credentials, extra, requests, panels ============ */
.bcm-cred { font-size: 12px; color: var(--bcm-muted); }
.bcm-cred strong { color: var(--bcm-ink); font-weight: 600; }

/* Extra edit (summary) */
.bcm-extra-cell { position: relative; white-space: nowrap; }
.bcm-extra-val { font-variant-numeric: tabular-nums; }
.bcm-extra-edit {
    background: none; border: none; cursor: pointer; color: var(--bcm-muted);
    font-size: 13px; padding: 2px 4px; margin-left: 4px; border-radius: 6px; line-height: 1; opacity: .55; transition: .15s;
}
.bcm-extra-edit:hover { opacity: 1; color: var(--bcm-brand); background: #fff3ec; }

.bcm-mini-green { color: var(--bcm-green); border-color: #bfe6cd; }
.bcm-mini-green:hover { background: var(--bcm-green-bg); }

/* Provider requests block */
.bcm-requests {
    background: #fff8f4; border: 1px solid #ffd9c6; border-radius: 12px;
    padding: 16px; margin-bottom: 18px;
}
.bcm-req-badge {
    display: inline-grid; place-items: center; min-width: 22px; height: 22px;
    background: var(--bcm-brand); color: #fff; border-radius: 11px; font-size: 12px; padding: 0 7px; margin-left: 6px;
}

/* Notice banners */
.bcm-notice { padding: 12px 16px; border-radius: 10px; font-size: 14px; font-weight: 600; margin: 14px 0; }
.bcm-notice-green { background: var(--bcm-green-bg); color: var(--bcm-green); }

/* Month pill (teacher/provider header) */
.bcm-month-pill {
    padding: 8px 14px; background: #fff; border: 1px solid var(--bcm-line);
    border-radius: 10px; font-size: 14px; font-weight: 600; white-space: nowrap;
}

/* ============ Teacher receipt ============ */
.bcm-teacher .bcm-stats-teacher { margin-top: 18px; }
.bcm-receipt {
    max-width: 520px; margin: 18px auto 0; background: #fff;
    border: 1px solid var(--bcm-line); border-radius: 18px; overflow: hidden;
    box-shadow: 0 10px 40px rgba(28,36,48,.10);
}
.bcm-receipt-top {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 22px; background: linear-gradient(135deg,#fff7f3,#ffe9dd);
    border-bottom: 1px dashed var(--bcm-line);
}
.bcm-receipt-brand { display: flex; align-items: center; gap: 12px; }
.bcm-receipt-brand .bcm-logo { width: 42px; height: 42px; font-size: 22px; }
.bcm-receipt-brand h2 { margin: 0; font-size: 17px; white-space: nowrap; }
.bcm-receipt-brand p { margin: 2px 0 0; color: var(--bcm-muted); font-size: 13px; }
.bcm-receipt-id { text-align: right; }
.bcm-receipt-id span { display: block; font-size: 11px; color: var(--bcm-muted); text-transform: uppercase; letter-spacing: .05em; }
.bcm-receipt-id strong { font-size: 16px; }

.bcm-receipt-name {
    padding: 16px 22px 8px; font-size: 18px; font-weight: 700;
    display: flex; flex-direction: row; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: nowrap;
}
.bcm-receipt-name span { font-size: 13px; font-weight: 500; color: var(--bcm-muted); text-align: right; white-space: nowrap; }

.bcm-receipt-lines { padding: 8px 22px 16px; }
.bcm-rline {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 9px 0; border-bottom: 1px dashed var(--bcm-line); font-size: 14px;
}
.bcm-rline:last-child { border-bottom: none; }
.bcm-rline span { color: var(--bcm-muted); }
.bcm-rline strong { font-variant-numeric: tabular-nums; font-weight: 700; }
.bcm-rline-sub { background: #fafbff; margin: 0 -22px; padding: 9px 22px; }

.bcm-receipt-total {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 22px; color: #fff;
}
.bcm-receipt-total.is-debt { background: linear-gradient(135deg,#f0553d,#dc2626); }
.bcm-receipt-total.is-surplus { background: linear-gradient(135deg,#1eb85e,#16a34a); }
.bcm-receipt-total span { font-size: 14px; opacity: .95; text-transform: uppercase; letter-spacing: .04em; }
.bcm-receipt-total strong { font-size: 24px; }

.bcm-receipt-deposits { padding: 14px 22px; background: #fafbff; border-top: 1px dashed var(--bcm-line); }
.bcm-receipt-deposits h4 { margin: 0 0 6px; font-size: 13px; color: var(--bcm-muted); text-transform: uppercase; letter-spacing: .04em; }
.bcm-receipt-foot { text-align: center; color: var(--bcm-muted); font-size: 12px; padding: 12px; margin: 0; }

@media (max-width: 620px) {
    .bcm-receipt { margin-top: 14px; border-radius: 14px; }
    .bcm-receipt-total strong { font-size: 20px; }
}

/* ============ v4: qty, meals, menu, provider ============ */
.bcm-notice-red { background: var(--bcm-red-bg); color: var(--bcm-red); }

/* Admin qty rows in daily entry */
.bcm-qtyrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; }
.bcm-qtyname { font-size: 13px; overflow-wrap: anywhere; }
.bcm-qty { display: inline-flex; align-items: center; gap: 6px; }
.bcm-qty-btn {
    width: 26px; height: 26px; border: 1px solid var(--bcm-line); background: #fff;
    border-radius: 7px; cursor: pointer; font-size: 15px; line-height: 1; color: var(--bcm-ink);
    display: grid; place-items: center; transition: .15s;
}
.bcm-qty-btn:hover { background: var(--bcm-brand); color: #fff; border-color: var(--bcm-brand); }
.bcm-qty-input {
    width: 46px; text-align: center; padding: 5px; border: 1px solid var(--bcm-line);
    border-radius: 7px; font-size: 14px;
}
.bcm-qty-num { min-width: 22px; text-align: center; font-weight: 700; font-size: 15px; }

/* Provider rows */
.bcm-provrow { grid-template-columns: 1fr 1fr 1fr; }
.bcm-provrow2 { grid-template-columns: 1fr 1fr 1fr; }
.bcm-provrow select, .bcm-provrow2 select, .bcm-provrow2 input {
    width: 100%; padding: 10px 12px; border: 1px solid var(--bcm-line); border-radius: 10px; font-size: 14px; background: #fff;
}
@media (max-width: 620px) { .bcm-provrow, .bcm-provrow2 { grid-template-columns: 1fr; } }

/* Meal count card (provider) */
.bcm-mealcount-card {
    display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(135deg,#eef3ff,#dbe6ff); border: 1px solid #c7d6ff;
    border-radius: 14px; padding: 16px 20px; margin-bottom: 16px;
}
.bcm-mc-label { display: block; font-weight: 700; font-size: 14px; }
.bcm-mc-sub { display: block; font-size: 12px; color: var(--bcm-muted); margin-top: 2px; }
.bcm-mc-value { font-size: 34px; font-weight: 800; color: var(--bcm-blue); }
.bcm-mc-value.is-locked { color: var(--bcm-ink); }

/* Today's menu card (teacher) */
.bcm-menu-card {
    background: linear-gradient(135deg,#fff7f3,#ffe9dd); border: 1px solid #ffd9c6;
    border-radius: 14px; padding: 14px 18px; margin: 14px 0; display: flex; flex-direction: column; gap: 2px;
}
.bcm-menu-label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--bcm-brand-d); font-weight: 700; }
.bcm-menu-item { font-size: 17px; font-weight: 700; }
.bcm-menu-note { font-size: 13px; color: var(--bcm-muted); }
.bcm-menu-src {
    margin-top: 4px; font-size: 11.5px; color: var(--bcm-brand-d);
    letter-spacing: .01em; opacity: .9;
}
.bcm-menu-src strong { font-weight: 700; }

/* Teacher meal control */
.bcm-meal-control { margin-top: 14px; }
.bcm-meal-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.bcm-meal-day {
    border: 1px solid var(--bcm-line); border-radius: 12px; padding: 12px; background: #fff;
    display: flex; flex-direction: column; gap: 10px;
}
.bcm-meal-day.is-locked { background: #f6f7f9; opacity: .8; }
.bcm-meal-date { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.bcm-lock { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; background: var(--bcm-gray-bg); color: var(--bcm-muted); padding: 2px 6px; border-radius: 5px; }
.bcm-meal-form { display: flex; flex-direction: column; gap: 8px; }
.bcm-meal-quick { display: flex; }
.bcm-meal-quick .bcm-mini { width: 100%; }

/* Request cost inline */
.bcm-req-cost { font-weight: 700; }

/* Teacher meal date forms */
.bcm-rangeform {
    display: grid; gap: 12px; align-items: end;
    background: #fbfcfe; border: 1px solid var(--bcm-line); border-radius: 12px;
    padding: 14px; margin-bottom: 16px;
}
.bcm-mode-fixed { grid-template-columns: 1fr auto; }
.bcm-mode-range { grid-template-columns: 1fr 1fr auto; }
.bcm-rangeform input[type=date],
.bcm-rangeform input[type=text] {
    padding: 10px 12px; border: 1px solid var(--bcm-line); border-radius: 10px; font-size: 14px; background: #fff; width: 100%; box-sizing: border-box;
}
.bcm-rangeform .bcm-field-actions .bcm-btn { white-space: nowrap; }
@media (max-width: 620px) {
    .bcm-mode-fixed { grid-template-columns: 1fr; }
    .bcm-mode-range { grid-template-columns: 1fr 1fr; }
}

/* Meal mode toggle (teacher) */
.bcm-meal-modes {
    display: inline-flex; gap: 4px; background: var(--bcm-gray-bg);
    padding: 5px; border-radius: 12px; margin-bottom: 16px;
}
.bcm-meal-modes .bcm-modebtn {
    padding: 9px 20px; border-radius: 9px; text-decoration: none; font-weight: 700;
    font-size: 13px; color: var(--bcm-muted); transition: .18s; border: none; background: transparent;
}
.bcm-meal-modes .bcm-modebtn:hover { color: var(--bcm-ink); }
.bcm-meal-modes .bcm-modebtn.is-active {
    background: #fff; color: var(--bcm-brand-d);
    box-shadow: 0 2px 8px rgba(28,36,48,.12);
}

/* Live server clock (admin header) */
.bcm-clock {
    margin: 4px 0 0; font-size: 12px; color: var(--bcm-brand-d); font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* dd/mm/yyyy hint under date inputs */
.bcm-datehint {
    display: block; margin-top: 4px; font-size: 11px; color: var(--bcm-muted);
    font-weight: 600; letter-spacing: .02em;
}

/* Teacher meal card OFF state (qty 0) */
.bcm-meal-day.is-off {
    background: #fff4f4; border-color: #f6cccc;
}
.bcm-meal-day.is-off .bcm-qty-num { color: var(--bcm-red); }
.bcm-meal-day.is-off .bcm-meal-date strong { color: #b91c1c; }

/* AJAX save status text */
.bcm-meal-status {
    display: block; font-size: 11px; color: var(--bcm-green); font-weight: 700;
    height: 14px; opacity: 0; transition: opacity .2s; margin-top: 2px;
}
.bcm-meal-status.show { opacity: 1; }
.bcm-meal-ajax { display: flex; flex-direction: column; gap: 8px; }

/* Admin "Meals per teacher" — zero rows stand out */
.bcm-qtyrow.is-zero { background: #ffe4e4; border-radius: 8px; box-shadow: inset 0 0 0 1px #f3b0b0; }
.bcm-qtyrow.is-zero .bcm-qtyname { color: #b91c1c; font-weight: 700; }
.bcm-qtyrow.is-zero .bcm-qty-input { color: var(--bcm-red); border-color: #e88; font-weight: 700; }
.bcm-qtyrow { padding: 5px 7px; transition: background .15s; }

/* Summary sort link + header actions */
.bcm-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.bcm-sortlink { text-decoration: none; color: inherit; display: inline-flex; align-items: center; gap: 4px; }
.bcm-sortlink:hover { color: var(--bcm-brand); }

/* Logout icon sizing */
.bcm-logout svg { display: block; }

/* Receipt Due/Surplus badge */
.bcm-receipt-id { text-align: center; padding: 8px 14px; border-radius: 12px; min-width: 88px; }
.bcm-receipt-id span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; opacity: .95; }
.bcm-receipt-id strong { font-size: 20px; display: block; margin-top: 2px; }
.bcm-receipt-id.is-due { background: var(--bcm-red-bg); color: #b91c1c; }
.bcm-receipt-id.is-surplus { background: var(--bcm-green-bg); color: #15803d; }

/* #11 Capitalize each word in display text (names, departments, items, labels) */
.bcm-table td.bcm-left,
.bcm-dept-name, .bcm-qtyname, .bcm-menu-item,
.bcm-receipt-name, .bcm-chip span, .bcm-brand h1, .bcm-sub,
.bcm-panel-head h2, .bcm-stat-label, .bcm-modebtn,
.bcm-meal-date strong {
    text-transform: capitalize;
}
/* But keep credentials/notes/emails as-is */
.bcm-cred, .bcm-menu-note, .bcm-receipt-name span.bcm-lower,
input, .bcm-code { text-transform: none; }

/* Day total badge (admin daily entry) */
.bcm-daytotal {
    display: inline-block; margin-left: 8px; background: var(--bcm-brand);
    color: #fff; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 12px;
    text-transform: none; vertical-align: middle;
}

/* Provider readonly meal count + small hint */
input[readonly] { background: #f2f4f8; color: var(--bcm-ink); cursor: not-allowed; }
.bcm-mini-hint { display: block; margin-top: 4px; margin-bottom: 6px; font-size: 11px; color: var(--bcm-muted); }
/* Detail expand row */
.bcm-detail-row td { background: #fafbff; font-size: 13px; }
.bcm-muted { color: var(--bcm-muted); }

/* Weekly off-day chips */
.bcm-weekdays { display: flex; flex-wrap: wrap; gap: 8px; }
.bcm-weekdays .bcm-chip input { position: absolute; opacity: 0; }
.bcm-weekdays .bcm-chip span {
    display: inline-block; padding: 7px 14px; border: 1px solid var(--bcm-line);
    border-radius: 20px; font-size: 13px; background: #fff; cursor: pointer; user-select: none;
}
.bcm-weekdays .bcm-chip input:checked + span { background: var(--bcm-red); color: #fff; border-color: var(--bcm-red); font-weight: 600; }

/* Off date range rows */
.bcm-offrange-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bcm-offrange-row input[type=date] { padding: 8px 10px; border: 1px solid var(--bcm-line); border-radius: 8px; font-size: 13px; }
.bcm-to { color: var(--bcm-muted); font-size: 13px; }

/* Admin daily item row */
.bcm-dayrow-item { grid-template-columns: 1fr 1fr 1fr; margin-top: 12px; }
.bcm-dayrow-item select, .bcm-dayrow-item input {
    width: 100%; padding: 10px 12px; border: 1px solid var(--bcm-line); border-radius: 10px; font-size: 14px; background: #fff; box-sizing: border-box;
}
@media (max-width: 620px) { .bcm-dayrow-item { grid-template-columns: 1fr; } }

/* Admin daily entry — all fields in one row */
.bcm-dayrow-full {
    display: grid; grid-template-columns: 1.3fr 1fr 1.2fr 1.4fr auto; gap: 12px; align-items: end;
}
.bcm-dayrow-full select, .bcm-dayrow-full input {
    width: 100%; padding: 10px 12px; border: 1px solid var(--bcm-line); border-radius: 10px; font-size: 14px; background: #fff; box-sizing: border-box;
}
@media (max-width: 820px) { .bcm-dayrow-full { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .bcm-dayrow-full { grid-template-columns: 1fr; } }

/* Backup & restore */
.bcm-backup-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.bcm-backup-row input[type=file] { font-size: 13px; max-width: 240px; }
@media (max-width: 620px) { .bcm-backup-row { flex-direction: column; align-items: stretch; } }

/* Email backup (SMTP) settings grid */
.bcm-smtp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 720px; }
.bcm-smtp-grid input, .bcm-smtp-grid select {
    padding: 10px 12px; border: 1px solid var(--bcm-line); border-radius: 10px; font-size: 14px; background: #fff; width: 100%; box-sizing: border-box;
}
@media (max-width: 620px) { .bcm-smtp-grid { grid-template-columns: 1fr; } }

/* Admin stats: 4 boxes */
.bcm-stats-4 { grid-template-columns: repeat(4, 1fr) !important; }
@media (max-width: 620px) { .bcm-stats-4 { grid-template-columns: repeat(2, 1fr) !important; } }

/* Settings 2-column layout with independent stacking (masonry-like) */
.bcm-settings-grid {
    column-count: 2; column-gap: 16px;
    border: none; border-radius: 0; overflow: visible; background: transparent;
}
.bcm-settings-grid .bcm-set-section {
    break-inside: avoid; -webkit-column-break-inside: avoid; page-break-inside: avoid;
    display: inline-block; width: 100%;
    padding: 18px; border: 1px solid var(--bcm-line); border-radius: 12px;
    margin: 0 0 16px; background: #fff; box-sizing: border-box;
}
.bcm-settings-grid .bcm-set-full { column-span: all; }
@media (max-width: 820px) {
    .bcm-settings-grid { column-count: 1; }
}

/* Days detail: two columns (ate / not ate) */
.bcm-detail-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.bcm-detail-col { padding: 6px 16px; }
.bcm-detail-ate { border-right: 1px solid var(--bcm-line); }
.bcm-detail-col h5 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.bcm-detail-ate h5 { color: var(--bcm-green); }
.bcm-detail-not h5 { color: var(--bcm-red); }
.bcm-detail-col ol { margin: 0; padding-left: 22px; }
.bcm-detail-col li { padding: 2px 0; font-size: 13px; }
@media (max-width: 620px) {
    .bcm-detail-cols { grid-template-columns: 1fr; }
    .bcm-detail-ate { border-right: none; border-bottom: 1px solid var(--bcm-line); padding-bottom: 10px; margin-bottom: 6px; }
}

/* Deposit two-column lists */
.bcm-deposit-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--bcm-line); border-radius: 12px; overflow: hidden; margin-top: 8px; }
.bcm-deposit-col { padding: 16px; min-width: 0; overflow-x: auto; }
.bcm-deposit-col:first-child { border-right: 1px solid var(--bcm-line); }
.bcm-deposit-col .bcm-h3 { margin-top: 0; }
.bcm-deposit-col .bcm-table { min-width: 0; width: 100%; }
.bcm-deposit-col .bcm-table th, .bcm-deposit-col .bcm-table td { padding: 8px 6px; white-space: nowrap; }
.bcm-deposit-col .bcm-rowactions, .bcm-deposit-col td:last-child { white-space: nowrap; }
@media (max-width: 820px) {
    .bcm-deposit-cols { grid-template-columns: 1fr; }
    .bcm-deposit-col:first-child { border-right: none; border-bottom: 1px solid var(--bcm-line); }
}
/* inline edit pencil in labels */
.bcm-inline-edit { background: none; border: none; cursor: pointer; color: var(--bcm-muted); font-size: 12px; padding: 0 2px; }
.bcm-inline-edit:hover { color: var(--bcm-brand); }

/* Email templates editor */
.bcm-tpl-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px; border: 1px solid var(--bcm-line); border-radius: 10px; margin-bottom: 10px; background: #fbfcfe; }
.bcm-tpl-row input, .bcm-tpl-row textarea { padding: 9px 11px; border: 1px solid var(--bcm-line); border-radius: 8px; font-size: 13px; width: 100%; box-sizing: border-box; background: #fff; font-family: inherit; }
.bcm-tpl-row textarea { grid-column: 1 / -1; resize: vertical; }
.bcm-tpl-row .bcm-tpl-del { grid-column: 1 / -1; justify-self: start; }
.bcm-tpl-send-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--bcm-line); flex-wrap: wrap; }
.bcm-tpl-send-name { font-weight: 600; min-width: 140px; }
.bcm-tpl-row code, .bcm-set-full code { background: var(--bcm-gray-bg); padding: 1px 5px; border-radius: 4px; font-size: 12px; }
@media (max-width: 620px) { .bcm-tpl-row { grid-template-columns: 1fr; } }

/* Auto-save flash on day total badge */
.bcm-saved-flash { background: var(--bcm-green) !important; transition: background .2s; }

/* Compose email editor */
.bcm-editor-toolbar { display: flex; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.bcm-editor { min-height: 140px; border: 1px solid var(--bcm-line); border-radius: 10px; padding: 12px; background: #fff; font-size: 14px; line-height: 1.6; }
.bcm-editor:focus { outline: 2px solid #ffd6c4; border-color: var(--bcm-brand); }
.bcm-send-scope { display: flex; gap: 16px; flex-wrap: wrap; }
.bcm-send-scope label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }

/* Nicer select styling across the app */
.bcm-settings select, .bcm-smtp-grid select, .bcm-field select,
.bcm-modal-box select, .bcm-addteacher select {
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7684' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; background-size: 12px;
    padding-right: 34px !important; cursor: pointer;
    border: 1px solid var(--bcm-line); border-radius: 10px; background-color: #fff;
    font-size: 14px; color: var(--bcm-ink); transition: .15s;
}
.bcm-settings select:hover, .bcm-smtp-grid select:hover, .bcm-field select:hover { border-color: var(--bcm-brand); }
.bcm-settings select:focus, .bcm-smtp-grid select:focus, .bcm-field select:focus {
    outline: 2px solid #ffd6c4; border-color: var(--bcm-brand);
}

/* 5-card stats + status card colors */
.bcm-stats-5 { grid-template-columns: repeat(5, 1fr) !important; }
@media (max-width: 900px) { .bcm-stats-5 { grid-template-columns: repeat(3, 1fr) !important; } }
@media (max-width: 620px) { .bcm-stats-5 { grid-template-columns: repeat(2, 1fr) !important; } }
.bcm-stat-red { background: linear-gradient(135deg,#f0553d,#dc2626); border-color: transparent; }
.bcm-stat-red .bcm-stat-label, .bcm-stat-red .bcm-stat-val { color: #fff; }
.bcm-stat-green { background: linear-gradient(135deg,#1eb85e,#16a34a); border-color: transparent; }
.bcm-stat-green .bcm-stat-label, .bcm-stat-green .bcm-stat-val { color: #fff; }

/* Ensure every select in the app panels looks consistent (incl. Contact) */
.bcm-panel select, .bcm-set-section select {
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7684' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; background-size: 12px;
    padding: 10px 34px 10px 12px; cursor: pointer;
    border: 1px solid var(--bcm-line); border-radius: 10px; background-color: #fff;
    font-size: 14px; color: var(--bcm-ink); transition: .15s; width: 100%; box-sizing: border-box;
}
.bcm-panel select:hover, .bcm-set-section select:hover { border-color: var(--bcm-brand); }
.bcm-panel select:focus, .bcm-set-section select:focus { outline: 2px solid #ffd6c4; border-color: var(--bcm-brand); }

/* Keep stat card values on one line on mobile */
.bcm-stat-val { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bcm-stat-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 620px) {
    .bcm-stat-val { font-size: 15px; }
    .bcm-stat-label { font-size: 10px; }
    .bcm-stat { padding: 10px 10px; }
}

/* Daily entry sub-tabs (Days / Extra) */
.bcm-daytabs { display: inline-flex; gap: 4px; background: var(--bcm-gray-bg); padding: 5px; border-radius: 12px; margin: 24px 0 12px; }
.bcm-daytab { padding: 9px 18px; border: none; background: transparent; border-radius: 9px; font-weight: 700; font-size: 13px; color: var(--bcm-muted); cursor: pointer; }
.bcm-daytab.is-active { background: #fff; color: var(--bcm-brand); box-shadow: 0 2px 8px rgba(232,93,36,.28); }

/* Impersonate button + notice */
.bcm-mini-blue { color: #2a4fd6; border-color: #b8c6f0; }
.bcm-mini-blue:hover { background: #eef3ff; }
.bcm-notice-blue { background: #eef3ff; color: #2a4fd6; padding: 12px 16px; border-radius: 10px; font-size: 14px; margin: 12px 0; }

/* Add teacher form on one row */
.bcm-addteacher { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.bcm-addteacher input, .bcm-addteacher select { flex: 1 1 180px; min-width: 150px; padding: 10px 12px; border: 1px solid var(--bcm-line); border-radius: 10px; font-size: 14px; }
.bcm-addteacher .bcm-btn { flex: 0 0 auto; }
@media (max-width: 620px) { .bcm-addteacher input, .bcm-addteacher select { flex: 1 1 100%; } }

/* Sortable table headers */
.bcm-table thead th:not([data-noexport]) { cursor: pointer; user-select: none; }
.bcm-table thead th:not([data-noexport]):hover { color: var(--bcm-brand); }
.bcm-sort-arrow { font-size: 10px; color: var(--bcm-brand); }

/* teacher-set meal badge */
.bcm-pill-blue { background: #eef3ff; color: #2a4fd6; }

/* changed-from-default meal badge */
.bcm-pill-amber { background: #fff3e0; color: #b26a00; }

/* Read-only meal on/off status in Daily Entry */
.bcm-onoff { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.bcm-onoff-on { background: #e6f7ed; color: #16a34a; }
.bcm-onoff-off { background: #f1f3f6; color: #8a94a3; }

/* Source mark (A=admin, T=teacher) beside qty control */
.bcm-srcmark { display:inline-flex; align-items:center; justify-content:center; width:18px; height:18px; border-radius:50%; font-size:11px; font-weight:800; margin:0 auto 3px; }
.bcm-srcmark-a { background:#fff3e0; color:#b26a00; }
.bcm-srcmark-t { background:#eef3ff; color:#2a4fd6; }

/* qty wrap: A/T mark centered above the control */
.bcm-qtywrap { display:flex; flex-direction:column; align-items:center; }


/* Summary column chooser dropdown */
.bcm-coldrop { position: relative; display: inline-block; }
.bcm-coldrop-menu { position: absolute; right: 0; top: 110%; z-index: 30; background: #fff; border: 1px solid var(--bcm-line); border-radius: 10px; box-shadow: var(--bcm-shadow); padding: 12px; min-width: 320px; max-height: 70vh; overflow-y: auto; }
.bcm-coldrop-head { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--bcm-muted, #888); padding: 2px 4px 6px; border-bottom: 1px solid var(--bcm-line); margin-bottom: 4px; }
.bcm-coldrop-item { display: flex; align-items: center; gap: 8px; padding: 4px; font-size: 14px; }
.bcm-coldrop-show { display: flex; align-items: center; gap: 6px; min-width: 120px; cursor: pointer; margin: 0; }
.bcm-coldrop-rename { flex: 1; min-width: 0; padding: 5px 8px; border: 1px solid var(--bcm-line); border-radius: 7px; font-size: 13px; }

/* SMS compose cost estimate bar */
.bcm-smsbar { display:flex; flex-wrap:nowrap; align-items:stretch; gap:8px; overflow-x:auto; -webkit-overflow-scrolling:touch; }
.bcm-smsbar-item { flex:0 0 auto; display:flex; flex-direction:column; align-items:center; justify-content:center; background:#fff; border:1px solid var(--bcm-line); border-radius:12px; padding:10px 14px; min-width:70px; }
.bcm-smsbar-num { font-size:18px; font-weight:800; color:var(--bcm-ink); }
.bcm-smsbar-lbl { font-size:11px; color:var(--bcm-muted); text-transform:uppercase; letter-spacing:.03em; margin-top:2px; }
.bcm-smsbar-x, .bcm-smsbar-eq { display:flex; align-items:center; font-size:18px; color:var(--bcm-muted); font-weight:700; }
.bcm-smsbar-total { background:linear-gradient(135deg,#fff4ee,#ffe8dc); border-color:var(--bcm-brand); }
.bcm-smsbar-total .bcm-smsbar-num { color:var(--bcm-brand-d); }

/* Show-password toggle on login */
.bcm-pw-wrap { position: relative; }
.bcm-pw-wrap input { width: 100%; padding-right: 60px; box-sizing: border-box; }
.bcm-pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--bcm-brand); font-size: 12px; font-weight: 700; cursor: pointer; padding: 4px 6px; }

/* Teacher action rows (two rows of buttons) */
.bcm-actrow { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.bcm-actrow:last-child { margin-bottom: 0; }
