/* Tampilan disamakan dengan Echo System Fit versi Blazor: wwwroot/app.css, MainLayout.razor.css, NavMenu.razor.css dan blok style NavMenu/MainLayout/Login/App. */
html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}



.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
/* ===== MainLayout.razor.css ===== */
.page { position: relative; display: flex; flex-direction: column; }
main { flex: 1; }
.sidebar { background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%); }
main .top-row { background-color: #f7f7f7; border-bottom: 1px solid #d6d5d5; justify-content: flex-end; height: 3.5rem; display: flex; align-items: center; }
main .top-row a, main .top-row .btn-link { white-space: nowrap; margin-left: 1.5rem; text-decoration: none; }
main .top-row a:hover, main .top-row .btn-link:hover { text-decoration: underline; }
main .top-row a:first-child { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640.98px) {
    main .top-row { justify-content: space-between; }
    main .top-row a, main .top-row .btn-link { margin-left: 0; }
}
@media (min-width: 641px) {
    .page { flex-direction: row; }
    .sidebar { width: 250px; height: 100vh; position: sticky; top: 0; }
    main .top-row { position: sticky; top: 0; z-index: 1; }
    main .top-row, main article { padding-left: 2rem !important; padding-right: 1.5rem !important; }
}
main { min-width: 0; }

/* animasi logout dan login */
.loading-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(255, 255, 255, 0.95); z-index: 9999; display: flex; flex-direction: column; justify-content: center; align-items: center; animation: fadeIn 0.3s ease-in-out; }
.loading-overlay[hidden] { display: none; }
.login-overlay { background-color: rgba(255, 255, 255, 0.9); }
.pulse-logo { font-size: 4rem; margin-bottom: 20px; animation: pulse 1s infinite; }
.login-overlay .pulse-logo { font-size: 3rem; animation: pulse 1.5s infinite; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.1); opacity: 0.7; } 100% { transform: scale(1); opacity: 1; } }

/* ===== NavMenu.razor.css (dibatasi ke .sidebar) ===== */
.sidebar .navbar-toggler { appearance: none; cursor: pointer; width: 3.5rem; height: 2.5rem; color: white; position: absolute; top: 0.5rem; right: 1rem; border: 1px solid rgba(255, 255, 255, 0.1); background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") no-repeat center/1.75rem rgba(255, 255, 255, 0.1); }
.sidebar .top-row { min-height: 3.5rem; background-color: rgba(0,0,0,0.4); }
.sidebar .navbar-brand { font-size: 1.1rem; }
.sidebar .bi { display: inline-block; position: relative; width: 1.25rem; height: 1.25rem; margin-right: 0.75rem; top: -1px; background-size: cover; }
.sidebar .nav-item { font-size: 0.9rem; padding-bottom: 0.5rem; }
.sidebar .nav-item:first-of-type { padding-top: 1rem; }
.sidebar .nav-item:last-of-type { padding-bottom: 1rem; }
.sidebar .nav-item .nav-link { color: #d7d7d7; background: none; border: none; border-radius: 4px; height: 3rem; display: flex; align-items: center; line-height: 3rem; width: 100%; }
.sidebar .nav-item a.active { background-color: rgba(255,255,255,0.37); color: white; }
.sidebar .nav-item .nav-link:hover { background-color: rgba(255,255,255,0.1); color: white; }

/* ===== blok <style> di NavMenu.razor ===== */
body .sidebar { z-index: 9999 !important; overflow: visible !important; }
@media (max-width: 640.98px) {
    .mobile-nav-wrapper { background-color: #111; border-bottom: 2px solid #444; overflow: hidden; transition: max-height 0.4s ease-in-out, opacity 0.4s ease-in-out; position: relative; }
    .mobile-nav-wrapper.nav-closed { max-height: 0; opacity: 0; padding: 0; }
    .mobile-nav-wrapper.nav-open { max-height: 85vh; opacity: 1; overflow-y: auto; }
    .nav-group-items { position: static !important; width: 100% !important; box-shadow: none !important; background-color: rgba(0,0,0,0.2) !important; border-radius: 0 !important; max-height: 0; overflow: hidden; opacity: 1 !important; visibility: visible !important; transform: none !important; transition: max-height 0.4s ease-in-out !important; }
    .nav-group:hover .nav-group-items, .nav-group.terbuka .nav-group-items { max-height: 600px; }
    .nav-group:hover .menu-header .bi-chevron-down, .nav-group.terbuka .menu-header .bi-chevron-down { transform: rotate(180deg) !important; }
}
@media (min-width: 641px) {
    .mobile-nav-wrapper { max-height: calc(100vh - 3.5rem) !important; overflow: visible !important; opacity: 1 !important; display: block !important; }
    .mobile-nav-wrapper::-webkit-scrollbar { width: 5px; }
    .mobile-nav-wrapper::-webkit-scrollbar-thumb { background: #444; border-radius: 5px; }
    .mobile-nav-wrapper::-webkit-scrollbar-track { background: #222; }
    .sidebar .navbar-toggler { display: none; }
    .nav-group { position: relative; }
    .nav-group-items { position: absolute; top: -5px; left: 100%; width: 250px; background-color: #1a1a1a; border-left: 1px solid #333; border-radius: 0 8px 8px 0; box-shadow: 10px 10px 25px rgba(0,0,0,0.7); padding: 0.5rem 0; z-index: 11000 !important; opacity: 0; visibility: hidden; transform: translateX(-15px); transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); }
    .nav-group:hover .nav-group-items { opacity: 1; visibility: visible; transform: translateX(0); }
    .nav-group:hover .menu-header { color: rgba(255, 255, 255, 1); background-color: rgba(255,255,255,0.08); border-right: 3px solid var(--bs-primary); }
    .menu-header .bi-chevron-down { transition: transform 0.3s ease; font-size: 0.9rem; }
    .nav-group:hover .menu-header .bi-chevron-down { transform: rotate(-90deg); }
}
.sidebar .nav-item .nav-link { font-size: 1rem; padding: 0.8rem 1.25rem; transition: all 0.2s; }
.sidebar .nav-item .nav-link .bi { display: inline-block; font-size: 1.3rem; width: 2rem; text-align: center; margin-right: 0.5rem; line-height: 1; vertical-align: -0.125em; }
.menu-header { font-size: 0.85rem; text-transform: uppercase; font-weight: bold; color: rgba(255, 255, 255, 0.4); margin-top: 1rem; margin-bottom: 0.2rem; padding-top: 10px; padding-bottom: 10px; padding-left: 1.25rem; letter-spacing: 1px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding-right: 1.25rem; transition: all 0.3s ease; }
.sidebar .menu-header .bi { width: 1.25rem; margin-right: 0.75rem; font-size: 0.9rem; }
.mobile-nav-wrapper .nav-item.px-3 .bi-box-arrow-left { }

/* ===== cetak ===== */
@media print { .sidebar, main .top-row, .no-print { display: none !important; } }
