/* =========================================================
   STUDX Task Tracker — admin panel trim.
   Loaded via a HEAD_END render hook, after Filament's own stylesheet,
   so it needs no Vite build and still wins on equal specificity.
   ========================================================= */

/* ---------- primary buttons ---------- */
/* Filament paints solid primary buttons with the 400 tint and near-black text,
   and Color::hex() only borrows the hue from the brand colour — so the button
   never actually shows #F7502F. Pin it to the brand orange instead.
   This sheet is unlayered, so it outranks Tailwind's layered utilities. */
.fi-btn.fi-color-primary {
    background-color: #f7502f;
    color: #fff;
}

.fi-btn.fi-color-primary:hover {
    background-color: #e24422;
    color: #fff;
}

/* ---------- sidebar ---------- */
/* Filament makes the sidebar white and 100dvh, but on desktop it explicitly
   strips the shadow and ring — so a white panel sits flush against the grey
   body with nothing marking the seam. Give it an edge and let it read as a
   full-height panel rather than as part of the page. */
.fi-main-sidebar {
    background-color: #fff;
    border-inline-end: 1px solid rgba(22, 22, 26, .08);
    box-shadow: 1px 0 3px -1px rgba(22, 22, 26, .05);
}

/* Line the brand block up with the topbar so the two share one baseline. */
.fi-sidebar-header {
    border-block-end: 1px solid rgba(22, 22, 26, .08);
    padding-inline: 1.25rem;
    flex-shrink: 0;
}

/* 1.5rem of side padding inside a 15rem rail leaves the labels cramped. */
.fi-sidebar-nav {
    padding-inline: .875rem;
    padding-block: 1rem;
    row-gap: 1.25rem;
}

.fi-sidebar-nav-groups {
    margin-inline: 0;
    row-gap: .25rem;
}

.fi-sidebar-group-items {
    row-gap: .125rem;
}

/* Resting items are quiet; hover is a wash, not a jump. */
.fi-sidebar-item-btn {
    padding-inline: .75rem;
    padding-block: .5rem;
    font-weight: 500;
}

.fi-sidebar-item:not(.fi-active) .fi-sidebar-item-btn:hover {
    background-color: rgba(22, 22, 26, .04);
}

/* The active page is the one thing that should carry the brand colour. */
.fi-sidebar-item.fi-active .fi-sidebar-item-btn {
    background-color: rgba(247, 80, 47, .1);
}

.fi-sidebar-item.fi-active .fi-sidebar-item-label,
.fi-sidebar-item.fi-active .fi-sidebar-item-icon {
    color: #d8401f;
}

/* ---------- sign-in: brand half beside the card ---------- */
/* The brand panel is injected at SIMPLE_LAYOUT_START, so it is the first
   child of .fi-simple-layout and the card follows it. Grid over that, rather
   than an override of Filament's auth layout. */
.fi-simple-layout:has(.auth-brand) {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: stretch;
    min-height: 100dvh;
    padding: 0;
    gap: 0;
}

/* The card column: centred in its half, with breathing room. */
.fi-simple-layout:has(.auth-brand) .fi-simple-main-ctn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    min-height: 100dvh;
}

.fi-simple-layout:has(.auth-brand) .fi-simple-main {
    width: 100%;
    max-width: 27rem;
    border: 0;
    box-shadow: none;
    background: transparent;
    padding: 0;
}

/* ---------- the brand half ---------- */
.auth-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    padding: 3rem;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(115% 85% at 8% 8%, rgba(247, 80, 47, .5) 0%, transparent 55%),
        radial-gradient(95% 80% at 92% 88%, rgba(70, 66, 241, .55) 0%, transparent 55%),
        #14141a;
}

/* A soft grid, so the large flat area has some texture without becoming a
   pattern that competes with the words on top of it. */
.auth-brand::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(80% 70% at 50% 40%, #000 0%, transparent 100%);
    pointer-events: none;
}

.auth-brand-inner,
.auth-brand-foot {
    position: relative;
    z-index: 1;
    max-width: 30rem;
}

.auth-brand-mark img {
    height: 2.75rem;
    width: auto;
    display: block;
    /* The logo is dark artwork for a light panel; invert it for this one. */
    filter: brightness(0) invert(1);
}

.auth-brand-wordmark {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -.02em;
}

.auth-brand-wordmark i {
    font-style: normal;
    color: #FF6B35;
}

.auth-brand-title {
    margin-block: 1.75rem .75rem;
    font-size: clamp(2rem, 3.2vw, 2.9rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.03em;
}

.auth-brand-lede {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, .72);
    max-width: 26rem;
}

.auth-brand-points {
    margin-block-start: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    list-style: none;
    padding: 0;
}

