/* SB Admin 2 - TravelExpress Multi-Panel System */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i');

/* Variables */
:root {
    --primary: #4e73df;
    --primary-dark: #224abe;
    --success: #1cc88a;
    --info: #36b9cc;
    --warning: #f6c23e;
    --danger: #e74a3b;
    --secondary: #858796;
    --light: #f8f9fc;
    --dark: #5a5c69;
    --sidebar-width: 220px;
    --sidebar-collapsed-width: 60px;
    --sidebar-bg: #4e73df;
    --sidebar-hover: rgba(255, 255, 255, 0.1);
    --sidebar-active: rgba(255, 255, 255, 0.2);
}

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fc;
    color: #5a5c69;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    z-index: 1000;
}

/* Sidebar Brand */
.sidebar-brand {
    padding: 0.75rem 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    user-select: none;
    width: 100%;
    justify-content: center;
}

.brand-content:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.02);
}

.brand-icon {
    font-size: 1.75rem;
    color: white;
    transition: all 0.3s ease;
}

.brand-content:hover .brand-icon {
    transform: scale(1.1);
}

.brand-text-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.125rem;
}

.brand-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
}

.brand-version {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    transition: all 0.3s ease;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin: 0;
    padding: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.6rem 0.75rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 500;
    border-radius: 0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin: 0;
    width: 100%;
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: rgba(255, 255, 255, 0.1);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: white;
    background: var(--sidebar-hover);
    transform: translateX(4px);
}

.nav-link:hover::before {
    width: 4px;
}

