/*
 * ঘণ্টিকা — থিম "ফিতা · দপ্তর" (Omar-এর বাছাই, ২৭ সেপ্টেম্বর ২০২৬; docs/redesign-themes.md)।
 * ময়ূরকণ্ঠী শিরোনাম-পট্টি, পাঁচ ভাগের ট্যাব, বড় বোতামের রিবন, পিতলের মূল বোতাম।
 *
 * কেবল অফিস-প্যানেলে (/admin) লোড হয় — AdminPanelProvider-এর HEAD_END hook।
 * Filament-এর নিজের CSS "@layer"-এর ভেতরে, তাই এখানকার সাধারণ নিয়মই জেতে; !important
 * কেবল সেখানে, যেখানে Filament/Alpine নিজে inline style বসায়।
 *
 * সব রঙ নিচের টোকেনে — হালকা :root-এ, গাঢ় .dark-এ। নতুন রঙ টোকেনের বাইরে নয়।
 * স্কুলের নিজের রঙ (--gh-school) কেবল লোগোর ঘর আর মূল বোতামে (Ribbon::schoolColor)।
 */

:root {
    --gh-ground: #F2F5F4;
    --gh-surface: #FFFFFF;
    --gh-title: #0A4E55;
    --gh-tabs: #0E6770;
    --gh-ribbon: #E3EFEE;
    --gh-ink: #122A2E;
    --gh-ink-soft: #46605F;
    --gh-line: #CFDDDB;
    --gh-brass: #946419;
    --gh-brass-light: #D9A441;
    --gh-on-title: #FFFFFF;
    --gh-tab-ink: #D7ECEA;
    --gh-btn-icon: #0E6770;
    --gh-btn-hover: #D3E6E4;
    --gh-btn-current: #FFFFFF;
    --gh-field: rgba(255, 255, 255, 0.14);
    --gh-field-line: rgba(255, 255, 255, 0.28);
}

.dark {
    --gh-ground: #0E1B1D;
    --gh-surface: #13272A;
    --gh-title: #06363B;
    --gh-tabs: #0A454C;
    --gh-ribbon: #16353A;
    --gh-ink: #E3EFEE;
    --gh-ink-soft: #A7C4C1;
    --gh-line: #2A4D51;
    --gh-tab-ink: #C9E3E0;
    --gh-btn-icon: #7CC2BA;
    --gh-btn-hover: #1E4449;
    --gh-btn-current: #0E2C30;
}

/* ---------- ভিত্তি ---------- */

.fi-body {
    background: var(--gh-ground);
}

/* ---------- শিরোনামের পট্টি (Filament-এর topbar) ---------- */

.fi-topbar {
    min-height: 3.5rem;
    background: var(--gh-title);
    color: var(--gh-on-title);
    box-shadow: none;
    border: 0;
    gap: 0.75rem;
}

.fi-topbar .fi-topbar-start {
    /* Filament ফোনে লোগো লুকায়; রিবনে ফোনেও নাম চাই — কোন পণ্যে আছি */
    display: flex;
}

/* রিবনই মেনু — Filament-এর নিজের মেনু, সাইডবার ও ☰ বোতাম আর লাগে না */
.fi-topbar-nav-groups,
.fi-topbar-open-sidebar-btn,
.fi-topbar-close-sidebar-btn,
.fi-layout-sidebar-toggle-btn-ctn,
.fi-sidebar,
.fi-sidebar-close-overlay {
    display: none !important;
}

.fi-topbar .fi-icon-btn,
.fi-topbar .fi-user-menu-trigger {
    color: var(--gh-on-title);
}

.fi-topbar .fi-input-wrp {
    background: var(--gh-field);
    box-shadow: inset 0 0 0 1px var(--gh-field-line);
}

.fi-topbar .fi-input-wrp input,
.fi-topbar .fi-input-wrp .fi-icon {
    color: var(--gh-on-title);
}

.fi-topbar .fi-input-wrp input::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

/* স্কুলের পরিচয় — লোগোর ঘর, নাম, শিক্ষাবর্ষ */
.gh-school {
    display: none;
    align-items: center;
    gap: 0.625rem;
    margin-inline-start: 0.75rem;
    padding-inline-start: 1rem;
    border-inline-start: 1px solid rgba(255, 255, 255, 0.22);
    color: var(--gh-on-title);
    min-width: 0;
}

@media (min-width: 768px) {
    .gh-school {
        display: flex;
    }
}

.gh-school-well {
    width: 2.125rem;
    height: 2.125rem;
    flex-shrink: 0;
    border-radius: 0.5625rem;
    background: var(--gh-school, var(--gh-brass));
    color: var(--gh-school-ink, #FFFFFF);
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 1rem;
    overflow: hidden;
}

.gh-school-well img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #FFFFFF;
}

.gh-school-name {
    font-weight: 600;
    font-size: 0.9375rem;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 18rem;
}

.gh-year {
    font-size: 0.8125rem;
    line-height: 1.4;
    padding: 0.125rem 0.625rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    white-space: nowrap;
}

/* ---------- ফিতা: ট্যাব + বোতাম ---------- */

.gh-ribbon {
    background: var(--gh-tabs);
    color: var(--gh-ink);
}

.gh-tabs {
    display: flex;
    gap: 0.125rem;
    padding: 0.375rem 1rem 0;
}

.gh-tab {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--gh-tab-ink);
    font: inherit;
    font-weight: 600;
    font-size: 0.9375rem;
    line-height: 1.35;
    min-height: 2.75rem;
    padding: 0.5rem 1.125rem;
    border-radius: 0.5rem 0.5rem 0 0;
    cursor: pointer;
}

