/* ==========================================================================
   Uygulama iskeleti: yan menü, içerik alanı, giriş ekranı düzeni
   ========================================================================== */

/* --- Marka işareti --- */
.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 9px;
    background: #d6ebe3;
    color: var(--pine-deep);
    font-weight: 700;
    font-stretch: 78%;
    font-size: .95rem;
    letter-spacing: .02em;
    line-height: 1;
}

/* --- İskelet --- */
.shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.shell-main {
    flex: 1;
    min-width: 0;
}

.shell-content {
    max-width: 1240px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

@media (min-width: 900px) {
    .shell { flex-direction: row; }
    .shell-side {
        width: 248px;
        flex: 0 0 248px;
        height: 100vh;
        position: sticky;
        top: 0;
    }
    .shell-content { padding: 2.25rem 2.75rem 4rem; }
}

/* --- Yan menü --- */
.side {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--pine-deep);
    color: #c9d8d2;
}

.side-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1rem 1rem 1.25rem;
}

.side-brand {
    display: flex;
    align-items: center;
    gap: .7rem;
    color: #fff;
    text-decoration: none;
}
.side-brand:hover { color: #fff; text-decoration: none; }

.side-brand-text {
    font-size: .8125rem;
    line-height: 1.25;
    color: #a9bdb5;
    max-width: 9rem;
}

.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-toggle-btn {
    display: inline-grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius);
    color: #fff;
    cursor: pointer;
    background: rgba(255, 255, 255, .06);
}
.nav-toggle:focus-visible + .nav-toggle-btn { outline: 2px solid #9fd3c1; outline-offset: 2px; }

.side-body {
    display: none;
    flex-direction: column;
    flex: 1;
    padding: .25rem .75rem 1rem;
}
.side:has(.nav-toggle:checked) .side-body { display: flex; }

@media (min-width: 900px) {
    .nav-toggle-btn { display: none; }
    .side-body { display: flex; }
    .side-top { padding: 1.4rem 1rem 1.6rem 1.25rem; }
}

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.side-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: .75rem;
    width: 100%;
    padding: .55rem .75rem;
    border: 0;
    border-radius: var(--radius);
    background: none;
    color: #c9d8d2;
    font: inherit;
    font-size: .9rem;
    font-weight: 520;
    text-decoration: none;
    text-align: left;
    transition: background-color .15s var(--ease), color .15s var(--ease);
}
.side-link .icon { flex: 0 0 auto; opacity: .8; transition: opacity .15s var(--ease); }
.side-link:hover { color: #fff; background: rgba(255, 255, 255, .06); text-decoration: none; }
.side-link:hover .icon { opacity: 1; }

/* Etkin sayfa: solda ince bir çizgi büyüyerek belirir */
.side-link::before {
    content: "";
    position: absolute;
    left: -.75rem;
    top: 50%;
    width: 3px;
    height: 1.4rem;
    border-radius: 0 3px 3px 0;
    background: #8fd0ba;
    transform: translateY(-50%) scaleY(0);
    transition: transform .25s var(--ease);
}
.side-link.active { color: #fff; background: rgba(143, 208, 186, .12); }
.side-link.active .icon { opacity: 1; color: #8fd0ba; }
.side-link.active::before { transform: translateY(-50%) scaleY(1); }

.side-user {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, .08);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.side-user-card {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .55rem .6rem;
    border-radius: var(--radius);
    color: #fff;
    text-decoration: none;
    transition: background-color .15s var(--ease);
}
.side-user-card:hover, .side-user-card.active { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }

.avatar {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    flex: 0 0 2rem;
    border-radius: 50%;
    background: #1f4a40;
    color: #d6ebe3;
    font-size: .75rem;
    font-weight: 650;
    letter-spacing: .02em;
}

.side-user-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.side-user-name { font-size: .875rem; font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user-role { font-size: .75rem; color: #a9bdb5; }

.side-logout { color: #a9bdb5; }

/* --- Hata çubuğu --- */
#blazor-error-ui {
    display: none;
    position: fixed;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%);
    z-index: 1000;
    padding: .7rem 2.75rem .7rem 1rem;
    border-radius: var(--radius);
    background: var(--ink);
    color: #fff;
    box-shadow: 0 10px 30px rgba(12, 39, 34, .25);
}
#blazor-error-ui a { color: #8fd0ba; margin-left: .5rem; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .9rem; top: .65rem; }

/* ==========================================================================
   Giriş ekranı
   ========================================================================== */
.auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr;
    background: var(--paper);
}

.auth-aside {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--pine-deep);
    color: #c9d8d2;
    overflow: hidden;
}

.auth-statement h2 {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 620;
    letter-spacing: -0.015em;
    margin-bottom: .5rem;
}
.auth-statement p { max-width: 30rem; margin: 0; color: #a9bdb5; }

.auth-standards-wrap { display: none; position: relative; z-index: 1; }
.auth-standards { margin: 0; }
.auth-standards-title { color: #a9bdb5; font-size: .8125rem; margin-bottom: .6rem; }

.auth-main {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1rem 3rem;
}

.auth-card { width: 100%; max-width: 26rem; }
.auth-card h1 { font-size: 1.75rem; margin-bottom: .25rem; }
.auth-card h2 { font-size: 1rem; font-weight: 450; color: var(--ink-2); letter-spacing: 0; margin-bottom: 1.5rem; }
.auth-card hr { display: none; }
.auth-card .row { --bs-gutter-x: 0; }
.auth-card .row > [class*="col-"] { width: 100%; max-width: 100%; flex: 0 0 100%; }

@media (min-width: 900px) {
    .auth { grid-template-columns: minmax(380px, 44%) 1fr; }
    .auth-aside {
        padding: 2.5rem 3rem;
        justify-content: space-between;
        position: sticky;
        top: 0;
        height: 100vh;
    }
    .auth-statement h2 { font-size: 2.25rem; line-height: 1.1; letter-spacing: -0.025em; max-width: 22rem; }
    .auth-standards-wrap { display: block; }
    .auth-standards {
        display: grid;
        gap: 0;
        border-top: 1px solid rgba(255, 255, 255, .12);
    }
    .auth-standards > div {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        padding: .8rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, .12);
    }
    .auth-standards dt { color: #fff; font-weight: 600; font-stretch: 85%; font-variant-numeric: tabular-nums; }
    .auth-standards dd { margin: 0; color: #a9bdb5; }
    .auth-main { align-items: center; padding: 3rem; }
}
