/* Custom Styles for Satu Aja! POS */
:root {
    --primary-color: #4e73df;
    --secondary-color: #858796;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --dark-color: #5a5c69;
    --light-bg: #f8f9fc;
}

body {
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--light-bg);
    color: #4e5e6a;
    line-height: 1.6;
}

.auth-card {
    max-width: 450px;
    margin: 80px auto;
    border: none;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
    background: #ffffff;
}

.auth-card .card-body {
    padding: 50px !important;
}

.btn {
    border-radius: 12px;
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #2e59d9;
    border-color: #264cc4;
    transform: translateY(-1px);
    box-shadow: 0 8px 15px rgba(78, 115, 223, 0.2);
}

.form-control {
    border-radius: 12px;
    padding: 12px 18px;
    border: 1px solid #d1d3e2;
    background-color: #fff;
}

.form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(78, 115, 223, 0.1);
    border-color: var(--primary-color);
}

.dashboard-card {
    border-radius: 5px;
    background: white;
    padding: 10px;
    border: 1px solid rgba(0,0,0,0.03);
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
}

/* Layout Containers */
.wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.sa-mobile-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: #ffffff;
    border-bottom: 1px solid #eaecf4;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    z-index: 1100;
}

.sa-mobile-topbar-inner {
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    width: 100%;
}

.sa-mobile-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.sa-mobile-brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--primary-color);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.sa-mobile-brand-text {
    display: grid;
    line-height: 1.1;
    min-width: 0;
}

.sa-mobile-brand-title {
    font-weight: 800;
    font-size: 14px;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sa-mobile-brand-subtitle {
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 1px;
    color: #6b7280;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sa-mobile-menu-btn {
    width: 44px;
    height: 44px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    color: #111827;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.sa-mobile-menu-btn:active {
    transform: translateY(1px);
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 1050;
}

.sidebar-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

body.sa-sidebar-open {
    overflow: hidden;
}

.sa-wa-float {
    position: fixed;
    right: calc(18px + env(safe-area-inset-right));
    bottom: calc(18px + env(safe-area-inset-bottom));
    width: 54px;
    height: 54px;
    border-radius: 999px;
    background: #25D366;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 14px 30px rgba(0,0,0,0.18);
    z-index: 1200;
}

.sa-wa-float i {
    font-size: 26px;
    line-height: 1;
}

.sa-wa-float:hover {
    color: #ffffff;
    filter: brightness(0.98);
}

.sa-wa-float:active {
    transform: translateY(1px);
}

#sidebar {
    width: 20%;
    height: 100vh;
    background: #ffffff;
    border-right: 1px solid #eaecf4;
    position: fixed;
    z-index: 1060;
    overflow-y: auto;
    overflow-x: hidden;
}

#sidebar .sidebar-header {
    padding: 40px 30px;
}

#sidebar ul.components {
    padding: 0 20px 40px 20px;
}

#sidebar ul li {
    margin-bottom: 8px;
}

#sidebar ul li a {
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 500;
    color: #6e707e;
    text-decoration: none;
    border-radius: 12px;
    transition: 0.2s;
    display: flex;
    align-items: center;
}

#sidebar ul li a i {
    margin-right: 15px;
    font-size: 1.25rem;
}

#sidebar ul li a:hover {
    background: #f8f9fc;
    color: var(--primary-color);
}

#sidebar ul li.active > a {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 12px rgba(78, 115, 223, 0.25);
}

#content.with-sidebar {
    width: 80%;
    margin-left: 20%;
    padding: 40px;
    min-height: 100vh;
}

#content.full-width {
    width: 100%;
    margin-left: 0;
    padding: 40px 0;
}

/* Force Containers behavior */
.container-fluid-custom {
    width: 100%;
    padding-left: 30px;
    padding-right: 30px;
}

/* Navbar Custom Styles */
.navbar {
    padding: 15px 0;
    background: #ffffff !important;
    border-bottom: 1px solid #eaecf4;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

/* Force Containers to 100% width */
.container, .container-lg, .container-md, .container-sm, .container-xl, .container-xxl {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 30px !important;
    padding-right: 30px !important;
}

.navbar-brand .brand-icon {
    background: var(--primary-color);
    padding: 8px;
    border-radius: 10px;
    margin-right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-link {
    font-weight: 600;
    color: #6e707e !important;
    padding: 10px 20px !important;
    border-radius: 10px;
    transition: 0.2s;
    display: flex;
    align-items: center;
    margin: 0 5px;
}

.nav-link i {
    margin-right: 8px;
    font-size: 1.1rem;
}

.nav-link:hover {
    background: #f8f9fc;
    color: var(--primary-color) !important;
}

.nav-item.active .nav-link {
    background: rgba(78, 115, 223, 0.1);
    color: var(--primary-color) !important;
}

.nav-link.text-danger:hover {
    background: rgba(231, 74, 59, 0.1);
}

/* Global Helpers */
.bg-success-soft { background-color: rgba(28, 200, 138, 0.1) !important; }
.bg-primary-soft { background-color: rgba(78, 115, 223, 0.1) !important; }
.bg-warning-soft { background-color: rgba(246, 194, 62, 0.1) !important; }
.bg-danger-soft { background-color: rgba(231, 74, 59, 0.1) !important; }

/* Animations */
.animate__animated { animation-duration: 1s; }
.animate__infinite { animation-iteration-count: infinite; }
.animate__pulse { animation-name: pulse; }
@keyframes pulse {
    from { transform: scale3d(1, 1, 1); }
    50% { transform: scale3d(1.05, 1.05, 1.05); }
    to { transform: scale3d(1, 1, 1); }
}

/* Cashier Specific */
.cashier-header {
    background: white;
    padding: 20px 40px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-card {
    border-radius: 15px;
    padding: 25px;
    border-left: 5px solid;
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.stat-card.primary { border-left-color: var(--primary-color); }
.stat-card.success { border-left-color: var(--success-color); }
.stat-card.warning { border-left-color: var(--warning-color); }

@media (max-width: 768px) {
    .container, .container-lg, .container-md, .container-sm, .container-xl, .container-xxl {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    .container-fluid-custom {
        padding-left: 14px;
        padding-right: 14px;
    }

    #sidebar {
        width: 280px;
        margin-left: -280px;
        box-shadow: 0 12px 30px rgba(0,0,0,0.12);
        transition: margin-left 0.4s ease;
        will-change: margin-left;
    }

    #sidebar.active {
        margin-left: 0;
    }

    #content.with-sidebar {
        width: 100%;
        margin-left: 0;
        padding: 72px 14px 14px;
        min-height: 100vh;
    }
}
