/* Tema bergaya Ynex. */

.ynex-app {
    --primary-color: #845adf;
    --secondary-color: #23b7e5;
    --accent-color: #26bf94;
    --success-color: #26bf94;
    --warning-color: #f5b849;
    --danger-color: #e6533c;
    --error-color: #e6533c;
    --info-color: #49b6f5;
    --light-color: #f5f6fa;
    --bg-light: #f5f6fa;
    --dark-color: #33405a;
    --text-primary: #33405a;
    --text-secondary: #6b7a90;
    --muted-color: #8c9097;
    --border-color: #ebeaf1;
    --border-radius: 0.5rem;
    --border-radius-lg: 0.625rem;
    --shadow-sm: 0 0.125rem 0.25rem rgba(20, 30, 60, 0.05);
    --shadow: 0 0.25rem 0.75rem rgba(20, 30, 60, 0.06);

    font-family: 'Outfit', 'Inter', 'Segoe UI', sans-serif;
    color: var(--text-primary);
}

.ynex-app .ynex-main { background: #f5f6fa; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.ynex-app .ynex-content { padding: 1.5rem; flex: 1; }

.ynex-app .ynex-appbar {
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 4px rgba(20, 30, 60, 0.04);
    background-color: #ffffff !important;
    color: #536485 !important;
}

.ynex-app .ynex-user { display: flex; align-items: center; gap: .6rem; cursor: pointer; padding: .25rem .5rem; border-radius: .5rem; }
.ynex-app .ynex-user:hover { background: rgba(132, 90, 223, 0.08); }
.ynex-app .ynex-user-text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.ynex-app .ynex-user-name { font-weight: 600; font-size: .875rem; color: var(--text-primary); }
.ynex-app .ynex-user-role { font-size: .75rem; color: var(--muted-color); }

.ynex-app .ynex-drawer { 
    border-right: 1px solid var(--border-color); 
    background-color: #ffffff !important;
}

.ynex-app .ynex-brand {
    height: 3.75rem; display: flex; align-items: center; padding: 0 1rem;
    border-bottom: 1px solid var(--border-color);
}
.ynex-app .ynex-brand-link { display: flex; align-items: center; gap: .65rem; text-decoration: none; }
.ynex-app .ynex-logo { height: 32px; width: 32px; object-fit: contain; border-radius: 6px; }
.ynex-app .ynex-brand-text { display: flex; flex-direction: column; line-height: 1.1; white-space: nowrap; }
.ynex-app .ynex-brand-title { font-weight: 700; font-size: 1rem; color: var(--primary-color); }
.ynex-app .ynex-brand-sub { font-size: .75rem; color: var(--muted-color); letter-spacing: .08em; }

.ynex-app .ynex-nav-search { padding: .85rem 1rem .25rem; }

.ynex-app .ynex-nav-category {
    font-size: .6875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
    color: var(--muted-color); padding: 1rem .9rem .35rem;
}
.ynex-app .ynex-nav-hint { color: var(--muted-color); margin-left: .25rem; font-size: .75rem; }
.ynex-app .ynex-nav-empty { padding: 1.5rem 1rem; text-align: center; color: var(--muted-color); font-size: .875rem; }

.ynex-app .app-footer {
    padding: 1rem 1.5rem;
    color: var(--muted-color);
    font-size: .8125rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
    background: #ffffff;
    margin-top: auto;
}
.ynex-app .ynex-nav { padding: .25rem .5rem 1rem; display: flex; flex-direction: column; gap: 2px; }
.ynex-app .ynex-nav-link {
    display: flex; align-items: center; gap: .65rem; width: 100%; border: 0; background: transparent; text-align: left;
    border-radius: .4rem; font-size: .875rem; color: #536485; padding: .5rem .75rem; text-decoration: none; cursor: pointer;
}
.ynex-app .ynex-nav-link i { font-size: 1.05rem; color: #8c9097; }
.ynex-app .ynex-nav-link span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ynex-app .ynex-nav-link:hover { background: rgba(132, 90, 223, 0.07); color: var(--primary-color); }
.ynex-app .ynex-nav-link.active { background: rgba(132, 90, 223, 0.12); color: var(--primary-color); font-weight: 600; }
.ynex-app .ynex-nav-link.active i { color: var(--primary-color); }

/* Shell: drawer kiri + appbar sticky (tanpa MudBlazor). Desktop: drawer tampil; mobile: tersembunyi, tombol menu membukanya. */
.ynex-shell { --drawer-w: 16rem; --appbar-h: 3.75rem; min-height: 100vh; min-height: 100dvh; background: #f5f6fa; }
.ynex-shell .ynex-drawer { position: fixed; top: 0; bottom: 0; left: 0; width: var(--drawer-w); overflow-y: auto; z-index: 1040; transition: transform .2s ease; }
.ynex-shell .ynex-body { margin-left: var(--drawer-w); min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; transition: margin .2s ease; }
.ynex-shell .ynex-appbar { position: sticky; top: 0; z-index: 1030; height: var(--appbar-h); display: flex; align-items: center; padding: 0 1rem; }
.ynex-shell .ynex-backdrop { display: none; }
.ynex-shell.toggled .ynex-drawer { transform: translateX(-100%); }
.ynex-shell.toggled .ynex-body { margin-left: 0; }
@media (max-width: 991.98px) {
    .ynex-shell .ynex-drawer { transform: translateX(-100%); }
    .ynex-shell .ynex-body { margin-left: 0; }
    .ynex-shell.toggled .ynex-drawer { transform: none; box-shadow: 0 0 2rem rgba(0,0,0,.2); }
    .ynex-shell.toggled .ynex-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 1035; }
}
