/* ============================================================
   ESTUDOS — motivo "grade/cronograma": a semana como grade de
   transmissão. Card (.zst-*) + tela cheia (.zstf-*). Identidade
   verde Zip · dia de hoje em destaque tinta · labels mono "//".
   ============================================================ */

/* ---------- HOST ---------- */
.widget-study-host {
    background: var(--bg-card) !important;
    color: var(--text-main) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-sm) !important;
    padding: 0 !important;
    gap: 0 !important;
}
.widget-study-host .w-content-wrap { padding: 0; display: flex; flex-direction: column; height: 100%; }
.widget-study-host .widget-actions-bottom { display: none !important; }

/* ---------- CARD ---------- */
.zst-card { display: flex; flex-direction: column; height: 100%; padding: 20px; box-sizing: border-box; gap: 15px; color: var(--text); }
.zst-header { display: flex; align-items: center; justify-content: space-between; }
.zst-header-left { display: flex; align-items: center; gap: 11px; }
.zst-badge { width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0; background: rgba(90,148,0,.12);
    display: flex; align-items: center; justify-content: center; }
body.dark-mode .zst-badge { background: rgba(155,219,31,.14); }
.zst-badge .zico { width: 22px; height: 22px; color: var(--green); }
.zst-titles { display: flex; flex-direction: column; }
.zst-title { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1.02rem; letter-spacing: -.03em; margin: 0; color: var(--text); }
.zst-meta { font-size: .76rem; color: var(--text2); font-weight: 500; margin-top: 2px; }

