/**
 * POS ERP - Custom App Styles
 */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-box {
    width: 100%;
    max-width: 420px;
    padding: 1rem;
}

.small-box {
    position: relative;
    display: block;
    padding: 1.25rem 1.25rem .75rem;
    color: #fff;
    overflow: hidden;
}

.small-box .inner h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0;
    white-space: nowrap;
}

.small-box .inner p {
    margin-bottom: 0;
    opacity: .9;
}

.small-box-icon {
    position: absolute;
    right: 12px;
    top: 12px;
    font-size: 3rem;
    opacity: .3;
}

.brand-image {
    color: #fff;
}

/**
 * ============================================================
 * Dark navy sidebar / slate topbar theme (blue accent), inspired
 * by a brighter admin reference. Layered on top of AdminLTE 4's
 * own dark sidebar variant, so the treeview/menu JS keeps working
 * unchanged - only colors, spacing and the user panel are custom.
 * ============================================================
 */
:root {
    --app-navy: #0f172a;
    --app-slate: #1e293b;
    --app-border: #1e293b;
    --app-accent: #2563eb;
    --app-muted: #64748b;
}

html, body {
    height: 100%;
}

.app-wrapper {
    min-height: 100vh;
}

/*
 * Force the sidebar to stay capped to the viewport and scroll its own
 * menu list internally. Without this, a very long menu tree (many
 * modules across every tahap) can inflate the height of the whole
 * CSS Grid layout, pushing the footer far below the visible content
 * and leaving a large blank gap on pages with little content (e.g.
 * an empty DataTable).
 */
.app-sidebar {
    position: sticky !important;
    top: 0;
    max-height: 100vh;
    overflow: hidden;
}
.app-sidebar .sidebar-wrapper {
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    overflow-x: hidden;
}

.app-sidebar {
    background: var(--app-navy) !important;
}
.app-sidebar .sidebar-brand {
    background: var(--app-navy);
    border-bottom: 1px solid var(--app-border);
}
.app-sidebar .brand-text {
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
    font-size: 1.05rem;
}
.app-sidebar .nav-header {
    color: var(--app-muted) !important;
    font-size: .7rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    font-weight: 700;
}
.app-sidebar .nav-sidebar > .nav-item > .nav-link.active,
.app-sidebar .nav-sidebar .nav-treeview .nav-link.active {
    background: var(--app-accent) !important;
    color: #fff !important;
    border-radius: .375rem;
}
.app-sidebar .nav-link:hover {
    background: rgba(37, 99, 235, .15);
    border-radius: .375rem;
}

/* Avatar circle with initials, used in the sidebar user panel and topbar */
.app-avatar-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--app-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    font-weight: 800;
    color: #fff;
    flex: 0 0 auto;
}
.app-avatar-circle.sm {
    width: 28px;
    height: 28px;
    font-size: .75rem;
}

.app-sidebar-userpanel {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .9rem 1rem;
    border-bottom: 1px solid var(--app-border);
    margin-bottom: .25rem;
}
.app-sidebar-userpanel .name {
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
    line-height: 1.2;
}
.app-sidebar-userpanel .role {
    color: var(--app-muted);
    font-size: .72rem;
}

.app-header {
    background: var(--app-slate) !important;
    border-bottom: 1px solid var(--app-border) !important;
}
.app-header .nav-link {
    color: #cbd5e1 !important;
}
.app-header .nav-link:hover {
    color: #fff !important;
}
.app-header .dropdown-menu {
    font-size: .875rem;
}

.app-content-header,
.app-content {
    background: #f1f5f9;
}

/* Bottom "Kelola X ->" link used on colored dashboard widgets */
.small-box .kelola-link {
    display: block;
    background: rgba(0, 0, 0, .12);
    color: #fff;
    text-align: right;
    padding: .4rem .9rem;
    font-size: .78rem;
    font-weight: 600;
    text-decoration: none;
    margin: .75rem -1.25rem -.75rem;
}
.small-box .kelola-link:hover {
    background: rgba(0, 0, 0, .22);
    color: #fff;
}