.gh-tab:hover {
    color: #FFFFFF;
}

.gh-tab[aria-selected="true"] {
    background: var(--gh-ribbon);
    color: var(--gh-ink);
}

.gh-tab:focus-visible,
.gh-btn:focus-visible,
.gh-main:focus-visible {
    outline: 3px solid var(--gh-brass-light);
    outline-offset: 2px;
}

.gh-panels {
    display: flex;
    align-items: stretch;
    gap: 1rem;
    background: var(--gh-ribbon);
    border-bottom: 1px solid var(--gh-line);
    padding: 0.5rem 1rem 0.375rem;
    min-height: 6rem;
}

.gh-panel {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.gh-panel[hidden] {
    display: none;
}

.gh-buttons {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.gh-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-width: 5.5rem;
    min-height: 4rem;
    padding: 0.375rem 0.625rem;
    border-radius: 0.5rem;
    color: var(--gh-ink);
    text-decoration: none;
    font-size: 0.84375rem;
    line-height: 1.3;
    text-align: center;
}

.gh-btn:hover {
    background: var(--gh-btn-hover);
}

.gh-btn[aria-current="page"] {
    background: var(--gh-btn-current);
    box-shadow: inset 0 0 0 1px var(--gh-line), 0 1px 2px rgba(10, 78, 85, 0.12);
    font-weight: 600;
}

.gh-btn-icon {
    width: 1.75rem;
    height: 1.75rem;
    color: var(--gh-btn-icon);
}

.gh-badge {
    position: absolute;
    top: 0.25rem;
    inset-inline-end: 0.375rem;
    min-width: 1.25rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: var(--gh-brass);
    color: #FFFFFF;
    font-size: 0.75rem;
    line-height: 1.25rem;
    font-weight: 700;
}

.gh-caption {
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--gh-ink-soft);
    padding: 0.125rem 0.25rem 0;
}

/* মূল কাজ — "+ নতুন ভর্তি"; স্কুলের নিজের রঙ এখানে (না থাকলে থিমের পিতল) */
.gh-main {
    align-self: center;
    margin-inline-start: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 3.5rem;
    padding: 0 1.375rem;
    border-radius: 0.75rem;
    background: var(--gh-school, var(--gh-brass));
    color: var(--gh-school-ink, #FFFFFF);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.3;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 2px 0 rgba(18, 42, 46, 0.18);
}

.gh-main:hover {
    filter: brightness(1.06);
}

.gh-main-icon {
    width: 1.375rem;
    height: 1.375rem;
}

/* ---------- ফোন ও ছোট পর্দা: চিপ + দুই কলামের বোতাম + নিচে মূল বোতাম ---------- */

@media (max-width: 1023px) {
    .gh-ribbon {
        background: var(--gh-ribbon);
    }

    .gh-tabs {
        overflow-x: auto;
        scrollbar-width: none;
        gap: 0.5rem;
        padding: 0.625rem 0.75rem;
    }

    .gh-tabs::-webkit-scrollbar {
        display: none;
    }

    .gh-tab {
        flex: 0 0 auto;
        border-radius: 999px;
        border: 1px solid var(--gh-tabs);
        color: var(--gh-tabs);
        padding: 0.5rem 1rem;
    }

    .dark .gh-tab {
        color: var(--gh-tab-ink);
        border-color: #3E7F85;
    }

    .gh-tab:hover {
        color: var(--gh-tabs);
    }

    .gh-tab[aria-selected="true"],
    .dark .gh-tab[aria-selected="true"] {
        background: var(--gh-tabs);
        border-color: var(--gh-tabs);
        color: #FFFFFF;
    }

    .gh-panels {
        display: block;
        min-height: 0;
        padding: 0 0.75rem 0.75rem;
    }

    .gh-buttons {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    .gh-btn {
        flex-direction: row;
        justify-content: flex-start;
        gap: 0.625rem;
        min-width: 0;
        min-height: 3.25rem;
        padding: 0.5rem 0.75rem;
        background: var(--gh-surface);
        border: 1px solid var(--gh-line);
        font-size: 0.90625rem;
        text-align: start;
    }

    .gh-btn-icon {
        width: 1.5rem;
        height: 1.5rem;
        flex-shrink: 0;
    }

    .gh-caption {
        display: none;
    }

    .gh-main {
        position: fixed;
        inset-inline: 0.75rem;
        bottom: calc(0.75rem + env(safe-area-inset-bottom));
        z-index: 40;
        justify-content: center;
        margin: 0;
        min-height: 3.375rem;
        box-shadow: 0 6px 18px rgba(18, 42, 46, 0.28);
    }

    /* নিচের বোতাম যেন পাতার শেষ লেখা ঢেকে না দেয় */
    body:has(.gh-main) .fi-main {
        padding-bottom: 6rem;
    }
}

/* ---------- লগইনের মতো একা পাতা: ময়ূরকণ্ঠী পট, মাঝে সাদা কার্ড ---------- */

.fi-simple-layout {
    background: var(--gh-title);
}

.fi-simple-main {
    background: var(--gh-surface);
    border-radius: 1rem;
}

/* লোগো: শিরোনাম-পট্টিতে সাদা সংস্করণ, লগইনের সাদা কার্ডে গাঢ় (resources/views/brand/logo.blade.php) */
.gh-logo-on-light {
    display: none !important;
}

.fi-simple-layout .gh-logo-on-dark {
    display: none !important;
}

.fi-simple-layout .gh-logo-on-light {
    display: inline-flex !important;
}

.dark .fi-simple-layout .gh-logo-on-dark {
    display: inline-flex !important;
}

.dark .fi-simple-layout .gh-logo-on-light {
    display: none !important;
}
