/* =====================================================================
   Global layout styles
   ===================================================================== */

:root {
    --sidebar-width: 240px;
    --navbar-height: 60px;
    --brand-green: #1e7e34;
}

body {
    background-color: #f4f6f9;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
}

/* Navbar */
.app-navbar {
    height: var(--navbar-height);
    background: #fff;
    border-bottom: 1px solid #e3e6ea;
    position: sticky;
    top: 0;
    z-index: 1030;
}

/* Layout */
.app-body {
    display: flex;
    min-height: calc(100vh - var(--navbar-height));
}

/* Sidebar */
.app-sidebar {
    width: var(--sidebar-width);
    background: #1c2b36;
    flex-shrink: 0;
    transition: transform 0.2s ease-in-out;
}

.app-sidebar .nav-link {
    color: #c7d1d8;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.95rem;
    border-left: 3px solid transparent;
}

.app-sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.app-sidebar .nav-link.active {
    background: rgba(30, 126, 52, 0.25);
    color: #fff;
    border-left-color: var(--brand-green);
    font-weight: 600;
}

/* Main content */
.app-main {
    flex-grow: 1;
    padding: 1.5rem;
    max-width: 100%;
    overflow-x: hidden;
}

@media (max-width: 991.98px) {
    .app-sidebar {
        position: fixed;
        top: var(--navbar-height);
        bottom: 0;
        left: 0;
        transform: translateX(-100%);
        z-index: 1040;
        overflow-y: auto;
    }
    .app-sidebar.show {
        transform: translateX(0);
    }
}

/* Dashboard KPI cards */
.kpi-card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.kpi-card .kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

/* Login page */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e7e34 0%, #14532d 100%);
}

.login-card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

/* POS touch-friendly buttons (used by POS module) */
.btn-pos {
    min-height: 70px;
    font-size: 1rem;
    border-radius: 0.75rem;
}
