@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #6f4e37; /* Coffee */
    --primary-hover: #5d4037;
    --secondary-color: #f8f9fa;
    --text-dark: #2c3e50;
    --text-muted: #6c757d;
    --bg-light: #f4f6f9;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --card-hover-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: #1a1a1a;
}

/* Navbar */
.navbar {
    background-color: #ffffff !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.navbar-brand {
    color: var(--primary-color) !important;
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar .navbar-nav .nav-link {
    color: #555 !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    background-color: rgba(111, 78, 55, 0.1);
}

/* POS Tabs Customization */
#posTab .nav-link {
    color: #555;
    background-color: transparent;
    transition: all 0.2s ease;
}

#posTab .nav-link:hover {
    background-color: rgba(111, 78, 55, 0.05);
    color: var(--primary-color);
}

#posTab .nav-link.active {
    background-color: var(--primary-color) !important;
    color: #fff !important;
    box-shadow: 0 4px 6px rgba(111, 78, 55, 0.2);
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: #ffffff;
}

.card:hover {
    box-shadow: var(--card-hover-shadow);
}

.card-header {
    background-color: white;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    font-weight: 600;
    padding: 1.25rem 1.5rem;
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
}

/* Buttons */
.btn {
    border-radius: 8px;
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    transition: all 0.2s;
}

/* SweetAlert2 Mobile-Friendly Override - Global */
.swal2-popup {
    font-size: 0.8rem !important;
    width: 280px !important;
    padding: 1rem !important;
}
.swal2-title {
    font-size: 1.1rem !important;
    margin-bottom: 0.5rem !important;
}
.swal2-html-container {
    font-size: 0.9rem !important;
    margin: 0.5rem 0 !important;
}
.swal2-icon {
    width: 3em !important;
    height: 3em !important;
    margin: 1rem auto 0.5rem !important;
}
.swal2-icon .swal2-icon-content {
    font-size: 2em !important;
}
.swal2-actions {
    margin-top: 0.5rem !important;
    gap: 0.5rem !important;
}
.swal2-styled {
    padding: 0.4rem 1rem !important;
    font-size: 0.85rem !important;
}
@media (min-width: 768px) {
    .swal2-popup {
        width: 320px !important;
    }
}

/* Login Page Styles */
/* Split Layout */
body.login-page, 
body.login-page html { 
    height: 100%; 
    overflow: hidden; 
    font-family: 'Poppins', sans-serif; /* Keep specific font for login */
}

.login-container { height: 100vh; }

/* Left Side - Image */
.bg-image {
    background-image: url('../../images/products/69634f3117df9.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
}

.bg-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.9) 0%, rgba(111, 78, 55, 0.8) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem;
    color: white;
}

/* Right Side - Form */
.login-form-container {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    position: relative;
}

.login-form-wrap {
    width: 100%;
    max-width: 420px;
    padding: 2rem;
}

/* Modern Inputs */
.form-floating > .form-control {
    border: 2px solid #eee;
    border-radius: 12px;
    height: calc(3.5rem + 2px);
}

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

.form-floating > label {
    padding-left: 1rem;
    color: #999;
}

/* Button */
.btn-login {
    background: var(--primary-color);
    color: white;
    border-radius: 12px;
    padding: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-login:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(111, 78, 55, 0.2);
    color: white;
}

/* Decorative Elements */
.coffee-icon-wrapper {
    width: 150px;
    height: 150px;
    background: rgba(111, 78, 55, 0.1);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-size: 4rem;
    transform: rotate(-5deg);
}

.decorative-circle {
    position: absolute;
    border-radius: 50%;
    z-index: 0;
    opacity: 0.5;
}

.circle-1 {
    width: 300px; height: 300px;
    background: rgba(111, 78, 55, 0.05);
    top: -100px; right: -100px;
}

.circle-2 {
    width: 200px; height: 200px;
    background: rgba(44, 62, 80, 0.05);
    bottom: -50px; left: -50px;
}

/* Responsive */
@media (max-width: 768px) {
    .bg-image { display: none; }
    
    /* Lock viewport to prevent body scroll */
    body.login-page {
        position: fixed;
        width: 100%;
        height: 100%;
        overflow: hidden;
        touch-action: none; /* Disable touch scroll on body */
    }
    
    /* Ensure login form takes full height on mobile/tablet */
    .login-container, .login-form-container {
        height: 100%;
        width: 100%;
        overflow: hidden; /* Prevent internal scroll unless necessary */
    }
    
    .login-form-wrap {
        padding: 1.5rem;
        /* Center vertically on mobile */
        display: flex;
        flex-direction: column;
        justify-content: center;
        height: 100%;
        width: 100%;
        overflow-y: auto; /* Allow scrolling ONLY inside form if content is too long */
    }
    
    /* Reduce size of decorative elements on mobile */
    .coffee-icon-wrapper {
        width: 80px;
        height: 80px;
        font-size: 2rem;
        margin-bottom: 1rem;
        flex-shrink: 0; /* Prevent shrinking */
    }
    
    .circle-1 {
        width: 150px; height: 150px;
        top: -30px; right: -30px;
    }
    
    .circle-2 {
        width: 100px; height: 100px;
        bottom: -20px; left: -20px;
    }
}
