/**
 * Application custom styles.
 * Design guidelines: .cursor/plans/inventory_system_ui_ux/14_design_guidelines.md
 * Theme colors: app/Config/Theme.php (--theme-primary, --theme-secondary, etc.)
 */
:root {
    --sidebar-width: 250px;
    /* Fallbacks if Theme config not loaded */
    --theme-primary: #000814;
    --theme-secondary: #001d3d;
    --theme-tertiary: #003566;
    --theme-accent: #ffc300;
    --theme-accent-light: #ffd60a;
}

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

/* Sidebar: fixed width on desktop, offcanvas on mobile */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    background-color: var(--theme-primary) !important;
}

.sidebar .offcanvas-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    padding: 0;
}

@media (min-width: 992px) {
    .sidebar.offcanvas-lg {
        position: relative;
        transform: none;
        visibility: visible;
    }
}

/* Brand: icon left, text right (non-stack), on top of nav */
.sidebar .sidebar-brand {
    flex-shrink: 0;
    padding: 1rem;
}

.sidebar .sidebar-brand .sidebar-brand-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar .sidebar-brand .sidebar-brand-text {
    font-size: 1rem;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Nav links below brand – avoid mid-word break (e.g. "Dashboard") */
.sidebar-nav {
    padding-top: 0.5rem;
}

.sidebar-nav .sidebar-link {
    min-height: 2.75rem;
    align-items: center;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: normal;
    line-height: 1.3;
}

.sidebar-nav .sidebar-link i {
    flex-shrink: 0;
    width: 1.25rem;
    text-align: center;
}

.sidebar-nav .sidebar-link .sidebar-link-text {
    min-width: 0;
    flex: 1;
}

.sidebar-link:hover {
    background-color: var(--theme-secondary);
}

.sidebar-link.active {
    font-weight: 600;
    background-color: var(--theme-tertiary);
}

/* Accent colors for buttons, links (use .btn-accent or .text-accent) */
.btn-accent {
    background-color: var(--theme-accent);
    border-color: var(--theme-accent);
    color: #000814;
}

.btn-accent:hover {
    background-color: var(--theme-accent-light);
    border-color: var(--theme-accent-light);
    color: #000814;
}

.text-accent {
    color: var(--theme-accent) !important;
}

.main-content {
    min-width: 0;
}

.content-area {
    flex: 1;
}

.z-3 {
    z-index: 1030;
}
