/* Nexora POS Original Custom Styles */
:root {
    /* Dark-blue / grey palette (updated per request) */
    --primary-color: #0b3d91; /* deep navy */
    --secondary-color: #334155; /* slate-grey */
    --accent-color: #f6f6f8; /* light blue accent */
    --primary-gradient: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    --success-gradient: linear-gradient(135deg, #57a1f1 0%, #6fb1ff 100%);
    --dark-bg: #1f2937; /* dark grey */
    --card-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f8f9fa;
    background-attachment: scroll;
    background-size: 100% 100%;
    background-position: center;
}

.header-top {
    background: var(--primary-gradient);
    color: white;
    padding: 15px 0;
    border-bottom: 3px solid var(--accent-color);
}
.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: white;
    text-decoration: none;
}
.header-brand div:first-child {
    color: rgb(96, 181, 188);
    font-size: 18px;
    font-weight: 700;
}
.header-brand img {
    height: 40px;
    width: auto;
}
.header-brand span {
    color: var(--accent-color);
    font-size: 14px;
    font-weight: 500;
}
.user-badge {
    background-color: var(--accent-color);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 10px;
}
.main-content {
    flex: 1;
    padding: 48px 0; /* Increased vertical spacing between header/nav and content */
}

/* Add consistent vertical rhythm between direct children of the main container */
.main-content .container > * + * {
    margin-top: 1.5rem; /* 24px */
}