.nav-link.active {
    color: white;
    background: var(--sidebar-active);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-link.active::before {
    width: 4px;
    background: #fff;
}

.nav-link i {
    font-size: 1.1rem;
    margin-right: 0.75rem;
    width: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.nav-text {
    flex: 1;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

/* Bootstrap Collapse Integration */
.collapse {
    margin: 0;
    padding: 0;
}

.collapse .nav-submenu {
    margin: 0;
    padding: 0;
    border-radius: 0;
    overflow: hidden;
}

/* Submenu */
.nav-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    border-left: 3px solid rgba(255, 255, 255, 0.2);
    max-height: none;
}

.nav-submenu li {
    margin: 0;
}

.nav-submenu .nav-link {
    padding: 0.5rem 0.75rem 0.5rem 2rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    border-radius: 0;
    margin: 0;
    border-left: none;
    transition: all 0.2s ease;
    width: 100%;
}

.nav-submenu .nav-link i {
    font-size: 0.9rem;
    margin-right: 0.5rem;
    width: 1.2rem;
}

.nav-submenu .nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(2px);
}

.nav-submenu .nav-link.active {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

/* User Profile Section */
.user-profile-section {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.user-avatar {
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.user-avatar i {
    font-size: 1.25rem;
    color: white;
}

.user-details {
    flex: 1;
}

.user-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.125rem;
}

.user-role {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.user-actions {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.user-actions .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    border-radius: 0;
    background: transparent;
    margin: 0;
    width: 100%;
}

.user-actions .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(2px);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    line-height: 1.4;
}

.copyright p {
    margin: 0;
    padding: 0;
}

/* Collapsed Sidebar */
.sidebar.collapsed {
    width: var(--sidebar-collapsed-width) !important;
    transition: width 0.3s ease;
}

.sidebar {
    transition: width 0.3s ease;
}

.sidebar.collapsed .brand-content {
    justify-content: center;
    gap: 0;
    width: 100%;
    padding: 0.75rem 0.5rem;
}

.sidebar.collapsed .brand-text-container {
    width: 0;
    margin-left: 0;
    max-width: 0;
    overflow: hidden;
}

.sidebar.collapsed .brand-text,
.sidebar.collapsed .brand-version {
    width: 0;
    margin-left: 0;
    max-width: 0;
    overflow: hidden;
}

.sidebar.collapsed .brand-icon {
    font-size: 1.75rem;
    margin: 0;
    color: white;
}

.sidebar.collapsed .nav-text {
    opacity: 0;
    visibility: hidden;
    width: 0;
    margin-left: 0;
    max-width: 0;
    overflow: hidden;
}

.sidebar.collapsed .nav-link {
    padding: 0.75rem 0.5rem;
    justify-content: center;
    margin: 0.25rem 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.sidebar.collapsed .nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.sidebar.collapsed .nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.sidebar.collapsed .nav-link i {
    margin-right: 0;
    font-size: 1.25rem;
}

.sidebar.collapsed .nav-arrow {
    display: none;
}

.sidebar.collapsed .user-details {
    opacity: 0;
    visibility: hidden;
    width: 0;
    margin-left: 0;
    max-width: 0;
    overflow: hidden;
}

.sidebar.collapsed .user-profile-section {
    padding: 0.75rem 0.5rem;
}

.sidebar.collapsed .user-info {
    flex-direction: column;
    text-align: center;
    margin-bottom: 0.75rem;
}

.sidebar.collapsed .user-avatar {
    margin: 0 auto 0.5rem;
    width: 2rem;
    height: 2rem;
}

.sidebar.collapsed .user-avatar i {
    font-size: 1rem;
}

.sidebar.collapsed .user-actions {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar.collapsed .user-actions .nav-link {
    padding: 0.5rem;
    justify-content: center;
    margin: 0;
    border-radius: 6px;
    font-size: 0.8rem;
}

.sidebar.collapsed .user-actions .nav-text {
    display: none;
}

.sidebar.collapsed .user-actions .nav-link i {
    margin-right: 0;
    font-size: 1rem;
}

.sidebar.collapsed .copyright {
    opacity: 0;
    visibility: hidden;
    width: 0;
    margin-left: 0;
    max-width: 0;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-footer {
    padding: 0.5rem;
}

/* Collapsed sidebar submenu */
.sidebar.collapsed .nav-submenu {
    position: fixed;
    left: var(--sidebar-collapsed-width);
    top: 0;
    width: 240px;
    background: var(--sidebar-bg);
    border-radius: 0 12px 12px 0;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    border-left: 3px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    margin-left: 0;
    display: block !important;
    pointer-events: none;
    overflow: visible;
    max-height: none;
}

.sidebar.collapsed .collapse {
    position: static;
    margin: 0;
    padding: 0;
}

.sidebar.collapsed .collapse .nav-submenu {
    position: fixed;
    left: var(--sidebar-collapsed-width);
    top: 0;
    width: 240px;
    background: var(--sidebar-bg);
    border-radius: 0 12px 12px 0;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    border-left: 3px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    margin-left: 0;
    display: block !important;
    pointer-events: none;
    overflow: visible;
    max-height: none;
}

.sidebar.collapsed .nav-item {
    position: relative;
    margin: 0;
    padding: 0;
}

.sidebar.collapsed .nav-item:hover .nav-submenu,
.sidebar.collapsed .nav-item:hover .collapse .nav-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    z-index: 1002;
    pointer-events: auto;
    margin-left: 0;
}

.sidebar.collapsed .nav-submenu .nav-link,
.sidebar.collapsed .collapse .nav-submenu .nav-link {
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
    border-radius: 0;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    border-left: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    pointer-events: auto;
    width: 100%;
}

.sidebar.collapsed .nav-submenu .nav-link:hover,
.sidebar.collapsed .collapse .nav-submenu .nav-link:hover {
    background: var(--sidebar-hover);
    color: white;
    transform: translateX(2px);
    padding-left: 1.25rem;
}

.sidebar.collapsed .nav-submenu .nav-link.active,
.sidebar.collapsed .collapse .nav-submenu .nav-link.active {
    color: white;
    background: var(--sidebar-active);
}

.sidebar.collapsed .nav-submenu .nav-link i,
.sidebar.collapsed .collapse .nav-submenu .nav-link i {
    font-size: 0.9rem;
    margin-right: 0.5rem;
    width: 1.2rem;
    transition: transform 0.2s ease;
}

.sidebar.collapsed .nav-submenu .nav-link:hover i,
.sidebar.collapsed .collapse .nav-submenu .nav-link:hover i {
    transform: scale(1.1);
}

/* Regular submenu styles */
.nav-submenu .nav-link {
    padding: 0.5rem 0.75rem 0.5rem 2rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    border-radius: 0;
    margin: 0;
    border-left: none;
    transition: all 0.2s ease;
    width: 100%;
}

.nav-submenu .nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(2px);
}

.nav-submenu .nav-link.active {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

/* Top Navigation Bar */
.top-navbar {
    background: white;
    border-bottom: 1px solid #e3e6f0;
    padding: 0.75rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1050;
    margin-bottom: 20px;
}

.top-navbar .btn-link {
    color: #5a5c69;
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.top-navbar .btn-link:hover {
    background-color: #f8f9fc;
    color: var(--primary);
}

/* Ensure dropdowns appear above sidebar */
.top-navbar .dropdown-menu {
    z-index: 1060;
}

.sidebar-toggle {
    font-size: 1.25rem;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
    z-index: 1001;
    position: relative;
}

.sidebar-toggle:hover {
    background-color: #f8f9fc;
    transform: scale(1.05);
}

.sidebar-toggle:active {
    transform: scale(0.95);
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: #f8f9fc;
    transition: margin-left 0.3s ease;
    overflow-x: hidden;
    padding: 0;
    margin-top: 0;
    margin-right: 0;
    margin-bottom: 0;
}

/* Ensure consistent spacing across all modules */
.main-content .container-fluid {
    padding: 0.1rem;
}

/* Add spacing between sidebar and main content */
.main-content {
    padding-left: 20px;
    padding-right: 20px;
}

.sidebar.collapsed + .main-content {
    margin-left: var(--sidebar-collapsed-width) !important;
}

.main-content.expanded {
    margin-left: var(--sidebar-collapsed-width) !important;
    transition: margin-left 0.3s ease;
}

.main-content {
    transition: margin-left 0.3s ease;
}

.page-content {
    padding: 0.1rem;
    transition: all 0.3s ease;
}

.page-header {
    margin-bottom: 0.15rem;
    padding: 0;
}

/* Consistent spacing for all modules */
.page-content .page-header {
    margin-bottom: 0.15rem;
}

/* Cards */
.card {
    background: white;
    border: 1px solid #e3e6f0;
    border-radius: 6px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.card-header {
    background: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
    padding: 0.5rem 0.75rem;
    border-radius: 6px 6px 0 0;
}

.card-header h6 {
    margin: 0;
    font-weight: 700;
    color: #5a5c69;
    font-size: 1.1rem;
}

.card-body {
    padding: 0.5rem;
}

.card-title {
    font-weight: 700;
    color: #5a5c69;
    margin-bottom: 0.75rem;
}

/* Dashboard Stats */
.dashboard-stats {
    background: white;
    border: 1px solid #e3e6f0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 1rem;
    margin-bottom: 0.75rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dashboard-stats:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.dashboard-stats::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.dashboard-stats.primary::before {
    background: linear-gradient(90deg, #4e73df, #224abe);
}

.dashboard-stats.success::before {
    background: linear-gradient(90deg, #1cc88a, #13855c);
}

/* Search and Filter Styles */
.search-filter-section {
    background: white;
    border: 1px solid #e3e6f0;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 0.25rem;
    overflow: hidden;
}

.search-filter-header {
    background: #f8f9fc;
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid #e3e6f0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.2s ease;
}

.search-filter-header:hover {
    background: #e9ecef;
}

.search-filter-header h6 {
    margin: 0;
    font-weight: 600;
    color: #5a5c69;
    font-size: 0.9rem;
}

.search-filter-toggle {
    color: #6c757d;
    transition: transform 0.2s ease;
    font-size: 0.9rem;
}

.search-filter-toggle.expanded {
    transform: rotate(180deg);
}

.search-filter-content {
    padding: 0.5rem;
    display: none;
}

.search-filter-content.show {
    display: block;
}

.search-filter-row {
    display: flex;
    gap: 1rem;
    align-items: end;
    flex-wrap: wrap;
}

.search-filter-group {
    flex: 1;
    min-width: 200px;
}

.search-filter-group label {
    font-weight: 600;
    color: #5a5c69;
    margin-bottom: 0.5rem;
    display: block;
    font-size: 0.9rem;
}

.search-filter-group .form-control,
.search-filter-group .form-select {
    border: 1px solid #d1d3e2;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.search-filter-group .form-control:focus,
.search-filter-group .form-select:focus {
    border-color: #4e73df;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

.search-filter-actions {
    display: flex;
    gap: 0.5rem;
    align-items: end;
}

.search-filter-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.search-filter-actions .btn-primary {
    background: #4e73df;
    border-color: #4e73df;
}

.search-filter-actions .btn-primary:hover {
    background: #224abe;
    border-color: #224abe;
}

.search-filter-actions .btn-secondary {
    background: #858796;
    border-color: #858796;
}

.search-filter-actions .btn-secondary:hover {
    background: #6e707e;
    border-color: #6e707e;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .search-filter-row {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .search-filter-group {
        min-width: 100%;
    }
    
    .search-filter-actions {
        width: 100%;
        justify-content: stretch;
    }
    
    .search-filter-actions .btn {
        flex: 1;
    }
}

/* Consistent spacing for all modules */
.container-fluid {
    padding-left: 0.1rem;
    padding-right: 0.1rem;
}

.row {
    margin-left: 0;
    margin-right: 0;
}

.col, .col-md, .col-lg, .col-xl {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

/* Reduce table spacing */
.table {
    margin-bottom: 0.5rem;
}

.table th, .table td {
    padding: 0.5rem 0.75rem;
    vertical-align: middle;
}

/* Reduce form spacing */
.form-group {
    margin-bottom: 0.75rem;
}

.form-label {
    margin-bottom: 0.25rem;
}

/* Reduce button spacing */
.btn-group .btn {
    margin-right: 0.25rem;
}

.btn-group .btn:last-child {
    margin-right: 0;
}

/* Reduce alert spacing */
.alert {
    margin-bottom: 0.75rem;
    padding: 0.75rem;
}

/* Reduce modal spacing */
.modal-header {
    padding: 0.75rem 1rem;
}

.modal-body {
    padding: 0.75rem;
}

.modal-footer {
    padding: 0.75rem 1rem;
}

.dashboard-stats.info::before {
    background: linear-gradient(90deg, #36b9cc, #258391);
}

.dashboard-stats.warning::before {
    background: linear-gradient(90deg, #f6c23e, #dda20a);
}

.dashboard-stats.danger::before {
    background: linear-gradient(90deg, #e74a3b, #be2617);
}

.dashboard-stats .stat-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.dashboard-stats.primary .stat-icon {
    color: #4e73df;
}

.dashboard-stats.success .stat-icon {
    color: #1cc88a;
}

.dashboard-stats.info .stat-icon {
    color: #36b9cc;
}

.dashboard-stats.warning .stat-icon {
    color: #f6c23e;
}

.dashboard-stats.danger .stat-icon {
    color: #e74a3b;
}

.dashboard-stats .stat-number {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.dashboard-stats.primary .stat-number {
    color: #4e73df;
}

.dashboard-stats.success .stat-number {
    color: #1cc88a;
}

.dashboard-stats.info .stat-number {
    color: #36b9cc;
}

.dashboard-stats.warning .stat-number {
    color: #f6c23e;
}

.dashboard-stats.danger .stat-number {
    color: #e74a3b;
}

.dashboard-stats .stat-label {
    color: #858796;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table th {
    background: #f8f9fc;
    border-top: none;
    font-weight: 700;
    color: #5a5c69;
    padding: 1.25rem 1rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
}

.table td {
    padding: 1.25rem 1rem;
    vertical-align: middle;
    border-color: #e3e6f0;
}

.table-hover tbody tr:hover {
    background: #f8f9fc;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #4e73df;
    border-color: #4e73df;
    color: white;
}

.btn-primary:hover {
    background: #2e59d9;
    border-color: #2653d4;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(78, 115, 223, 0.3);
}

.btn-success {
    background: #1cc88a;
    border-color: #1cc88a;
    color: white;
}

.btn-success:hover {
    background: #17a673;
    border-color: #169b6b;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(28, 200, 138, 0.3);
}

.btn-info {
    background: #36b9cc;
    border-color: #36b9cc;
    color: white;
}

.btn-info:hover {
    background: #2c9faf;
    border-color: #2a96a5;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(54, 185, 204, 0.3);
}

.btn-warning {
    background: #f6c23e;
    border-color: #f6c23e;
    color: white;
}

.btn-warning:hover {
    background: #f4b30d;
    border-color: #f4b009;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(246, 194, 62, 0.3);
}

.btn-danger {
    background: #e74a3b;
    border-color: #e74a3b;
    color: white;
}

.btn-danger:hover {
    background: #e02e1e;
    border-color: #d52a1a;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231, 74, 59, 0.3);
}

.btn-outline-primary {
    color: #4e73df;
    border-color: #4e73df;
}

.btn-outline-primary:hover {
    background: #4e73df;
    border-color: #4e73df;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(78, 115, 223, 0.3);
}

/* Badges */
.badge {
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
}

.badge-primary {
    background: #4e73df;
    color: white;
}

.badge-success {
    background: #1cc88a;
    color: white;
}

.badge-info {
    background: #36b9cc;
    color: white;
}

.badge-warning {
    background: #f6c23e;
    color: white;
}

.badge-danger {
    background: #e74a3b;
    color: white;
}

/* Forms */
.form-control {
    border: 1px solid #d1d3e2;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: #bac8f3;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

.form-label {
    font-weight: 700;
    color: #5a5c69;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 0.875rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    width: 100%;
    max-width: 400px;
}

.login-header {
    background: #4e73df;
    color: white;
    padding: 2rem;
    text-align: center;
}

.login-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.login-body {
    padding: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar.collapsed + .main-content {
        margin-left: 0;
    }
    
    .page-content {
        padding: 1rem;
    }
    
    .dashboard-stats {
        margin-bottom: 1rem;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    .stat-icon {
        font-size: 2rem;
    }
    
    /* Hide hover submenus on mobile */
    .sidebar.collapsed .nav-submenu {
        display: none !important;
    }
    
    /* Show mobile toggle button */
    .sidebar-toggle-mobile {
        display: flex !important;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Print Styles */
@media print {
    .sidebar, .btn, .no-print {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Global Floating Chat Styles */
.floating-chat {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 1050;
    display: none;
    flex-direction: column;
    border: 1px solid #dee2e6;
}

.floating-chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.floating-chat-controls {
    display: flex;
    gap: 0.5rem;
}

.floating-chat-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

.floating-messages {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 1rem;
    max-height: 350px;
}

.floating-message {
    margin-bottom: 0.75rem;
}

.floating-message-content {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    background: #f8f9fa;
    padding: 0.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

.floating-message.user-message .floating-message-content {
    background: #e3f2fd;
    justify-content: flex-end;
}

.floating-input {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.floating-input .form-control {
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.floating-input .btn {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-chat-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    z-index: 1040;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.floating-chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Typing Animation */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6c757d;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Floating Chat Sales Cards */
.floating-sales-cards {
    margin-top: 0.5rem;
}

.floating-sale-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    overflow: hidden;
    font-size: 0.85rem;
}

.floating-sale-card.compact {
    margin-bottom: 0.25rem;
}

.floating-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.floating-sale-number {
    font-weight: 600;
    font-size: 0.9rem;
}

.floating-status-group {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.floating-status-badge, .floating-payment-badge {
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
}

.floating-status-completed {
    background: #28a745;
    color: white;
}

.floating-status-authorized {
    background: #17a2b8;
    color: white;
}

.floating-status-created {
    background: #ffc107;
    color: #212529;
}

.floating-status-pending {
    background: #6c757d;
    color: white;
}

.floating-status-default {
    background: #e9ecef;
    color: #6c757d;
}

.floating-payment-paid {
    background: #28a745;
    color: white;
}

.floating-payment-pending {
    background: #ffc107;
    color: #212529;
}

.floating-payment-partial {
    background: #fd7e14;
    color: white;
}

.floating-payment-default {
    background: #e9ecef;
    color: #6c757d;
}

.floating-card-body {
    padding: 0.5rem;
}

.floating-info-group {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.floating-label {
    color: #6c757d;
    font-weight: 500;
}

.floating-value {
    color: #495057;
    font-weight: 600;
}

.floating-customer, .floating-service, .floating-amount, .floating-payment {
    margin-bottom: 0.25rem;
    font-size: 0.8rem;
}

.floating-stats-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.5rem;
    margin-top: 0.5rem;
}

.floating-stats-header {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    text-align: center;
}

.floating-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.floating-stat-item {
    text-align: center;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.floating-stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #495057;
    margin-bottom: 0.1rem;
}

.floating-stat-label {
    font-size: 0.7rem;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: 500;
}

/* Mobile responsive for floating chat */
@media (max-width: 768px) {
    .floating-chat {
        width: calc(100vw - 40px);
        height: 60vh;
        bottom: 10px;
        right: 20px;
    }
    
    .floating-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Risk Assessment Modal Styles */
/* Main Risk Summary Card Header (colored background) */
.risk-assessment-modal .card.border-success .card-header h6,
.risk-assessment-modal .card.border-info .card-header h6,
.risk-assessment-modal .card.border-warning .card-header h6,
.risk-assessment-modal .card.border-danger .card-header h6 {
    color: white !important;
}

.risk-assessment-modal .card.border-success .card-header i,
.risk-assessment-modal .card.border-info .card-header i,
.risk-assessment-modal .card.border-warning .card-header i,
.risk-assessment-modal .card.border-danger .card-header i {
    color: white !important;
}

/* Content Section Card Headers (light background) */
.risk-assessment-modal .card:not(.border-success):not(.border-info):not(.border-warning):not(.border-danger) .card-header {
    background-color: #f8f9fc !important;
    border-bottom: 1px solid #e3e6f0 !important;
}

.risk-assessment-modal .card:not(.border-success):not(.border-info):not(.border-warning):not(.border-danger) .card-header h6 {
    color: #5a5c69 !important;
    font-weight: 600 !important;
}

.risk-assessment-modal .card:not(.border-success):not(.border-info):not(.border-warning):not(.border-danger) .card-header i {
    color: #5a5c69 !important;
}

/* Risk Highlighting Styles */
.risk-high-row {
    background-color: #fef2f2 !important;
    border-left: 4px solid #dc2626 !important;
}

.risk-medium-row {
    background-color: #fffbeb !important;
    border-left: 4px solid #f59e0b !important;
}

.risk-check-btn {
    transition: all 0.3s ease;
    position: relative;
}

.risk-check-btn.risk-high {
    background-color: #dc2626 !important;
    border-color: #dc2626 !important;
    color: white !important;
    box-shadow: 0 4px 6px -1px rgba(220, 38, 38, 0.3);
}

.risk-check-btn.risk-high:hover {
    background-color: #b91c1c !important;
    border-color: #b91c1c !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 8px -1px rgba(220, 38, 38, 0.4);
}

.risk-check-btn.risk-medium {
    background-color: #f59e0b !important;
    border-color: #f59e0b !important;
    color: white !important;
    box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.3);
}

.risk-check-btn.risk-medium:hover {
    background-color: #d97706 !important;
    border-color: #d97706 !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 8px -1px rgba(245, 158, 11, 0.4);
}

.risk-check-btn.risk-low {
    background-color: #059669 !important;
    border-color: #059669 !important;
    color: white !important;
    box-shadow: 0 4px 6px -1px rgba(5, 150, 105, 0.3);
}

.risk-check-btn.risk-low:hover {
    background-color: #047857 !important;
    border-color: #047857 !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 8px -1px rgba(5, 150, 105, 0.4);
}

.risk-indicator {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 2px solid white;
}

.risk-indicator.risk-high {
    background-color: #dc2626;
}

.risk-indicator.risk-medium {
    background-color: #f59e0b;
}

.risk-indicator.risk-low {
    background-color: #059669;
} 