/*
 * Temple admin theme.
 *
 * Plain CSS on purpose: shared Hostinger plans have no Node toolchain, so the
 * admin panel must never need an npm build to deploy. Filament's own compiled
 * stylesheet ships in the package; this file layers the temple identity on top
 * using Filament's own class names and a few scoped overrides.
 *
 * The visual language is drawn from temple building rather than applied as
 * decoration: the saffron and kumkum of cloth and tilak, the gold of kalasha
 * and trim, sandal for plastered walls, and the stepped silhouette of a
 * gopuram in the section headers. Everything is defined once as a token so
 * light and dark stay in step.
 */

:root {
    --temple-saffron: #e07a1f;
    --temple-kumkum: #9b1b30;
    --temple-gold: #c9a227;
    --temple-sandal: #f5ebdc;
    --temple-deep: #3e2723;
    --temple-stone: #d8cbb8;

    --temple-surface: #fffdf9;
    --temple-ink: #3e2723;
    --temple-muted: rgba(62, 39, 35, 0.62);
    --temple-rule: rgba(201, 162, 39, 0.35);
    --temple-wash-a: rgba(224, 122, 31, 0.12);
    --temple-wash-b: rgba(155, 27, 48, 0.10);
}

.dark {
    --temple-surface: #1a1412;
    --temple-ink: #f5ebdc;
    --temple-muted: rgba(245, 235, 220, 0.62);
    --temple-rule: rgba(201, 162, 39, 0.28);
    --temple-wash-a: rgba(224, 122, 31, 0.10);
    --temple-wash-b: rgba(155, 27, 48, 0.09);
}

/* --- Sign-in: a warm sandal wash instead of flat grey --- */

.fi-simple-layout {
    background-color: var(--temple-sandal);
    background-image:
        radial-gradient(circle at 18% 12%, var(--temple-wash-a), transparent 42%),
        radial-gradient(circle at 82% 88%, var(--temple-wash-b), transparent 45%);
}

.dark .fi-simple-layout {
    background-color: var(--temple-deep);
}

/* --- Brand mark carries the saffron-to-kumkum gradient --- */

.fi-logo {
    background: linear-gradient(95deg, var(--temple-saffron), var(--temple-kumkum));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
    letter-spacing: -0.015em;
}

/* --- A thin gold rule under the topbar, echoing temple trim --- */

.fi-topbar nav {
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(
            90deg,
            var(--temple-saffron),
            var(--temple-gold),
            var(--temple-kumkum)
        )
        1;
}

/* --- Sidebar: warm paper rather than cold white --- */

.fi-sidebar,
.fi-topbar > nav {
    background-color: var(--temple-surface);
}

.fi-sidebar-nav-groups .fi-sidebar-group-label {
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.68rem;
    color: var(--temple-muted);
}

/* The active item gets a saffron edge, like a marked threshold. */
.fi-sidebar-item-active .fi-sidebar-item-button {
    box-shadow: inset 3px 0 0 0 var(--temple-saffron);
}

/* --- Section headings read as temple signage --- */

.fi-section-header-heading {
    letter-spacing: -0.01em;
}

/*
 * A stepped gold motif before each section heading, echoing the receding
 * tiers of a gopuram. Drawn with gradients rather than an image so it costs
 * no request and stays crisp at any zoom.
 */
.fi-section-header::before {
    content: "";
    display: block;
    width: 34px;
    height: 4px;
    margin-bottom: 0.6rem;
    border-radius: 1px;
    background:
        linear-gradient(90deg, var(--temple-saffron) 0 10px, transparent 10px 12px,
            var(--temple-gold) 12px 22px, transparent 22px 24px,
            var(--temple-kumkum) 24px 34px);
}

/* --- Badges stay distinct: trust levels must never blur together --- */

.fi-badge {
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* --- Tables: warmer header, softer rules --- */

.fi-ta-header-cell {
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.7rem;
    color: var(--temple-muted);
}

/* --- Today's deity panel on the dashboard --- */

.temple-today {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    border: 1px solid var(--temple-rule);
    background-color: var(--temple-surface);
    background-image:
        radial-gradient(circle at 92% 8%, color-mix(in srgb, var(--day-accent) 16%, transparent), transparent 55%);
}

.temple-today__rule {
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--day-accent),
        var(--temple-gold) 55%,
        var(--day-accent)
    );
}

.temple-today__body {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.25rem 1.5rem 1.4rem;
}

.temple-today__meta {
    min-width: 0;
}

.temple-today__eyebrow {
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--temple-muted);
}

.temple-today__title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--temple-ink);
}

.temple-today__subtitle {
    margin: 0.3rem 0 0;
    color: var(--temple-muted);
}

.temple-today__mantra {
    margin: 0.85rem 0 0;
    font-size: 1.05rem;
    color: var(--day-accent);
    font-weight: 600;
}

.temple-today__translit {
    margin: 0.15rem 0 0;
    font-size: 0.85rem;
    font-style: italic;
    color: var(--temple-muted);
}