/* mini-grade da semana no card */
.zst-wk { display: flex; gap: 5px; }
.zst-wday { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.zst-wday em { font-family: 'JetBrains Mono', monospace; font-size: .58rem; font-style: normal; font-weight: 600; color: var(--muted2); }
.zst-wcell { width: 100%; height: 30px; border-radius: 9px; background: var(--sunk); display: flex; align-items: center; justify-content: center; }
.zst-wcell.has { background: rgba(90,148,0,.16); }
body.dark-mode .zst-wcell.has { background: rgba(155,219,31,.16); }
.zst-wcell.has::after { content: ''; width: 7px; height: 7px; border-radius: 99px; background: var(--green); }
.zst-wday.today em { color: var(--text); }
.zst-wday.today .zst-wcell { box-shadow: inset 0 0 0 2px var(--text); }

/* lista de matérias no card */
.zst-subj-list-card { display: flex; flex-direction: column; gap: 2px; flex: 1; min-height: 0; }
.zst-subj-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; min-width: 0; }
.zst-subj-dot { width: 9px; height: 9px; border-radius: 3px; background: var(--green); flex-shrink: 0; }
.zst-subj-rowname { font-family: 'Outfit', sans-serif; font-weight: 600; font-size: .88rem; color: var(--text);
    flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zst-subj-rowsched { font-family: 'JetBrains Mono', monospace; font-size: .66rem; color: var(--text2); font-weight: 500; white-space: nowrap; }
.zst-subj-more { font-size: .74rem; color: var(--green-deep); font-weight: 600; padding-top: 4px; }
body.dark-mode .zst-subj-more { color: var(--green); }

.zst-actions { display: flex; margin-top: auto; }
/* .zst-open: visual de .zbtn--soft/.zbtn--block (_core.css); só padding extra. */
.zst-open { padding-top: 11px; padding-bottom: 11px; }

/* estado vazio do card (nenhuma matéria) */
.zst-empty-state { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 4px; padding: 12px 8px; }
.zst-empty-ico { width: 54px; height: 54px; border-radius: 16px; background: rgba(90,148,0,.1); display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
body.dark-mode .zst-empty-ico { background: rgba(155,219,31,.12); }
.zst-empty-ico .zico { width: 28px; height: 28px; color: var(--green); }
.zst-empty-title { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: .95rem; color: var(--text); letter-spacing: -.02em; }
.zst-empty-sub { font-size: .78rem; color: var(--text2); max-width: 230px; line-height: 1.4; }

/* estado vazio da tela cheia (lista de matérias) */
.zst-empty { text-align: center; color: var(--text2); font-size: .82rem; padding: 14px 0; }

/* ============================================================
   TELA CHEIA
   ============================================================ */
#fsWidget[data-type="widget-study"] .zfs-body { padding: 0; }
.zstf { display: flex; flex-direction: column; }

.zstf-hero { padding: 22px; background: var(--card); border-bottom: 1px solid var(--line); }
.zstf-hero-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.zstf-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: 'JetBrains Mono', monospace;
    font-size: .66rem; font-weight: 700; letter-spacing: .14em; color: var(--green); text-transform: uppercase; }
.zstf-eyebrow .zico { width: 16px; height: 16px; }
.zstf-count { font-family: 'Outfit', sans-serif; font-size: .72rem; font-weight: 700; color: var(--green-deep);
    background: rgba(90,148,0,.1); padding: 5px 11px; border-radius: 99px; }
body.dark-mode .zstf-count { background: rgba(155,219,31,.14); color: var(--green); }
.zstf-next { display: flex; flex-direction: column; gap: 3px; margin-bottom: 16px; }
.zstf-next-lbl { font-size: .74rem; color: var(--text2); font-weight: 500; }
.zstf-next-val { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 1.5rem; letter-spacing: -.03em; color: var(--text); }
.zstf-pomo { width: 100%; padding-top: 12px; padding-bottom: 12px; }

.zstf-section { padding: 18px 22px; border-bottom: 1px solid var(--line); }
.zstf-section:last-child { border-bottom: none; }
.zstf-section-title { display: flex; align-items: center; gap: 8px; font-family: 'JetBrains Mono', monospace;
    font-size: .64rem; font-weight: 700; letter-spacing: .14em; color: var(--muted); margin-bottom: 13px; text-transform: uppercase; }
.zstf-section-title i { color: var(--muted); font-size: .9em; }

/* grade semanal grande */
.zstf-week { display: grid; grid-template-columns: repeat(7, minmax(46px, 1fr)); gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.zstf-col { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 5px; min-height: 84px;
    display: flex; flex-direction: column; align-items: center; gap: 7px; }
.zstf-col.today { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.zstf-col-lbl { font-family: 'JetBrains Mono', monospace; font-size: .6rem; font-weight: 700; color: var(--muted2); text-transform: uppercase; }
.zstf-col.today .zstf-col-lbl { color: var(--text); }
.zstf-col-body { display: flex; flex-direction: column; gap: 4px; width: 100%; align-items: center; }
.zstf-chip { width: 100%; background: rgba(90,148,0,.14); border-radius: 6px; padding: 4px 3px; text-align: center;
    font-family: 'Outfit', sans-serif; font-weight: 600; font-size: .6rem; color: var(--green-deep); line-height: 1.15;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.dark-mode .zstf-chip { color: var(--green); background: rgba(155,219,31,.16); }
.zstf-chip small { display: block; font-family: 'JetBrains Mono', monospace; font-size: .52rem; opacity: .8; font-weight: 600; }
.zstf-col-empty { color: var(--muted2); font-size: .7rem; }

/* matérias editáveis */
.zst-subjects { display: flex; flex-direction: column; gap: 11px; }
.zst-subj { border: 1px solid var(--line); border-radius: 16px; background: var(--card); padding: 15px; }
.zst-subj-head { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; }
.zst-subj-name { flex: 1; min-width: 0; font-family: 'Outfit', sans-serif; font-weight: 700; font-size: .98rem; letter-spacing: -.02em;
    color: var(--text); background: transparent; border: none; padding: 0; }
.zst-subj-name:focus { outline: none; }
.zst-del { width: 30px; height: 30px; border-radius: 9px; border: none; background: var(--sunk); color: var(--muted);
    cursor: pointer; flex-shrink: 0; transition: background .18s, color .18s; }
.zst-del:hover { background: var(--terra-soft); color: var(--terra); }

.zst-subj-sched { display: block; }
.zst-subj-lbl { display: flex; align-items: center; gap: 7px; font-family: 'JetBrains Mono', monospace; font-size: .6rem;
    font-weight: 700; letter-spacing: .1em; color: var(--muted2); margin-bottom: 8px; text-transform: uppercase; }
.zst-days { display: flex; gap: 5px; margin-bottom: 13px; }
.zst-day { flex: 1; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--app); cursor: pointer;
    font-family: 'JetBrains Mono', monospace; font-size: .66rem; font-weight: 700; color: var(--text2); transition: background .15s, color .15s; }
body.dark-mode .zst-day { background: rgba(255,255,255,.03); }
.zst-day.on { background: var(--ink); color: #FAFAF7; border-color: var(--ink); }
body.dark-mode .zst-day.on { background: var(--neon); color: #0d0d0d; border-color: var(--neon); }
.zst-subj-time-row { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; }
.zst-subj-time-row .zst-subj-lbl { margin-bottom: 0; }
.zst-subj-time { border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; background: var(--app); color: var(--text);
    font-family: 'Outfit', sans-serif; font-weight: 600; font-size: .82rem; }
body.dark-mode .zst-subj-time { background: rgba(255,255,255,.03); }
.zst-subj-time:focus { outline: none; border-color: var(--green); }
.zst-subj-notes { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 11px; background: var(--app);
    color: var(--text); font-family: 'Inter', sans-serif; font-size: .82rem; padding: 10px 12px; resize: vertical; min-height: 58px; line-height: 1.45; }
body.dark-mode .zst-subj-notes { background: rgba(255,255,255,.03); }
.zst-subj-notes::placeholder { color: var(--muted2); }
.zst-subj-notes:focus { outline: none; border-color: var(--green); }

.zst-add-subject { display: flex; gap: 9px; margin-top: 11px; }
.zst-add-subject input { flex: 1; border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; background: var(--card);
    color: var(--text); font-family: 'Inter', sans-serif; font-size: .86rem; }
.zst-add-subject input:focus { outline: none; border-color: var(--green); }
/* botão "+" usa .zbtn-icon--primary (_core.css); só alinha a altura ao input. */
.zst-add-subject button { width: 44px; height: 44px; }

@media (min-width: 900px) {
    .zstf {
        display: grid;
        grid-template-columns: 320px 1fr;
        grid-template-rows: auto 1fr;
        gap: 24px;
        padding: 32px 40px;
        min-height: 100%;
        box-sizing: border-box;
        background: var(--bg-app);
    }
    .zstf-content-wrap { display: contents; }
    .zstf-hero {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
        border-radius: 24px;
        border: 1px solid var(--border-color);
        padding: 28px;
        background: var(--bg-card);
        box-shadow: var(--shadow-sm);
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    .zstf-section:nth-of-type(1) { /* Cronograma */
        grid-column: 2 / 3;
        grid-row: 1 / 2;
        border-radius: 24px;
        border: 1px solid var(--border-color);
        padding: 28px;
        background: var(--bg-card);
        box-shadow: var(--shadow-sm);
        display: flex;
        flex-direction: column;
    }
    .zstf-section:nth-of-type(2) { /* Matérias */
        grid-column: 1 / 3;
        grid-row: 2 / 3;
        border-radius: 24px;
        border: 1px solid var(--border-color);
        padding: 28px;
        background: var(--bg-card);
        box-shadow: var(--shadow-sm);
        display: flex;
        flex-direction: column;
    }
    .zst-subjects {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 16px;
    }
}

/* ============================================================
   v7 "QUIET PREMIUM" — escala e pesos contidos
   ============================================================ */
.zstf-eyebrow, .zstf-section-title, .zstf-col-lbl, .zst-subj-lbl {
    font-family: 'Inter', sans-serif; font-weight: 600;
    letter-spacing: .09em; text-transform: uppercase; color: var(--text-muted);
}
.zstf-next-val { font-weight: 700; font-size: 1.3rem; letter-spacing: -.02em; }
.zst-wday em { font-family: 'Inter', sans-serif; font-weight: 600; letter-spacing: .05em; }