.page-title {
    margin-bottom: 1rem;
}
.navbar-custom {
    background-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.navbar-custom .nav-link {
    color: rgba(255,255,255,0.85) !important;
    margin: 0 8px;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    padding: 8px 12px !important;
}
.navbar-custom .nav-link:hover {
    color: var(--accent-color) !important;
    border-bottom-color: var(--accent-color);
}
.navbar-custom .nav-link.active {
    color: var(--accent-color) !important;
    border-bottom-color: var(--accent-color);
}
footer {
    background: var(--primary-gradient);
    color: rgba(255,255,255,0.9);
    padding: 40px 0 20px;
    margin-top: 50px;
    border-top: 3px solid var(--accent-color);
}

footer .row {
    display: flex;
    flex-wrap: wrap;
}

footer .footer-section {
    flex: 1;
    min-width: 280px;
    display: flex;
    flex-direction: column;
}

footer .footer-section h6 {
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
footer .footer-section p,
footer .footer-section a {
    font-size: 13px;
    line-height: 1.8;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
}
footer .footer-section a:hover {
    color: var(--accent-color);
}
.footer-divider {
    border-top: 1px solid rgba(255,255,255,0.2);
    margin: 20px 0;
    padding-top: 20px;
}
.copyright {
    text-align: center;
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.alert {
    border-radius: 6px;
    border: none;
    padding: 15px 20px;
    margin-top: 20px;
}
@media (max-width: 768px) {
    .header-brand {
        font-size: 16px;
    }
    .header-brand img {
        height: 35px;
    }
    .user-badge {
        margin-left: 0;
        margin-top: 8px;
        display: inline-block;
    }
    footer {
        padding: 30px 15px;
    }
    footer .footer-section {
        margin-bottom: 25px;
        min-width: 100%;
    }
}
/* Nexora POS Custom Styles */

body {
    background-attachment: scroll;
    background-size: 100% 100%;
    background-position: center;
}

.navbar {
    background: var(--primary-gradient) !important;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-weight: 700;
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white !important;
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-toggler {
    border: none;
    background: rgba(255, 255, 255, 0.1);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    margin: 0 8px;
    padding: 8px 12px !important;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: white !important;
    transform: translateY(-2px);
}

/* Mobile navigation improvements */
@media (max-width: 991px) {
    .navbar-nav .nav-link {
        margin: 2px 0;
        text-align: center;
        border-radius: 4px;
    }
    .navbar-collapse {
        background: var(--primary-gradient);
        padding: 10px;
        border-radius: 8px;
        margin-top: 10px;
    }
    .dropdown-menu {
        background: var(--primary-gradient);
        border: none;
        margin-top: 5px;
    }
    .dropdown-item {
        color: rgba(255, 255, 255, 0.9) !important;
    }
    .dropdown-item:hover {
        background-color: rgba(255, 255, 255, 0.2);
        color: white !important;
    }
}

.main-container {
    padding: 40px 20px;
    min-height: calc(100vh - 70px);
    position: relative;
    z-index: 1;
}

/* Sidebar styles for logged-in users */
.sidebar {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(15,23,42,0.06);
}
.sidebar .nav-link {
    color: var(--secondary-color);
    padding: 8px 6px;
    border-radius: 6px;
}
.sidebar .nav-link:hover {
    background: rgba(102,126,234,0.06);
    color: var(--primary-color);
}

/* Mobile: show sidebar above content and make it full width */
@media (max-width: 767px) {
    aside.col-md-3.d-none.d-md-block {
        display: block !important;
        margin-bottom: 16px;
    }
    .sidebar {
        padding: 0;
    }
    .sidebar .nav-link {
        display: inline-block;
        width: auto;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .main-container {
        padding: 20px 15px;
    }
    .page-title {
        font-size: 24px;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    .navbar-brand {
        font-size: 20px;
    }
    .card {
        margin-bottom: 20px;
    }
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    .table-responsive {
        font-size: 14px;
    }
    .stat-card {
        text-align: center;
        padding: 15px;
    }
}

@media (max-width: 576px) {
    .main-container {
        padding: 15px 10px;
    }
    .page-title {
        font-size: 20px;
    }
    .display-4 {
        font-size: 28px;
    }
    .card-header {
        padding: 15px;
        font-size: 16px;
    }
    .btn {
        padding: 8px 16px;
        font-size: 14px;
    }
}

.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 20px;
    font-weight: 600;
}

.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 10px 20px;
    transition: all 0.3s ease;
    border: none;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    color: white;
}

.btn-success {
    background: var(--success-gradient);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(86, 171, 47, 0.4);
    color: white;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.stat-label {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
    opacity: 0.9;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
}

.table thead th {
    background: var(--primary-gradient);
    color: white;
    border: none;
    font-weight: 600;
    padding: 15px;
    text-transform: uppercase;
    font-size: 12px;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
}

.form-control, .form-select {
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    background-color: #f8f9ff;
}

/* Form responsive improvements */
@media (max-width: 768px) {
    .form-control, .form-select {
        padding: 8px 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    .form-group {
        margin-bottom: 15px;
    }
    .btn-group {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    .btn-group .btn {
        width: 100%;
    }
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.page-title i {
    color: #667eea;
    font-size: 36px;
}

.alert {
    border: none;
    border-radius: 8px;
    padding: 15px 20px;
    margin-top: 20px;
}

footer .copyright {
    background: rgba(0, 0, 0, 0.1);
    color: white;
    padding: 20px;
    text-align: center;
    margin-top: 20px;
}

footer a {
    color: var(--accent-color);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Footer divider */
.footer-divider {
    border-top: 1px solid rgba(255,255,255,0.2);
    margin: 20px 0;
}

.copyright {
    text-align: center;
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Home page navigation menu */
.home-nav-menu .nav-link {
    /* Light grey button with dark text for readability on blue header */
    background-color: #f1f5f9;
    color: #0f172a !important;
    border: 1px solid #cbd5e1;
    border-radius: 25px;
    padding: 8px 16px;
    margin: 6px 6px;
    transition: all 0.15s ease;
    font-weight: 600;
    display: inline-block;
    white-space: nowrap;
}

.home-nav-menu .nav-link:hover {
    background-color: #e6eefc;
    color: #07132b !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.home-nav-menu .navbar-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

.home-nav-menu .nav-item {
    flex: 0 0 auto;
}

@media (max-width: 768px) {
    .home-nav-menu .navbar-nav {
        flex-direction: column;
        align-items: stretch;
    }
    .home-nav-menu .nav-item {
        width: 100%;
        max-width: none;
        margin: 6px 0;
    }
    .home-nav-menu .nav-link {
        display: block;
        text-align: center;
        width: 100%;
    }
}
/* Beta Notice Sticky Top */
.beta-notice-sticky {
    background-color: #fff3cd;
    border-bottom: 2px solid #ffc107;
    padding: 12px 0;
    position: relative;
    z-index: 1029;
}

.beta-notice-sticky small {
    font-size: 13px !important;
    line-height: 1.4;
}

.beta-notice-sticky a {
    color: #0b3d91;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dotted #0b3d91;
}

.beta-notice-sticky a:hover {
    color: #062a5a;
    border-bottom: 1px solid #062a5a;
}

/* Module buttons - responsive grid layout */
.explore-modules {
    display: flex !important;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    align-items: stretch;
}

.explore-modules > div {
    display: flex;
    margin: 0.75rem;
}

.explore-modules .btn {
    font-size: 14px;
    line-height: 1.2;
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 10px 16px;
    margin-bottom: 0;
    width: 100%;
    border-radius: 8px;
}

.explore-modules .btn i {
    font-size: 16px;
    margin-right: 8px;
    min-width: 16px;
}

.explore-modules .btn div {
    display: flex;
    align-items: center;
}

/* Mobile and responsive adjustments */
@media (max-width: 768px) {
    .explore-modules .btn {
        font-size: 13px;
        padding: 10px 12px;
        min-height: 40px;
    }
    
    .explore-modules .btn i {
        font-size: 14px;
        margin-right: 6px;
    }
}

/* Ensure explore-modules columns display in grid */
.explore-modules [class*="col-"] {
    display: flex;
    flex-direction: column;
}

.beta-notice-sticky .btn-link {
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.beta-notice-sticky .btn-link:hover {
    opacity: 1;
}

/* Floating AI Chat Widget */
#ai-chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.chat-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-gradient);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.chat-button-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.8);
    pointer-events: none;
}

.chat-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

.chat-toggle-btn.active {
    background: var(--secondary-color);
}

.chat-box {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 320px;
    max-width: calc(100vw - 40px);
    height: 450px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    opacity: 0;
    visibility: hidden;
    z-index: 10000;
    transform: translateY(20px) scale(0.95);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.chat-box.active {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) scale(1);
}

.chat-header {
    background: var(--primary-gradient);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.chat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 10px;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.chat-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.chat-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #f8f9fa;
}

.message {
    margin-bottom: 12px;
    display: flex;
}

.message-content {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.bot-message .message-content {
    background-color: white;
    color: #333;
    border: 1px solid #e0e0e0;
}

.user-message {
    justify-content: flex-end;
}

.user-message .message-content {
    background: var(--primary-gradient);
    color: white;
}

.message-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
}

.message-icon {
    font-size: 12px;
    margin-top: 2px;
    opacity: 0.7;
}

.chat-input-area {
    padding: 15px;
    background: white;
    border-top: 1px solid #e0e0e0;
}

.chat-input-area .input-group .form-control {
    border-radius: 20px 0 0 20px;
    border-right: none;
    font-size: 14px;
}

.chat-input-area .input-group .btn {
    border-radius: 0 20px 20px 0;
    border-left: none;
    padding: 8px 15px;
}

.chat-input-area .input-group .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.chat-input-area .input-group .form-control:focus + .btn {
    border-color: #667eea;
}

/* Mobile responsive for chat widget */
@media (max-width: 768px) {
    #ai-chat-widget {
        bottom: 15px;
        right: 15px;
    }
    
    .chat-box {
        width: calc(100vw - 30px) !important;
        height: calc(100vh - 150px) !important;
        bottom: 80px !important;
        right: 15px !important;
        left: auto !important;
        transform: translateY(20px) scale(0.95) !important;
        display: flex !important;
        visibility: hidden !important;
        opacity: 0 !important;
        transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    }
    
    .chat-box.active {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        transform: translateY(0) scale(1) !important;
    }
    
    .chat-toggle-btn {
        width: 55px !important;
        height: 55px !important;
        font-size: 20px !important;
    }
}

/* General responsiveness improvements */
@media (max-width: 576px) {
    .header-top {
        padding: 10px 0;
    }
    .header-brand {
        font-size: 16px;
    }
    .header-brand img {
        height: 35px;
    }
    .main-content {
        padding: 20px 0;
    }
    .navbar-custom .nav-link {
        padding: 6px 8px !important;
        margin: 0 4px;
        font-size: 14px;
    }
    .sidebar {
        margin-bottom: 20px;
    }
    .footer-section {
        margin-bottom: 20px;
    }
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    .main-content {
        padding: 30px 0;
    }
    .navbar-custom .nav-link {
        font-size: 15px;
    }
}

@media (min-width: 769px) and (max-width: 992px) {
    .main-content .container > * + * {
        margin-top: 1.25rem;
    }
}

@media (min-width: 993px) {
    .main-content {
        padding: 60px 0;
    }
}

/* Adjust button sizes for better proportion */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 8px 16px; /* Reduced padding */
    transition: all 0.3s ease;
    border: none;
    font-size: 14px; /* Ensure consistent font size */
}

/* No duplicate explore-modules rules needed */