.temple-today__deities {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.temple-today__deity {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.5rem 0.85rem;
    border-radius: 0.55rem;
    border: 1px solid var(--temple-rule);
    background-color: color-mix(in srgb, var(--day-accent) 8%, transparent);
}

.temple-today__link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.temple-today__link:hover {
    border-bottom-color: var(--day-accent, var(--temple-gold));
}

.temple-today__deity--link {
    text-decoration: none;
    color: inherit;
    transition: border-color 140ms ease, transform 140ms ease;
}

.temple-today__deity--link:hover {
    border-color: var(--day-accent, var(--temple-gold));
    transform: translateY(-1px);
}

.temple-today__deity-name {
    font-weight: 600;
    color: var(--temple-ink);
}

.temple-today__deity-count {
    font-size: 0.75rem;
    color: var(--temple-muted);
}

/* Phone width: the meta block and deity chips stack rather than squeeze. */
@media (max-width: 640px) {
    .temple-today__body {
        flex-direction: column;
        padding: 1rem 1.1rem 1.2rem;
    }
}

/* Respect users who ask for reduced motion. */
@media (prefers-reduced-motion: reduce) {
    .fi-simple-layout,
    .temple-today {
        background-image: none;
    }

    .temple-today__deity--link {
        transition: none;
    }

    .temple-today__deity--link:hover {
        transform: none;
    }
}

/* --- Profile page: the account facts above the edit form --- */

.temple-profile {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: 1rem 1.5rem;
    margin: 0;
}

.temple-profile__item--wide {
    grid-column: 1 / -1;
}

.temple-profile__label {
    margin: 0 0 0.3rem;
    font-size: 0.72rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--temple-muted);
}

.temple-profile__value {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    margin: 0;
    font-size: 0.95rem;
    color: var(--temple-ink);
}

.temple-profile__badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border: 1px solid var(--temple-rule);
    border-radius: 999px;
    background-color: var(--temple-wash-a);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--temple-ink);
}

.temple-profile__hint {
    margin: 0.35rem 0 0;
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--temple-muted);
}

/* --- Storage page: the health checks and the upload allowance table --- */

.temple-storage__checks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 1.1rem 1.5rem;
    margin: 0;
}

.temple-storage__label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 0.3rem;
    font-size: 0.72rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--temple-muted);
}

/* Colour is doubled by the words beside it: a red dot alone would be lost on
   anyone who cannot separate it from the green one. */
.temple-storage__dot {
    flex: none;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    background-color: #1a7f4b;
}

.temple-storage__dot--bad {
    background-color: var(--temple-kumkum);
}

.temple-storage__dot--unknown {
    background-color: var(--temple-stone);
}

.temple-storage__value {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--temple-ink);
    overflow-wrap: anywhere;
}

.temple-storage__hint {
    margin: 0.35rem 0 0;
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--temple-muted);
    overflow-wrap: anywhere;
}

.temple-storage__link {
    color: var(--temple-saffron);
    text-decoration: underline;
}

/* A narrow screen scrolls the table sideways rather than crushing the columns. */
.temple-storage__scroll {
    overflow-x: auto;
}

.temple-storage__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    color: var(--temple-ink);
}

.temple-storage__table th,
.temple-storage__table td {
    padding: 0.6rem 0.75rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--temple-rule);
}

.temple-storage__table thead th {
    font-size: 0.72rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--temple-muted);
    background-color: var(--temple-wash-a);
}

.temple-storage__table tbody th {
    font-weight: 600;
}

.temple-storage__nowrap {
    white-space: nowrap;
}

.temple-storage__footnote {
    margin-top: 1rem;
}

/* An upload the server will cut short before the form ever sees it. */
.temple-storage__capped {
    color: var(--temple-kumkum);
    white-space: normal;
    max-width: 11rem;
}

/* The connection-test result, left in place under the storage form. */
.temple-storage__result {
    margin-top: 1rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--temple-rule);
    border-left-width: 3px;
    border-left-color: #1a7f4b;
    border-radius: 0.5rem;
    background-color: var(--temple-wash-a);
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--temple-ink);
}

.temple-storage__result--bad {
    border-left-color: var(--temple-kumkum);
    background-color: var(--temple-wash-b);
}

.temple-storage__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.25rem;
}

/* --- "Use this on your phone": the install steps on the profile page --- */

.temple-install__steps {
    margin: 0 0 0.85rem;
    /* Filament's reset strips list markers from every ol; numbered steps are
       the whole point of this one, so they are put back. */
    list-style: decimal outside;
    padding-left: 1.3rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--temple-ink);
}

.temple-install__steps li {
    margin-bottom: 0.3rem;
}

.temple-install__note {
    margin: 0 0 0.6rem;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--temple-muted);
}

.temple-install__installed {
    margin: 0;
    font-size: 0.9rem;
    color: var(--temple-muted);
}