.auth-brand-points li {
    display: flex;
    gap: .875rem;
    align-items: flex-start;
    font-size: .875rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, .62);
}

.auth-brand-points b {
    color: #fff;
    font-weight: 600;
}

.auth-brand-icon {
    flex: 0 0 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    border-radius: .625rem;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    font-size: .9rem;
    color: #fff;
}

.auth-brand-foot {
    font-size: .8125rem;
    color: rgba(255, 255, 255, .5);
}

.auth-brand-foot a {
    color: rgba(255, 255, 255, .85);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-brand-foot a:hover {
    color: #fff;
}

/* ---------- the form half ---------- */
/* Filament makes this a centred flex column, so the heading is a
   shrink-to-fit flex item — text-align on the heading itself can never
   move it. The alignment has to happen on the container. */
.fi-simple-layout:has(.auth-brand) .fi-simple-header {
    align-items: flex-start;
    text-align: start;
    margin-block-end: 2rem;
}

.fi-simple-layout:has(.auth-brand) .fi-simple-header-heading {
    text-align: start;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -.02em;
}

.fi-simple-layout:has(.auth-brand) .fi-simple-header-subheading {
    text-align: start;
    max-width: none;
    margin-inline: 0;
    margin-block-start: .5rem;
}

/* Taller inputs and button: this form is two fields, so it can afford the
   room, and it stops the column reading as a cramped afterthought. */
.fi-simple-layout:has(.auth-brand) .fi-input {
    padding-block: .75rem;
}

.fi-simple-layout:has(.auth-brand) .fi-form > * + * {
    margin-block-start: .25rem;
}

.fi-simple-layout:has(.auth-brand) .fi-btn {
    padding-block: .75rem;
    font-size: .9375rem;
}

/* ---------- one column below 60rem ---------- */
/* The brand half becomes a short header strip rather than disappearing, so
   the page still says which door this is on a phone. */
@media (max-width: 60rem) {
    .fi-simple-layout:has(.auth-brand) {
        grid-template-columns: minmax(0, 1fr);
        min-height: 100dvh;
    }

    .auth-brand {
        padding: 2rem 1.5rem;
        gap: 0;
    }

    .auth-brand-title {
        margin-block: 1rem 0;
        font-size: 1.75rem;
    }

    /* The value props are for someone deciding; whoever opens this on a phone
       has already decided. Drop them and get to the fields. */
    .auth-brand-lede,
    .auth-brand-points,
    .auth-brand-foot {
        display: none;
    }

    .fi-simple-layout:has(.auth-brand) .fi-simple-main-ctn {
        min-height: 0;
        padding: 2rem 1.25rem 3rem;
    }
}

/* No :has() — the split silently does not apply, and Filament's own centred
   card is what shows. Make sure that still looks deliberate. */
@supports not selector(:has(*)) {
    .auth-brand {
        display: none;
    }
}

/* =========================================================
   Team month widget
   ========================================================= */
.tc-nav{display:flex;align-items:center;gap:8px}
.tc-month{min-width:9.5rem;text-align:center;font-weight:600;font-size:.9rem;color:#16161A}

.tc-totals{display:flex;flex-wrap:wrap;gap:6px 18px;margin-bottom:1rem;
  font-size:.8125rem;color:#6B6F76}
.tc-totals b{color:#16161A;font-size:.9375rem}

.tc-head{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;margin-bottom:6px}
.tc-head span{text-align:center;font-size:.625rem;font-weight:700;letter-spacing:.07em;
  text-transform:uppercase;color:#9A9DA3}

.tc-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}

.tc-day{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;
  min-height:66px;padding:8px 4px;border-radius:.625rem;border:1px solid #E7E6E3;
  background:#fff;text-decoration:none;transition:.13s}
.tc-day.tc-blank{border:0;background:transparent}
.tc-num{font-size:.8125rem;font-weight:700;line-height:1.1;color:#3A3B42;
  font-variant-numeric:tabular-nums}
.tc-frac{font-size:.75rem;font-weight:700;line-height:1.2;font-variant-numeric:tabular-nums}
.tc-sub{font-size:.625rem;color:#6B6F76;line-height:1.2}

/* Every cell carries its own numbers, so colour is reinforcement rather than
   the only channel — the grid still reads printed, or to anyone who cannot
   separate the hues. */
.tc-full{background:#E4F2EA;border-color:#BEE0CE}
.tc-full .tc-num,.tc-full .tc-frac{color:#12734A}
.tc-partial{background:#FBF0DC;border-color:#EBD5A6}
.tc-partial .tc-num,.tc-partial .tc-frac{color:#8A5D0B}
.tc-empty{background:#FBEAE8;border-color:#F0C8C3}
.tc-empty .tc-num,.tc-empty .tc-frac{color:#B8352A}
.tc-off{background:#F5F4F2;border-color:#E7E6E3;opacity:.75}
.tc-none-expected{background:#F5F4F2;border-color:#E7E6E3;opacity:.6}
.tc-future{background:#fff;border-style:dashed;opacity:.5}
.tc-today{box-shadow:0 0 0 2px #fff,0 0 0 3px #F7502F}

/* Holidays: a colour of their own, not the grey of an ordinary day off —
   a festival is something the team plans around, and it has to be findable
   at a glance in a month of green. */
.tc-holiday{background:#F2ECFD;border-color:#D9CBF6}
.tc-holiday .tc-num{color:#5B3AB8}
.tc-hol{max-width:100%;padding:0 2px;font-size:.625rem;font-weight:600;line-height:1.2;color:#5B3AB8;
  text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* The slot holds the day and its flag. The day fills it, so the grid keeps
   its shape whether or not a flag is drawn. */
.tc-slot{position:relative;min-width:0}
.tc-slot > .tc-day{height:100%}

/* The flag sits in the corner and stays quiet until the cell is hovered —
   thirty buttons in full view would drown the numbers. A day that already is
   a holiday keeps its flag visible, because that is information. */
.tc-flag{position:absolute;top:2px;right:2px;opacity:0;transition:opacity .13s}
.tc-slot:hover .tc-flag,.tc-flag:focus-within,.tc-flag.is-set{opacity:1}
/* Touch screens have no hover, so there the flag is simply always shown. */
@media (hover:none){.tc-flag{opacity:.7}}

a.tc-day:hover{transform:translateY(-1px);
  box-shadow:0 1px 2px rgba(22,22,26,.05),0 8px 20px -12px rgba(22,22,26,.3)}

.tc-legend{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;margin-top:1rem;
  font-size:.75rem;color:#6B6F76}
.tc-legend span{display:inline-flex;align-items:center;gap:6px}
.tc-dot{width:10px;height:10px;border-radius:3px;border:1px solid #E7E6E3;display:inline-block}
.tc-legend .tc-hint{margin-left:auto;opacity:.8}

@media(max-width:640px){
  .tc-grid,.tc-head{gap:3px}
  .tc-day{min-height:54px;padding:6px 2px;border-radius:.5rem}
  .tc-frac{font-size:.6875rem}
  .tc-sub{display:none}
  .tc-legend .tc-hint{display:none}
}

/* =========================================================
   Sidebar footer — who is signed in, and the way out
   =========================================================
   A second copy of what the avatar menu top-right already offers. Deliberate:
   that menu is only discoverable if you think to click the circle.
   ========================================================= */
.sidebar-user{border-top:1px solid #E7E6E3;padding:.875rem .75rem;display:flex;
  flex-direction:column;gap:.625rem}
.sidebar-user-who{display:flex;align-items:center;gap:.625rem;min-width:0}
.sidebar-user-avatar{flex:0 0 2rem;width:2rem;height:2rem;border-radius:50%;
  background:#16161A;color:#fff;display:flex;align-items:center;justify-content:center;
  font-size:.8125rem;font-weight:700}
.sidebar-user-text{display:flex;flex-direction:column;min-width:0}
.sidebar-user-name{font-size:.8125rem;font-weight:600;color:#16161A;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sidebar-user-email{font-size:.6875rem;color:#6B6F76;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.sidebar-user-out{display:flex;align-items:center;justify-content:center;gap:.4rem;
  width:100%;padding:.5rem .75rem;border:1px solid #E7E6E3;border-radius:.5rem;
  background:#fff;cursor:pointer;font-size:.8125rem;font-weight:600;color:#6B6F76;
  transition:.15s}
.sidebar-user-out:hover{color:#B8352A;border-color:#F0C8C3;background:#FBEAE8}
.sidebar-user-out-icon{width:1rem;height:1rem}

/* =========================================================
   Creator insights — the one-off lookup result panel.

   Bespoke rules rather than Tailwind utilities: the panel registers no Vite
   theme, so Filament's compiled stylesheet contains only the classes Filament
   itself uses. `grid-cols-4` and friends are absent and silently do nothing,
   which is what turned this panel into an unstyled vertical list.
   ========================================================= */
.ci-result{margin-top:1rem;padding-top:1rem;border-top:1px solid #E7E6E3}

/* ---------- who ---------- */
.ci-head{display:flex;align-items:flex-start;gap:.75rem}
.ci-avatar{flex:0 0 2.75rem;width:2.75rem;height:2.75rem;border-radius:50%;
  object-fit:cover;background:#F3F3F1}
.ci-who{display:flex;flex-direction:column;min-width:0;flex:1 1 auto}
.ci-name{font-size:.9375rem;font-weight:600;color:#16161A;line-height:1.3}
.ci-handle{font-size:.8125rem;color:#F7502F;text-decoration:none;width:fit-content}
.ci-handle:hover{text-decoration:underline}
.ci-bio{margin-top:.25rem;font-size:.75rem;color:#6B6F76;line-height:1.5}
/* Darker than the bio it sits above: it is a fact about the creator, not the
   blurb. Only ever rendered when the bio actually named a place. */
.ci-city{display:block;margin-top:.25rem;font-size:.75rem;font-weight:500;color:#16161A}
.ci-badge{flex:0 0 auto;border-radius:.375rem;padding:.125rem .5rem;
  font-size:.6875rem;font-weight:600;background:#E7F6EC;color:#1B7A43;white-space:nowrap}

/* ---------- section headings ---------- */
.ci-section{margin:1.125rem 0 .5rem;font-size:.6875rem;font-weight:600;
  text-transform:uppercase;letter-spacing:.04em;color:#6B6F76}
.ci-section-note{margin-left:.375rem;font-weight:500;text-transform:none;
  letter-spacing:normal;color:#A3A3A0}

/* ---------- stat grids ----------
   auto-fit rather than fixed columns: the tile count varies with what the API
   returned, and this wraps sensibly at any modal width without media queries. */
.ci-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(112px,1fr));gap:.75rem}
.ci-grid-2{margin-top:.75rem;grid-template-columns:repeat(auto-fit,minmax(112px,1fr))}
.ci-stat{min-width:0;background:#F9F9F7;border:1px solid #F0F0EE;
  border-radius:.5rem;padding:.5rem .625rem}
.ci-stat-wide{grid-column:span 2}
/* Engagement rate is the number people quote out of this panel, so it is
   accented - but it stays one tile wide, so the audience row and the reel
   row keep the same column rhythm. */
.ci-stat-key{background:#EEEDFE;border-color:#D6D4FB}
.ci-stat-key dd{color:#312DD6}
.ci-stat dt{font-size:.6875rem;color:#6B6F76;line-height:1.4;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ci-stat dd{margin:.125rem 0 0;font-size:.9375rem;font-weight:600;color:#16161A;
  font-variant-numeric:tabular-nums;line-height:1.3}

.ci-empty{font-size:.8125rem;color:#6B6F76;line-height:1.5}

/* ---------- provenance ---------- */
.ci-foot{display:flex;align-items:baseline;justify-content:space-between;gap:1rem;
  flex-wrap:wrap;margin-top:1.125rem;padding-top:.75rem;
  border-top:1px solid #F0F0EE;font-size:.75rem;color:#6B6F76;line-height:1.5}
.ci-foot a{color:#F7502F;text-decoration:none;word-break:break-all}
.ci-foot a:hover{text-decoration:underline}
.ci-foot-note{margin-top:.5rem;font-size:.6875rem;color:#A3A3A0;line-height:1.5}

/* ---------- messages ---------- */
.ci-note{border-radius:.5rem;padding:.75rem;font-size:.8125rem;line-height:1.5;
  background:#F7F7F5;color:#16161A}
.ci-note-bad{background:#FBEAE8;color:#B8352A}
.ci-note-why{display:block;margin-top:.25rem;color:#6B6F76}

/* A limit to respect before pressing Start, not an error after it — amber,
   and with a left edge so it reads as a rule rather than as help text. */
.ci-note-warn{background:#FFF7E6;color:#8A5A00;border-left:3px solid #E0A008}
.ci-note-warn strong{color:#6B4400}
.ci-note-warn ul{margin:.375rem 0 0;padding-left:1.125rem}
.ci-note-warn li{margin-top:.125rem}

/* ---------- rich editor: room to actually write ---------- */
/* Filament sizes the editor to its content, so a new draft opens about two
   lines tall and the writer is typing into a slot. An announcement is a few
   paragraphs, so give it five lines up front and let it grow from there.

   Plain CSS rather than a Tailwind class on the field: this panel ships
   Filament's compiled stylesheet and registers no custom theme, so utility
   classes written in a Blade file are not in the CSS at all. */
/* Filament sets this to calc(var(--spacing) * 12) — 3rem, roughly two
   lines. Five lines of 15px text at 1.5 is about 7rem, plus the 1.5rem of
   vertical padding it already carries. */
.fi-fo-rich-editor-content {
    min-height: 8.5rem;
}

/* The editable area fills the container rather than sitting two lines tall
   inside a taller box, so the whole height is clickable. */
.fi-fo-rich-editor-content .ProseMirror,
.fi-fo-rich-editor-content [contenteditable="true"] {
    min-height: 7rem;
}
